<commit_before>﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
                    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
                    xmlns:Actions="clr-namespace:MahApps.Metro.Actions">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <DataTemplate x:Key="HeaderTemplate"
                  x:Shared="False">
        <DockPanel x:Name="dpHeader"
                   Margin="10,25,10,10"
                   VerticalAlignment="Center"
                   LastChildFill="True">
            <Button x:Name="nav"
                    Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type Controls:Flyout}}, Path=CloseCommand, Mode=OneWay}"
                    DockPanel.Dock="Left"
                    Style="{DynamicResource MetroCircleButtonStyle}"
                    Height="40"
                    Width="40"
                    FontFamily="Segoe UI Symbol"
                    Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type Controls:Flyout}}, Path=Foreground}"
                    FontSize="16"
                    VerticalAlignment="Bottom">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Click">
                        <Actions:SetFlyoutOpenAction TargetObject="{Binding RelativeSource={RelativeSource AncestorType={x:Type Controls:Flyout}}}"
                                                     Value="False" />
                    </i:EventTrigger>
                </i:Interaction.Triggers>
                <Rectangle Width="20"
                           Height="15"
                           Fill="{Binding RelativeSource={RelativeSource AncestorType={x:Type Controls:Flyout}}, Path=Foreground}">
                    <Rectangle.OpacityMask>
                        <VisualBrush Stretch="Fill">
                            <VisualBrush.Visual>
                                <Canvas Width="48"
                                        Height="48"
                                        Clip="F1 M 0,0L 48,0L 48,48L 0,48L 0,0"
                                        UseLayoutRounding="False">
                                    <Path Width="25"
                                          Height="18"
                                          Canvas.Left="12"
                                          Canvas.Top="15"
                                          Stretch="Fill"
                                          Fill="Black"
                                          Data="F1 M 12,22L 12,26L 28.25,26L 21,33L 27.5,33L 37,24L 27.5,15L 21,15L 28.25,22L 12,22 Z " />
                                </Canvas>
                            </VisualBrush.Visual>
                        </VisualBrush>
                    </Rectangle.OpacityMask>
                </Rectangle>
            </Button>
            <TextBlock Text="{Binding}"
                       x:Name="PART_BackButton"
                       FontSize="20"
                       Margin="15,0,0,0"
                       VerticalAlignment="Center" />
        </DockPanel>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding Position, RelativeSource={RelativeSource AncestorType={x:Type Controls:Flyout}}}"
                         Value="Left">
                <Setter TargetName="nav"
                        Property="DockPanel.Dock"
                        Value="Right" />
                <Setter TargetName="PART_BackButton"
                        Property="TextAlignment"
                        Value="Right" />
                <Setter TargetName="PART_BackButton"
                        Property="Margin"
                        Value="0,0,15,0" />
                <Setter TargetName="nav"
                        Property="LayoutTransform">
                    <Setter.Value>
                        <ScaleTransform ScaleX="-1" />
                    </Setter.Value>
                </Setter>
            </DataTrigger>
            <DataTrigger Binding="{Binding Position, RelativeSource={RelativeSource AncestorType={x:Type Controls:Flyout}}}"
                         Value="Top">
                <Setter TargetName="dpHeader"
                        Property="Margin"
                        Value="10" />
                <Setter TargetName="nav"
                        Property="LayoutTransform">
                    <Setter.Value>
                        <RotateTransform Angle="-90" />
                    </Setter.Value>
                </Setter>
            </DataTrigger>
            <DataTrigger Binding="{Binding Position, RelativeSource={RelativeSource AncestorType={x:Type Controls:Flyout}}}"
                         Value="Bottom">
                <Setter TargetName="dpHeader"
                        Property="Margin"
                        Value="10" />
                <Setter TargetName="nav"
                        Property="LayoutTransform">
                    <Setter.Value>
                        <RotateTransform Angle="90" />
                    </Setter.Value>
                </Setter>
            </DataTrigger>
        </DataTemplate.Triggers>
    </DataTemplate>

    <ControlTemplate x:Key="FlyoutTemplate"
                     TargetType="{x:Type Controls:Flyout}">
        <Grid x:Name="root"
              Margin="{TemplateBinding Margin}"
              Background="{TemplateBinding Background}">
            <Grid.RenderTransform>
                <TranslateTransform />
            </Grid.RenderTransform>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup>
                    <VisualState x:Name="Default" />
                    <VisualState x:Name="Hide">
                        <Storyboard x:Name="HideStoryboard">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)"
                                                           Storyboard.TargetName="root">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.750"
                                                      KeySpline="0.25,1,0.05,1"
                                                      Value="0"
                                                      x:Name="hideFrame">
                                </SplineDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)"
                                                           Storyboard.TargetName="root">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.750"
                                                      KeySpline="0.25,1,0.05,1"
                                                      Value="0"
                                                      x:Name="hideFrameY">
                                </SplineDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Show">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)"
                                                           Storyboard.TargetName="root">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.750"
                                                      KeySpline="0.25,1,0.05,1"
                                                      Value="0"
                                                      x:Name="showFrame">
                                </SplineDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)"
                                                           Storyboard.TargetName="root">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.750"
                                                      KeySpline="0.25,1,0.05,1"
                                                      Value="0"
                                                      x:Name="showFrameY">
                                </SplineDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <DockPanel>
                <ContentPresenter x:Name="PART_Header"
                                  DockPanel.Dock="Top"
                                  ContentSource="Header"
                                  ContentTemplate="{TemplateBinding HeaderTemplate}" />
                <ContentPresenter x:Name="PART_Content"
                                  DockPanel.Dock="Bottom">
                </ContentPresenter><commit_msg>Added the Opacity animation<commit_after><ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
                    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
                    xmlns:Actions="clr-namespace:MahApps.Metro.Actions">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <DataTemplate x:Key="HeaderTemplate"
                  x:Shared="False">
        <DockPanel x:Name="dpHeader"
                   Margin="10,25,10,10"
                   VerticalAlignment="Center"
                   LastChildFill="True">
            <Button x:Name="nav"
                    Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type Controls:Flyout}}, Path=CloseCommand, Mode=OneWay}"
                    DockPanel.Dock="Left"
                    Style="{DynamicResource MetroCircleButtonStyle}"
                    Height="40"
                    Width="40"
                    FontFamily="Segoe UI Symbol"
                    Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type Controls:Flyout}}, Path=Foreground}"
                    FontSize="16"
                    VerticalAlignment="Bottom">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Click">
                        <Actions:SetFlyoutOpenAction TargetObject="{Binding RelativeSource={RelativeSource AncestorType={x:Type Controls:Flyout}}}"
                                                     Value="False" />
                    </i:EventTrigger>
                </i:Interaction.Triggers>
                <Rectangle Width="20"
                           Height="15"
                           Fill="{Binding RelativeSource={RelativeSource AncestorType={x:Type Controls:Flyout}}, Path=Foreground}">
                    <Rectangle.OpacityMask>
                        <VisualBrush Stretch="Fill">
                            <VisualBrush.Visual>
                                <Canvas Width="48"
                                        Height="48"
                                        Clip="F1 M 0,0L 48,0L 48,48L 0,48L 0,0"
                                        UseLayoutRounding="False">
                                    <Path Width="25"
                                          Height="18"
                                          Canvas.Left="12"
                                          Canvas.Top="15"
                                          Stretch="Fill"
                                          Fill="Black"
                                          Data="F1 M 12,22L 12,26L 28.25,26L 21,33L 27.5,33L 37,24L 27.5,15L 21,15L 28.25,22L 12,22 Z " />
                                </Canvas>
                            </VisualBrush.Visual>
                        </VisualBrush>
                    </Rectangle.OpacityMask>
                </Rectangle>
            </Button>
            <TextBlock Text="{Binding}"
                       x:Name="PART_BackButton"
                       FontSize="20"
                       Margin="15,0,0,0"
                       VerticalAlignment="Center" />
        </DockPanel>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding Position, RelativeSource={RelativeSource AncestorType={x:Type Controls:Flyout}}}"
                         Value="Left">
                <Setter TargetName="nav"
                        Property="DockPanel.Dock"
                        Value="Right" />
                <Setter TargetName="PART_BackButton"
                        Property="TextAlignment"
                        Value="Right" />
                <Setter TargetName="PART_BackButton"
                        Property="Margin"
                        Value="0,0,15,0" />
                <Setter TargetName="nav"
                        Property="LayoutTransform">
                    <Setter.Value>
                        <ScaleTransform ScaleX="-1" />
                    </Setter.Value>
                </Setter>
            </DataTrigger>
            <DataTrigger Binding="{Binding Position, RelativeSource={RelativeSource AncestorType={x:Type Controls:Flyout}}}"
                         Value="Top">
                <Setter TargetName="dpHeader"
                        Property="Margin"
                        Value="10" />
                <Setter TargetName="nav"
                        Property="LayoutTransform">
                    <Setter.Value>
                        <RotateTransform Angle="-90" />
                    </Setter.Value>
                </Setter>
            </DataTrigger>
            <DataTrigger Binding="{Binding Position, RelativeSource={RelativeSource AncestorType={x:Type Controls:Flyout}}}"
                         Value="Bottom">
                <Setter TargetName="dpHeader"
                        Property="Margin"
                        Value="10" />
                <Setter TargetName="nav"
                        Property="LayoutTransform">
                    <Setter.Value>
                        <RotateTransform Angle="90" />
                    </Setter.Value>
                </Setter>
            </DataTrigger>
        </DataTemplate.Triggers>
    </DataTemplate>

    <ControlTemplate x:Key="FlyoutTemplate"
                     TargetType="{x:Type Controls:Flyout}">
        <Grid x:Name="root"
              Margin="{TemplateBinding Margin}"
              Background="{TemplateBinding Background}">
            <Grid.RenderTransform>
                <TranslateTransform />
            </Grid.RenderTransform>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup>
                    <VisualState x:Name="Default" />
                    <VisualState x:Name="Hide">
                        <Storyboard x:Name="HideStoryboard">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)"
                                                           Storyboard.TargetName="root">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.750"
                                                      KeySpline="0.25,1,0.05,1"
                                                      Value="0"
                                                      x:Name="hideFrame">
                                </SplineDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)"
                                                           Storyboard.TargetName="root">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.750"
                                                      KeySpline="0.25,1,0.05,1"
                                                      Value="0"
                                                      x:Name="hideFrameY">
                                </SplineDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)"
                                                           Storyboard.TargetName="root">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.750"
                                                      KeySpline="0.25,1,0.05,1"
                                                      Value="1"
                                                      x:Name="fadeOutFrame"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Show">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)"
                                                           Storyboard.TargetName="root">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.750"
                                                      KeySpline="0.25,1,0.05,1"
                                                      Value="0"
                                                      x:Name="showFrame">
                                </SplineDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)"
                                                           Storyboard.TargetName="root">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.750"
                                                      KeySpline="0.25,1,0.05,1"
                                                      Value="0"
                                                      x:Name="showFrameY">
                                </SplineDoubleKeyFrame>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)"
                                                           Storyboard.TargetName="root">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.750"
                                                      KeySpline="0.25,1,0.05,1"
                                                      Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <DockPanel>
                <ContentPresenter x:Name="PART_Header"
                                  DockPanel.Dock="Top"
                                  ContentSource="Header"
                                  ContentTemplate="{TemplateBinding HeaderTemplate}" />
                <ContentPresenter x:Name="PART_Content"
                                  DockPanel.Dock="Bottom">
                </ContentPresenter>
{'fraction_non_alphanumeric': 0.09100616415085182, 'fraction_numerical': 0.023782944231422607, 'mean_word_length': 1.0044751434964492, 'pattern_counts': {'":': 0, '<': 195, '<?xml version=': 0, '>': 195, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 142, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2864050', 'n_tokens_mistral': 4750, 'n_tokens_neox': 4086, 'n_words': 549}