Instruction:
作为 Java 安全专家，检测此代码中的安全漏洞：
## 内容1
### 文件路径：
extensions/wikidata/module/langs/translation-en.json
### 代码内容：
{
    "wikidata-extension/menu-label": "Wikidata",
    "wikidata-extension/edit-wikidata-schema": "Edit Wikidata schema",
    "wikidata-extension/import-wikidata-schema": "Import schema",
    "wikidata-extension/manage-wikidata-account": "Manage Wikidata account",
    "wikidata-extension/perform-edits-on-wikidata": "Upload edits to Wikidata",
    "wikidata-extension/export-to-qs": "Export to QuickStatements",
    "wikidata-extension/export-schema": "Export schema",
    "wikidata-extension/quickstatements-export-name": "QuickStatements",
    "wikidata-schema/dialog-header": "Align to Wikidata",
    "wikidata-schema/dialog-explanation": "The Wikidata schema below specifies how your tabular data will be transformed into Wikidata edits. You can drag and drop the column names below in most input boxes: for each row, edits will be generated with the values in these columns.",
    "wikidata-schema/preview-explanation": "This tab shows the first edits (out of {nb_edits}) that will be made once you upload the changes to Wikidata. You can use facets to inspect the edits on particular items.",
    "wikidata-schema/schema-tab-header": "Schema",
    "wikidata-schema/warnings-tab-header": "Issues",
    "wikidata-schema/edits-preview-tab-header": "Preview",
    "wikidata-schema/statements-header": "Statements",
    "wikidata-schema/terms-header": "Terms",
    "wikidata-schema/empty-statements": "no statements added",
    "wikidata-schema/empty-terms": "no labels, descriptions or aliases added",
    "wikidata-schema/add-item-button": "add item",
    "wikidata-schema/add-term": "add term",
    "wikidata-schema/remove": "remove",
    "wikidata-schema/add-statement": "add statement",
    "wikidata-schema/add-value": "add value",
    "wikidata-schema/add-qualifier": "add qualifier",
    "wikidata-schema/add-reference": "add reference",
    "wikidata-schema/add-reference-snak": "add",
    "wikidata-schema/property-placeholder": "property",
    "wikidata-schema/nb-references": " references",
    "wikidata-schema/remove-column": "remove column",
    "wikidata-schema/label": "Label",
    "wikidata-schema/description": "Description",
    "wikidata-schema/alias": "Alias",
    "wikidata-schema/item-or-reconciled-column": "type item or drag reconciled column here",
    "wikidata-schema/amount": "amount",
    "wikidata-schema/unit": "unit",
    "wikidata-schema/full-url": "full URL including the protocol",
    "wikidata-schema/tabular-data-with-prefix": "filename starting with \"Data:\"",
    "wikidata-schema/commons-media": "filename",
    "wikidata-schema/math-expression": "mathematical expression",
    "wikidata-schema/geoshape-with-prefix": "filename starting with \"Data:\"",
    "wikidata-schema/datatype-not-supported-yet": "This datatype is not supported yet, sorry.",
    "wikidata-schema/invalid-schema-warning-issues": "Your schema is incomplete, fix it to see the issues.",
    "wikidata-schema/invalid-schema-warning-preview": "Your schema is incomplete, fix it to see the preview.",
    "wikidata-schema/discard-button": "Discard changes",
    "wikidata-schema/save-button": "Save schema",
    "wikidata-schema/close-button": "Close",
    "wikidata-schema/unsaved-changes-alt": "You have made unsaved changes to your Wikidata schema.",
    "wikidata-schema/save-schema-alt": "Save the schema to OpenRefine. The changes will not be uploaded to Wikidata yet.",
    "wikidata-schema/discard-schema-changes-alt": "Discard the changes made to the schema.",
    "wikidata-schema/incomplete-schema-could-not-be-saved": "Your schema is incomplete so it cannot be saved yet.",
    "wikidata-schema/unsaved-warning": "You have made unsaved changes to your Wikidata schema. Close anyway?",
    "wikidata-preview/new-id": "new item",
    "wikidata-account/dialog-header": "Wikidata account",
    "wikidata-account/explain-log-in": "Logging in to Wikidata lets you to upload edits directly from OpenRefine.",
    "wikidata-account/username-label": "Username:",
    "wikidata-account/username-placeholder": "Enter your username",
    "wikidata-account/password-label": "Password:",
    "wikidata-account/password-placeholder": "Enter your password",
    "wikidata-account/remember-credentials-label": "Remember credentials (stored unencrypted in OpenRefine's preferences)",
    "wikidata-account/close": "Close",
    "wikidata-account/log-in": "Log in",
    "wikidata-account/logged-in-as": "You are logged in as:",
    "wikidata-account/log-out": "Log out",
    "wikidata-account/connecting-to-wikidata": "Connecting to Wikidata...",
    "perform-wikidata-edits/dialog-header": "Upload edits to Wikidata",
    "perform-wikidata-edits/review-your-edits": "You are about to upload {nb_edits} edits to Wikidata. Please check them carefully. Large edit batches should be submitted for bot review first.",
    "perform-wikidata-edits/logged-in-as": "You are logged in as",
    "perform-wikidata-edits/edit-summary-label": "Edit summary:",
    "perform-wikidata-edits/edit-summary-placeholder": "a few words to describe your edits",
    "perform-wikidata-edits/perform-edits": "Upload edits",
    "perform-wikidata-edits/cancel": "Cancel",
    "perform-wikidata-edits/analyzing-edits": "Analyzing your edits...",
    "import-wikibase-schema/dialog-header": "Import Wikidata schema",
    "import-wikibase-schema/file-label": "From JSON file: ",
    "import-wikibase-schema/schema-label": "Or from JSON text:",
    "import-wikibase-schema/invalid-schema": "Invalid Wikibase schema.",
    "import-wikibase-schema/import": "Import",
    "warnings-messages/new-item-created/title": "This edit batch will create new Wikidata items.",
    "warnings-messages/new-item-created/body": "Please make sure that these items do not exist yet and are suitable for inclusion in Wikidata.",
    "warnings-messages/new-item-without-labels-or-aliases/title": "New items created without any label or alias.",
    "warnings-messages/new-item-without-labels-or-aliases/body": "You should at least provide one label for new items such as {example_entity}, so that others can understand what the item is about.",
    "warnings-messages/new-item-without-descriptions/title": "New items created without any description.",
    "warnings-messages/new-item-without-descriptions/body": "Adding descriptions on new items such as {example_entity} will make it easier to disambiguate the items from namesakes.",
    "warnings-messages/new-item-with-deleted-statements/title": "Deleting statements on new items.",
    "warnings-messages/new-item-with-deleted-statements/body": "There is probably something wrong in your schema or project.",
    "warnings-messages/new-item-without-P31-or-P279/title": "New items created without any type.",
    "warnings-messages/new-item-without-P31-or-P279/body": "You should provide an \"instance of\" (P31) or \"subclass of\" (P279) statement for each item that you create, such as {example_entity}.",
    "warnings-messages/add-statements-with-invalid-format/title": "{property_entity} statements with invalid format.",
    "warnings-messages/add-statements-with-invalid-format/body": "Values for this property are expected to match the regular expression {regex}, which is not the case for {example_value} added on {example_item_entity}.",
    "warnings-messages/remove-statements-with-invalid-format/title": "Removed statements with invalid format.",
    "warnings-messages/remove-statements-with-invalid-format/body": "If these statements currently exist on Wikidata, this will solve constraint violations.",
    "warnings-messages/missing-inverse-statements/title": "Inverse statements missing for {added_property_entity}.",
    "warnings-messages/missing-inverse-statements/body": "Any {added_property_entity} statement such as the one from {source_entity} to {target_entity} should also be added in reverse with {inverse_property_entity}: in this case, {target_entity} {inverse_property_entity} {source_entity}.",
    "warnings-messages/self-referential-statements/title": "Self-referential statements.",
    "warnings-messages/self-referential-statements/body": "While not forbidden, self-referential statements are generally suspicious. You have some on {example_entity}.",
    "warnings-messages/unsourced-statements/title": "Statements without references.",
    "warnings-messages/unsourced-statements/body": "Most statements should have references. You can add them easily in the schema.",
    "warnings-messages/property-found-in-mainsnak/title": "{property_entity} used as statement.",
    "warnings-messages/property-found-in-mainsnak/body": "You are using {property_entity} as a main statement but it is not designed for that.",
    "warnings-messages/property-found-in-qualifier/title": "{property_entity} used as qualifier.",
    "warnings-messages/property-found-in-qualifier/body": "You are using in {property_entity} as a qualifier but it is not designed for that .",
    "warnings-messages/property-found-in-reference/title": "{property_entity} used as reference.",
    "warnings-messages/property-found-in-reference/body": "You are using {property_entity} in a reference but it is not designed for that.",
    "warnings-messages/missing-mandatory-qualifiers/title": "{statement_property_entity} is missing a {missing_property_entity} qualifier.",
    "warnings-messages/missing-mandatory-qualifiers/body": "Statements using {statement_property_entity} such as the one on {example_item_entity} are missing a mandatory {missing_property_entity} qualifier.",
    "warnings-messages/disallowed-qualifiers/title": "Qualifier {disallowed_property_entity} is incompatible with {statement_property_entity}.",
    "warnings-messages/disallowed-qualifiers/body": "Statements using {statement_property_entity} such as the one on {example_item_entity} should not have a {disallowed_property_entity} qualifier as they are incompatible.",
    "warnings-messages/single-valued-property-added-more-than-once/title": "{property_entity} added more than once on the same item.",
    "warnings-messages/single-valued-property-added-more-than-once/body": "This property is expected to be used at most once on each item but has been added multiple times on the same item, for instance on {example_entity}.",
    "warnings-messages/identical-values-for-distinct-valued-property/title": "Identical values for {property_entity}",
    "warnings-messages/identical-values-for-distinct-valued-property/body": "This property should have distinct values, but the same value was found on {item1_entity} and {item2_entity} for instance.",
    "warnings-messages/no-edit-generated/title": "No edit was generated.",
    "warnings-messages/no-edit-generated/body": "There might be something wrong with your schema.",
    "warnings-messages/no-issue-detected/title": "No issue was detected in your edits.",
    "warnings-messages/no-issue-detected/body": "Note that OpenRefine cannot detect all the types of problems Wikidata edits can have.",
    "warnings-messages/ignored-qualifiers/title": "Some qualifiers were ignored.",
    "warnings-messages/ignored-qualifiers/body": "Qualifier values could not be parsed, so they will not be added to the corresponding statements.",
    "warnings-messages/ignored-references/title": "Some references were ignored.",
    "warnings-messages/ignored-references/body": "None of their statements could be parsed, so no reference was added.",
    "warnings-messages/monolingual-text-without-language/title": "No language provided for monolingual text.",
    "warnings-messages/monolingual-text-without-language/body": "Some label, description, alias or monolingual text value have been skipped because no language was provided. Example value: {example_text}.",
    "warnings-messages/duplicate-whitespace/title": "Duplicate whitespace in strings.",
    "warnings-messages/duplicate-whitespace/body": "Strings such as {example_string} contain duplicate whitespace.",
    "warnings-messages/non-printable-characters/title": "Non-printable characters in strings.",
    "warnings-messages/non-printable-characters/body": "Strings such as {example_string} contain non-printable characters.",
    "warnings-messages/invalid-identifier-space/title": "Invalid identifier space for reconciled cells.",
    "warnings-messages/invalid-identifier-space/body": "Some reconciled cells such as {example_cell} were ignored because they are not reconciled to Wikidata.",
    "warnings-messages/ignored-language/title": "Invalid language identifiers.",
    "warnings-messages/ignored-language/body": "Some language identifiers are invalid, such as {example_value}. See the allowed values.",
    "warnings-messages/ignored-date/title": "Invalid date formats.",
    "warnings-messages/ignored-date/body": "Some dates are incorrectly formatted, such as {example_value}. See the allowed formats.",
    "warnings-messages/ignored-amount/title": "Invalid amount formats.",
    "warnings-messages/ignored-amount/body": "Some amounts are incorrectly formatted, such as {example_value}. See the allowed formats.",
    "warnings-messages/ignored-coordinates/title": "Invalid geographic coordinates.",
    "warnings-messages/ignored-coordinates/body": "Some coordinates are incorrectly formatted, such as {example_value}. See the allowed formats.",
    "warnings-messages/forbidden-value/title": "Invalid values for {property_entity}",
    "warnings-messages/forbidden-value/body": "Items such as {example_value_entity} added on {example_subject_entity} are not allowed as values for {property_entity}.",
    "warnings-messages/bounds-disallowed/title": "Quantity bounds supplied for {property_entity}",
    "warnings-messages/bounds-disallowed/body": "Values are not expected to have uncertainty bounds, but {example_value} added on {example_item_entity} has some. See the manual to learn how to fix their format.",
    "warnings-messages/values-should-be-integers/title": "Non-integer values of {property_entity}",
    "warnings-messages/values-should-be-integers/body": "Values are expected to be integers, but {example_value} added on {example_item_entity} has a fractional part. See the manual to learn how to fix their format.",
    "warnings-messages/invalid-unit/title": "{property_entity} with invalid units",
    "warnings-messages/invalid-unit/body": "Units such as {unit_entity} used on {example_item_entity} are invalid for {property_entity}.",
    "warnings-messages/no-unit-provided/title": "Unit missing for {property_entity}",
    "warnings-messages/no-unit-provided/body": "Values such as {example_value} on {example_item_entity} are expected to have units.",
    "warnings-messages/invalid-entity-type/title": "{property_entity} used on items",
    "warnings-messages/invalid-entity-type/body": "Uses of {property_entity} on items such as {example_entity} are invalid."
}
## 内容2
### 文件路径：
extensions/wikidata/module/langs/translation-fr.json
### 代码内容：
{
    "wikidata-extension/menu-label": "Wikidata",
    "wikidata-extension/edit-wikidata-schema": "Modifier le schéma Wikidata",
    "wikidata-extension/manage-wikidata-account": "Gérer le compte Wikidata",
    "wikidata-extension/perform-edits-on-wikidata": "Publier les modifications sur Wikidata",
    "wikidata-extension/export-to-qs": "Exporter en QuickStatements",
    "wikidata-extension/quickstatements-export-name": "QuickStatements",
    "wikidata-schema/dialog-header": "Aligner à Wikidata",
    "wikidata-schema/dialog-explanation": "Le schéma Wikidata ci-dessous spécifie comment vos données sont transformées en modifications sur Wikidata. Vous pouvez glisser-déposer les noms des colonnes ci-dessous dans la plupart des champs: pour chaque ligne, des modifications seront générées avec les valeurs dans ces colonnes.",
    "wikidata-schema/preview-explanation": "Cet onglet affiche les premières modifications (sur {nb_edits} modifications au total) qui seront effectuées quand vous publierez les données sur Wikidata. Vous pouvez utiliser les facettes pour inspecter les changements sur des éléments particuliers.",
    "wikidata-schema/schema-tab-header": "Schéma",
    "wikidata-schema/warnings-tab-header": "Problèmes",
    "wikidata-schema/edits-preview-tab-header": "Prévisualisation",
    "wikidata-schema/statements-header": "Déclarations",
    "wikidata-schema/terms-header": "Termes",
    "wikidata-schema/empty-terms": "pas de libellés, descriptions ou alias ajoutés",
    "wikidata-schema/add-item-button": "ajouter un élément",
    "wikidata-schema/add-term": "ajouter un terme",
    "wikidata-schema/remove": "supprimer",
    "wikidata-schema/add-statement": "ajouter une déclaration",
    "wikidata-schema/add-value": "ajouter une valeur",
    "wikidata-schema/add-qualifier": "ajouter un qualificatif",
    "wikidata-schema/add-reference": "ajouter une référence",
    "wikidata-schema/add-reference-snak": "ajouter",
    "wikidata-schema/property-placeholder": "propriété",
    "wikidata-schema/nb-references": " références",
    "wikidata-schema/remove-column": "supprimer la colonne",
    "wikidata-schema/label": "Libellé",
    "wikidata-schema/description": "Description",
    "wikidata-schema/alias": "Alias",
    "wikidata-schema/item-or-reconciled-column": "entrer un élément ou déposer une colonne réconciliée ici",
    "wikidata-schema/amount": "quantité",
    "wikidata-schema/unit": "unité",
    "wikidata-schema/full-url": "URL complète avec protocole",
    "wikidata-schema/tabular-data-with-prefix": "nom de fichier débutant par \"Data:\"",
    "wikidata-schema/commons-media": "nom de fichier",
    "wikidata-schema/math-expression": "expression mathématique",
    "wikidata-schema/geoshape-with-prefix": "nom de fichier commençant par \"Data:\"",
    "wikidata-schema/datatype-not-supported-yet": "Ce type de données n'est pas encore supporté, désolé.",
    "wikidata-schema/invalid-schema-warning-issues": "Votre schéma est incomplet, complétez-le pour voir les problèmes.",
    "wikidata-schema/invalid-schema-warning-preview": "Votre schéma est incomplet, complétez-le pour la prévisualisation.",
    "wikidata-schema/discard-button": "Annuler les modifications",
    "wikidata-schema/save-button": "Enregistrer le schéma",
    "wikidata-schema/close-button": "Fermer",
    "wikidata-schema/unsaved-changes-alt": "Des changements sur le schéma Wikidata n'ont pas été enregistrés.",
    "wikidata-schema/save-schema-alt": "Sauvegarder le schéma dans OpenRefine. Cela n'enverra pas de données sur Wikidata.",
    "wikidata-schema/discard-schema-changes-alt": "Abandonner les modifications sur le schéma.",
    "wikidata-schema/incomplete-schema-could-not-be-saved": "Votre schéma est incomplet, il ne peut donc pas encore être enregistré.",
    "wikidata-schema/unsaved-warning": "Les changements sur le schéma Wikidata n'ont pas été sauvegardés. Souhaitez-vous tout de même fermer ?",
    "wikidata-schema/empty-statements": "aucune déclaration ajoutée",
    "wikidata-preview/new-id": "nouvel élément",
    "wikidata-account/dialog-header": "compte Wikidata",
    "wikidata-account/explain-log-in": "Se connecter à Wikidata vous permet de publier vos données sur Wikidata depuis OpenRefine.",
    "wikidata-account/username-label": "Nom d'utilisateur :",
    "wikidata-account/username-placeholder": "Entrez votre nom d'utilisateur",
    "wikidata-account/password-label": "Mot de passe :",
    "wikidata-account/password-placeholder": "Entrez votre mot de passe",
    "wikidata-account/remember-credentials-label": "Se souvenir des identifiants (enregistrés sans chiffrement dans les préférences)",
    "wikidata-account/close": "Fermer",
    "wikidata-account/log-in": "Se connecter",
    "wikidata-account/logged-in-as": "Vous êtes connecté·e en tant que :",
    "wikidata-account/log-out": "Se déconnecter",
    "wikidata-account/connecting-to-wikidata": "Connexion à Wikidata…",
    "perform-wikidata-edits/dialog-header": "Envoyer les modifications sur Wikidata",
    "perform-wikidata-edits/review-your-edits": "Vous êtes sur le point d'envoyer {nb_edits} modifications à Wikidata. Veuillez les vérifier avec soin. Les modifications à grande échelle devraient être approuvées par la communauté.",
    "perform-wikidata-edits/logged-in-as": "Vous êtes connecté·e en tant que",
    "perform-wikidata-edits/edit-summary-label": "Résumé de modification :",
    "perform-wikidata-edits/edit-summary-placeholder": "décrivez vos modifications en quelques mots",
    "perform-wikidata-edits/perform-edits": "Envoyer les modifications",
    "perform-wikidata-edits/cancel": "Annuler",
    "perform-wikidata-edits/analyzing-edits": "Analyse de vos modifications…",
    "warnings-messages/new-item-created/title": "Ce groupe de modifications va créer de nouveaux éléments Wikidata.",
    "warnings-messages/new-item-created/body": "Assurez-vous que ces éléments n'existent pas déjà et qu'ils sont acceptables pour être inclus dans Wikidata.",
    "warnings-messages/new-item-without-labels-or-aliases/title": "Nouveaux éléments créés sans libellé ou alias.",
    "warnings-messages/new-item-without-labels-or-aliases/body": "Vous devriez fournir au moins un libellé pour les nouveaux éléments tels que {example_entity}, pour définir le sujet de ces éléments.",
    "warnings-messages/new-item-without-descriptions/title": "Nouveaux éléments créés sans description.",
    "warnings-messages/new-item-without-descriptions/body": "Ajouter des descriptinos sur les nouveaux éléments tels que {example_entity} aidera à les distinguer d'homonymes.",
    "warnings-messages/new-item-with-deleted-statements/title": "Suppression de déclarations sur des nouveaux éléments.",
    "warnings-messages/new-item-with-deleted-statements/body": "Cela vient probablement d'une erreur dans votre schéma ou projet.",
    "warnings-messages/new-item-without-P31-or-P279/title": "Nouveaux éléments créés sans aucune classe.",
    "warnings-messages/new-item-without-P31-or-P279/body": "Il est préférable d'ajouter une déclaration \"nature de l'élément\" (P31) ou \"sous-classe de\" (P279) pour chaque nouvel élément que vous créez, comme {example_entity} par exemple.",
    "warnings-messages/add-statements-with-invalid-format/title": "Déclarations {property_entity} avec un format invalide.",
    "warnings-messages/add-statements-with-invalid-format/body": "Les valeurs pour cette propriété devraient correspondre à l'expression régulière {regex}, ce qui n'est pas le cas de {example_value} ajouté sur {example_item_entity}.",
    "warnings-messages/remove-statements-with-invalid-format/title": "Déclarations avec un format invalide supprimées.",
    "warnings-messages/remove-statements-with-invalid-format/body": "Si ces déclarations existent sur Wikidata, cela résoudra des violations de contraintes.",
    "warnings-messages/missing-inverse-statements/title": "Déclarations inverses manquantes pour {added_property_entity}.",
    "warnings-messages/missing-inverse-statements/body": "Toute déclaration {added_property_entity} telle que celle de {source_entity} vers {target_entity} devrait aussi être ajoutée à l'envers avec {inverse_property_entity} : dans ce cas, {target_entity} {inverse_property_entity} {source_entity}.",
    "warnings-messages/self-referential-statements/title": "Déclarations auto-référentielles.",
    "warnings-messages/self-referential-statements/body": "Les déclarations qui font référence à l'élément sur lequel elles sont ajoutées sont généralement signe d'erreurs de réconciliation. Il y en a sur {example_entity}.",
    "warnings-messages/unsourced-statements/title": "Déclarations sans références.",
    "warnings-messages/unsourced-statements/body": "La plupart des déclarations devraient avoir des références. Vous pouvez les ajouter facilement dans le schéma.",
    "warnings-messages/property-found-in-mainsnak/title": "{property_entity} utilisée pour une déclaration.",
    "warnings-messages/property-found-in-mainsnak/body": "Vous utilisez {property_entity} comme déclaration principale mais cette propriété n'est pas conçue pour cela.",
    "warnings-messages/property-found-in-qualifier/title": "{property_entity} utilisée comme qualificatif.",
    "warnings-messages/property-found-in-qualifier/body": "Vous utilisez {property_entity} comme un qualificatif mais elle n'est pas conçue pour cela.",
    "warnings-messages/property-found-in-reference/title": "{property_entity} utilisée dans une référence.",
    "warnings-messages/property-found-in-reference/body": "Vous utilisez {property_entity} dans une référence mais cette propriété n'est pas conçue pour cela.",
    "warnings-messages/missing-mandatory-qualifiers/title": "{statement_property_entity} attend un qualificatif {missing_property_entity}.",
    "warnings-messages/missing-mandatory-qualifiers/body": "Les déclarations qui utilisent {statement_property_entity} tels que celle sur {example_item_entity} attendent un qualificatif obligatoire {missing_property_entity}.",
    "warnings-messages/disallowed-qualifiers/title": "Le qualificatif {disallowed_property_entity} est incompatible avec {statement_property_entity}.",
    "warnings-messages/disallowed-qualifiers/body": "Les déclarations utilisant {statement_property_entity} tels que celle sur {example_item_entity} ne devraient pas avoir de qualificatif {disallowed_property_entity}.",
    "warnings-messages/single-valued-property-added-more-than-once/title": "{property_entity} ajoutée plusieurs fois sur le même élément.",
    "warnings-messages/single-valued-property-added-more-than-once/body": "Cette propriété devrait n'être utilisée qu'une fois par élément mais ce n'est pas le cas pour {example_entity}.",
    "warnings-messages/identical-values-for-distinct-valued-property/title": "Valeurs identiques pour {property_entity}",
    "warnings-messages/identical-values-for-distinct-valued-property/body": "Cette propriété devrait avoir des valeurs distinctes, mais la même valeur va être ajoutée sur {item1_entity} et {item2_entity} par exemple.",
    "warnings-messages/no-edit-generated/title": "Aucun changement généré.",
    "warnings-messages/no-edit-generated/body": "Votre schéma n'est probablement pas en accord avec vos données.",
    "warnings-messages/no-issue-detected/title": "Aucun problème détecté dans vos modifications.",
    "warnings-messages/no-issue-detected/body": "OpenRefine ne peut pas détecter tous les types de problèmes que des modifications Wikidata peuvent avoir.",
    "warnings-messages/ignored-qualifiers/title": "Certains qualificatifs ont été ignorés.",
    "warnings-messages/ignored-qualifiers/body": "Les valeurs de ces qualificatifs n'ont pas pu être extraites, ils ne seront donc pas ajoutés aux déclarations correspondantes.",
    "warnings-messages/ignored-references/title": "Certaines références ont été ignorées.",
    "warnings-messages/ignored-references/body": "Aucune déclaration dans ces références n'a pu être construite, ces références sont donc ignorées.",
    "warnings-messages/monolingual-text-without-language/title": "Pas de langue fournie pour des textes monolingues.",
    "warnings-messages/monolingual-text-without-language/body": "Des libellés, descriptions, alias ou textes monolingues ont été ignorés car aucune langue n'a été fournie. Exemple: {example_text}.",
    "warnings-messages/duplicate-whitespace/title": "Espaces dédoublées dans des chaînes de caractères.",
    "warnings-messages/duplicate-whitespace/body": "Des chaînes telles que {example_string} contiennent des espaces dédoublées.",
    "warnings-messages/non-printable-characters/title": "Caractères spéciaux non affichables dans des chaînes de caractères.",
    "warnings-messages/non-printable-characters/body": "Des chaînes telles que {example_string} contiennent des caractères spéciaux non affichables.",
    "warnings-messages/invalid-identifier-space/title": "Espace d'identifiant invalide pour des cellules réconciliées.",
    "warnings-messages/invalid-identifier-space/body": "Certaines cellules réconciliées telles que {example_cell} ont été ignorées car elles ne sont pas réconciliées à Wikidata.",
    "warnings-messages/ignored-language/title": "Identifiants de langue invalides.",
    "warnings-messages/ignored-language/body": "Certains codes de langue sont invalides, tels que {example_value}. Consultez les valeurs autorisées.",
    "warnings-messages/ignored-date/title": "Format de date invalide.",
    "warnings-messages/ignored-date/body": "Certaines dates ne sont pas formatées correctement, par exemple {example_value}. Consultez les formats supportés.",
    "warnings-messages/ignored-amount/title": "Format de quantité invalide.",
    "warnings-messages/ignored-amount/body": "Certaines quantités ne sont pas formatées correctement, telles que {example_value}. Consultez les formats supportés.",
    "warnings-messages/ignored-coordinates/title": "Coordonnées géographiques invalides.",
    "warnings-messages/ignored-coordinates/body": "Certaines coordonnées ne sont pas formatées correctement, par exemple {example_value}. Consultez les formats autorisés.",
    "warnings-messages/forbidden-value/title": "Valeurs invalides pour {property_entity}",
    "warnings-messages/forbidden-value/body": "Les items tels que {example_value_entity} ajoutés sur {example_subject_entity} ne sont pas autorisés comme valeurs pour {property_entity}.",
    "warnings-messages/bounds-disallowed/title": "Incertitudes fournies pour des quantités {property_entity}",
    "warnings-messages/bounds-disallowed/body": "Ces valeurs ne devraient pas avoir d'incertitudes, mais {example_value} ajoutée sur {example_item_entity} en a. Consultez le manuel pour corriger ces formats.",
    "warnings-messages/values-should-be-integers/title": "Valeurs non entières pour {property_entity}",
    "warnings-messages/values-should-be-integers/body": "Les valeurs devraient être des entiers, mais {example_value} ajoutée sur {example_item_entity} a une partie fractionnaire. Consultez le manuel pour corriger ce format.",
    "warnings-messages/invalid-unit/title": "{property_entity} avec des unités invalides",
    "warnings-messages/invalid-unit/body": "Des unités telles que {unit_entity} utilisées sur {example_item_entity} sont invalides pour {property_entity}.",
    "warnings-messages/no-unit-provided/title": "Unité manquante pour {property_entity}",
    "warnings-messages/no-unit-provided/body": "Des valeurs telles que {example_value} sur {example_item_entity} devraient avoir des unités.",
    "warnings-messages/invalid-entity-type/title": "{property_entity} utilisée sur des éléments",
    "warnings-messages/invalid-entity-type/body": "Les utilisations de {property_entity} sur des éléments tels que {example_entity} sont invalides."
}
## 内容3
### 文件路径：
extensions/wikidata/module/scripts/dialogs/schema-alignment-dialog.js
### 代码内容：
var SchemaAlignment = {};

SchemaAlignment._cleanName = function(s) {
  return s.replace(/\W/g, " ").replace(/\s+/g, " ").toLowerCase();
};

var SchemaAlignmentDialog = {};

/**
 * Installs the tabs in the UI the first time the Wikidata
 * extension is called.
 */
SchemaAlignmentDialog.setUpTabs = function() {
  var self = this;
  this._rightPanel = $('#right-panel');
  this._viewPanel = $('#view-panel').addClass('main-view-panel-tab');
  this._toolPanel = $('#tool-panel');
  this._summaryBar = $('#summary-bar')
        .addClass('main-view-panel-tab-header')
        .addClass('active')
        .attr('href', '#view-panel');

  this._schemaPanel = $('

')
        .addClass('main-view-panel-tab')
        .appendTo(this._rightPanel);
  this._issuesPanel = $('

')
        .addClass('main-view-panel-tab')
        .appendTo(this._rightPanel);
  this._previewPanel = $('

')
        .addClass('main-view-panel-tab')
        .appendTo(this._rightPanel);

  var schemaButton = $('

')
        .addClass('main-view-panel-tab-header')
        .attr('href', '#wikidata-schema-panel')
        .text($.i18n('wikidata-schema/schema-tab-header'))
        .appendTo(this._toolPanel);
  var issuesButton = $('

')
        .addClass('main-view-panel-tab-header')
        .attr('href', '#wikidata-issues-panel')
        .text($.i18n('wikidata-schema/warnings-tab-header')+' ')
        .appendTo(this._toolPanel);
  this.issuesTabCount = $('')
        .addClass('schema-alignment-total-warning-count')
        .appendTo(issuesButton)
        .hide();
  this.issueSpinner = $('')
        .attr('src', 'images/large-spinner.gif')
        .attr('width', '16px')
        .appendTo(issuesButton);
  var previewButton = $('

')
        .addClass('main-view-panel-tab-header')
        .attr('href', '#wikidata-preview-panel')
        .text($.i18n('wikidata-schema/edits-preview-tab-header'))
        .appendTo(this._toolPanel);
  this.previewSpinner = $('')
        .attr('src', 'images/large-spinner.gif')
        .attr('width', '16px')
        .appendTo(previewButton);

  this._unsavedIndicator = $('')
        .html(' *')
        .attr('title', $.i18n('wikidata-schema/unsaved-changes-alt'))
        .hide()
        .appendTo(schemaButton);

  $('.main-view-panel-tab-header').click(function(e) {
     var targetTab = $(this).attr('href');
     SchemaAlignmentDialog.switchTab(targetTab);
     e.preventDefault();
  });

  /**
   * Init the schema tab
   */
  var schemaTab = $(DOM.loadHTML("wikidata", "scripts/schema-alignment-tab.html")).appendTo(this._schemaPanel);
  var schemaElmts = this._schemaElmts = DOM.bind(schemaTab);
  schemaElmts.dialogExplanation.text($.i18n('wikidata-schema/dialog-explanation'));
  this._plusButton($.i18n('wikidata-schema/add-item-button'), schemaElmts.addItemButton);
  schemaElmts.addItemButton.click(function(e) {
    self._addItem();
    SchemaAlignmentDialog._hasChanged();
    e.preventDefault();
  });
  schemaElmts.saveButton
        .text($.i18n('wikidata-schema/save-button'))
        .attr('title', $.i18n('wikidata-schema/save-schema-alt'))
        .prop('disabled', true)
        .addClass('disabled')
        .click(function() { SchemaAlignmentDialog._save(); });
  schemaElmts.discardButton
        .text($.i18n('wikidata-schema/discard-button'))
        .attr('title', $.i18n('wikidata-schema/discard-schema-changes-alt'))
        .prop('disabled', true)
        .addClass('disabled')
        .click(function() { SchemaAlignmentDialog._discardChanges(); });

  this._wikibasePrefix = "http://www.wikidata.org/entity/"; // hardcoded for now

  // Init the column area
  this.updateColumns();

  var url = ReconciliationManager.ensureDefaultServicePresent();
  SchemaAlignmentDialog._reconService = ReconciliationManager.getServiceFromUrl(url);

  /**
   * Init the issues tab
   */
  var issuesTab = $(DOM.loadHTML("wikidata", "scripts/issues-tab.html")).appendTo(this._issuesPanel);
  var issuesElmts = this._issuesElmts = DOM.bind(issuesTab);
  issuesElmts.invalidSchemaWarningIssues.text($.i18n('wikidata-schema/invalid-schema-warning-issues'));

  /**
   * Init the preview tab
   */
  var previewTab = $(DOM.loadHTML("wikidata", "scripts/preview-tab.html")).appendTo(this._previewPanel);
  var previewElmts = this._previewElmts = DOM.bind(previewTab);
  SchemaAlignmentDialog.updateNbEdits(0);
  previewElmts.invalidSchemaWarningPreview.text($.i18n('wikidata-schema/invalid-schema-warning-preview'));

  this._previewPanes = $(".schema-alignment-dialog-preview");

  // Load the existing schema
  this._reset(theProject.overlayModels.wikibaseSchema);
  // Perform initial preview
  this.preview();
}

SchemaAlignmentDialog.updateColumns = function() {
  var columns = theProject.columnModel.columns;
  this._columnArea = $(".schema-alignment-dialog-columns-area");
  this._columnArea.empty();
  for (var i = 0; i < columns.length; i++) {
     var column = columns[i];
     var reconConfig = column.reconConfig;
     var cell = SchemaAlignmentDialog._createDraggableColumn(column.name,
        reconConfig && reconConfig.identifierSpace === this._wikibasePrefix && column.reconStats);
     this._columnArea.append(cell);
  }

  $('.wbs-reconciled-column').draggable({
     helper: "clone",
     cursor: "crosshair",
     snap: ".wbs-item-input input, .wbs-target-input input",
     zIndex: 100,
  });
  $('.wbs-unreconciled-column').draggable({
     helper: "clone",
     cursor: "crosshair",
     snap: ".wbs-target-input input",
     zIndex: 100,
  });
}

SchemaAlignmentDialog.switchTab = function(targetTab) {
  $('.main-view-panel-tab').hide();
  $('.main-view-panel-tab-header').removeClass('active');
  $('.main-view-panel-tab-header[href="'+targetTab+'"]').addClass('active');
  $(targetTab).show();
  resizeAll();
  var panelHeight = this._viewPanel.height();
  this._schemaPanel.height(panelHeight);
  this._issuesPanel.height(panelHeight);
  this._previewPanel.height(panelHeight);
  // Resize the inside of the schema panel
  var headerHeight = this._schemaElmts.schemaHeader.outerHeight();
  this._schemaElmts.canvas.height(panelHeight - headerHeight - 10);

  if (targetTab === "#view-panel") {
     ui.dataTableView.render();
  }
}

SchemaAlignmentDialog.isSetUp = function() {
  return $('#wikidata-schema-panel').length !== 0;
}

SchemaAlignmentDialog.launch = function(onDone) {
  this._onDone = onDone;
  this._hasUnsavedChanges = false;

  if (!SchemaAlignmentDialog.isSetUp()) {
     SchemaAlignmentDialog.setUpTabs();
  }
  SchemaAlignmentDialog.switchTab('#wikidata-schema-panel');

  // this._createDialog();
}

var beforeUnload = function(e) {
  if (SchemaAlignmentDialog.isSetUp() && SchemaAlignmentDialog._hasUnsavedChanges === true) {
     return (e = $.i18n('wikidata-schema/unsaved-warning'));
  }
};

$(window).bind('beforeunload', beforeUnload);

SchemaAlignmentDialog._reset = function(schema) {
  this._originalSchema = schema || { itemDocuments: [] };
  this._schema = cloneDeep(this._originalSchema); // this is what can be munched on

  $('#schema-alignment-statements-container').empty();

  if (this._schema && this._schema.itemDocuments) {
    for(var i = 0; i != this._schema.itemDocuments.length; i++) {
      this._addItem(this._schema.itemDocuments[i]);
    }
  }

  if (!this._schema.itemDocuments.length) {
    // this._addItem();
  }
};

SchemaAlignmentDialog._save = function(onDone) {
  var self = this;
  var schema = this.getJSON();

  Refine.postProcess(
    "wikidata",
    "save-wikibase-schema",
    {},
    { schema: JSON.stringify(schema) },
    {},
    {
      onDone: function() {
        theProject.overlayModels.wikibaseSchema = schema;

        $('.invalid-schema-warning').hide();
        self._changesCleared();

        if (onDone) onDone();
      },
      onError: function(e) {
        alert($.i18n('wikidata-schema/incomplete-schema-could-not-be-saved'));
      },
    }
  );
};

SchemaAlignmentDialog._discardChanges = function() {
  this._reset(theProject.overlayModels.wikibaseSchema);
  this._changesCleared();
}

SchemaAlignmentDialog._changesCleared = function() {
  this._hasUnsavedChanges = false;
  this._unsavedIndicator.hide();
  this._schemaElmts.saveButton
        .prop('disabled', true)
        .addClass('disabled');
  this._schemaElmts.discardButton
        .prop('disabled', true)
        .addClass('disabled');
}

SchemaAlignmentDialog._createDraggableColumn = function(name, reconciled) {
  var cell = $("

").addClass('wbs-draggable-column').text(name);
  if (reconciled) {
    cell.addClass('wbs-reconciled-column');
  } else {
    cell.addClass('wbs-unreconciled-column');
  }
  return cell;
}

SchemaAlignmentDialog._plusButton = function(label, element) {
   var plus = $('').html('+ ').appendTo(element);
   var span = $('').text(label)
        .appendTo(element);
}

SchemaAlignmentDialog._makeDeleteButton = function (noText) {
  var button = $('

').addClass('wbs-remove').append(
     $('').addClass('wbs-icon')
  );
  if(noText === undefined) {
     button.append(
     $('').text($.i18n('wikidata-schema/remove')));
  }
  return button;
}

/**************/
/*** ITEMS ****/
/**************/

SchemaAlignmentDialog._addItem = function(json) {
  var subject = null;
  var statementGroups = null;
  var nameDescs = null;
  if (json) {
     subject = json.subject;
     statementGroups = json.statementGroups;
     nameDescs = json.nameDescs;
  }

  var item = $('

').addClass('wbs-item');
  $('#schema-alignment-statements-container').append(item);
  var deleteToolbar = $('

').addClass('wbs-toolbar')
        .attr('style', 'margin-top: 10px')
        .appendTo(item);
  var deleteButton = SchemaAlignmentDialog._makeDeleteButton()
        .appendTo(deleteToolbar)
        .click(function(e) {
     item.remove();
     SchemaAlignmentDialog._hasChanged();
     e.preventDefault();
  });
  var inputContainer = $('

').addClass('wbs-item-input').appendTo(item);
  SchemaAlignmentDialog._initField(inputContainer, "wikibase-item", subject);
  var right = $('

').addClass('wbs-item-contents').appendTo(item);

  // Terms
  $('').addClass('wbs-namedesc-header')
       .text($.i18n('wikidata-schema/terms-header')).appendTo(right);
  $('

').addClass('wbs-namedesc-container')
        .attr('data-emptyplaceholder', $.i18n('wikidata-schema/empty-terms'))
        .appendTo(right);
  var termToolbar = $('

').addClass('wbs-toolbar').appendTo(right);
  var addNamedescButton = $('').addClass('wbs-add-namedesc')
  .click(function(e) {
     SchemaAlignmentDialog._addNameDesc(item, null);
     e.preventDefault();
  }).appendTo(termToolbar);
  SchemaAlignmentDialog._plusButton(
         $.i18n('wikidata-schema/add-term'), addNamedescButton);

  // Clear the float
  $('

').attr('style', 'clear: right').appendTo(right);

  // Statements
  $('

').addClass('wbs-statements-header')
        .text($.i18n('wikidata-schema/statements-header')).appendTo(right);
  $('

').addClass('wbs-statement-group-container')
        .attr('data-emptyplaceholder', $.i18n('wikidata-schema/empty-statements'))
        .appendTo(right);
  var statementToolbar = $('

').addClass('wbs-toolbar').appendTo(right);
  var addStatementButton = $('').addClass('wbs-add-statement-group')
        .click(function(e) {
     SchemaAlignmentDialog._addStatementGroup(item, null);
     e.preventDefault();
  }).appendTo(statementToolbar);

  SchemaAlignmentDialog._plusButton(
         $.i18n('wikidata-schema/add-statement'), addStatementButton);

  if (statementGroups) {
     for(var i = 0; i != statementGroups.length; i++) {
        SchemaAlignmentDialog._addStatementGroup(item, statementGroups[i]);
     }
  }

  if (nameDescs) {
     for(var i = 0; i != nameDescs.length; i++) {
        SchemaAlignmentDialog._addNameDesc(item, nameDescs[i]);
     }
  }
}

SchemaAlignmentDialog._itemToJSON = function (item) {
    var statementGroupLst = new Array();
    item.find('.wbs-statement-group').each(function () {
        statementGroupLst.push(SchemaAlignmentDialog._statementGroupToJSON($(this)));
    });
    var nameDescLst = new Array();
    item.find('.wbs-namedesc').each(function () {
        nameDescLst.push(SchemaAlignmentDialog._nameDescToJSON($(this)));
    });
    var inputContainer = item.find(".wbs-item-input").first();
    return {subject: SchemaAlignmentDialog._inputContainerToJSON(inputContainer),
            statementGroups: statementGroupLst,
            nameDescs: nameDescLst};
};

/**************************
 * NAMES AND DESCRIPTIONS *
 **************************/

SchemaAlignmentDialog._addNameDesc = function(item, json) {
  var type = 'ALIAS';
  var value = null;
  if (json) {
     type = json.name_type;
     value = json.value;
  }

  var container = item.find('.wbs-namedesc-container').first();
  var namedesc = $('

').addClass('wbs-namedesc').appendTo(container);
  var type_container = $('

').addClass('wbs-namedesc-type').appendTo(namedesc);
  var type_input = $('<select></select>').appendTo(type_container);
  $('<option></option>')
  .attr('value', 'LABEL')
  .text($.i18n('wikidata-schema/label'))
  .appendTo(type_input);
  $('<option></option>')
  .attr('value', 'DESCRIPTION')
  .text($.i18n('wikidata-schema/description'))
  .appendTo(type_input);
  $('<option></option>')
  .attr('value', 'ALIAS')
  .text($.i18n('wikidata-schema/alias'))
  .appendTo(type_input);
  type_input.val(type);
  type_input.on('change', function(e) {
    SchemaAlignmentDialog._hasChanged();
  });

  var toolbar = $('

').addClass('wbs-toolbar').appendTo(namedesc);
  SchemaAlignmentDialog._makeDeleteButton().click(function(e) {
     namedesc.remove();
     SchemaAlignmentDialog._hasChanged();
     e.preventDefault();
  }).appendTo(toolbar);

  var right = $('

').addClass('wbs-right').appendTo(namedesc);
  var value_container = $('

').addClass('wbs-namedesc-value').appendTo(namedesc);
  SchemaAlignmentDialog._initField(value_container, "monolingualtext", value);

}

SchemaAlignmentDialog._nameDescToJSON = function (namedesc) {
  var type = namedesc.find('select').first().val();
  var value = namedesc.find('.wbs-namedesc-value').first().data("jsonValue");
  return {
    type: "wbnamedescexpr",
    name_type: type,
    value: value,
  };
}

/********************
 * STATEMENT GROUPS *
 ********************/

SchemaAlignmentDialog._addStatementGroup = function(item, json) {
  var property = null;
  var statements = null;
  if (json) {
     property = json.property;
     statements = json.statements;
  }

  var container = item.find('.wbs-statement-group-container').first();
  var statementGroup = $('

').addClass('wbs-statement-group');
  var inputContainer = $('

').addClass('wbs-prop-input').appendTo(statementGroup);
  var right = $('

').addClass('wbs-right').appendTo(statementGroup);
  var statementContainer = $('

').addClass('wbs-statement-container').appendTo(right);
  SchemaAlignmentDialog._initPropertyField(inputContainer, statementContainer, property);
  var toolbar = $('

').addClass('wbs-toolbar').appendTo(right);
  var addValueButton = $('').addClass('wbs-add-statement').click(function(e) {
     var datatype = inputContainer.data("jsonValue").datatype;
     SchemaAlignmentDialog._addStatement(statementContainer, datatype, null);
     e.preventDefault();
  }).appendTo(toolbar).hide();
  SchemaAlignmentDialog._plusButton($.i18n('wikidata-schema/add-value'), addValueButton);
  var removeButton = SchemaAlignmentDialog._makeDeleteButton()
        .addClass('wbs-remove-statement-group')
        .appendTo(toolbar)
        .click(function(e) {
     statementGroup.remove();
     e.preventDefault();
  });

  container.append(statementGroup);

  if (statements) {
     for (var i = 0; i != statements.length; i++) {
        SchemaAlignmentDialog._addStatement(statementContainer, property.datatype, statements[i]);
        addValueButton.show();
        removeButton.hide();
     }
  } else {
     inputContainer.find('input').focus();
  }

}

SchemaAlignmentDialog._statementGroupToJSON = function (statementGroup) {
    var lst = new Array();
    statementGroup.find('.wbs-statement-container').first().children('.wbs-statement').each(function () {
    lst.push(SchemaAlignmentDialog._statementToJSON($(this)));
    });
    var inputContainer = statementGroup.find(".wbs-prop-input").first();
    return {property: SchemaAlignmentDialog._inputContainerToJSON(inputContainer),
            statements: lst};
};

/**************
 * STATEMENTS *
 **************/

SchemaAlignmentDialog._addStatement = function(container, datatype, json) {
  var qualifiers = null;
  var references = null;
  var value = null;
  if (json) {
    qualifiers = json.qualifiers;
    references = json.references;
    value = json.value;
  }

  var statement = $('

').addClass('wbs-statement');
  var inputContainer = $('

').addClass('wbs-target-input').appendTo(statement);
  SchemaAlignmentDialog._initField(inputContainer, datatype, value);

  // If we are in a mainsnak...
  // (see https://www.mediawiki.org/wiki/Wikibase/DataModel#Snaks)
  if (container.parents('.wbs-statement').length == 0) {
    // add delete button
    var toolbar1 = $('

').addClass('wbs-toolbar').appendTo(statement);
    SchemaAlignmentDialog._makeDeleteButton().click(function(e) {
        SchemaAlignmentDialog._removeStatement(statement);
        e.preventDefault();
    }).appendTo(toolbar1);

    // add rank
    var rank = $('

').addClass('wbs-rank-selector-icon').prependTo(inputContainer);

    // add qualifiers...
    var right = $('

').addClass('wbs-right').appendTo(statement);
    var qualifierContainer = $('

').addClass('wbs-qualifier-container').appendTo(right);
    var toolbar2 = $('

').addClass('wbs-toolbar').appendTo(right);
    var addQualifierButton = $('').addClass('wbs-add-qualifier')
        .click(function(e) {
        SchemaAlignmentDialog._addQualifier(qualifierContainer, null);
        e.preventDefault();
    }).appendTo(toolbar2);
    SchemaAlignmentDialog._plusButton($.i18n('wikidata-schema/add-qualifier'), addQualifierButton);

    if (qualifiers) {
       for (var i = 0; i != qualifiers.length; i++) {
         SchemaAlignmentDialog._addQualifier(qualifierContainer, qualifiers[i]);
       }
    }

    // and references
    $('

').attr('style', 'clear: right').appendTo(statement);
    var referencesToggleContainer = $('

').addClass('wbs-references-toggle').appendTo(statement);
    var triangle = $('

').addClass('triangle-icon').addClass('pointing-right').appendTo(referencesToggleContainer);
    var referencesToggle = $('').appendTo(referencesToggleContainer);
    right = $('

').addClass('wbs-right').appendTo(statement);
    var referenceContainer = $('

').addClass('wbs-reference-container').appendTo(right);
    referencesToggleContainer.click(function(e) {
        triangle.toggleClass('pointing-down');
        triangle.toggleClass('pointing-right');
        referenceContainer.toggle(100);
        e.preventDefault();
    });
    referenceContainer.hide();
    var right2 = $('

').addClass('wbs-right').appendTo(right);
    var toolbar3 = $('

').addClass('wbs-toolbar').appendTo(right2);
    var addReferenceButton = $('').addClass('wbs-add-reference')
        .click(function(e) {
        referenceContainer.show();
        SchemaAlignmentDialog._addReference(referenceContainer, null);
        SchemaAlignmentDialog._updateReferencesNumber(referenceContainer);
        e.preventDefault();
    }).appendTo(toolbar3);
    SchemaAlignmentDialog._plusButton($.i18n('wikidata-schema/add-reference'), addReferenceButton);
    if (references) {
        for (var i = 0; i != references.length; i++) {
          SchemaAlignmentDialog._addReference(referenceContainer, references[i]);
        }
    }
    SchemaAlignmentDialog._updateReferencesNumber(referenceContainer);
  }
  container.append(statement);
}

SchemaAlignmentDialog._statementToJSON = function (statement) {
    var inputContainer = statement.find(".wbs-target-input").first();
    var qualifiersList = new Array();
    var referencesList = new Array();
    statement.find('.wbs-qualifier-container').first().children().each(function () {
        qualifiersList.push(SchemaAlignmentDialog._qualifierToJSON($(this)));
    });
    statement.find('.wbs-reference-container').first().children().each(function () {
        referencesList.push(SchemaAlignmentDialog._referenceToJSON($(this)));
    });
    return {
        value:SchemaAlignmentDialog._inputContainerToJSON(inputContainer),
        qualifiers: qualifiersList,
        references: referencesList,
    };
};

/**************
 * QUALIFIERS *
 **************/

SchemaAlignmentDialog._addQualifier = function(container, json) {
  var property = null;
  var value = null;
  if (json) {
    property = json.prop;
    value = json.value;
  }

  var qualifier = $('

').addClass('wbs-qualifier').appendTo(container);
  var toolbar1 = $('

').addClass('wbs-toolbar').appendTo(qualifier);
  var inputContainer = $('

').addClass('wbs-prop-input').appendTo(qualifier);
  var right = $('

').addClass('wbs-right').appendTo(qualifier);
  var deleteButton = SchemaAlignmentDialog._makeDeleteButton()
            .addClass('wbs-remove-statement-group')
            .appendTo(toolbar1).click(function(e) {
    qualifier.remove();
    SchemaAlignmentDialog._hasChanged();
    e.preventDefault();
  });
  var statementContainer = $('

').addClass('wbs-statement-container').appendTo(right);
  SchemaAlignmentDialog._initPropertyField(inputContainer, statementContainer, property);
  if (value && property) {
    SchemaAlignmentDialog._addStatement(statementContainer, property.datatype, {value:value});
  } else {
    inputContainer.find('input').focus();
  }
}

SchemaAlignmentDialog._qualifierToJSON = function(elem) {
  var prop = elem.find(".wbs-prop-input").first();
  var target = elem.find(".wbs-target-input").first();
  return {
      prop: SchemaAlignmentDialog._inputContainerToJSON(prop),
      value: SchemaAlignmentDialog._inputContainerToJSON(target),
  };
}

/**************
 * REFERENCES *
 **************/

SchemaAlignmentDialog._addReference = function(container, json) {
  var snaks = null;
  if (json) {
     snaks = json.snaks;
  }

  var reference = $('

').addClass('wbs-reference').appendTo(container);
  var referenceHeader = $('

').addClass('wbs-reference-header').appendTo(reference);
  var toolbarRef = $('

').addClass('wbs-toolbar').appendTo(referenceHeader);
  SchemaAlignmentDialog._makeDeleteButton().click(function(e) {
     reference.remove();
     SchemaAlignmentDialog._updateReferencesNumber(container);
     SchemaAlignmentDialog._hasChanged();
     e.preventDefault();
  }).appendTo(toolbarRef);
  var right = $('

').addClass('wbs-right').appendTo(reference);
  var qualifierContainer = $('

').addClass('wbs-qualifier-container').appendTo(right);
  var toolbar2 = $('

').addClass('wbs-toolbar').appendTo(right);
  var addSnakButton = $('').addClass('wbs-add-qualifier')
        .click(function(e) {
      SchemaAlignmentDialog._addQualifier(qualifierContainer, null);
      e.preventDefault();
  }).appendTo(toolbar2);
  SchemaAlignmentDialog._plusButton($.i18n('wikidata-schema/add-reference-snak'), addSnakButton);

  if (snaks) {
     for (var i = 0; i != snaks.length; i++) {
        SchemaAlignmentDialog._addQualifier(qualifierContainer, snaks[i]);
     }
  } else {
     SchemaAlignmentDialog._addQualifier(qualifierContainer, null);
  }
}

SchemaAlignmentDialog._referenceToJSON = function(reference) {
  var snaks = reference.find('.wbs-qualifier-container').first().children();
  var snaksList = new Array();
  snaks.each(function () {
      snaksList.push(SchemaAlignmentDialog._qualifierToJSON($(this)));
  });
  return {snaks:snaksList};
}

SchemaAlignmentDialog._updateReferencesNumber = function(container) {
  var childrenCount = container.children().length;
  var statement = container.parents('.wbs-statement');
  var a = statement.find('.wbs-references-toggle a').first();
  a.html(childrenCount+$.i18n('wikidata-schema/nb-references'));
}

/************************
 * FIELD INITIALIZATION *
 ************************/

SchemaAlignmentDialog._getPropertyType = function(pid, callback) {
  $.ajax({
      url:'https://www.wikidata.org/w/api.php',
      data: {
        action: "wbgetentities",
        format: "json",
        ids: pid,
        props: "datatype",
     },
     dataType: "jsonp",
     success: function(data) {
        callback(data.entities[pid].datatype);
     }});
}

SchemaAlignmentDialog._initPropertyField = function(inputContainer, targetContainer, initialValue) {
  var input = $('<input></input>').appendTo(inputContainer);
  input.attr("placeholder", $.i18n('wikidata-schema/property-placeholder'));

  if (this._reconService !== null) {
    endpoint = this._reconService.suggest.property;
    var suggestConfig = $.extend({}, endpoint);
    suggestConfig.key = null;
    suggestConfig.query_param_name = "prefix";

    input.suggestP(suggestConfig).bind("fb-select", function(evt, data) {
        // Fetch the type of this property and add the appropriate target value type
        var statementGroup = inputContainer.parents(".wbs-statement-group, .wbs-qualifier").first();
        SchemaAlignmentDialog._getPropertyType(data.id, function(datatype) {
          inputContainer.data("jsonValue", {
            type : "wbpropconstant",
            pid : data.id,
            label: data.name,
            datatype: datatype,
          });
          SchemaAlignmentDialog._addStatement(targetContainer, datatype, null);
          var addValueButtons = targetContainer.parent().find('.wbs-add-statement');
          var removeGroupButton = targetContainer.parent().find('.wbs-remove-statement-group');
          removeGroupButton.hide();
          addValueButtons.show();
        });
        SchemaAlignmentDialog._hasChanged();
    }).bind("fb-textchange", function(evt, data) {
        inputContainer.data("jsonValue", null);
        targetContainer.find('.wbs-statement').remove();
        var addValueButtons = targetContainer.parent().find('.wbs-add-statement');
        var removeGroupButton = targetContainer.parent().find('.wbs-remove-statement-group');
        addValueButtons.hide();
        removeGroupButton.show();
    });
   // adds tweaks to display the validation status more clearly, like in Wikidata
   fixSuggestInput(input);
  }

  // Init with the provided initial value.
  if (initialValue) {
     if (initialValue.type === "wbpropconstant") {
        input.val(initialValue.label);
        input.addClass('wbs-validated-input');
     }
     inputContainer.data("jsonValue", initialValue);
  }

}

SchemaAlignmentDialog._initField = function(inputContainer, mode, initialValue, changedCallback) {
  var input = $('<input></input>').appendTo(inputContainer);

  if (! changedCallback) {
    changedCallback = SchemaAlignmentDialog._hasChanged;
  }

  if (this._reconService !== null && (mode === "wikibase-item" || mode === "unit")) {
    if (mode === "wikibase-item") {
        input.attr("placeholder", $.i18n('wikidata-schema/item-or-reconciled-column'));
    } else {
        input.attr("placeholder", $.i18n('wikidata-schema/unit'));
    }
    var endpoint = null;
    endpoint = this._reconService.suggest.entity;
    var suggestConfig = $.extend({}, endpoint);
    suggestConfig.key = null;
    suggestConfig.query_param_name = "prefix";

    input.suggestP(suggestConfig).bind("fb-select", function(evt, data) {
        inputContainer.data("jsonValue", {
            type : "wbitemconstant",
            qid : data.id,
            label: data.name,
        });
        changedCallback();
    });
    // adds tweaks to display the validation status more clearly, like in Wikidata
    fixSuggestInput(input);

  } else if (this._reconService !== null && mode === "wikibase-property") {
    var endpoint = null;
    endpoint = this._reconService.suggest.property;
    var suggestConfig = $.extend({}, endpoint);
    suggestConfig.key = null;
    suggestConfig.query_param_name = "prefix";

    input.suggestP(suggestConfig).bind("fb-select", function(evt, data) {
        inputContainer.data("jsonValue", {
            type : "wbpropconstant",
            pid : data.id,
            label: data.name,
            datatype: "not-important",
        });
        changedCallback();
    });
    // adds tweaks to display the validation status more clearly, like in Wikidata
    fixSuggestInput(input);

  } else if (mode === "time") {
     input.attr("placeholder", "YYYY(-MM(-DD))...");
     var propagateValue = function(val) {
        // TODO add validation here
        inputContainer.data("jsonValue", {
           type: "wbdateconstant",
           value: val,
        });
    };
    propagateValue("");
    input.change(function() {
      propagateValue($(this).val());
      changedCallback();
    });

    SchemaAlignmentDialog.setupStringInputValidation(input, /^\d{4}(-[0-1]\d(-[0-3]\d(T[0-2]\d(:[0-5]\d(:[0-5]\dZ)?)?)?)?)?$/);
   } else if (mode === "globe-coordinate") {
     input.attr("placeholder", "lat,lon");
     var propagateValue = function(val) {
        // TODO add validation here
        inputContainer.data("jsonValue", {
           type: "wblocationconstant",
           value: val,
        });
    };
    propagateValue("");
    input.change(function() {
      propagateValue($(this).val());
      changedCallback();
    });

    SchemaAlignmentDialog.setupStringInputValidation(input, /^[\-+]?\d+(\.\d*)?[,\/][\-+]?\d+(\.\d*)?([,\/]\d+(\.\d*)?)?$/);
   } else if (mode === "language") {
     input.attr("placeholder", "lang");
     input.addClass("wbs-language-input");
     input.langsuggest().bind("fb-select", function(evt, data) {
        inputContainer.data("jsonValue", {
            type: "wblanguageconstant",
            id: data.id,
            label: data.name,
        });
        changedCallback();
     });
     fixSuggestInput(input);

   } else if (mode === "monolingualtext") {
     input.remove();
     var inputContainerLanguage = $('

')
     .addClass('wbs-monolingual-container')
     .width('30%')
     .appendTo(inputContainer);
     var inputContainerValue = $('

')
     .addClass('wbs-monolingual-container')
     .width('70%')
     .appendTo(inputContainer);

     var langValue = null;
     var strValue = null;
     if (initialValue) {
         langValue = initialValue.language;
         strValue = initialValue.value;
     }

     var propagateValue = function() {
        inputContainer.data("jsonValue", {
           type: "wbmonolingualexpr",
           language: inputContainerLanguage.data("jsonValue"),
           value: inputContainerValue.data("jsonValue"),
        });
        changedCallback();
     }

     SchemaAlignmentDialog._initField(inputContainerLanguage, "language", langValue, propagateValue);
     SchemaAlignmentDialog._initField(inputContainerValue, "string", strValue, propagateValue);

   } else if (mode === "quantity") {
     input.remove();
     var inputContainerAmount = $('

')
     .addClass('wbs-quantity-container')
     .width('60%')
     .appendTo(inputContainer);
     var inputContainerUnit = $('

')
     .addClass('wbs-quantity-container')
     .width('40%')
     .appendTo(inputContainer);

     var amountValue = null;
     var unitValue = null;
     if (initialValue) {
        amountValue = initialValue.amount;
        unitValue = initialValue.unit;
     }

     var propagateValue = function() {
        inputContainer.data("jsonValue", {
           type: "wbquantityexpr",
           amount: inputContainerAmount.data("jsonValue"),
           unit: inputContainerUnit.data("jsonValue"),
        });
        changedCallback();
     }

     SchemaAlignmentDialog._initField(inputContainerAmount, "amount", amountValue, propagateValue);
     SchemaAlignmentDialog._initField(inputContainerUnit, "unit", unitValue, propagateValue);

   } else {
    var propagateValue = function(val) {
        inputContainer.data("jsonValue", {
           type: "wbstringconstant",
           value: val,
        });
    };
    propagateValue("");
    input.change(function() {
      propagateValue($(this).val());
      changedCallback();
    });
    if (mode === "amount") {
        input.attr("placeholder", $.i18n('wikidata-schema/amount'));
        SchemaAlignmentDialog.setupStringInputValidation(input, /^[\-+]?\d+(\.\d*)?(E[\-+]\d+)?$/);
    } else if (mode === "url") {
        input.attr("placeholder", $.i18n('wikidata-schema/full-url'));
        SchemaAlignmentDialog.setupStringInputValidation(input, /^https?:\/\/.+$/);
    } else if (mode === "tabular-data") {
        input.attr("placeholder", $.i18n('wikidata-schema/tabular-data-with-prefix'));
        SchemaAlignmentDialog.setupStringInputValidation(input, /^Data:.+$/);
    } else if (mode === "commonsMedia") {
        input.attr("placeholder", $.i18n('wikidata-schema/commons-media'));
    } else if (mode === "math") {
        input.attr("placeholder", $.i18n('wikidata-schema/math-expression'));
    } else if (mode === "geo-shape") {
        input.attr("placeholder", $.i18n('wikidata-schema/geoshape-with-prefix'));
        SchemaAlignmentDialog.setupStringInputValidation(input, /^Data:.+$/);
    } else {
        SchemaAlignmentDialog.setupStringInputValidation(input, /^.+$/);
    }
    if (mode !== "external-id" &&
        mode !== "url" &&
        mode !== "string" &&
        mode !== "amount" &&
        mode !== "tabular-data" &&
        mode !== "commonsMedia" &&
        mode !== "geo-shape" &&
        mode !== "math") {
       alert($.i18n('wikidata-schema/datatype-not-supported-yet'));
    }
  }

  var acceptDraggableColumn = function(column) {
    input.hide();
    input.val("");
    var columnDiv = $('

').appendTo(inputContainer);
    column.appendTo(columnDiv);
    var origText = column.text();
    column.text("");
    column.append($('

').addClass('wbs-restricted-column-name').text(origText));
    var deleteButton = SchemaAlignmentDialog._makeDeleteButton(true).appendTo(column);
    deleteButton.attr('alt', $.i18n('wikidata-schema/remove-column'));
    deleteButton.click(function (e) {
        columnDiv.remove();
        input.show();
        inputContainer.data("jsonValue", null);
        changedCallback();
        e.preventDefault();
    });
  };

  // Make it droppable
  var acceptClass = ".wbs-draggable-column";
  var wbVariableType = "wbstringvariable";
  if (mode === "wikibase-item" || mode === "unit") {
      acceptClass = ".wbs-reconciled-column";
      wbVariableType = "wbitemvariable";
  } else if (mode === "time") {
      wbVariableType = "wbdatevariable";
  } else if (mode === "globe-coordinate") {
      wbVariableType = "wblocationvariable";
  } else if (mode === "monolingualtext" || mode === "quantity") {
      wbVariableType = null; // not droppable directly
  } else if (mode === "language") {
      wbVariableType = "wblanguagevariable";
  }

  if (wbVariableType) {
    inputContainer.droppable({
        accept: acceptClass,
    }).on("drop", function (evt, ui) {
        var column = ui.draggable.clone();
        acceptDraggableColumn(column);
        inputContainer.data("jsonValue", {
            type : wbVariableType,
            columnName: ui.draggable.text(),
        });
        changedCallback();
        return true;
    }).on("dropactivate", function(evt, ui) {
        input.addClass("wbs-accepting-input");
    }).on("dropdeactivate", function(evt, ui) {
        input.removeClass("wbs-accepting-input");
    });
  }

  // Init with the provided initial value.
  if (initialValue) {
     if (initialValue.type === "wbitemconstant" || initialValue.type === "wbpropconstant") {
        input.val(initialValue.label);
        input.addClass("wbs-validated-input");
     } else if (initialValue.type == "wbitemvariable") {
        var cell = SchemaAlignmentDialog._createDraggableColumn(initialValue.columnName, true);
        acceptDraggableColumn(cell);
     } else if (initialValue.type === "wbstringconstant" ||
                initialValue.type === "wbdateconstant" ||
                initialValue.type === "wblocationconstant") {
        input.val(initialValue.value);
     } else if (initialValue.type === "wblanguageconstant") {
        input.val(initialValue.id);
        input.addClass("wbs-validated-input");
     } else if (initialValue.type === "wbstringvariable" ||
                initialValue.type === "wbdatevariable" ||
                initialValue.type === "wblocationvariable" ||
                initialValue.type === "wblanguagevariable") {
        var cell = SchemaAlignmentDialog._createDraggableColumn(initialValue.columnName, false);
        acceptDraggableColumn(cell);
     }
     inputContainer.data("jsonValue", initialValue);
  }
}

SchemaAlignmentDialog.setupStringInputValidation = function(input, regex) {
  input.focus(function() {
    input.removeClass('wbs-unvalidated-input');
  }).blur(function() {
    var currentValue = input.val();
    if (regex.test(currentValue)) {
       input.addClass('wbs-validated-input');
    } else {
       input.addClass('wbs-unvalidated-input');
    }
  });
}

SchemaAlignmentDialog._inputContainerToJSON = function (inputContainer) {
    var data = inputContainer.data();
    if (data) {
       return data.jsonValue;
    } else {
       return null;
    }
};

SchemaAlignmentDialog._removeStatement = function(statement) {
  var statementGroup = statement.parents('.wbs-statement-group, .wbs-qualifier').first();
  statement.remove();
  var remainingStatements = statementGroup.find('.wbs-statement').length;
  if (remainingStatements === 0) {
      statementGroup.remove();
  }
  SchemaAlignmentDialog._hasChanged();
}

SchemaAlignmentDialog.getJSON = function() {
  var list = new Array();
  $('#schema-alignment-statements-container .wbs-item').each(function () {
     list.push(SchemaAlignmentDialog._itemToJSON($(this)));
  });
  return {
        'itemDocuments': list,
        'wikibasePrefix': this._wikibasePrefix,
  };
};

SchemaAlignmentDialog._hasChanged = function() {
  SchemaAlignmentDialog._hasUnsavedChanges = true;
  SchemaAlignmentDialog.preview();
  SchemaAlignmentDialog._unsavedIndicator.show();
  SchemaAlignmentDialog._schemaElmts.saveButton
        .prop('disabled', false)
        .removeClass('disabled');
  SchemaAlignmentDialog._schemaElmts.discardButton
        .prop('disabled', false)
        .removeClass('disabled');
}

SchemaAlignmentDialog.updateNbEdits = function(nb_edits) {
   this._previewElmts.previewExplanation.text(
      $.i18n('wikidata-schema/preview-explanation').replace('{nb_edits}',nb_edits));
}

SchemaAlignmentDialog.preview = function() {
  var self = this;

  $('.invalid-schema-warning').hide();
  this._previewPanes.empty();
  this.updateNbEdits(0);
  this.issueSpinner.show();
  this.previewSpinner.show();
  var schema = this.getJSON();
  $.post(
    "command/wikidata/preview-wikibase-schema?" + $.param({ project: theProject.id }),
    { schema: JSON.stringify(schema), engine: JSON.stringify(ui.browsingEngine.getJSON()) },
    function(data) {
      self.issueSpinner.hide();
      self.previewSpinner.hide();
      if ("edits_preview" in data) {
        var previewContainer = self._previewPanes[0];
        EditRenderer.renderEdits(data.edits_preview, previewContainer);
        self.updateNbEdits(data["edit_count"]);
      }

      if (data.warnings) {
          self._updateWarnings(data.warnings, data.nb_warnings);
      } else {
          self._updateWarnings([], 0);
      }

      if ("code" in data && data.code === "error") {
         $('.invalid-schema-warning').show();
      }
    },
    "json"
  );
};

Refine.registerUpdateFunction(function(options) {
   // Inject tabs in any project where the schema has been defined
   if(theProject.overlayModels.wikibaseSchema && !SchemaAlignmentDialog.isSetUp()) {
       SchemaAlignmentDialog.setUpTabs();
   }
   if (SchemaAlignmentDialog.isSetUp() && (options.everythingChanged || options.modelsChanged ||
       options.rowsChanged || options.rowMetadataChanged || options.cellsChanged || options.engineChanged)) {
       if (!SchemaAlignmentDialog._hasUnsavedChanges) {
          SchemaAlignmentDialog._discardChanges();
       }
       SchemaAlignmentDialog.updateColumns();
       SchemaAlignmentDialog.preview();
   }
});

/*************************
 * WARNINGS RENDERING *
 *************************/

SchemaAlignmentDialog._updateWarnings = function(warnings, totalCount) {
   var mainDiv = $('#wikidata-issues-panel');
   var countsElem = this.issuesTabCount;

   // clear everything
   mainDiv.empty();
   countsElem.hide();

   var table = $('

').appendTo(mainDiv);
   for (var i = 0; i != warnings.length; i++) {
      var rendered = WarningsRenderer._renderWarning(warnings[i]);
      rendered.appendTo(table);
   }

   // update the counts
   if (totalCount) {
        countsElem.text(totalCount);
        countsElem.show();
   }
}

## 内容4
### 文件路径：
extensions/wikidata/module/styles/dialogs/schema-alignment-dialog.css
### 代码内容：
@import-less url("../theme.less");

.main-view-panel-tab-header#summary-bar {
  font-size: 1.3em;
  font-weight: normal;
  position: initial;
}

#wikidata-schema-panel, #wikidata-issues-panel, #wikidata-preview-panel {
  display: block;
  overflow: hidden;
  height: 100%;
  background-color: white;
  font-size: 1.2em;
}

#schema-preview-tab, #schema-issues-tab, #schema-alignment-tab {
  overflow: auto;
  height: 100%;
}

#schema-alignment-tab {
  overflow: hidden;
}

.main-view-panel-tab-header {
  margin-top: 9px;
  margin-left: 7px;
  font-size: 1.3em;
  display: inline-block;
  background-color: transparent;
  color: #11c;
  padding: 3px 7px;
  cursor: pointer;
}

.main-view-panel-tab-header.active {
  background-color: white;
  color: black;
  border: 1px solid #818fb7;
  border-bottom: none;
}

.main-view-panel-tab-header.active:first-child {
  background-color: #f2f2f2;
}

.schema-alignment-dialog-canvas {
  background: white;
  overflow-y: auto;
}

.schema-alignment-dialog-statements-area {
  padding: 10px;
  max-width: 900px;
  overflow-y: auto;
}

.panel-explanation {
  margin: 1em;
}

.schema-alignment-save {
  float: right;
  padding: 1em;
}

.schema-alignment-save button:disabled {
  color: gray;
}

.schema-alignment-save button {
  font-weight: normal;
}

.schema-alignment-dialog-columns-area {
  border: 1px solid #bcf;
  border-left: 0;
  border-right: 0;
  padding: 5px;
  max-height: 100px;
  overflow-y: auto;
}

.wbs-draggable-column {
    border: 1px solid #aaa;
    padding: 2px;
    margin: 2px;
    background-color: #eee;
    display: inline-block;
    padding-bottom: 3px;
    max-width: 95%;
}

.ui-droppable .wbs-draggable-column {
    margin: 0px;
    padding: 0px;
    padding-left: 2px;
}

.wbs-reconciled-column {
    border-bottom: 3px solid #282;
    padding-bottom: 1px;
}

.wbs-restricted-column-name {
    max-width: -moz-calc(100% - 20px);
    max-width: -webkit-calc(100% - 20px);
    max-width: -o-calc(100% - 20px);
    max-width: calc(100% - 20px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap;
}

.wbs-draggable-column .wbs-remove {
    float: right;
}

.wbs-accepting-input {
    box-shadow: inset 0 0 10px #a7cdff;
}

.wbs-validated-input {
   border: 1px solid green !important;
}

.wbs-unvalidated-input {
   border: 1px solid red !important;
   background-color: #ffbfbf;
}

.wbs-icon {
    background-position: center;
    background-size: 20px 20px;
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    opacity: 0.7;
}

.wbs-remove .wbs-icon {
    background-image:linear-gradient(transparent,transparent),url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%2224%22%20height=%2224%22%20viewBox=%220%200%2024%2024%22%3E%20%3Cg%20id=%22remove%22%3E%20%3Cpath%20id=%22trash-can%22%20d=%22M12%2010h-1v6h1v-6zm-2%200H9v6h1v-6zm4%200h-1v6h1v-6zm0-4V5H9v1H6v3h1v7.966l1%201.03v-.073V18h6.984l.016-.018v.015l1-1.03V9h1V6h-3zm1%2011H8V9h7v8zm1-9H7V7h9v1z%22/%3E%20%3C/g%3E%20%3C/svg%3E");
}

.wbs-remove span:last-child:hover {
    text-decoration: underline;
}

.wbs-rank-selector-icon {
   background-position: -36px;
   width: 8px;
   flex: 0 0 8px;
   height: 20px;
   margin-right: 2px;
   background-image:linear-gradient(transparent,transparent),url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20xmlns:xlink=%22http://www.w3.org/1999/xlink%22%20width=%22107%22%20height=%2220%22%3E%20%3Cdefs%3E%20%3Cpath%20d=%22M3.1%2C0%200%2C3.8%200%2C6%208%2C6%208%2C3.8%204.9%2C0zm8.2%2C7%20-2.3%2C2%200%2C2%202.3%2C2%203.4%2C0%202.3%2C-2%200%2C-2%20-2.3%2C-2zm6.7%2C7%200%2C2.2%203.1%2C3.8%201.8%2C0%203.1%2C-3.8%200%2C-2.2z%22%20id=%22a%22/%3E%20%3Cpath%20d=%22m18.5%2C10.75%200%2C-1.5%202%2C-1.75%203%2C0%202%2C1.75%200%2C1.5%20-2%2C1.75%20-3%2C0zm0%2C-6.75%200%2C1.5%207%2C0%200%2C-1.5%20-2.875%2C-3.5%20-1.25%2C0zm-9%2C12%200%2C-1.5%207%2C0%200%2C1.5%20-2.875%2C3.5%20-1.25%2C0zm0%2C-12%200%2C1.5%207%2C0%200%2C-1.5%20-2.875%2C-3.5%20-1.25%2C0zm-9%2C12%200%2C-1.5%207%2C0%200%2C1.5%20-2.875%2C3.5%20-1.25%2C0zm0%2C-5.25%200%2C-1.5%202%2C-1.75%203%2C0%202%2C1.75%200%2C1.5%20-2%2C1.75%20-3%2C0z%22%20id=%22b%22%20fill=%22none%22/%3E%20%3C/defs%3E%20%3Cuse%20fill=%22%23000%22%20x=%220%22%20y=%220%22%20xlink:href=%22%23a%22/%3E%20%3Cuse%20stroke=%22%23000%22%20x=%220%22%20y=%220%22%20xlink:href=%22%23b%22/%3E%20%3Cuse%20fill=%22%2372777d%22%20x=%2227%22%20y=%220%22%20xlink:href=%22%23a%22/%3E%20%3Cuse%20stroke=%22%2372777d%22%20x=%2227%22%20y=%220%22%20xlink:href=%22%23b%22/%3E%20%3Cuse%20fill=%22%2336c%22%20x=%2254%22%20y=%220%22%20xlink:href=%22%23a%22/%3E%20%3Cuse%20stroke=%22%2336c%22%20x=%2254%22%20y=%220%22%20xlink:href=%22%23b%22/%3E%20%3Cuse%20fill=%22%23447ff5%22%20x=%2281%22%20y=%220%22%20xlink:href=%22%23a%22/%3E%20%3Cuse%20stroke=%22%23447ff5%22%20x=%2281%22%20y=%220%22%20xlink:href=%22%23b%22/%3E%20%3C/svg%3E");
}

.wbs-item-input, .wbs-prop-input, .wbs-target-input {
    width: 250px;
    min-height: 20px;
    display: inline-block;
    margin: 5px;
    white-space: normal;
    word-wrap: break-word;
}

.wbs-target-input {
    display: inline-flex;
}

.wbs-prop-input {
    width: 120px;
}

.wbs-qualifier .wbs-prop-input {
    width: 85px;
}

.wbs-qualifier .wbs-target-input {
    width: 120px;
}

/* Fix input rendering for Firefox */

.wbs-item-input input, .wbs-prop-input input, .wbs-target-input input,
.wbs-monolingual-container input {
    width: 100%;
    border: solid #b5b5b5 1px;
    padding: 2px;
}

.wbs-draggable-column img {
    float: right;
}

.wbs-toolbar {
    float: right;
    width: 100px;
    padding: 2px;
}

.wbs-toolbar a {
    cursor: pointer;
}

.wbs-remove,
.wbs-add-item, .wbs-add-statement-group, .wbs-add-statement,
.wbs-add-qualifier, .wbs-add-reference, .wbs-add-namedesc {
    color: #0645ad !important;
    font-size: 0.9em;
    cursor: pointer;
}

.wbs-add-item:hover, .wbs-add-statement-group:hover, .wbs-add-statement:hover,
.wbs-add-qualifier:hover, .wbs-add-reference:hover, .wbs-add-namedesc:hover {
    text-decoration: none;
}

.wbs-add-item span:hover, .wbs-add-statement-group span:hover, .wbs-add-statement span:hover,
.wbs-add-qualifier span:hover, .wbs-add-reference span:hover, .wbs-add-namedesc span:hover {
    text-decoration: underline;
}

.wbs-remove {
    display: inline-block;
}

.wbs-item-contents {
    padding-left: 10px;
    margin-left: 20px;
    border-left: 3px solid gray;
}

.wbs-add-item b, .wbs-add-statement-group b, .wbs-add-statement b,
.wbs-add-qualifier b, .wbs-add-reference b, .wbs-add-namedesc b {
    font-size: 1em;
    color: grey;
    width: 20px;
    height: 20px;
}

.wbs-statement-group-container:empty:before {
    content: attr(data-emptyplaceholder);
    color: gray;
}

.schema-alignment-dialog-preview .wbs-qualifier .wbs-statement-container {
    display: table-cell;
    vertical-align: bottom;
    padding-left: 10px;
    height: 20px;
}

.wbs-statement-group-container, .wbs-statement-container, .wbs-qualifier-container, .wbs-reference-container {
    width: 100%;
    display: block;
    overflow: auto;
}

.wbs-item, .wbs-statement-group, .wbs-statement, .wbs-qualifier, .wbs-reference {
    display: block;
    overflow: auto;
}

.wbs-item {
    margin-bottom: 5px;
    padding-right: 5px;
}

.wbs-statement-group {
    background: #eaecf0;
    margin-bottom: 5px;
    border: 1px solid #c8ccd1;
}

.wbs-statement {
    background: white;
    border-bottom: 1px solid #eaecf0;
}

.wbs-statement:last-child {
    border-bottom: 0;
}

.wbs-right {
    float: right;
    width: 85%;
}

.wbs-statement-group .wbs-right {
    width: 75%;
}

.wbs-statement .wbs-right {
    width: 90%;
}

.wbs-qualifier, .wbs-reference {
    position: relative;
    overflow-x: hidden;
}

.wbs-qualifier .wbs-right {
    width: auto;
    position: absolute;
    top: 0px;
    margin-left: 100px;
}

.wbs-reference > .wbs-right {
    width: 100%;
}

.wbs-references-toggle {
    width: 12em;
    margin: 5px;
}

.wbs-references-toggle a {
    color: #0645ad !important;
}

.wbs-references-toggle .triangle-icon {
    background: transparent url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3Csvg%0A%20%20%20xmlns%3Adc%3D%22http%3A//purl.org/dc/elements/1.1/%22%0A%20%20%20xmlns%3Acc%3D%22http%3A//creativecommons.org/ns%23%22%0A%20%20%20xmlns%3Ardf%3D%22http%3A//www.w3.org/1999/02/22-rdf-syntax-ns%23%22%0A%20%20%20xmlns%3Asvg%3D%22http%3A//www.w3.org/2000/svg%22%0A%20%20%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%0A%20%20%20id%3D%22svg8%22%0A%20%20%20version%3D%221.1%22%0A%20%20%20viewBox%3D%220%200%202.6458332%202.6458332%22%0A%20%20%20height%3D%2210%22%0A%20%20%20width%3D%2210%22%3E%0A%20%20%3Cdefs%0A%20%20%20%20%20id%3D%22defs2%22%20/%3E%0A%20%20%3Cmetadata%0A%20%20%20%20%20id%3D%22metadata5%22%3E%0A%20%20%20%20%3Crdf%3ARDF%3E%0A%20%20%20%20%20%20%3Ccc%3AWork%0A%20%20%20%20%20%20%20%20%20rdf%3Aabout%3D%22%22%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Aformat%3Eimage/svg+xml%3C/dc%3Aformat%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atype%0A%20%20%20%20%20%20%20%20%20%20%20rdf%3Aresource%3D%22http%3A//purl.org/dc/dcmitype/StillImage%22%20/%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atitle%3E%3C/dc%3Atitle%3E%0A%20%20%20%20%20%20%3C/cc%3AWork%3E%0A%20%20%20%20%3C/rdf%3ARDF%3E%0A%20%20%3C/metadata%3E%0A%20%20%3Cg%0A%20%20%20%20%20transform%3D%22translate%280%2C-294.35416%29%22%0A%20%20%20%20%20id%3D%22layer1%22%3E%0A%20%20%20%20%3Cpath%0A%20%20%20%20%20%20%20id%3D%22path12%22%0A%20%20%20%20%20%20%20d%3D%22m%200.21601809%2C294.5035%202.28763941%2C1.14744%20-2.29850705%2C1.20871%20z%22%0A%20%20%20%20%20%20%20style%3D%22fill%3A%23645eea%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3A%23645eea%3Bstroke-width%3A0.06161711px%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-opacity%3A1%22%20/%3E%0A%20%20%3C/g%3E%0A%3C/svg%3E%0A) no-repeat center center;
    background-size: 100% auto;
    height: 8px;
    width: 8px;
    margin-right: 4px;
    display: inline-block;
}

.pointing-right {
    transform: rotate(0deg);
    transition: .3s cubic-bezier(.17,.67,.21,1.69);
}
.pointing-down {
    transform: rotate(90deg);
    transition: .3s cubic-bezier(.17,.67,.21,1.69);
}

.wbs-qualifier .wbs-statement {
    overflow: hidden;
    background: transparent;
}

.wbs-monolingual-container, .wbs-quantity-container {
    display: inline-block;
}

.wbs-reference-header {
    height: 22px;
    overflow: hidden;
    display: block;
    background-color: #b6c8ec;
}

.wbs-reference {
    background-color: #eaf3ff;
    margin-bottom: 5px;
}

.wbs-reference .wbs-statement {
    background-color: #eaf3ff;
}

.wbs-namedesc-header, .wbs-statements-header {
   font-size: 1.2em;
}

.wbs-namedesc {
   border-left: 1px solid #c8ccd1;
   border-right: 1px solid #c8ccd1;
}

.wbs-namedesc:first-child {
   border-top: 1px solid #c8ccd1;
}

.wbs-namedesc:last-child {
   border-bottom: 1px solid #c8ccd1;
}

.wbs-namedesc-container:empty:before {
    content: attr(data-emptyplaceholder);
    color: gray;
    padding: 5px;
    border: none;
}

.wbs-namedesc {
   background-color: #eaecf0;
   padding: 5px;
}

.wbs-namedesc-type, .wbs-namedesc-value {
   display: inline-block;
}

.wbs-namedesc-value {
   padding-left: 20px;
   width: 300px;
}

.wbs-language-input {
   width: 100%;
}

.schema-alignment-columns-header {
  margin-bottom: 0.3em;
}

/*** Warnings rendering ****/

#wikidata-issues-panel table {
  width: 100%;
}

.wb-warning h1 {
  font-size: 1.2em;
}

.schema-issues-area table,
.perform-edits-warnings-area table {
  width: 100%;
}

tr.wb-warning:nth-of-type(odd) {
  background-color: #f2f2f2;
}

.wb-warning-count span,
.schema-alignment-total-warning-count {
  color: white;
  background-color: #777;
  padding: 0px 5px;
  border-radius: 0.5em;
}

.wb-warning-severity {
  width: 60px;
  height: 60px;
  background-repeat: no-repeat;
  background-position: center;
}

.wb-warning-severity-INFO {
  background-image: url('../../images/Information.png');
}

.wb-warning-severity-WARNING {
  background-image: url('../../images/Warning.png');
}

.wb-warning-severity-IMPORTANT {
  background-image: url('../../images/Important.png');
}

.wb-warning-severity-CRITICAL {
  background-image: url('../../images/Critical.png');
}

.wb-warning-body {
  padding: 5px;
  vertical-align: top;
}

.wb-warning-count {
  padding: 5px;
  vertical-align: middle;
  text-align: center;
}

.wb-warning-end {
  float: clear;
}

div.perform-edits-warnings-area {
  min-height: 340px;
  max-height: 400px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #bbb;
}

.wb-issue-preformat {
  border: 1px solid #eaecf0;
  background-color: #f8f9fa;
  padding: 1px 3px;
  border-radius: 2px;
  font-family: monospace;
}

.wb-preview-new-entity {
   color: #11c;
}

/*** QuickStatements Preview ***/

div.schema-alignment-dialog-preview {
  min-height: 340px;
  max-width: 900px;
  overflow: auto;
  background: white;
  padding: 10px;
  margin-top: 3px;
  white-space: pre;
  font-size: 9pt;
}

Output:
【漏洞类型】业务逻辑安全漏洞
【严重性】Medium
【漏洞摘要】此代码允许用户复制和粘贴wikibase schema中的引用，未进行任何验证或限制。虽然复制和粘贴功能本身不直接导致安全问题，但可能存在用户通过复制粘贴恶意数据而绕过系统验证或限制的风险，从而可能插入不合规或错误的数据到wikidata中。具体表现为在SchemaAlignmentDialog._addReference函数中直接使用复制的引用数据，未进行任何额外的验证。
【关键代码模式】SchemaAlignmentDialog._copyReference, SchemaAlignmentDialog._addReference, SchemaAlignmentDialog._referenceToJSON
【修复方法说明】修复方法通过增加对复制引用的验证和限制，确保粘贴的引用数据是合规和有效的。这样可以防止用户通过复制粘贴插入恶意数据。