<commit_before><!--Layout for desktop browsers-->
<mat-list-item *ngIf="!(isMobile | async); else mobileLayout"
               [ngClass]="{'even': even, 'auto-height':true, 'compact':settings.compactLists,
               'done-row': item.done >= item.amount, 'craftable-row': canBeCrafted, 'has-all-ingredients-row': hasAllIngredients}">
    <div class="item-col-left">
        <div matListAvatar [ngClass]="{'icon':true, 'compact': settings.compactLists}"
             [appXivdbTooltip]="item.id" [appXivdbTooltipDisabled]="isDraft()">
            <a matListAvatar disabled="isDraft()" href="{{item.id | itemLink | i18n}}" target="_blank">
                <img matListAvatar src="{{item.icon | icon}}" alt="{{item.id | itemName | i18n}}">
            </a>
            <span class="yield" *ngIf="item.yield > 1">x{{item.yield}}</span>
        </div>
        <div class="item-name" matLine matTooltipPosition="above"
             matTooltip="{{'Copy_item_name_to_clipboard' | translate}}"
             mat-icon-button ngxClipboard [cbContent]="item.id | itemName | i18n"
             (cbOnSuccess)="afterNameCopy(item.id)">
            <span
                [ngClass]="{'compact': settings.compactLists}">
                {{item.id | itemName | i18n}}
            </span>
        </div>
        <img src="./assets/icons/HQ.png" alt=""
             matTooltip="{{'Required_for_final_craft' | translate: { amount: requiredForFinalCraft } }}"
             matTooltipPosition="above" *ngIf="requiredForFinalCraft>0 && !recipe">

        <button matTooltipPosition="above"
                matTooltip="{{'Copy_isearch' | translate}}"
                mat-icon-button ngxClipboard cbContent="/isearch &quot;{{item.id | itemName | i18n}}&quot;"
                (cbOnSuccess)="afterNameCopy(item.id)">
            <mat-icon>search</mat-icon>
        </button>

        <app-comments-button [name]="item.id | itemName | i18n"
                             [row]="item"
                             [list]="list"
                             [isOwnList]="user?.$key === list?.authorId"
                             (updated)="update.emit()"></app-comments-button>
        <button mat-icon-button
                matTooltip="{{'Requirements_for_craft' | translate}}"
                matTooltipPosition="above" [ngClass]="{'requirements-button':true, 'compact': settings.compactLists}"
                (click)="openRequirementsPopup()">
            <mat-icon color="accent">assignment</mat-icon>
        </button>
        <button mat-icon-button *ngIf="!hasBook" routerLink="/profile">
            <mat-icon matTooltip="{{'LIST_DETAILS.No_book' | translate}}" matTooltipPosition="above"
                      color="warn">
                warning
            </mat-icon>
        </button>
        <div *ngIf="item.workingOnIt && getAmount() > (item.done | ceil)">
            <div *ngIf="worksOnIt as character" class="working-on-it">
                <img src="{{character.avatar}}" alt=""
                     matTooltip="{{'Is_working_on_it' | translate:{name: character.name} }}"
                     matTooltipPosition="above" class="avatar" routerLink="/profile/{{item.workingOnIt}}">
                <button mat-icon-button color="warn" *ngIf="item.workingOnIt === user.$key"
                        (click)="removeWorkingOnIt()">
                    <mat-icon>clear</mat-icon>
                </button>
            </div>
        </div>
        <div
            *ngIf="!item.workingOnIt && !user?.anonymous && getAmount() > (item.done | ceil) && permissions?.participate">
            <button mat-icon-button matTooltip="{{'Work_on_it' | translate}}"
                    matTooltipPosition="above"
                    [ngClass]="{'requirements-button':true, 'compact': settings.compactLists}"
                    (click)="workOnIt()">
                <mat-icon color="accent">work</mat-icon>
            </button>
        </div>
        <div *ngIf="teamLeader$ | async as leader">
            <div *ngIf="teamMembers$ | async as teamMembers">
                <mat-menu #teamMembersMenu="matMenu">
                    <button mat-menu-item *ngFor="let member of teamMembers" (click)="assign(member.user.$key)">
                        {{member.name}}
                    </button>
                </mat-menu>
                <div *ngIf="!item.workingOnIt && !user?.anonymous
                && getAmount() > (item.done | ceil) && leader">
                    <button mat-icon-button matTooltip="{{'TEAMS.Assign_item' | translate}}"
                            matTooltipPosition="above"
                            [ngClass]="{'requirements-button':true, 'compact': settings.compactLists}"
                            [matMenuTriggerFor]="teamMembersMenu">
                        <mat-icon color="accent">assignment_ind</mat-icon>
                    </button>
                </div>
            </div>
        </div>
    </div>

    <div *ngIf="hasTimers" class="timers-container">
        <div [ngClass]="{'timer':true, 'compact': settings.compactLists}"
             *ngFor="let timer of timers | async; trackBy: trackByTimers">
            <mat-menu #addAlarmMenu="matMenu">
                <button (click)="addAlarm(timer.itemId, timer.type, group.name)" mat-menu-item
                        *ngFor="let group of user?.alarmGroups">{{group.name}}
                </button>
            </mat-menu>
            <button mat-raised-button
                    *ngIf="!hasAlarm[timer.itemId]"
                    [matMenuTriggerFor]="addAlarmMenu"
                    [color]="getTimerColor(timer.alarm) | async"
                    matTooltip="{{timer?.zoneId | placeName | i18n}} - {{timer?.areaId | placeName | i18n}}"
                    matTooltipPosition="above">
                <mat-icon>alarm_add</mat-icon>
                {{timer?.display}} <span *ngIf="timer?.slot as slot">({{slot}})</span>
                <img src="{{getTimerIcon(timer.type)}}" alt="" class="type-icon" *ngIf="timer.type > -1">
            </button>

            <button mat-raised-button
                    *ngIf="hasAlarm[timer.itemId]"
                    (click)="removeAlarm(timer.itemId)"
                    [color]="getTimerColor(timer.alarm) | async"
                    matTooltip="{{timer?.zoneId | placeName | i18n}} - {{timer?.areaId | placeName | i18n}}"
                    matTooltipPosition="above">
                <mat-icon>alarm_on</mat-icon>
                {{timer?.display}} <span *ngIf="timer?.slot as slot">({{slot}})</span><commit_msg>feat: right clicking on a timer button now creates an alarm in default group without opening menu<commit_after><!--Layout for desktop browsers-->
<mat-list-item *ngIf="!(isMobile | async); else mobileLayout"
               [ngClass]="{'even': even, 'auto-height':true, 'compact':settings.compactLists,
               'done-row': item.done >= item.amount, 'craftable-row': canBeCrafted, 'has-all-ingredients-row': hasAllIngredients}">
    <div class="item-col-left">
        <div matListAvatar [ngClass]="{'icon':true, 'compact': settings.compactLists}"
             [appXivdbTooltip]="item.id" [appXivdbTooltipDisabled]="isDraft()">
            <a matListAvatar disabled="isDraft()" href="{{item.id | itemLink | i18n}}" target="_blank">
                <img matListAvatar src="{{item.icon | icon}}" alt="{{item.id | itemName | i18n}}">
            </a>
            <span class="yield" *ngIf="item.yield > 1">x{{item.yield}}</span>
        </div>
        <div class="item-name" matLine matTooltipPosition="above"
             matTooltip="{{'Copy_item_name_to_clipboard' | translate}}"
             mat-icon-button ngxClipboard [cbContent]="item.id | itemName | i18n"
             (cbOnSuccess)="afterNameCopy(item.id)">
            <span
                [ngClass]="{'compact': settings.compactLists}">
                {{item.id | itemName | i18n}}
            </span>
        </div>
        <img src="./assets/icons/HQ.png" alt=""
             matTooltip="{{'Required_for_final_craft' | translate: { amount: requiredForFinalCraft } }}"
             matTooltipPosition="above" *ngIf="requiredForFinalCraft>0 && !recipe">

        <button matTooltipPosition="above"
                matTooltip="{{'Copy_isearch' | translate}}"
                mat-icon-button ngxClipboard cbContent="/isearch &quot;{{item.id | itemName | i18n}}&quot;"
                (cbOnSuccess)="afterNameCopy(item.id)">
            <mat-icon>search</mat-icon>
        </button>

        <app-comments-button [name]="item.id | itemName | i18n"
                             [row]="item"
                             [list]="list"
                             [isOwnList]="user?.$key === list?.authorId"
                             (updated)="update.emit()"></app-comments-button>
        <button mat-icon-button
                matTooltip="{{'Requirements_for_craft' | translate}}"
                matTooltipPosition="above" [ngClass]="{'requirements-button':true, 'compact': settings.compactLists}"
                (click)="openRequirementsPopup()">
            <mat-icon color="accent">assignment</mat-icon>
        </button>
        <button mat-icon-button *ngIf="!hasBook" routerLink="/profile">
            <mat-icon matTooltip="{{'LIST_DETAILS.No_book' | translate}}" matTooltipPosition="above"
                      color="warn">
                warning
            </mat-icon>
        </button>
        <div *ngIf="item.workingOnIt && getAmount() > (item.done | ceil)">
            <div *ngIf="worksOnIt as character" class="working-on-it">
                <img src="{{character.avatar}}" alt=""
                     matTooltip="{{'Is_working_on_it' | translate:{name: character.name} }}"
                     matTooltipPosition="above" class="avatar" routerLink="/profile/{{item.workingOnIt}}">
                <button mat-icon-button color="warn" *ngIf="item.workingOnIt === user.$key"
                        (click)="removeWorkingOnIt()">
                    <mat-icon>clear</mat-icon>
                </button>
            </div>
        </div>
        <div
            *ngIf="!item.workingOnIt && !user?.anonymous && getAmount() > (item.done | ceil) && permissions?.participate">
            <button mat-icon-button matTooltip="{{'Work_on_it' | translate}}"
                    matTooltipPosition="above"
                    [ngClass]="{'requirements-button':true, 'compact': settings.compactLists}"
                    (click)="workOnIt()">
                <mat-icon color="accent">work</mat-icon>
            </button>
        </div>
        <div *ngIf="teamLeader$ | async as leader">
            <div *ngIf="teamMembers$ | async as teamMembers">
                <mat-menu #teamMembersMenu="matMenu">
                    <button mat-menu-item *ngFor="let member of teamMembers" (click)="assign(member.user.$key)">
                        {{member.name}}
                    </button>
                </mat-menu>
                <div *ngIf="!item.workingOnIt && !user?.anonymous
                && getAmount() > (item.done | ceil) && leader">
                    <button mat-icon-button matTooltip="{{'TEAMS.Assign_item' | translate}}"
                            matTooltipPosition="above"
                            [ngClass]="{'requirements-button':true, 'compact': settings.compactLists}"
                            [matMenuTriggerFor]="teamMembersMenu">
                        <mat-icon color="accent">assignment_ind</mat-icon>
                    </button>
                </div>
            </div>
        </div>
    </div>

    <div *ngIf="hasTimers" class="timers-container">
        <div [ngClass]="{'timer':true, 'compact': settings.compactLists}"
             *ngFor="let timer of timers | async; trackBy: trackByTimers">
            <mat-menu #addAlarmMenu="matMenu">
                <button (click)="addAlarm(timer.itemId, timer.type, group.name)" mat-menu-item
                        *ngFor="let group of user?.alarmGroups">{{group.name}}
                </button>
            </mat-menu>
            <button mat-raised-button
                    *ngIf="!hasAlarm[timer.itemId]"
                    [matMenuTriggerFor]="addAlarmMenu"
                    [color]="getTimerColor(timer.alarm) | async"
                    matTooltip="{{timer?.zoneId | placeName | i18n}} - {{timer?.areaId | placeName | i18n}}"
                    matTooltipPosition="above"
                    (contextmenu)="$event.preventDefault();addAlarm(timer.itemId, timer.type, 'Default group')">
                <mat-icon>alarm_add</mat-icon>
                {{timer?.display}} <span *ngIf="timer?.slot as slot">({{slot}})</span>
                <img src="{{getTimerIcon(timer.type)}}" alt="" class="type-icon" *ngIf="timer.type > -1">
            </button>

            <button mat-raised-button
                    *ngIf="hasAlarm[timer.itemId]"
                    (click)="removeAlarm(timer.itemId)"
                    [color]="getTimerColor(timer.alarm) | async"
                    matTooltip="{{timer?.zoneId | placeName | i18n}} - {{timer?.areaId | placeName | i18n}}"
                    matTooltipPosition="above">
                <mat-icon>alarm_on</mat-icon>
                {{timer?.display}} <span *ngIf="timer?.slot as slot">({{slot}})</span>
{'fraction_non_alphanumeric': 0.16078697421981003, 'fraction_numerical': 0.003467510930197497, 'mean_word_length': 1.9800089847259659, 'pattern_counts': {'":': 0, '<': 157, '<?xml version=': 0, '>': 171, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1451257', 'n_tokens_mistral': 3927, 'n_tokens_neox': 3718, 'n_words': 601}