<commit_before><template>
    <main id="mainPsaApp">
        <section class="psa-tracker-title">
            <h2 class="tnth-header heading">{{intro.header}}</h2>
            <div class="body">{{intro.body}}</div>
            <div id="psaTrackerButtonsContainer"><button id="psaTrackerBtnAddNew" class="btn btn-tnth-primary" data-toggle="modal" data-target="#addPSAModal">{{intro.addText}}</button></div>
        </section>
        <section>
            <div id="psaTrackerNoResultContainer" class="text-warning" v-if="!items.length">
                {{noResultMessage}}
                <span v-if="isActedOn()">
                    <refresh-icon v-on:refresh="refresh" v-bind:title="getRefreshMessage()"></refresh-icon>
                </span>
            </div>
            <div id="psaTrackerResultsContainer" v-if="items.length > 0">
                <div class="psaTrackerLoader" v-bind:class="{ 'tnth-hide': !loading }"><i class="fa fa-spinner fa-spin fa-2x"></i></div>
                <div class="psaTrackerDataContainer" v-bind:class="{ 'tnth-hide': loading }">
                    <table id="psaTrackerResultsTable" >
                        <THEAD class="psa-tracker-table-header">
                            <th v-for="(item, index) in headers" :key="index">{{item}}</th>
                        </THEAD>
                        <TBODY>
                            <tr v-if="showFilters()" class="filter-row">
                                <td class="filter-cell">
                                    <filter-control v-bind:id="'psaTrackerYearFilter'" v-bind:prompt="filters.filterYearPrompt" v-bind:items="yearList" v-bind:selectedvalue="filters.selectedFilterYearValue" v-on:changeevent="filterDataByYearEvent"></filter-control>
                                </td>
                                <td class="filter-cell">
                                    <filter-control v-bind:id="'psaTrackerResultFilter'" v-bind:prompt="filters.filterResultPrompt" v-bind:items="resultRange" v-bind:selectedvalue="filters.selectedFilterResultRange" v-on:changeevent="filterDataByResultEvent"></filter-control>
                                </td>
                            </tr>
                            <tr v-for="item in items" v-bind:data-id="item.id" v-bind:data-date="item.date" :key="item.id" class="result-row" v-on:click="onEdit(item)">
                                <td class="result-cell"><div class="glyphicon glyphicon-pencil edit-icon" aria-hidden="true"></div><span>{{item.date}}</span></td>
                                <td class="result-cell"><span>{{item.result}}</span></td>
                            </tr>
                        </TBODY>
                        <TFOOT>
                            <tr>
                                <td colspan="2">
                                    <span class="glyphicon glyphicon-remove edit-icon" aria-hidden="true" v-on:click="refresh" v-bind:disabled="!isActedOn()" v-if="showFilters()" v-bind:title="filterText"></span>
                                    <a class="info-link" v-on:click="refresh" v-bind:disabled="!isActedOn()" v-if="showFilters()" v-html="filters.clearLabel" v-bind:title="filterText"></a>
                                </td>
                            </tr>
                        </TFOOT>
                    </table>
                    <div id="psaTrackerDataSidebar" v-show="history.items.length">
                        <button class="btn btn-tnth-primary" v-show="history.items.length" v-on:click="showHistory" v-html="history.buttonLabel"></button>
                    </div>
                </div>
                <div id="psaTrackerGraphContainer" v-bind:class="{ 'tnth-hide': loading }">
                    <div id="psaTrackerGraph"></div>
                    <div id="psaTrackerTreatmentContainer">
                        <div class="group" v-if="showTreatment()" v-for="(item, index) in treatment.data" :key="index">
                            <div>
                                <div class="title">{{treatment.treatmentTextPrompt}}</div><div class="content display-text">{{item.display}}</div>
                            </div>
                            <div>
                                <div class="title">{{treatment.treatmentDatePrompt}}</div> <div class="content display-text">{{item.date}}</div>
                            </div>
                        </div>
                        <div v-if="!showTreatment()">
                            <span class="text-warning" v-html="treatment.noTreatmentText"></span>
                        </div>
                        <div class="shift-right">
                            <a v-bind:href="treatmentEditUrl" class="info-link" v-html="editLink" v-bind:title="editText"></a>
                            <a v-bind:href="treatmentEditUrl" v-bind:title="editText"><span class="glyphicon glyphicon-pencil edit-icon" aria-hidden="true"></span></a>
                        </div>
                    </div>
                </div>
            </div>
            <div id="psaTrackerErrorMessageContainer" class="error-message"></div>
        </section>
        <div class="modal fade" id="addPSAModal" tabindex="-1" role="dialog">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" v-bind:aria-label="closeText"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-header-title" v-html="getAddModalTitle()"></div>
                </div>
                <div class="modal-body">
                    <div class="body-content">
                        <div class="psaTrackerModalLoader" v-bind:class="{ 'tnth-hide': !modalLoading }"><i class="fa fa-spinner fa-spin fa-2x"></i></div>
                        <table id="psaTrackerAddTable" v-bind:class="{ 'tnth-hide': modalLoading }">
                            <tr>
                                <td class="field-label" v-html="fields.resultLabel"></td>
                                <td><input id="psaResult" type="text" v-model.trim="newItem.result" class="form-control" v-bind:placeholder="fields.resultPlaceholder"/></td>
                            </tr>
                            <tr>
                                <td class="field-label" v-html="fields.dateLabel"></td>
                                <td><input id="psaDate" type="text" v-model.trim="newItem.date" class="form-control" v-bind:placeholder="fields.datePlaceholder"/></td>
                            </tr>
                        </table>
                        <br/>
                        <div class="error-message text-center" v-html="addErrorMessage"></div>
                    </div>
                </div>
                <div class="modal-footer">
                    <div v-bind:class="{'tnth-hide':!savingInProgress}"><i class="fa fa-spinner fa-spin fa-2x"></i></div>
                    <div v-bind:class="{'tnth-hide': savingInProgress}">
                        <button type="button" class="btn btn-default" v-on:click="onAdd()" v-bind:disabled="!isValidData()" v-html="saveText"></button>
                        <button type="button" class="btn btn-default" data-dismiss="modal" v-html="closeText"></button>
                    </div>
                </div>
                </div>
            </div>
        </div>
        <div class="modal fade" id="PSAHistoryModal" tabindex="-1" role="dialog">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" v-bind:aria-label="closeText"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-header-title" v-html="history.title"></div>
                </div>
                <div class="modal-body">
                    <div class="body-content">
                        <table id="psaTrackerHistoryTable">
                            <THEAD class="psa-tracker-table-header"><TH v-for="(item, index) in headers" v-html="item" :key="index">{{item}}</TH></THEAD>
                            <TR v-for="(item,index) in history.items" :key="index"><TD v-html="item.date"></TD><TD v-html="item.result"></TD></TR>
                        </table>
                        <div class="text-warning sidenote" v-html="history.sidenote"></div>
                    </div>
                </div>
                <div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal" v-html="closeText"></button></div>
                </div>
            </div>
        </div>
        <svg width="300" height="200">
            <defs>
                <path id="arrow" d="M2,2 L10,6 L2,10 L6,6 L2,2" class="marker" transform="rotate(90)" stroke-width="4"></path>
                <rect id="marker" width="4" height="4" stroke-width="1" class="marker"/>
            </defs>
        </svg>
    </main>
</template>
<script>
    import FilterControl from "./FilterControl.vue";
    import RefreshIcon from "./RefreshIcon.vue";
    import tnthAjax from "../modules/TnthAjax.js";
    import tnthDates from "../modules/TnthDate.js";
    import SYSTEM_IDENTIFIER_ENUM from "../modules/SYSTEM_IDENTIFIER_ENUM.js";
    export default {
        components: { RefreshIcon, FilterControl},<commit_msg>fix build error in PsaTracker vue (#3009)<commit_after><template>
    <main id="mainPsaApp">
        <section class="psa-tracker-title">
            <h2 class="tnth-header heading">{{intro.header}}</h2>
            <div class="body">{{intro.body}}</div>
            <div id="psaTrackerButtonsContainer"><button id="psaTrackerBtnAddNew" class="btn btn-tnth-primary" data-toggle="modal" data-target="#addPSAModal">{{intro.addText}}</button></div>
        </section>
        <section>
            <div id="psaTrackerNoResultContainer" class="text-warning" v-if="!items.length">
                {{noResultMessage}}
                <span v-if="isActedOn()">
                    <refresh-icon v-on:refresh="refresh" v-bind:title="getRefreshMessage()"></refresh-icon>
                </span>
            </div>
            <div id="psaTrackerResultsContainer" v-if="items.length > 0">
                <div class="psaTrackerLoader" v-bind:class="{ 'tnth-hide': !loading }"><i class="fa fa-spinner fa-spin fa-2x"></i></div>
                <div class="psaTrackerDataContainer" v-bind:class="{ 'tnth-hide': loading }">
                    <table id="psaTrackerResultsTable" >
                        <THEAD class="psa-tracker-table-header">
                            <th v-for="(item, index) in headers" :key="index">{{item}}</th>
                        </THEAD>
                        <TBODY>
                            <tr v-if="showFilters()" class="filter-row">
                                <td class="filter-cell">
                                    <filter-control v-bind:id="'psaTrackerYearFilter'" v-bind:prompt="filters.filterYearPrompt" v-bind:items="yearList" v-bind:selectedvalue="filters.selectedFilterYearValue" v-on:changeevent="filterDataByYearEvent"></filter-control>
                                </td>
                                <td class="filter-cell">
                                    <filter-control v-bind:id="'psaTrackerResultFilter'" v-bind:prompt="filters.filterResultPrompt" v-bind:items="resultRange" v-bind:selectedvalue="filters.selectedFilterResultRange" v-on:changeevent="filterDataByResultEvent"></filter-control>
                                </td>
                            </tr>
                            <tr v-for="item in items" v-bind:data-id="item.id" v-bind:data-date="item.date" :key="item.id" class="result-row" v-on:click="onEdit(item)">
                                <td class="result-cell"><div class="glyphicon glyphicon-pencil edit-icon" aria-hidden="true"></div><span>{{item.date}}</span></td>
                                <td class="result-cell"><span>{{item.result}}</span></td>
                            </tr>
                        </TBODY>
                        <TFOOT>
                            <tr>
                                <td colspan="2">
                                    <span class="glyphicon glyphicon-remove edit-icon" aria-hidden="true" v-on:click="refresh" v-bind:disabled="!isActedOn()" v-if="showFilters()" v-bind:title="filterText"></span>
                                    <a class="info-link" v-on:click="refresh" v-bind:disabled="!isActedOn()" v-if="showFilters()" v-html="filters.clearLabel" v-bind:title="filterText"></a>
                                </td>
                            </tr>
                        </TFOOT>
                    </table>
                    <div id="psaTrackerDataSidebar" v-show="history.items.length">
                        <button class="btn btn-tnth-primary" v-show="history.items.length" v-on:click="showHistory" v-html="history.buttonLabel"></button>
                    </div>
                </div>
                <div id="psaTrackerGraphContainer" v-bind:class="{ 'tnth-hide': loading }">
                    <div id="psaTrackerGraph"></div>
                    <div id="psaTrackerTreatmentContainer">
                        <div class="group" v-if="showTreatment()" v-for="(item, index) in treatment.data" :key="index">
                            <div>
                                <div class="title">{{treatment.treatmentTextPrompt}}</div><div class="content display-text">{{item.display}}</div>
                            </div>
                            <div>
                                <div class="title">{{treatment.treatmentDatePrompt}}</div> <div class="content display-text">{{item.date}}</div>
                            </div>
                        </div>
                        <div v-if="!showTreatment()">
                            <span class="text-warning" v-html="treatment.noTreatmentText"></span>
                        </div>
                        <div class="shift-right">
                            <a v-bind:href="treatmentEditUrl" class="info-link" v-html="editLink" v-bind:title="editText"></a>
                            <a v-bind:href="treatmentEditUrl" v-bind:title="editText"><span class="glyphicon glyphicon-pencil edit-icon" aria-hidden="true"></span></a>
                        </div>
                    </div>
                </div>
            </div>
            <div id="psaTrackerErrorMessageContainer" class="error-message"></div>
        </section>
        <div class="modal fade" id="addPSAModal" tabindex="-1" role="dialog">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" v-bind:aria-label="closeText"><span aria-hidden="true">&times;</span></button>
                        <div class="modal-header-title" v-html="getAddModalTitle()"></div>
                    </div>
                    <div class="modal-body">
                        <div class="body-content">
                            <div class="psaTrackerModalLoader" v-bind:class="{ 'tnth-hide': !modalLoading }"><i class="fa fa-spinner fa-spin fa-2x"></i></div>
                            <table id="psaTrackerAddTable" v-bind:class="{ 'tnth-hide': modalLoading }">
                                <tr>
                                    <td class="field-label" v-html="fields.resultLabel"></td>
                                    <td><input id="psaResult" type="text" v-model.trim="newItem.result" class="form-control" v-bind:placeholder="fields.resultPlaceholder" /></td>
                                </tr>
                                <tr>
                                    <td class="field-label" v-html="fields.dateLabel"></td>
                                    <td><input id="psaDate" type="text" v-model.trim="newItem.date" class="form-control" v-bind:placeholder="fields.datePlaceholder" /></td>
                                </tr>
                            </table>
                            <br/>
                            <div class="error-message text-center" v-html="addErrorMessage"></div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <div v-bind:class="{'tnth-hide':!savingInProgress}"><i class="fa fa-spinner fa-spin fa-2x"></i></div>
                        <div v-bind:class="{'tnth-hide': savingInProgress}">
                            <button type="button" class="btn btn-default" v-on:click="onAdd()" v-bind:disabled="!isValidData()" v-html="saveText"></button>
                            <button type="button" class="btn btn-default" data-dismiss="modal" v-html="closeText"></button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal fade" id="PSAHistoryModal" tabindex="-1" role="dialog">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" v-bind:aria-label="closeText"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-header-title" v-html="history.title"></div>
                </div>
                <div class="modal-body">
                    <div class="body-content">
                        <table id="psaTrackerHistoryTable">
                            <THEAD class="psa-tracker-table-header"><TH v-for="(item, index) in headers" v-html="item" :key="index">{{item}}</TH></THEAD>
                            <TR v-for="(item,index) in history.items" :key="index"><TD v-html="item.date"></TD><TD v-html="item.result"></TD></TR>
                        </table>
                        <div class="text-warning sidenote" v-html="history.sidenote"></div>
                    </div>
                </div>
                <div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal" v-html="closeText"></button></div>
                </div>
            </div>
        </div>
        <svg width="300" height="200">
            <defs>
                <path id="arrow" d="M2,2 L10,6 L2,10 L6,6 L2,2" class="marker" transform="rotate(90)" stroke-width="4"></path>
                <rect id="marker" width="4" height="4" stroke-width="1" class="marker"></rect>
            </defs>
        </svg>
    </main>
</template>
<script>
    import FilterControl from "./FilterControl.vue";
    import RefreshIcon from "./RefreshIcon.vue";
    import tnthAjax from "../modules/TnthAjax.js";
    import tnthDates from "../modules/TnthDate.js";
    import SYSTEM_IDENTIFIER_ENUM from "../modules/SYSTEM_IDENTIFIER_ENUM.js";
    export default {
        components: { RefreshIcon, FilterControl},
{'fraction_non_alphanumeric': 0.16107206545683417, 'fraction_numerical': 0.003671457043952586, 'mean_word_length': 1.6603878889353985, 'pattern_counts': {'":': 0, '<': 414, '<?xml version=': 0, '>': 416, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2486066', 'n_tokens_mistral': 5398, 'n_tokens_neox': 5068, 'n_words': 825}