<commit_before><div
    ng-if="item"
    ng-repeat="field in fields track by field.field"
    data-test-id="media-metadata-editor"
>

    <div
        ng-if="(!field.type && !field.cv) || (field.type === 'string' && !field.cv)"
        class="sd-line-input sd-line-input--boxed"
        ng-class="{'sd-line-input--required': field.required}"
        data-test-id="{{'field--' + field.field}}"
    >
        <label class="sd-line-input__label">{{field.label}}</label>
        <sd-plain-text-editor
            on-change="handleInputChange"
            on-change-data="{field: field.field}"
            value="item[field.field]"
            classes="'sd-line-input__input'"
            spellcheck="true"
            language="item.language"
        />
    </div>

    <sd-line-input
        ng-if="field.cv && field.cv.field_type === 'text'"
        data-sync="true"
        ng-model="item.extra[field.field]"
        data-dark="dark"
        data-boxed="boxed"
        data-label="{{ field.label }}"
        data-required="field.required"
        data-disabled="isDisabled(field)"
        data-onchange="onChange({key: 'extra'})"
        data-onblur="onBlur()"
        data-maxlength="field.maxlength"
        data-placeholder="{{ placeholder[field.field] }}"
        data-test-id="{{'field--' + field.field}}"
    />

    <div ng-if="field.cv && !field.cv.field_type" class="sd-line-input sd-line-input--boxed" ng-class="{'sd-line-input--required': field.required}">
        <label class="sd-line-input__label">{{ field.label }}</label>

        <div sd-meta-place ng-if="field.field === 'place' && features.places_autocomplete"
            class="data sd-terms--boxed"
            data-item="item"
            data-field="place"
            ng-disabled="isDisabled(field)"
            data-change="onChange({key: field})"
        ></div>

        <div sd-meta-words-list ng-if="field.field === 'keywords'"
            class="data sd-terms--boxed sd-line-input--dark-ui sd-line-input--boxed"
            data-item="item"
            data-field="keywords"
            data-change="onChange({key: field.field})"
            data-list="field.cv.items"
            data-disabled="isDisabled(field)"
            data-style="sd-line-input__input"
            data-header="true"
        ></div>

        <div sd-meta-terms
            ng-if="!(field.field === 'place' && features.places_autocomplete) && field.field !== 'keywords' && field.cv.selection_type === 'multi selection'"
            class="data sd-terms--boxed"
            data-item="item"
            data-field="{{ field.cv.schema_field || 'subject'}}"
            data-unique="qcode"
            data-list="field.cv.items"
            data-cv="field.cv"
            ng-disabled="isDisabled(field)"
            data-header="true"
            data-change="onChange({key: field})"
            data-include-parent="{{ field.includeparent }}"
            data-reload-list="true"
        ></div>

        <div sd-meta-dropdown
            ng-if="!(field.field === 'place' && features.places_autocomplete) && field.field !== 'keywords' && field.cv.selection_type !== 'multi selection'"
            class="data sd-terms--boxed"
            data-item="item"
            data-field="{{ field.cv.schema_field || 'subject'}}"
            data-unique="qcode"
            data-list="field.cv.items"
            data-cv="field.cv"
            ng-disabled="isDisabled(field)"
            data-header="true"
            data-change="onChange({key: field})"
            data-key="{{ field.cv.key }}"
        ></div>

        <span class="sd-line-input__hint" ng-show="field.helper_text || field.cv.helper_text" style="position: static">
            {{ field.helper_text || field.cv.helper_text }}
        </span>
    </div>

    <div ng-if="field.cv && field.cv.field_type === 'date'" class="sd-line-input sd-line-input--boxed" ng-class="{'sd-line-input--required': field.required}">
        <label class="form-label">{{ field.label }}</label>
        <div sd-datepicker
            ng-disabled="isDisabled(field)"
            ng-model="item.extra[field.field]"
            data-format="YYYY-MM-DDT00:00:00+0000"
            data-on-change="onChange({key: 'extra'})"
        ></div>
    </div>

    <div ng-if="field.cv && field.cv.field_type === 'authors'" class="sd-line-input sd-line-input--boxed" ng-class="{'sd-line-input--required': field.required}">
        <label class="authoring-header__item-label">{{ field.label }}</label>
        <div class="authoring-header__input-holder">
            <div
                sd-meta-terms
                class="data sd-terms--boxed"
                data-item="item"
                data-field="authors"
                data-unique="_id"
                data-list="field.cv.items"
                data-label= "{{ :: 'Add author' | translate }}"
                ng-disabled="isDisabled(field)"
                data-header="true"
                data-change="onChange({key: field})"
                data-reload-list="true"
                data-disable-entire-category="{{field.cv.disable_entire_category_selection}}"
            ></div>
        </div>
    </div>
</div><commit_msg>fix authors dropdown search in media editor (#3904)<commit_after><div
    ng-if="item"
    ng-repeat="field in fields track by field.field"
    data-test-id="media-metadata-editor"
>

    <div
        ng-if="(!field.type && !field.cv) || (field.type === 'string' && !field.cv)"
        class="sd-line-input sd-line-input--boxed"
        ng-class="{'sd-line-input--required': field.required}"
        data-test-id="{{'field--' + field.field}}"
    >
        <label class="sd-line-input__label">{{field.label}}</label>
        <sd-plain-text-editor
            on-change="handleInputChange"
            on-change-data="{field: field.field}"
            value="item[field.field]"
            classes="'sd-line-input__input'"
            spellcheck="true"
            language="item.language"
        />
    </div>

    <sd-line-input
        ng-if="field.cv && field.cv.field_type === 'text'"
        data-sync="true"
        ng-model="item.extra[field.field]"
        data-dark="dark"
        data-boxed="boxed"
        data-label="{{ field.label }}"
        data-required="field.required"
        data-disabled="isDisabled(field)"
        data-onchange="onChange({key: 'extra'})"
        data-onblur="onBlur()"
        data-maxlength="field.maxlength"
        data-placeholder="{{ placeholder[field.field] }}"
        data-test-id="{{'field--' + field.field}}"
    />

    <div ng-if="field.cv && !field.cv.field_type" class="sd-line-input sd-line-input--boxed" ng-class="{'sd-line-input--required': field.required}">
        <label class="sd-line-input__label">{{ field.label }}</label>

        <div sd-meta-place ng-if="field.field === 'place' && features.places_autocomplete"
            class="data sd-terms--boxed"
            data-item="item"
            data-field="place"
            ng-disabled="isDisabled(field)"
            data-change="onChange({key: field})"
        ></div>

        <div sd-meta-words-list ng-if="field.field === 'keywords'"
            class="data sd-terms--boxed sd-line-input--dark-ui sd-line-input--boxed"
            data-item="item"
            data-field="keywords"
            data-change="onChange({key: field.field})"
            data-list="field.cv.items"
            data-disabled="isDisabled(field)"
            data-style="sd-line-input__input"
            data-header="true"
        ></div>

        <div sd-meta-terms
            ng-if="!(field.field === 'place' && features.places_autocomplete) && field.field !== 'keywords' && field.cv.selection_type === 'multi selection'"
            class="data sd-terms--boxed"
            data-item="item"
            data-field="{{ field.cv.schema_field || 'subject'}}"
            data-unique="qcode"
            data-list="field.cv.items"
            data-cv="field.cv"
            ng-disabled="isDisabled(field)"
            data-header="true"
            data-change="onChange({key: field})"
            data-include-parent="{{ field.includeparent }}"
            data-reload-list="true"
        ></div>

        <div sd-meta-dropdown
            ng-if="!(field.field === 'place' && features.places_autocomplete) && field.field !== 'keywords' && field.cv.selection_type !== 'multi selection'"
            class="data sd-terms--boxed"
            data-item="item"
            data-field="{{ field.cv.schema_field || 'subject'}}"
            data-unique="qcode"
            data-list="field.cv.items"
            data-cv="field.cv"
            ng-disabled="isDisabled(field)"
            data-header="true"
            data-change="onChange({key: field})"
            data-key="{{ field.cv.key }}"
        ></div>

        <span class="sd-line-input__hint" ng-show="field.helper_text || field.cv.helper_text" style="position: static">
            {{ field.helper_text || field.cv.helper_text }}
        </span>
    </div>

    <div ng-if="field.cv && field.cv.field_type === 'date'" class="sd-line-input sd-line-input--boxed" ng-class="{'sd-line-input--required': field.required}">
        <label class="form-label">{{ field.label }}</label>
        <div sd-datepicker
            ng-disabled="isDisabled(field)"
            ng-model="item.extra[field.field]"
            data-format="YYYY-MM-DDT00:00:00+0000"
            data-on-change="onChange({key: 'extra'})"
        ></div>
    </div>

    <div ng-if="field.cv && field.cv.field_type === 'authors'" class="sd-line-input sd-line-input--boxed" ng-class="{'sd-line-input--required': field.required}">
        <label class="authoring-header__item-label">{{ field.label }}</label>
        <div class="authoring-header__input-holder">
            <div
                sd-meta-terms
                class="data sd-terms--boxed"
                data-item="item"
                data-field="authors"
                data-unique="_id"
                data-list="field.cv.items"
                data-label= "{{ :: 'Add author' | translate }}"
                ng-disabled="isDisabled(field)"
                data-header="true"
                data-change="onChange({key: field})"
                data-reload-list="true"
                data-disable-entire-category="true"
            ></div>
        </div>
    </div>
</div>
{'fraction_non_alphanumeric': 0.17909724912824487, 'fraction_numerical': 0.002324680356450988, 'mean_word_length': 2.056542332741267, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 75, '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': '1566741', 'n_tokens_mistral': 3224, 'n_tokens_neox': 3100, 'n_words': 432}