వాడుకరి:Veeven/twinkle/twinkle.js: కూర్పుల మధ్య తేడాలు

Content deleted Content added
చి new version
చిదిద్దుబాటు సారాంశం లేదు
పంక్తి 1:
/******/ (function() { // webpackBootstrap
/* _______________________________________________________________________________
/******/ var __webpack_modules__ = ({
* | |
 
* | === WARNING: GLOBAL GADGET FILE === |
/***/ "./node_modules/orange-i18n/dist/banana-i18n.js":
* | Changes to this page affect many users. |
/*!******************************************************!*\
* | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
!*** ./node_modules/orange-i18n/dist/banana-i18n.js ***!
* |_______________________________________________________________________________|
\******************************************************/
/***/ (function(module) {
 
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
 
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
 
!function (u, e) {
true ? module.exports = e() : 0;
}(this, function () {
"use strict";
 
var u = /*#__PURE__*/function () {
function u(_u) {
this.locale = _u;
}
 
var _proto = u.prototype;
 
_proto.convertPlural = function convertPlural(e, d) {
var t = new RegExp("\\d+=", "i");
if (!d || 0 === d.length) return "";
 
for (var _u10 = 0; _u10 < d.length; _u10++) {
var _a = d[_u10];
 
if (t.test(_a)) {
if (parseInt(_a.slice(0, _a.indexOf("=")), 10) === e) return _a.slice(_a.indexOf("=") + 1);
d[_u10] = void 0;
}
}
 
d = d.filter(function (_u3) {
return !!_u3;
});
var a = u.pluralRules[this.locale];
a || (a = {
one: "i = 1 and v = 0"
});
var c = this.getPluralForm(e, a);
return c = Math.min(c, d.length - 1), d[c];
};
 
_proto.getPluralForm = function getPluralForm(_u4, e) {
var d = ["zero", "one", "two", "few", "many", "other"];
var t = 0;
var a = mw.libs.pluralRuleParser;
 
for (var _c = 0; _c < d.length; _c++) {
if (e[d[_c]]) {
if (a(e[d[_c]], _u4)) return t;
t++;
}
}
 
return t;
};
 
_proto.convertNumber = function convertNumber(_u5, e) {
var d = this.digitTransformTable(this.locale),
t = String(_u5),
a = "";
if (!d) return _u5;
 
if (e) {
if (parseFloat(_u5, 10) === _u5) return _u5;
var _e = [];
 
for (var _u11 in d) {
_e[d[_u11]] = _u11;
}
 
d = _e;
}
 
for (var _u12 = 0; _u12 < t.length; _u12++) {
d[t[_u12]] ? a += d[t[_u12]] : a += t[_u12];
}
 
return e ? parseFloat(a, 10) : a;
};
 
_proto.convertGrammar = function convertGrammar(_u8, e) {
return _u8;
};
 
_proto.gender = function gender(_u9, e) {
if (!e || 0 === e.length) return "";
 
for (; e.length < 2;) {
e.push(e[e.length - 1]);
}
 
return "male" === _u9 ? e[0] : "female" === _u9 ? e[1] : 3 === e.length ? e[2] : e[0];
};
 
_proto.digitTransformTable = function digitTransformTable(e) {
return !!u.digitTransforms[e] && u.digitTransforms[e].split("");
};
 
return u;
}();
 
u.pluralRules = {}, u.digitTransforms = {};
var e = {
bs: /*#__PURE__*/function (_u13) {
_inheritsLoose(bs, _u13);
 
function bs() {
return _u13.apply(this, arguments) || this;
}
 
var _proto2 = bs.prototype;
 
_proto2.convertGrammar = function convertGrammar(u, e) {
switch (e) {
case "instrumental":
u = "s " + u;
break;
 
case "lokativ":
u = "o " + u;
}
 
return u;
};
 
return bs;
}(u),
default: u,
dsb: /*#__PURE__*/function (_u14) {
_inheritsLoose(dsb, _u14);
 
function dsb() {
return _u14.apply(this, arguments) || this;
}
 
var _proto3 = dsb.prototype;
 
_proto3.convertGrammar = function convertGrammar(u, e) {
switch (e) {
case "instrumental":
u = "z " + u;
break;
 
case "lokatiw":
u = "wo " + u;
}
 
return u;
};
 
return dsb;
}(u),
fi: /*#__PURE__*/function (_u15) {
_inheritsLoose(fi, _u15);
 
function fi() {
return _u15.apply(this, arguments) || this;
}
 
var _proto4 = fi.prototype;
 
_proto4.convertGrammar = function convertGrammar(u, e) {
var d = u.match(/[aou][^äöy]*$/i),
t = u;
 
switch (u.match(/wiki$/i) && (d = !1), u.match(/[bcdfghjklmnpqrstvwxz]$/i) && (u += "i"), e) {
case "genitive":
u += "n";
break;
 
case "elative":
u += d ? "sta" : "stä";
break;
 
case "partitive":
u += d ? "a" : "ä";
break;
 
case "illative":
u += u.slice(-1) + "n";
break;
 
case "inessive":
u += d ? "ssa" : "ssä";
break;
 
default:
u = t;
}
 
return u;
};
 
return fi;
}(u),
ga: /*#__PURE__*/function (_u16) {
_inheritsLoose(ga, _u16);
 
function ga() {
return _u16.apply(this, arguments) || this;
}
 
var _proto5 = ga.prototype;
 
_proto5.convertGrammar = function convertGrammar(u, e) {
if ("ainmlae" === e) switch (u) {
case "an Domhnach":
u = "Dé Domhnaigh";
break;
 
case "an Luan":
u = "Dé Luain";
break;
 
case "an Mháirt":
u = "Dé Mháirt";
break;
 
case "an Chéadaoin":
u = "Dé Chéadaoin";
break;
 
case "an Déardaoin":
u = "Déardaoin";
break;
 
case "an Aoine":
u = "Dé hAoine";
break;
 
case "an Satharn":
u = "Dé Sathairn";
}
return u;
};
 
return ga;
}(u),
he: /*#__PURE__*/function (_u17) {
_inheritsLoose(he, _u17);
 
function he() {
return _u17.apply(this, arguments) || this;
}
 
var _proto6 = he.prototype;
 
_proto6.convertGrammar = function convertGrammar(u, e) {
switch (e) {
case "prefixed":
case "תחילית":
"ו" === u.slice(0, 1) && "וו" !== u.slice(0, 2) && (u = "ו" + u), "ה" === u.slice(0, 1) && (u = u.slice(1)), (u.slice(0, 1) < "א" || u.slice(0, 1) > "ת") && (u = "־" + u);
}
 
return u;
};
 
return he;
}(u),
hsb: /*#__PURE__*/function (_u18) {
_inheritsLoose(hsb, _u18);
 
function hsb() {
return _u18.apply(this, arguments) || this;
}
 
var _proto7 = hsb.prototype;
 
_proto7.convertGrammar = function convertGrammar(u, e) {
switch (e) {
case "instrumental":
u = "z " + u;
break;
 
case "lokatiw":
u = "wo " + u;
}
 
return u;
};
 
return hsb;
}(u),
hu: /*#__PURE__*/function (_u19) {
_inheritsLoose(hu, _u19);
 
function hu() {
return _u19.apply(this, arguments) || this;
}
 
var _proto8 = hu.prototype;
 
_proto8.convertGrammar = function convertGrammar(u, e) {
switch (e) {
case "rol":
u += "ról";
break;
 
case "ba":
u += "ba";
break;
 
case "k":
u += "k";
}
 
return u;
};
 
return hu;
}(u),
hy: /*#__PURE__*/function (_u20) {
_inheritsLoose(hy, _u20);
 
function hy() {
return _u20.apply(this, arguments) || this;
}
 
var _proto9 = hy.prototype;
 
_proto9.convertGrammar = function convertGrammar(u, e) {
return "genitive" === e && ("ա" === u.slice(-1) ? u = u.slice(0, -1) + "այի" : "ո" === u.slice(-1) ? u = u.slice(0, -1) + "ոյի" : "գիրք" === u.slice(-4) ? u = u.slice(0, -4) + "գրքի" : u += "ի"), u;
};
 
return hy;
}(u),
la: /*#__PURE__*/function (_u21) {
_inheritsLoose(la, _u21);
 
function la() {
return _u21.apply(this, arguments) || this;
}
 
var _proto10 = la.prototype;
 
_proto10.convertGrammar = function convertGrammar(u, e) {
switch (e) {
case "genitive":
u = (u = (u = (u = (u = (u = (u = (u = (u = u.replace(/u[ms]$/i, "i")).replace(/ommunia$/i, "ommunium")).replace(/a$/i, "ae")).replace(/libri$/i, "librorum")).replace(/nuntii$/i, "nuntiorum")).replace(/tio$/i, "tionis")).replace(/ns$/i, "ntis")).replace(/as$/i, "atis")).replace(/es$/i, "ei");
break;
 
case "accusative":
u = (u = (u = (u = (u = (u = (u = (u = (u = u.replace(/u[ms]$/i, "um")).replace(/ommunia$/i, "am")).replace(/a$/i, "ommunia")).replace(/libri$/i, "libros")).replace(/nuntii$/i, "nuntios")).replace(/tio$/i, "tionem")).replace(/ns$/i, "ntem")).replace(/as$/i, "atem")).replace(/es$/i, "em");
break;
 
case "ablative":
u = (u = (u = (u = (u = (u = (u = (u = (u = u.replace(/u[ms]$/i, "o")).replace(/ommunia$/i, "ommunibus")).replace(/a$/i, "a")).replace(/libri$/i, "libris")).replace(/nuntii$/i, "nuntiis")).replace(/tio$/i, "tione")).replace(/ns$/i, "nte")).replace(/as$/i, "ate")).replace(/es$/i, "e");
}
 
return u;
};
 
return la;
}(u),
os: /*#__PURE__*/function (_u22) {
_inheritsLoose(os, _u22);
 
function os() {
return _u22.apply(this, arguments) || this;
}
 
var _proto11 = os.prototype;
 
_proto11.convertGrammar = function convertGrammar(u, e) {
var d, t, a, c;
 
switch (d = "мæ", t = "", a = "", c = "", u.match(/тæ$/i) ? (u = u.slice(0, -1), d = "æм") : u.match(/[аæеёиоыэюя]$/i) ? t = "й" : u.match(/у$/i) ? u.slice(-2, -1).match(/[аæеёиоыэюя]$/i) || (t = "й") : u.match(/[бвгджзйклмнопрстфхцчшщьъ]$/i) || (a = "-"), e) {
case "genitive":
c = a + t + "ы";
break;
 
case "dative":
c = a + t + "æн";
break;
 
case "allative":
c = a + d;
break;
 
case "ablative":
c = "й" === t ? a + t + "æ" : a + t + "æй";
break;
 
case "superessive":
c = a + t + "ыл";
break;
 
case "equative":
c = a + t + "ау";
break;
 
case "comitative":
c = a + "имæ";
}
 
return u + c;
};
 
return os;
}(u),
ru: /*#__PURE__*/function (_u23) {
_inheritsLoose(ru, _u23);
 
function ru() {
return _u23.apply(this, arguments) || this;
}
 
var _proto12 = ru.prototype;
 
_proto12.convertGrammar = function convertGrammar(u, e) {
return "genitive" === e && ("ь" === u.slice(-1) ? u = u.slice(0, -1) + "я" : "ия" === u.slice(-2) ? u = u.slice(0, -2) + "ии" : "ка" === u.slice(-2) ? u = u.slice(0, -2) + "ки" : "ти" === u.slice(-2) ? u = u.slice(0, -2) + "тей" : "ды" === u.slice(-2) ? u = u.slice(0, -2) + "дов" : "ник" === u.slice(-3) && (u = u.slice(0, -3) + "ника")), u;
};
 
return ru;
}(u),
sl: /*#__PURE__*/function (_u24) {
_inheritsLoose(sl, _u24);
 
function sl() {
return _u24.apply(this, arguments) || this;
}
 
var _proto13 = sl.prototype;
 
_proto13.convertGrammar = function convertGrammar(u, e) {
switch (e) {
case "mestnik":
u = "o " + u;
break;
 
case "orodnik":
u = "z " + u;
}
 
return u;
};
 
return sl;
}(u),
uk: /*#__PURE__*/function (_u25) {
_inheritsLoose(uk, _u25);
 
function uk() {
return _u25.apply(this, arguments) || this;
}
 
var _proto14 = uk.prototype;
 
_proto14.convertGrammar = function convertGrammar(u, e) {
switch (e) {
case "genitive":
"ь" === u.slice(-1) ? u = u.slice(0, -1) + "я" : "ія" === u.slice(-2) ? u = u.slice(0, -2) + "ії" : "ка" === u.slice(-2) ? u = u.slice(0, -2) + "ки" : "ти" === u.slice(-2) ? u = u.slice(0, -2) + "тей" : "ды" === u.slice(-2) ? u = u.slice(0, -2) + "дов" : "ник" === u.slice(-3) && (u = u.slice(0, -3) + "ника");
break;
 
case "accusative":
"ія" === u.slice(-2) && (u = u.slice(0, -2) + "ію");
}
 
return u;
};
 
return uk;
}(u)
};
var d = new RegExp("(?:([A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02BB-\u02C1\u02D0\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0482\u048A-\u052F\u0531-\u0556\u0559-\u055F\u0561-\u0587\u0589\u0903-\u0939\u093B\u093D-\u0940\u0949-\u094C\u094E-\u0950\u0958-\u0961\u0964-\u0980\u0982\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C0\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09FA\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A40\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC0\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0\u0AE1\u0AE6-\u0AF0\u0AF9\u0B02\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0BE6-\u0BF2\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C41-\u0C44\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C7F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D57\u0D5F-\u0D61\u0D66-\u0D75\u0D79-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E4F-\u0E5B\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3E-\u0F47\u0F49-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u1000-\u102C\u1031\u1038\u103B\u103C\u103F-\u1057\u105A-\u105D\u1061-\u1070\u1075-\u1081\u1083\u1084\u1087-\u108C\u108E-\u109C\u109E-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1360-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u167F\u1681-\u169A\u16A0-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1735\u1736\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17B6\u17BE-\u17C5\u17C7\u17C8\u17D4-\u17DA\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A19\u1A1A\u1A1E-\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1B04-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B4B\u1B50-\u1B6A\u1B74-\u1B7C\u1B82-\u1BA1\u1BA6\u1BA7\u1BAA\u1BAE-\u1BE5\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1BFC-\u1C2B\u1C34\u1C35\u1C3B-\u1C49\u1C4D-\u1C7F\u1CC0-\u1CC7\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200E\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u214F\u2160-\u2188\u2336-\u237A\u2395\u249C-\u24E9\u26AC\u2800-\u28FF\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u302E\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31F0-\u321C\u3220-\u324F\u3260-\u327B\u327F-\u32B0\u32C0-\u32CB\u32D0-\u32FE\u3300-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA60C\uA610-\uA62B\uA640-\uA66E\uA680-\uA69D\uA6A0-\uA6EF\uA6F2-\uA6F7\uA722-\uA787\uA789-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA824\uA827\uA830-\uA837\uA840-\uA873\uA880-\uA8C3\uA8CE-\uA8D9\uA8F2-\uA8FD\uA900-\uA925\uA92E-\uA946\uA952\uA953\uA95F-\uA97C\uA983-\uA9B2\uA9B4\uA9B5\uA9BA\uA9BB\uA9BD-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA2F\uAA30\uAA33\uAA34\uAA40-\uAA42\uAA44-\uAA4B\uAA4D\uAA50-\uAA59\uAA5C-\uAA7B\uAA7D-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAAEB\uAAEE-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB65\uAB70-\uABE4\uABE6\uABE7\uABE9-\uABEC\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uE000-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B]|\uD800[\uDC0D-\uDC26]|\uD800[\uDC28-\uDC3A]|\uD800\uDC3C|\uD800\uDC3D|\uD800[\uDC3F-\uDC4D]|\uD800[\uDC50-\uDC5D]|\uD800[\uDC80-\uDCFA]|\uD800\uDD00|\uD800\uDD02|\uD800[\uDD07-\uDD33]|\uD800[\uDD37-\uDD3F]|\uD800[\uDDD0-\uDDFC]|\uD800[\uDE80-\uDE9C]|\uD800[\uDEA0-\uDED0]|\uD800[\uDF00-\uDF23]|\uD800[\uDF30-\uDF4A]|\uD800[\uDF50-\uDF75]|\uD800[\uDF80-\uDF9D]|\uD800[\uDF9F-\uDFC3]|\uD800[\uDFC8-\uDFD5]|\uD801[\uDC00-\uDC9D]|\uD801[\uDCA0-\uDCA9]|\uD801[\uDD00-\uDD27]|\uD801[\uDD30-\uDD63]|\uD801\uDD6F|\uD801[\uDE00-\uDF36]|\uD801[\uDF40-\uDF55]|\uD801[\uDF60-\uDF67]|\uD804\uDC00|\uD804[\uDC02-\uDC37]|\uD804[\uDC47-\uDC4D]|\uD804[\uDC66-\uDC6F]|\uD804[\uDC82-\uDCB2]|\uD804\uDCB7|\uD804\uDCB8|\uD804[\uDCBB-\uDCC1]|\uD804[\uDCD0-\uDCE8]|\uD804[\uDCF0-\uDCF9]|\uD804[\uDD03-\uDD26]|\uD804\uDD2C|\uD804[\uDD36-\uDD43]|\uD804[\uDD50-\uDD72]|\uD804[\uDD74-\uDD76]|\uD804[\uDD82-\uDDB5]|\uD804[\uDDBF-\uDDC9]|\uD804\uDDCD|\uD804[\uDDD0-\uDDDF]|\uD804[\uDDE1-\uDDF4]|\uD804[\uDE00-\uDE11]|\uD804[\uDE13-\uDE2E]|\uD804\uDE32|\uD804\uDE33|\uD804\uDE35|\uD804[\uDE38-\uDE3D]|\uD804[\uDE80-\uDE86]|\uD804\uDE88|\uD804[\uDE8A-\uDE8D]|\uD804[\uDE8F-\uDE9D]|\uD804[\uDE9F-\uDEA9]|\uD804[\uDEB0-\uDEDE]|\uD804[\uDEE0-\uDEE2]|\uD804[\uDEF0-\uDEF9]|\uD804\uDF02|\uD804\uDF03|\uD804[\uDF05-\uDF0C]|\uD804\uDF0F|\uD804\uDF10|\uD804[\uDF13-\uDF28]|\uD804[\uDF2A-\uDF30]|\uD804\uDF32|\uD804\uDF33|\uD804[\uDF35-\uDF39]|\uD804[\uDF3D-\uDF3F]|\uD804[\uDF41-\uDF44]|\uD804\uDF47|\uD804\uDF48|\uD804[\uDF4B-\uDF4D]|\uD804\uDF50|\uD804\uDF57|\uD804[\uDF5D-\uDF63]|\uD805[\uDC80-\uDCB2]|\uD805\uDCB9|\uD805[\uDCBB-\uDCBE]|\uD805\uDCC1|\uD805[\uDCC4-\uDCC7]|\uD805[\uDCD0-\uDCD9]|\uD805[\uDD80-\uDDB1]|\uD805[\uDDB8-\uDDBB]|\uD805\uDDBE|\uD805[\uDDC1-\uDDDB]|\uD805[\uDE00-\uDE32]|\uD805\uDE3B|\uD805\uDE3C|\uD805\uDE3E|\uD805[\uDE41-\uDE44]|\uD805[\uDE50-\uDE59]|\uD805[\uDE80-\uDEAA]|\uD805\uDEAC|\uD805\uDEAE|\uD805\uDEAF|\uD805\uDEB6|\uD805[\uDEC0-\uDEC9]|\uD805[\uDF00-\uDF19]|\uD805\uDF20|\uD805\uDF21|\uD805\uDF26|\uD805[\uDF30-\uDF3F]|\uD806[\uDCA0-\uDCF2]|\uD806\uDCFF|\uD806[\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E]|\uD809[\uDC70-\uDC74]|\uD809[\uDC80-\uDD43]|\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38]|\uD81A[\uDE40-\uDE5E]|\uD81A[\uDE60-\uDE69]|\uD81A\uDE6E|\uD81A\uDE6F|\uD81A[\uDED0-\uDEED]|\uD81A\uDEF5|\uD81A[\uDF00-\uDF2F]|\uD81A[\uDF37-\uDF45]|\uD81A[\uDF50-\uDF59]|\uD81A[\uDF5B-\uDF61]|\uD81A[\uDF63-\uDF77]|\uD81A[\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44]|\uD81B[\uDF50-\uDF7E]|\uD81B[\uDF93-\uDF9F]|\uD82C\uDC00|\uD82C\uDC01|\uD82F[\uDC00-\uDC6A]|\uD82F[\uDC70-\uDC7C]|\uD82F[\uDC80-\uDC88]|\uD82F[\uDC90-\uDC99]|\uD82F\uDC9C|\uD82F\uDC9F|\uD834[\uDC00-\uDCF5]|\uD834[\uDD00-\uDD26]|\uD834[\uDD29-\uDD66]|\uD834[\uDD6A-\uDD72]|\uD834\uDD83|\uD834\uDD84|\uD834[\uDD8C-\uDDA9]|\uD834[\uDDAE-\uDDE8]|\uD834[\uDF60-\uDF71]|\uD835[\uDC00-\uDC54]|\uD835[\uDC56-\uDC9C]|\uD835\uDC9E|\uD835\uDC9F|\uD835\uDCA2|\uD835\uDCA5|\uD835\uDCA6|\uD835[\uDCA9-\uDCAC]|\uD835[\uDCAE-\uDCB9]|\uD835\uDCBB|\uD835[\uDCBD-\uDCC3]|\uD835[\uDCC5-\uDD05]|\uD835[\uDD07-\uDD0A]|\uD835[\uDD0D-\uDD14]|\uD835[\uDD16-\uDD1C]|\uD835[\uDD1E-\uDD39]|\uD835[\uDD3B-\uDD3E]|\uD835[\uDD40-\uDD44]|\uD835\uDD46|\uD835[\uDD4A-\uDD50]|\uD835[\uDD52-\uDEA5]|\uD835[\uDEA8-\uDEDA]|\uD835[\uDEDC-\uDF14]|\uD835[\uDF16-\uDF4E]|\uD835[\uDF50-\uDF88]|\uD835[\uDF8A-\uDFC2]|\uD835[\uDFC4-\uDFCB]|\uD836[\uDC00-\uDDFF]|\uD836[\uDE37-\uDE3A]|\uD836[\uDE6D-\uDE74]|\uD836[\uDE76-\uDE83]|\uD836[\uDE85-\uDE8B]|\uD83C[\uDD10-\uDD2E]|\uD83C[\uDD30-\uDD69]|\uD83C[\uDD70-\uDD9A]|\uD83C[\uDDE6-\uDE02]|\uD83C[\uDE10-\uDE3A]|\uD83C[\uDE40-\uDE48]|\uD83C\uDE50|\uD83C\uDE51|[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6]|\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF34]|\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|[\uDB80-\uDBBE][\uDC00-\uDFFF]|\uDBBF[\uDC00-\uDFFD]|[\uDBC0-\uDBFE][\uDC00-\uDFFF]|\uDBFF[\uDC00-\uDFFD])|([\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05FF\u07C0-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u082E-\u0858\u085C-\u089F\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB4F\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074B-\u07A5\u07B1-\u07BF\u08A0-\u08E2\uFB50-\uFD3D\uFD40-\uFDCF\uFDF0-\uFDFC\uFDFE\uFDFF\uFE70-\uFEFE]|\uD802[\uDC00-\uDD1E]|\uD802[\uDD20-\uDE00]|\uD802\uDE04|\uD802[\uDE07-\uDE0B]|\uD802[\uDE10-\uDE37]|\uD802[\uDE3B-\uDE3E]|\uD802[\uDE40-\uDEE4]|\uD802[\uDEE7-\uDF38]|\uD802[\uDF40-\uDFFF]|\uD803[\uDC00-\uDE5F]|\uD803[\uDE7F-\uDFFF]|\uD83A[\uDC00-\uDCCF]|\uD83A[\uDCD7-\uDFFF]|\uD83B[\uDC00-\uDDFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDE00-\uDEEF]|\uD83B[\uDEF2-\uDEFF]))");
 
var t = /*#__PURE__*/function () {
function t(u) {
this.locale = u, this.language = new (e[u] || e.default)(u);
}
 
var _proto15 = t.prototype;
 
_proto15.emit = function emit(u, e) {
var _this = this;
 
var d, _t, c;
 
switch (typeof u) {
case "string":
case "number":
d = u;
break;
 
case "object":
_t = u.slice(1).map(function (u) {
return _this.emit(u, e);
}), c = u[0].toLowerCase(), d = "function" == typeof this[c] ? this[c](_t, e) : "{{" + new a(this.locale).simpleParse(u[0], e) + _t.map(function (u) {
return "|" + u;
}) + "}}";
break;
 
case "undefined":
d = "";
break;
 
default:
throw new Error("unexpected type in AST: " + typeof u);
}
 
return d;
};
 
_proto15.concat = function concat(u) {
var e = "";
return u.forEach(function (u) {
e += u;
}), e;
};
 
_proto15.replace = function replace(u, e) {
var d = parseInt(u[0], 10);
return d < e.length ? e[d] : "$" + (d + 1);
};
 
_proto15.plural = function plural(u) {
var e = parseFloat(this.language.convertNumber(u[0], 10)),
d = u.slice(1);
return d.length ? this.language.convertPlural(e, d) : "";
};
 
_proto15.gender = function gender(u) {
var e = u[0],
d = u.slice(1);
return this.language.gender(e, d);
};
 
_proto15.grammar = function grammar(u) {
var e = u[0],
d = u[1];
return d && e && this.language.convertGrammar(d, e);
};
 
_proto15.bidi = function bidi(u) {
var e = function (u) {
var e = u.match(d);
return e ? void 0 === e[2] ? "ltr" : "rtl" : null;
}(u[0]);
 
return "ltr" === e ? "‪" + u[0] + "‬" : "rtl" === e ? "‫" + u[0] + "‬" : u[0];
};
 
_proto15.formatnum = function formatnum(u) {
var e = !!u[1] && "R" === u[1],
d = u[0];
return "string" == typeof d || "number" == typeof d ? this.language.convertNumber(d, e) : d;
};
 
return t;
}();
 
var a = /*#__PURE__*/function () {
function a(u) {
this.locale = u, this.emitter = new t(this.locale);
}
 
var _proto16 = a.prototype;
 
_proto16.parse = function parse(u, e) {
if (u.includes("{{")) {
var _d = function (u) {
var e,
d,
t,
a,
c,
r,
n,
s = 0;
 
function l(u) {
return function () {
for (var _e2 = 0; _e2 < u.length; _e2++) {
var _d2 = u[_e2]();
 
if (null !== _d2) return _d2;
}
 
return null;
};
}
 
function i(u) {
var e = s,
d = [];
 
for (var _t2 = 0; _t2 < u.length; _t2++) {
var _a2 = u[_t2]();
 
if (null === _a2) return s = e, null;
d.push(_a2);
}
 
return d;
}
 
function f(u, e) {
return function () {
var d = s,
t = [];
var a = e();
 
for (; null !== a;) {
t.push(a), a = e();
}
 
return t.length < u ? (s = d, null) : t;
};
}
 
function o(e) {
var d = e.length;
return function () {
var t = null;
return u.slice(s, s + d) === e && (t = e, s += d), t;
};
}
 
function h(e) {
return function () {
var d = u.slice(s).match(e);
return null === d ? null : (s += d[0].length, d[0]);
};
}
 
var b = o("|"),
m = o(":"),
p = o("\\"),
g = h(/^./),
v = o("$"),
k = h(/^\d+/),
$ = h(/^[^{}$\\]/),
w = h(/^[^{}$\\|]/);
 
function x() {
var u = i([p, g]);
return null === u ? null : u[1];
}
 
function y() {
var u = i([v, k]);
return null === u ? null : ["REPLACE", parseInt(u[1], 10) - 1];
}
 
var M, G;
 
function T() {
var u = i([b, f(0, r)]);
if (null === u) return null;
var e = u[1];
return e.length > 1 ? ["CONCAT"].concat(e) : e[0];
}
 
function F() {
var u = i([a, m, y]);
return null === u ? null : [u[0], u[2]];
}
 
function P() {
var u = i([a, m, r]);
return null === u ? null : [u[0], u[2]];
}
 
e = l([x, w]), d = l([x, $]), M = h(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/), G = function G(u) {
return u.toString();
}, a = function a() {
var u = M();
return null === u ? null : G(u);
}, t = l([function () {
var u = i([l([F, P]), f(0, T)]);
return null === u ? null : u[0].concat(u[1]);
}, function () {
var u = i([a, f(0, T)]);
return null === u ? null : [u[0]].concat(u[1]);
}]);
var L = o("{{"),
D = o("}}");
 
function j() {
var u = i([L, t, D]);
return null === u ? null : u[1];
}
 
if (c = l([j, y, function () {
var u = f(1, d)();
return null === u ? null : u.join("");
}]), r = l([j, y, function () {
var u = f(1, e)();
return null === u ? null : u.join("");
}]), n = function () {
var u = f(0, c)();
return null === u ? null : ["CONCAT"].concat(u);
}(), null === n || s !== u.length) throw new Error("Parse error at position " + s.toString() + " in input: " + u);
return n;
}(u);
 
return this.emitter.emit(_d, e);
}
 
return this.simpleParse(u, e);
};
 
_proto16.simpleParse = function simpleParse(u, e) {
return u.replace(/\$(\d+)/g, function (u, d) {
var t = parseInt(d, 10) - 1;
return void 0 !== e[t] ? e[t] : "$" + d;
});
};
 
return a;
}();
 
var c = /*#__PURE__*/function () {
function c(u) {
this.sourceMap = new Map();
}
 
var _proto17 = c.prototype;
 
_proto17.load = function load(u, e) {
if ("object" != typeof u) throw new Error("Invalid message source. Must be an object");
 
if (e) {
if (!/^[a-zA-Z0-9-]+$/.test(e)) throw new Error("Invalid locale " + e);
 
for (var _d3 in u) {
if (0 !== _d3.indexOf("@")) {
if ("object" == typeof u[_d3]) return this.load(u);
if ("string" != typeof u[_d3]) throw new Error("Invalid message for message " + _d3 + " in " + e + " locale.");
break;
}
}
 
this.sourceMap.has(e) ? this.sourceMap.set(e, Object.assign(this.sourceMap.get(e), u)) : this.sourceMap.set(e, u);
} else for (e in u) {
this.load(u[e], e);
}
};
 
_proto17.getMessage = function getMessage(u, e) {
var d = this.sourceMap.get(e);
return d ? d[u] : null;
};
 
_proto17.hasLocale = function hasLocale(u) {
return this.sourceMap.has(u);
};
 
return c;
}();
 
return /*#__PURE__*/function () {
function _class(u, _temp) {
var _ref = _temp === void 0 ? {} : _temp,
_ref$finalFallback = _ref.finalFallback,
e = _ref$finalFallback === void 0 ? "en" : _ref$finalFallback,
d = _ref.messages;
 
this.locale = u, this.parser = new a(this.locale), this.messageStore = new c(), d && this.load(d, this.locale), this.fallbackLocales = [], this.finalFallback = e;
}
 
var _proto18 = _class.prototype;
 
_proto18.load = function load(u, e) {
return this.messageStore.load(u, e || this.locale);
};
 
_proto18.i18n = function i18n(u) {
for (var _len = arguments.length, e = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
e[_key - 1] = arguments[_key];
}
 
return this.parser.parse(this.getMessage(u), e);
};
 
_proto18.setLocale = function setLocale(u) {
this.locale = u, this.parser = new a(this.locale);
};
 
_proto18.getFallbackLocales = function getFallbackLocales() {
return [].concat(this.fallbackLocales, [this.finalFallback]);
};
 
_proto18.setFallbackLocales = function setFallbackLocales(u) {
this.fallbackLocales = u;
};
 
_proto18.setPluralRules = function setPluralRules(e, d) {
u.pluralRules[e] = d;
};
 
_proto18.setDigitTransforms = function setDigitTransforms(e, d) {
u.digitTransforms[e] = d;
};
 
_proto18.getMessage = function getMessage(u) {
var e = this.locale,
d = 0;
var t = this.getFallbackLocales();
 
for (; e;) {
var _a3 = e.split("-"),
_c2 = _a3.length;
 
do {
var _e3 = _a3.slice(0, _c2).join("-"),
_d4 = this.messageStore.getMessage(u, _e3);
 
if ("string" == typeof _d4) return _d4;
_c2--;
} while (_c2);
 
e = t[d], d++;
}
 
return u;
};
 
_proto18.registerParserPlugin = function registerParserPlugin(u, e) {
t.prototype[u] = e;
};
 
return _class;
}();
});
 
/***/ }),
 
/***/ "./node_modules/tslib/tslib.es6.js":
/*!*****************************************!*\
!*** ./node_modules/tslib/tslib.es6.js ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "__extends": function() { return /* binding */ __extends; },
/* harmony export */ "__assign": function() { return /* binding */ _assign; },
/* harmony export */ "__rest": function() { return /* binding */ __rest; },
/* harmony export */ "__decorate": function() { return /* binding */ __decorate; },
/* harmony export */ "__param": function() { return /* binding */ __param; },
/* harmony export */ "__metadata": function() { return /* binding */ __metadata; },
/* harmony export */ "__awaiter": function() { return /* binding */ __awaiter; },
/* harmony export */ "__generator": function() { return /* binding */ __generator; },
/* harmony export */ "__createBinding": function() { return /* binding */ __createBinding; },
/* harmony export */ "__exportStar": function() { return /* binding */ __exportStar; },
/* harmony export */ "__values": function() { return /* binding */ __values; },
/* harmony export */ "__read": function() { return /* binding */ __read; },
/* harmony export */ "__spread": function() { return /* binding */ __spread; },
/* harmony export */ "__spreadArrays": function() { return /* binding */ __spreadArrays; },
/* harmony export */ "__await": function() { return /* binding */ __await; },
/* harmony export */ "__asyncGenerator": function() { return /* binding */ __asyncGenerator; },
/* harmony export */ "__asyncDelegator": function() { return /* binding */ __asyncDelegator; },
/* harmony export */ "__asyncValues": function() { return /* binding */ __asyncValues; },
/* harmony export */ "__makeTemplateObject": function() { return /* binding */ __makeTemplateObject; },
/* harmony export */ "__importStar": function() { return /* binding */ __importStar; },
/* harmony export */ "__importDefault": function() { return /* binding */ __importDefault; },
/* harmony export */ "__classPrivateFieldGet": function() { return /* binding */ __classPrivateFieldGet; },
/* harmony export */ "__classPrivateFieldSet": function() { return /* binding */ __classPrivateFieldSet; }
/* harmony export */ });
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
 
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
 
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
 
/* global Reflect, Promise */
var _extendStatics = function extendStatics(d, b) {
_extendStatics = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function (d, b) {
d.__proto__ = b;
} || function (d, b) {
for (var p in b) {
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
}
};
 
return _extendStatics(d, b);
};
 
function __extends(d, b) {
_extendStatics(d, b);
 
function __() {
this.constructor = d;
}
 
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
 
var _assign = function __assign() {
_assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
 
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
}
 
return t;
};
 
return _assign.apply(this, arguments);
};
 
 
function __rest(s, e) {
var t = {};
 
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
 
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
}
function __decorate(decorators, target, key, desc) {
var c = arguments.length,
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
}
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
return function (target, key) {
decorator(target, key, paramIndex);
};
}
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function (resolve) {
resolve(value);
});
}
 
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
 
function rejected(value) {
try {
step(generator["throw"](value));
} catch (e) {
reject(e);
}
}
 
function step(result) {
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}
 
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = {
label: 0,
sent: function sent() {
if (t[0] & 1) throw t[1];
return t[1];
},
trys: [],
ops: []
},
f,
y,
t,
g;
return g = {
next: verb(0),
"throw": verb(1),
"return": verb(2)
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
return this;
}), g;
 
function verb(n) {
return function (v) {
return step([n, v]);
};
}
 
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
 
while (_) {
try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
 
switch (op[0]) {
case 0:
case 1:
t = op;
break;
 
case 4:
_.label++;
return {
value: op[1],
done: false
};
 
case 5:
_.label++;
y = op[1];
op = [0];
continue;
 
case 7:
op = _.ops.pop();
 
_.trys.pop();
 
continue;
 
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
_ = 0;
continue;
}
 
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
_.label = op[1];
break;
}
 
if (op[0] === 6 && _.label < t[1]) {
_.label = t[1];
t = op;
break;
}
 
if (t && _.label < t[2]) {
_.label = t[2];
 
_.ops.push(op);
 
break;
}
 
if (t[2]) _.ops.pop();
 
_.trys.pop();
 
continue;
}
 
op = body.call(thisArg, _);
} catch (e) {
op = [6, e];
y = 0;
} finally {
f = t = 0;
}
}
 
if (op[0] & 5) throw op[1];
return {
value: op[0] ? op[1] : void 0,
done: true
};
}
}
var __createBinding = Object.create ? function (o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, {
enumerable: true,
get: function get() {
return m[k];
}
});
} : function (o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
};
function __exportStar(m, o) {
for (var p in m) {
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
}
}
function __values(o) {
var s = typeof Symbol === "function" && Symbol.iterator,
m = s && o[s],
i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function next() {
if (o && i >= o.length) o = void 0;
return {
value: o && o[i++],
done: !o
};
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o),
r,
ar = [],
e;
 
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
ar.push(r.value);
}
} catch (error) {
e = {
error: error
};
} finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
} finally {
if (e) throw e.error;
}
}
 
return ar;
}
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++) {
ar = ar.concat(__read(arguments[i]));
}
 
return ar;
}
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
s += arguments[i].length;
}
 
for (var r = Array(s), k = 0, i = 0; i < il; i++) {
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
r[k] = a[j];
}
}
 
return r;
}
;
function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []),
i,
q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
return this;
}, i;
 
function verb(n) {
if (g[n]) i[n] = function (v) {
return new Promise(function (a, b) {
q.push([n, v, a, b]) > 1 || resume(n, v);
});
};
}
 
function resume(n, v) {
try {
step(g[n](v));
} catch (e) {
settle(q[0][3], e);
}
}
 
function step(r) {
r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
}
 
function fulfill(value) {
resume("next", value);
}
 
function reject(value) {
resume("throw", value);
}
 
function settle(f, v) {
if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
}
}
function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) {
throw e;
}), verb("return"), i[Symbol.iterator] = function () {
return this;
}, i;
 
function verb(n, f) {
i[n] = o[n] ? function (v) {
return (p = !p) ? {
value: __await(o[n](v)),
done: n === "return"
} : f ? f(v) : v;
} : f;
}
}
function __asyncValues(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator],
i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
return this;
}, i);
 
function verb(n) {
i[n] = o[n] && function (v) {
return new Promise(function (resolve, reject) {
v = o[n](v), settle(resolve, reject, v.done, v.value);
});
};
}
 
function settle(resolve, reject, d, v) {
Promise.resolve(v).then(function (v) {
resolve({
value: v,
done: d
});
}, reject);
}
}
function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) {
Object.defineProperty(cooked, "raw", {
value: raw
});
} else {
cooked.raw = raw;
}
 
return cooked;
}
;
 
var __setModuleDefault = Object.create ? function (o, v) {
Object.defineProperty(o, "default", {
enumerable: true,
value: v
});
} : function (o, v) {
o["default"] = v;
};
 
function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
}
 
__setModuleDefault(result, mod);
 
return result;
}
function __importDefault(mod) {
return mod && mod.__esModule ? mod : {
default: mod
};
}
function __classPrivateFieldGet(receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
 
return privateMap.get(receiver);
}
function __classPrivateFieldSet(receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
 
privateMap.set(receiver, value);
return value;
}
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/Api.ts":
/*!**********************************************!*\
!*** ./node_modules/twinkle-core/src/Api.ts ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Api": function() { return /* binding */ Api; },
/* harmony export */ "mwApi": function() { return /* binding */ mwApi; },
/* harmony export */ "initialiseMwApi": function() { return /* binding */ initialiseMwApi; }
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _twinkle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./twinkle */ "./node_modules/twinkle-core/src/twinkle.ts");
/* harmony import */ var _messenger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./messenger */ "./node_modules/twinkle-core/src/messenger.ts");
 
 
 
/**
* Wrapper around Morebits.wiki.api that preset the commonly used
* API parameters and sets the correct user agent
*/
var Api = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(Api, _super);
function Api(currentAction, query, statusElement) {
var _this = this;
query = $.extend({
action: 'query',
format: 'json',
formatversion: '2',
uselang: _messenger__WEBPACK_IMPORTED_MODULE_1__.language,
errorlang: _messenger__WEBPACK_IMPORTED_MODULE_1__.language,
errorsuselocal: true,
// tags isn't applicable for all API actions, it gives a warning but that's harmless
tags: _twinkle__WEBPACK_IMPORTED_MODULE_2__.Twinkle.changeTags,
}, query);
_this = _super.call(this, currentAction, query, null, statusElement, null) || this;
return _this;
}
Api.prototype.post = function (ajaxParameters) {
if (!ajaxParameters) {
ajaxParameters = {};
}
if (!ajaxParameters.headers) {
ajaxParameters.headers = {};
}
ajaxParameters.headers['Api-User-Agent'] = _twinkle__WEBPACK_IMPORTED_MODULE_2__.Twinkle.userAgent;
return _super.prototype.post.call(this, ajaxParameters);
};
return Api;
}(Morebits.wiki.api));
 
var mwApi;
/**
* Called from init(). Can't initialise at top level, since values of language,
* Twinkle.changeTags and Twinkle.userAgent aren't final by that stage.
* @private
*/
function initialiseMwApi() {
mwApi = new mw.Api({
parameters: {
action: 'query',
format: 'json',
formatversion: '2',
uselang: _messenger__WEBPACK_IMPORTED_MODULE_1__.language,
errorlang: _messenger__WEBPACK_IMPORTED_MODULE_1__.language,
errorsuselocal: true,
// tags isn't applicable for all API actions, it gives a warning but that's harmless
tags: _twinkle__WEBPACK_IMPORTED_MODULE_2__.Twinkle.changeTags,
},
ajax: {
headers: {
'Api-User-Agent': _twinkle__WEBPACK_IMPORTED_MODULE_2__.Twinkle.userAgent,
},
},
});
}
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/Config.ts":
/*!*************************************************!*\
!*** ./node_modules/twinkle-core/src/Config.ts ***!
\*************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "setDefaultConfig": function() { return /* binding */ setDefaultConfig; },
/* harmony export */ "getPref": function() { return /* binding */ getPref; },
/* harmony export */ "loadUserConfig": function() { return /* binding */ loadUserConfig; },
/* harmony export */ "Config": function() { return /* binding */ Config; }
/* harmony export */ });
/* harmony import */ var _twinkle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./twinkle */ "./node_modules/twinkle-core/src/twinkle.ts");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./node_modules/twinkle-core/src/utils.ts");
 
 
var prefs;
/**
* This holds the default set of preferences used by Twinkle.
* It is important that all new preferences added here, especially admin-only ones, are also added to
* |Twinkle.config.sections| in twinkleconfig.js, so they are configurable via the Twinkle preferences panel.
* For help on the actual preferences, see the comments in twinkleconfig.js.
*/
var defaultConfig = {
optionsVersion: 2,
// TODO: Use the defaults in Config.sections
// General
userTalkPageMode: 'tab',
dialogLargeFont: false,
disabledModules: [],
disabledSysopModules: [],
// Portlet
portletArea: null,
portletId: null,
portletName: null,
portletType: null,
portletNext: null,
// Hidden preferences
autolevelStaleDays: 3,
revertMaxRevisions: 50,
batchMax: 5000,
batchChunks: 50,
// Deprecated options, as a fallback for add-on scripts/modules
summaryAd: ' ([[WP:TW|TW]])',
deletionSummaryAd: ' ([[WP:TW|TW]])',
protectionSummaryAd: ' ([[WP:TW|TW]])',
// XfD
logXfdNominations: false,
xfdLogPageName: 'XfD log',
noLogOnXfdNomination: [],
xfdWatchDiscussion: 'default',
xfdWatchList: 'no',
xfdWatchPage: 'default',
xfdWatchUser: 'default',
xfdWatchRelated: 'default',
markXfdPagesAsPatrolled: true,
// Fluff (revert and rollback)
autoMenuAfterRollback: false,
openTalkPage: ['agf', 'norm', 'vand'],
openTalkPageOnAutoRevert: false,
rollbackInPlace: false,
markRevertedPagesAsMinor: ['vand'],
watchRevertedPages: ['agf', 'norm', 'vand', 'torev'],
watchRevertedExpiry: '1 month',
offerReasonOnNormalRevert: true,
confirmOnFluff: false,
confirmOnMobileFluff: true,
showRollbackLinks: ['diff', 'others'],
// CSD
speedySelectionStyle: 'buttonClick',
watchSpeedyPages: ['g3', 'g5', 'g10', 'g11', 'g12'],
watchSpeedyExpiry: '1 month',
markSpeedyPagesAsPatrolled: false,
// Warn
defaultWarningGroup: '1',
combinedSingletMenus: false,
showSharedIPNotice: true,
watchWarnings: '1 month',
oldSelect: false,
customWarningList: [],
// ARV
spiWatchReport: 'yes',
// Welcome
topWelcomes: false,
watchWelcomes: '3 months',
insertUsername: true,
quickWelcomeMode: 'norm',
quickWelcomeTemplate: 'welcome',
customWelcomeList: [],
customWelcomeSignature: true,
// Shared
markSharedIPAsMinor: true,
// Talkback
markTalkbackAsMinor: true,
insertTalkbackSignature: true,
talkbackHeading: 'New message from ' + mw.config.get('wgUserName'),
mailHeading: "You've got mail!",
};
/**
* Extends the defaultConfig
* @param config
*/
function setDefaultConfig(config) {
config.forEach(function (pref) {
defaultConfig[pref.name] = pref.value;
});
}
function getPref(name) {
if (typeof prefs === 'object' && prefs[name] !== undefined) {
return prefs[name];
}
// Old preferences format, used before twinkleoptions.js was a thing
if (typeof window.TwinkleConfig === 'object' && window.TwinkleConfig[name] !== undefined) {
return window.TwinkleConfig[name];
}
if (typeof window.FriendlyConfig === 'object' && window.FriendlyConfig[name] !== undefined) {
return window.FriendlyConfig[name];
}
return defaultConfig[name];
}
function loadUserConfig() {
var scriptpathbefore = mw.util.wikiScript('index') + '?title=', scriptpathafter = '&action=raw&ctype=text/javascript&happy=yes';
return $.ajax({
url: scriptpathbefore +
'User:' +
encodeURIComponent(mw.config.get('wgUserName')) +
'/twinkleoptions.js' +
scriptpathafter,
dataType: 'text',
})
.then(function (optionsText) {
// Quick pass if user has no options
if (optionsText === '') {
return;
}
// Twinkle options are basically a JSON object with some comments. Strip those:
optionsText = optionsText.replace(/(?:^(?:\/\/[^\n]*\n)*\n*|(?:\/\/[^\n]*(?:\n|$))*$)/g, '');
// First version of options had some boilerplate code to make it eval-able -- strip that too. This part may become obsolete down the line.
if (optionsText.lastIndexOf('window.Twinkle.prefs = ', 0) === 0) {
optionsText = optionsText.replace(/(?:^window.Twinkle.prefs = |;\n*$)/g, '');
}
try {
var options = JSON.parse(optionsText);
if (options) {
if (options.twinkle || options.friendly) {
// Old preferences format
prefs = $.extend(options.twinkle, options.friendly);
}
else {
prefs = options;
}
// v2 established after unification of Twinkle/Friendly objects
prefs.optionsVersion = prefs.optionsVersion || 1;
}
}
catch (e) {
mw.notify('Could not parse your Twinkle preferences', { type: 'error' });
}
})
.catch(function () {
mw.notify('Could not load your Twinkle preferences', { type: 'error' });
// not rejected
});
}
var Config = /** @class */ (function () {
function Config() {
}
Config.addGroup = function (module, section) {
Config.sections[module] = section;
};
Config.addPreference = function (module, pref) {
Config.sections[module].preferences.push(pref);
};
Config.init = function () {
// create the config page at Wikipedia:Twinkle/Preferences
if (mw.config.get('wgNamespaceNumber') === mw.config.get('wgNamespaceIds').project &&
mw.config.get('wgTitle') === 'Twinkle/Preferences' &&
mw.config.get('wgAction') === 'view') {
if (!document.getElementById('twinkle-config')) {
return; // maybe the page is misconfigured, or something - but any attempt to modify it will be pointless
}
// set style (the url() CSS function doesn't seem to work from wikicode - ?!)
document.getElementById('twinkle-config-titlebar').style.backgroundImage =
'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB%2FqqA%2BAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEhQTFRFr73ZobTPusjdsMHZp7nVwtDhzNbnwM3fu8jdq7vUt8nbxtDkw9DhpbfSvMrfssPZqLvVztbno7bRrr7W1d%2Fs1N7qydXk0NjpkW7Q%2BgAAADVJREFUeNoMwgESQCAAAMGLkEIi%2FP%2BnbnbpdB59app5Vdg0sXAoMZCpGoFbK6ciuy6FX4ABAEyoAef0BXOXAAAAAElFTkSuQmCC)';
var contentdiv = document.getElementById('twinkle-config-content');
contentdiv.textContent = ''; // clear children
// let user know about possible conflict with skin js/common.js file
// (settings in that file will still work, but they will be overwritten by twinkleoptions.js settings)
if (window.TwinkleConfig || window.FriendlyConfig) {
var contentnotice = document.createElement('p');
contentnotice.innerHTML =
'<table class="plainlinks ombox ombox-content"><tr><td class="mbox-image">' +
'<img alt="" src="https://upload.wikimedia.org/wikipedia/commons/3/38/Imbox_content.png" /></td>' +
'<td class="mbox-text"><p><big><b>Before modifying your settings here,</b> you must remove your old Twinkle and Friendly settings from your personal skin JavaScript.</big></p>' +
'<p>To do this, you can <a href="' +
mw.util.getUrl('User:' + mw.config.get('wgUserName') + '/' + mw.config.get('skin') + '.js', {
action: 'edit',
}) +
'" target="_blank"><b>edit your personal skin javascript file</b></a> or <a href="' +
mw.util.getUrl('User:' + mw.config.get('wgUserName') + '/common.js', { action: 'edit' }) +
'" target="_blank"><b>your common.js file</b></a>, removing all lines of code that refer to <code>TwinkleConfig</code> and <code>FriendlyConfig</code>.</p>' +
'</td></tr></table>';
contentdiv.appendChild(contentnotice);
}
// start a table of contents
var toctable = document.createElement('div');
toctable.className = 'toc';
toctable.style.marginLeft = '0.4em';
// create TOC title
var toctitle = document.createElement('div');
toctitle.id = 'toctitle';
var toch2 = document.createElement('h2');
toch2.textContent = 'Contents ';
toctitle.appendChild(toch2);
// add TOC show/hide link
var toctoggle = document.createElement('span');
toctoggle.className = 'toctoggle';
toctoggle.appendChild(document.createTextNode('['));
var toctogglelink = document.createElement('a');
toctogglelink.className = 'internal';
toctogglelink.setAttribute('href', '#tw-tocshowhide');
toctogglelink.textContent = 'hide';
toctoggle.appendChild(toctogglelink);
toctoggle.appendChild(document.createTextNode(']'));
toctitle.appendChild(toctoggle);
toctable.appendChild(toctitle);
// create item container: this is what we add stuff to
var tocul = document.createElement('ul');
toctogglelink.addEventListener('click', function twinkleconfigTocToggle() {
var $tocul = $(tocul);
$tocul.toggle();
if ($tocul.find(':visible').length) {
toctogglelink.textContent = 'hide';
}
else {
toctogglelink.textContent = 'show';
}
}, false);
toctable.appendChild(tocul);
contentdiv.appendChild(toctable);
var contentform = document.createElement('form');
contentform.setAttribute('action', 'javascript:void(0)'); // was #tw-save - changed to void(0) to work around Chrome issue
contentform.addEventListener('submit', Config.save, true);
contentdiv.appendChild(contentform);
var container = document.createElement('table');
container.style.width = '100%';
contentform.appendChild(container);
(0,_utils__WEBPACK_IMPORTED_MODULE_0__.obj_values)(Config.sections).forEach(function (section) {
if (section.hidden || (section.adminOnly && !Morebits.userIsSysop)) {
return true; // i.e. "continue" in this context
}
// add to TOC
var tocli = document.createElement('li');
tocli.className = 'toclevel-1';
var toca = document.createElement('a');
toca.setAttribute('href', '#' + section.module);
toca.appendChild(document.createTextNode(section.title));
tocli.appendChild(toca);
tocul.appendChild(tocli);
var row = document.createElement('tr');
var cell = document.createElement('td');
cell.setAttribute('colspan', '3');
var heading = document.createElement('h4');
heading.style.borderBottom = '1px solid gray';
heading.style.marginTop = '0.2em';
heading.id = section.module;
heading.appendChild(document.createTextNode(section.title));
cell.appendChild(heading);
row.appendChild(cell);
container.appendChild(row);
var rowcount = 1; // for row banding
// add each of the preferences to the form
section.preferences.forEach(function (pref) {
if (pref.adminOnly && !Morebits.userIsSysop) {
return true; // i.e. "continue" in this context
}
row = document.createElement('tr');
row.style.marginBottom = '0.2em';
// create odd row banding
if (rowcount++ % 2 === 0) {
row.style.backgroundColor = 'rgba(128, 128, 128, 0.1)';
}
cell = document.createElement('td');
var label, input, gotPref = getPref(pref.name);
switch (pref.type) {
case 'boolean': // create a checkbox
cell.setAttribute('colspan', '2');
label = document.createElement('label');
input = document.createElement('input');
input.setAttribute('type', 'checkbox');
input.setAttribute('id', pref.name);
input.setAttribute('name', pref.name);
if (gotPref === true) {
input.setAttribute('checked', 'checked');
}
label.appendChild(input);
label.appendChild(document.createTextNode(' ' + pref.label));
cell.appendChild(label);
break;
case 'string': // create an input box
case 'integer':
// add label to first column
cell.style.textAlign = 'right';
cell.style.paddingRight = '0.5em';
label = document.createElement('label');
label.setAttribute('for', pref.name);
label.appendChild(document.createTextNode(pref.label + ':'));
cell.appendChild(label);
row.appendChild(cell);
// add input box to second column
cell = document.createElement('td');
cell.style.paddingRight = '1em';
input = document.createElement('input');
input.setAttribute('type', 'text');
input.setAttribute('id', pref.name);
input.setAttribute('name', pref.name);
if (pref.type === 'integer') {
input.setAttribute('size', 6);
input.setAttribute('type', 'number');
input.setAttribute('step', '1'); // integers only
}
if (gotPref) {
input.setAttribute('value', gotPref);
}
cell.appendChild(input);
break;
case 'enum': // create a combo box
// add label to first column
// note: duplicates the code above, under string/integer
cell.style.textAlign = 'right';
cell.style.paddingRight = '0.5em';
label = document.createElement('label');
label.setAttribute('for', pref.name);
label.appendChild(document.createTextNode(pref.label + ':'));
cell.appendChild(label);
row.appendChild(cell);
// add input box to second column
cell = document.createElement('td');
cell.style.paddingRight = '1em';
input = document.createElement('select');
input.setAttribute('id', pref.name);
input.setAttribute('name', pref.name);
$.each(pref.enumValues, function (enumvalue, enumdisplay) {
var option = document.createElement('option');
option.setAttribute('value', enumvalue);
if (gotPref === enumvalue ||
// Hack to convert old boolean watchlist prefs
// to corresponding enums (added in v2.1)
(typeof gotPref === 'boolean' &&
((gotPref && enumvalue === 'yes') || (!gotPref && enumvalue === 'no')))) {
option.setAttribute('selected', 'selected');
}
option.appendChild(document.createTextNode(enumdisplay));
input.appendChild(option);
});
cell.appendChild(input);
break;
case 'set': // create a set of check boxes
// add label first of all
cell.setAttribute('colspan', '2');
label = document.createElement('label'); // not really necessary to use a label element here, but we do it for consistency of styling
label.appendChild(document.createTextNode(pref.label + ':'));
cell.appendChild(label);
var checkdiv = document.createElement('div');
checkdiv.style.paddingLeft = '1em';
var worker = function (itemkey, itemvalue) {
var checklabel = document.createElement('label');
checklabel.style.marginRight = '0.7em';
checklabel.style.display = 'inline-block';
var check = document.createElement('input');
check.setAttribute('type', 'checkbox');
check.setAttribute('id', pref.name + '_' + itemkey);
check.setAttribute('name', pref.name + '_' + itemkey);
if (gotPref && gotPref.indexOf(itemkey) !== -1) {
check.setAttribute('checked', 'checked');
}
// cater for legacy integer array values for unlinkNamespaces (this can be removed a few years down the track...)
if (pref.name === 'unlinkNamespaces') {
if (gotPref && gotPref.indexOf(parseInt(itemkey, 10)) !== -1) {
check.setAttribute('checked', 'checked');
}
}
checklabel.appendChild(check);
checklabel.appendChild(document.createTextNode(itemvalue));
checkdiv.appendChild(checklabel);
};
if (pref.setDisplayOrder) {
// add check boxes according to the given display order
$.each(pref.setDisplayOrder, function (itemkey, item) {
worker(item, pref.setValues[item]);
});
}
else {
// add check boxes according to the order it gets fed to us (probably strict alphabetical)
$.each(pref.setValues, worker);
}
cell.appendChild(checkdiv);
break;
case 'customList':
// add label to first column
cell.style.textAlign = 'right';
cell.style.paddingRight = '0.5em';
label = document.createElement('label');
label.setAttribute('for', pref.name);
label.appendChild(document.createTextNode(pref.label + ':'));
cell.appendChild(label);
row.appendChild(cell);
// add button to second column
cell = document.createElement('td');
cell.style.paddingRight = '1em';
var button = document.createElement('button');
button.setAttribute('id', pref.name);
button.setAttribute('name', pref.name);
button.setAttribute('type', 'button');
button.addEventListener('click', ListDialog.display, false);
// use jQuery data on the button to store the current config value
$(button).data({
value: gotPref,
pref: pref,
});
button.appendChild(document.createTextNode('Edit items'));
cell.appendChild(button);
break;
default:
alert('twinkleconfig: unknown data type for preference ' + pref.name);
break;
}
row.appendChild(cell);
// add help tip
cell = document.createElement('td');
cell.style.fontSize = '90%';
cell.style.color = 'gray';
if (pref.helptip) {
// convert mentions of templates in the helptip to clickable links
cell.innerHTML = pref.helptip.replace(/{{(.+?)}}/g, '{{<a href="' + mw.util.getUrl('Template:') + '$1" target="_blank">$1</a>}}');
}
// add reset link (custom lists don't need this, as their config value isn't displayed on the form)
if (pref.type !== 'customList') {
var resetlink = document.createElement('a');
resetlink.setAttribute('href', '#tw-reset');
resetlink.setAttribute('id', 'twinkle-config-reset-' + pref.name);
resetlink.addEventListener('click', Config.resetPrefLink, false);
resetlink.style.cssFloat = 'right';
resetlink.style.margin = '0 0.6em';
resetlink.appendChild(document.createTextNode('Reset'));
cell.appendChild(resetlink);
}
row.appendChild(cell);
container.appendChild(row);
return true;
});
return true;
});
var footerbox = document.createElement('div');
footerbox.setAttribute('id', 'twinkle-config-buttonpane');
footerbox.style.backgroundColor = '#BCCADF';
footerbox.style.padding = '0.5em';
var button = document.createElement('button');
button.setAttribute('id', 'twinkle-config-submit');
button.setAttribute('type', 'submit');
button.appendChild(document.createTextNode('Save changes'));
footerbox.appendChild(button);
var footerspan = document.createElement('span');
footerspan.className = 'plainlinks';
footerspan.style.marginLeft = '2.4em';
footerspan.style.fontSize = '90%';
var footera = document.createElement('a');
footera.setAttribute('href', '#tw-reset-all');
footera.setAttribute('id', 'twinkle-config-resetall');
footera.addEventListener('click', Config.resetAllPrefs, false);
footera.appendChild(document.createTextNode('Restore defaults'));
footerspan.appendChild(footera);
footerbox.appendChild(footerspan);
contentform.appendChild(footerbox);
// since all the section headers exist now, we can try going to the requested anchor
if (window.location.hash) {
var loc = window.location.hash;
window.location.hash = '';
window.location.hash = loc;
}
}
else if (mw.config.get('wgNamespaceNumber') === mw.config.get('wgNamespaceIds').user &&
mw.config.get('wgTitle').indexOf(mw.config.get('wgUserName')) === 0 &&
mw.config.get('wgPageName').slice(-3) === '.js') {
var box = document.createElement('div');
// Styled in twinkle.css
box.setAttribute('id', 'twinkle-config-headerbox');
var link, scriptPageName = mw.config
.get('wgPageName')
.slice(mw.config.get('wgPageName').lastIndexOf('/') + 1, mw.config.get('wgPageName').lastIndexOf('.js'));
if (scriptPageName === 'twinkleoptions') {
// place "why not try the preference panel" notice
box.setAttribute('class', 'config-twopt-box');
if (mw.config.get('wgArticleId') > 0) {
// page exists
box.appendChild(document.createTextNode('This page contains your Twinkle preferences. You can change them using the '));
}
else {
// page does not exist
box.appendChild(document.createTextNode('You can customize Twinkle to suit your preferences by using the '));
}
link = document.createElement('a');
link.setAttribute('href', mw.util.getUrl(mw.config.get('wgFormattedNamespaces')[mw.config.get('wgNamespaceIds').project] + ':Twinkle/Preferences'));
link.appendChild(document.createTextNode('Twinkle preferences panel'));
box.appendChild(link);
box.appendChild(document.createTextNode(', or by editing this page.'));
$(box).insertAfter($('#contentSub'));
}
else if (['monobook', 'vector', 'cologneblue', 'modern', 'timeless', 'minerva', 'common'].indexOf(scriptPageName) !== -1) {
// place "Looking for Twinkle options?" notice
box.setAttribute('class', 'config-userskin-box');
box.appendChild(document.createTextNode('If you want to set Twinkle preferences, you can use the '));
link = document.createElement('a');
link.setAttribute('href', mw.util.getUrl(mw.config.get('wgFormattedNamespaces')[mw.config.get('wgNamespaceIds').project] + ':Twinkle/Preferences'));
link.appendChild(document.createTextNode('Twinkle preferences panel'));
box.appendChild(link);
box.appendChild(document.createTextNode('.'));
$(box).insertAfter($('#contentSub'));
}
}
};
Config.resetPrefLink = function (e) {
var wantedpref = e.target.id.substring(21); // "twinkle-config-reset-" prefix is stripped
// search tactics
(0,_utils__WEBPACK_IMPORTED_MODULE_0__.obj_values)(Config.sections).forEach(function (section) {
if (section.hidden || (section.adminOnly && !Morebits.userIsSysop)) {
return true; // continuze: skip impossibilities
}
var foundit = false;
section.preferences.forEach(function (pref) {
if (pref.name !== wantedpref) {
return true; // continue
}
Config.resetPref(pref);
foundit = true;
return false; // break
});
if (foundit) {
return false; // break
}
});
return false; // stop link from scrolling page
};
Config.resetPref = function (pref) {
switch (pref.type) {
case 'boolean':
document.getElementById(pref.name).checked = defaultConfig[pref.name];
break;
case 'string':
case 'integer':
case 'enum':
document.getElementById(pref.name).value = defaultConfig[pref.name];
break;
case 'set':
$.each(pref.setValues, function (itemkey) {
var checkbox = document.getElementById(pref.name + '_' + itemkey);
if (checkbox) {
checkbox.checked = defaultConfig[pref.name].indexOf(itemkey) !== -1;
}
});
break;
case 'customList':
$(document.getElementById(pref.name)).data('value', defaultConfig[pref.name]);
break;
default:
alert('twinkleconfig: unknown data type for preference ' + pref.name);
break;
}
};
Config.resetAllPrefs = function () {
// no confirmation message - the user can just refresh/close the page to abort
(0,_utils__WEBPACK_IMPORTED_MODULE_0__.obj_values)(Config.sections).forEach(function (section) {
if (section.hidden || (section.adminOnly && !Morebits.userIsSysop)) {
return true; // continue: skip impossibilities
}
section.preferences.forEach(function (pref) {
if (!pref.adminOnly || Morebits.userIsSysop) {
Config.resetPref(pref);
}
});
return true;
});
return false; // stop link from scrolling page
};
Config.save = function (e) {
Morebits.status.init(document.getElementById('twinkle-config-content'));
var userjs = mw.config.get('wgFormattedNamespaces')[mw.config.get('wgNamespaceIds').user] +
':' +
mw.config.get('wgUserName') +
'/twinkleoptions.js';
var wikipedia_page = new Morebits.wiki.page(userjs, 'Saving preferences to ' + userjs);
wikipedia_page.setCallbackParameters(e.target);
wikipedia_page.load(Config.writePrefs);
return false;
};
Config.writePrefs = function (pageobj) {
var form = pageobj.getCallbackParameters();
// this is the object which gets serialized into JSON; only
// preferences that this script knows about are kept
var newConfig = { optionsVersion: 2.1 };
// a comparison function is needed later on
// it is just enough for our purposes (i.e. comparing strings, numbers, booleans,
// arrays of strings, and arrays of { value, label })
// and it is not very robust: e.g. compare([2], ["2"]) === true, and
// compare({}, {}) === false, but it's good enough for our purposes here
var compare = function (a, b) {
if (Array.isArray(a)) {
if (a.length !== b.length) {
return false;
}
var asort = a.sort(), bsort = b.sort();
for (var i = 0; asort[i]; ++i) {
// comparison of the two properties of custom lists
if (typeof asort[i] === 'object' &&
(asort[i].label !== bsort[i].label || asort[i].value !== bsort[i].value)) {
return false;
}
else if (asort[i].toString() !== bsort[i].toString()) {
return false;
}
}
return true;
}
return a === b;
};
(0,_utils__WEBPACK_IMPORTED_MODULE_0__.obj_values)(Config.sections).forEach(function (section) {
if (section.adminOnly && !Morebits.userIsSysop) {
return; // i.e. "continue" in this context
}
// reach each of the preferences from the form
section.preferences.forEach(function (pref) {
var userValue; // = undefined
// only read form values for those prefs that have them
if (!pref.adminOnly || Morebits.userIsSysop) {
if (!section.hidden) {
switch (pref.type) {
case 'boolean': // read from the checkbox
userValue = form[pref.name].checked;
break;
case 'string': // read from the input box or combo box
case 'enum':
userValue = form[pref.name].value;
break;
case 'integer': // read from the input box
userValue = parseInt(form[pref.name].value, 10);
if (isNaN(userValue)) {
Morebits.status.warn('Saving', 'The value you specified for ' +
pref.name +
' (' +
form[pref.name].value +
') was invalid. The save will continue, but the invalid data value will be skipped.');
userValue = null;
}
break;
case 'set': // read from the set of check boxes
userValue = [];
if (pref.setDisplayOrder) {
// read only those keys specified in the display order
$.each(pref.setDisplayOrder, function (itemkey, item) {
if (form[pref.name + '_' + item].checked) {
userValue.push(item);
}
});
}
else {
// read all the keys in the list of values
$.each(pref.setValues, function (itemkey) {
if (form[pref.name + '_' + itemkey].checked) {
userValue.push(itemkey);
}
});
}
break;
case 'customList': // read from the jQuery data stored on the button object
userValue = $(form[pref.name]).data('value');
break;
default:
alert('twinkleconfig: unknown data type for preference ' + pref.name);
break;
}
}
else if (prefs) {
// Retain the hidden preferences that may have customised by the user from twinkleoptions.js
// undefined if not set
userValue = prefs[pref.name];
}
}
// only save those preferences that are *different* from the default
if (userValue !== undefined && !compare(userValue, defaultConfig[pref.name])) {
newConfig[pref.name] = userValue;
}
});
});
var text = '// twinkleoptions.js: personal Twinkle preferences file\n' +
'//\n' +
'// NOTE: The easiest way to change your Twinkle preferences is by using the\n' +
'// Twinkle preferences panel, at [[' +
Morebits.pageNameNorm +
']].\n' +
'//\n' +
'// This file is AUTOMATICALLY GENERATED. Any changes you make (aside from\n' +
'// changing the configuration parameters in a valid-JavaScript way) will be\n' +
'// overwritten the next time you click "save" in the Twinkle preferences\n' +
'// panel. If modifying this file, make sure to use correct JavaScript.\n' +
'// <no' +
'wiki>\n' +
'\n' +
'window.Twinkle.prefs = ';
text += JSON.stringify(newConfig, null, 2);
text += ';\n' + '\n' + '// </no' + 'wiki>\n' + '// End of twinkleoptions.js\n';
pageobj.setPageText(text);
pageobj.setEditSummary('Saving Twinkle preferences: automatic edit from [[:' + Morebits.pageNameNorm + ']]');
pageobj.setChangeTags(_twinkle__WEBPACK_IMPORTED_MODULE_1__.Twinkle.changeTags);
pageobj.setCreateOption('recreate');
pageobj.save(Config.saveSuccess);
};
Config.saveSuccess = function (pageobj) {
pageobj.getStatusElement().info('successful');
var noticebox = document.createElement('div');
noticebox.className = 'successbox';
noticebox.style.fontSize = '100%';
noticebox.style.marginTop = '2em';
noticebox.innerHTML =
'<p><b>Your Twinkle preferences have been saved.</b></p><p>To see the changes, you will need to <b>clear your browser cache entirely</b> (see <a href="' +
mw.util.getUrl('WP:BYPASS') +
'" title="WP:BYPASS">WP:BYPASS</a> for instructions).</p>';
Morebits.status.root.appendChild(noticebox);
var noticeclear = document.createElement('br');
noticeclear.style.clear = 'both';
Morebits.status.root.appendChild(noticeclear);
};
Config.sections = {
general: {
title: 'General',
module: 'general',
preferences: [
// TwinkleConfig.userTalkPageMode may take arguments:
// 'window': open a new window, remember the opened window
// 'tab': opens in a new tab, if possible.
// 'blank': force open in a new window, even if such a window exists
{
name: 'userTalkPageMode',
label: 'When opening a user talk page, open it',
type: 'enum',
enumValues: {
window: 'In a window, replacing other user talks',
tab: 'In a new tab',
blank: 'In a totally new window',
},
default: 'tab',
},
// TwinkleConfig.dialogLargeFont (boolean)
{
name: 'dialogLargeFont',
label: 'Use larger text in Twinkle dialogs',
type: 'boolean',
default: false,
},
// Config.disabledModules (array)
{
name: 'disabledModules',
label: 'Turn off the selected Twinkle modules',
helptip: 'Anything you select here will NOT be available for use, so act with care. Uncheck to reactivate.',
type: 'set',
setValues: {
arv: 'ARV',
warn: 'Warn',
welcome: 'Welcome',
shared: 'Shared IP',
talkback: 'Talkback',
speedy: 'CSD',
prod: 'PROD',
xfd: 'XfD',
image: 'Image (DI)',
protect: 'Protect (RPP)',
tag: 'Tag',
diff: 'Diff',
unlink: 'Unlink',
fluff: 'Revert and rollback',
},
default: [],
},
// Config.disabledSysopModules (array)
{
name: 'disabledSysopModules',
label: 'Turn off the selected admin-only modules',
helptip: 'Anything you select here will NOT be available for use, so act with care. Uncheck to reactivate.',
adminOnly: true,
type: 'set',
setValues: {
block: 'Block',
deprod: 'DePROD',
batchdelete: 'D-batch',
batchprotect: 'P-batch',
batchundelete: 'Und-batch',
},
default: [],
},
],
},
hidden: {
title: 'Hidden',
hidden: true,
preferences: [
// twinkle.js: portlet setup
{
name: 'portletArea',
type: 'string',
},
{
name: 'portletId',
type: 'string',
},
{
name: 'portletName',
type: 'string',
},
{
name: 'portletType',
type: 'string',
},
{
name: 'portletNext',
type: 'string',
},
// twinklefluff.js: defines how many revision to query maximum, maximum possible is 50, default is 50
{
name: 'revertMaxRevisions',
type: 'integer',
default: 50,
},
// twinklewarn.js: When using the autolevel select option, how many days makes a prior warning stale
// Huggle is three days ([[Special:Diff/918980316]] and [[Special:Diff/919417999]]) while ClueBotNG is two:
// https://github.com/DamianZaremba/cluebotng/blob/4958e25d6874cba01c75f11debd2e511fd5a2ce5/bot/action_functions.php#L62
{
name: 'autolevelStaleDays',
type: 'integer',
default: 3,
},
// How many pages should be queried by deprod and batchdelete/protect/undelete
{
name: 'batchMax',
type: 'integer',
adminOnly: true,
default: 5000,
},
// How many pages should be processed at a time by deprod and batchdelete/protect/undelete
{
name: 'batchChunks',
type: 'integer',
adminOnly: true,
default: 50,
},
],
},
};
Config.watchlistEnums = {
'yes': 'Add to watchlist (indefinitely)',
'no': "Don't add to watchlist",
'default': 'Follow your site preferences',
'1 week': 'Watch for 1 week',
'1 month': 'Watch for 1 month',
'3 months': 'Watch for 3 months',
'6 months': 'Watch for 6 months',
};
Config.commonSets = {
csdCriteria: {
db: 'Custom rationale ({{db}})',
g1: 'G1',
g2: 'G2',
g3: 'G3',
g4: 'G4',
g5: 'G5',
g6: 'G6',
g7: 'G7',
g8: 'G8',
g10: 'G10',
g11: 'G11',
g12: 'G12',
g13: 'G13',
g14: 'G14',
a1: 'A1',
a2: 'A2',
a3: 'A3',
a5: 'A5',
a7: 'A7',
a9: 'A9',
a10: 'A10',
a11: 'A11',
u1: 'U1',
u2: 'U2',
u3: 'U3',
u5: 'U5',
f1: 'F1',
f2: 'F2',
f3: 'F3',
f7: 'F7',
f8: 'F8',
f9: 'F9',
f10: 'F10',
c1: 'C1',
r2: 'R2',
r3: 'R3',
r4: 'R4',
p1: 'P1',
p2: 'P2',
},
csdCriteriaDisplayOrder: [
'db',
'g1',
'g2',
'g3',
'g4',
'g5',
'g6',
'g7',
'g8',
'g10',
'g11',
'g12',
'g13',
'g14',
'a1',
'a2',
'a3',
'a5',
'a7',
'a9',
'a10',
'a11',
'u1',
'u2',
'u3',
'u5',
'f1',
'f2',
'f3',
'f7',
'f8',
'f9',
'f10',
'c1',
'r2',
'r3',
'r4',
'p1',
'p2',
],
csdCriteriaNotification: {
db: 'Custom rationale ({{db}})',
g1: 'G1',
g2: 'G2',
g3: 'G3',
g4: 'G4',
g6: 'G6 ("copy-paste move" only)',
g10: 'G10',
g11: 'G11',
g12: 'G12',
g13: 'G13',
g14: 'G14',
a1: 'A1',
a2: 'A2',
a3: 'A3',
a5: 'A5',
a7: 'A7',
a9: 'A9',
a10: 'A10',
a11: 'A11',
u3: 'U3',
u5: 'U5',
f1: 'F1',
f2: 'F2',
f3: 'F3',
f7: 'F7',
f9: 'F9',
f10: 'F10',
c1: 'C1',
r2: 'R2',
r3: 'R3',
r4: 'R4',
p1: 'P1',
p2: 'P2',
},
csdCriteriaNotificationDisplayOrder: [
'db',
'g1',
'g2',
'g3',
'g4',
'g6',
'g10',
'g11',
'g12',
'g13',
'g14',
'a1',
'a2',
'a3',
'a5',
'a7',
'a9',
'a10',
'a11',
'u3',
'u5',
'f1',
'f2',
'f3',
'f7',
'f9',
'f10',
'c1',
'r2',
'r3',
'r4',
'p1',
'p2',
],
csdAndDICriteria: {
db: 'Custom rationale ({{db}})',
g1: 'G1',
g2: 'G2',
g3: 'G3',
g4: 'G4',
g5: 'G5',
g6: 'G6',
g7: 'G7',
g8: 'G8',
g10: 'G10',
g11: 'G11',
g12: 'G12',
g13: 'G13',
g14: 'G14',
a1: 'A1',
a2: 'A2',
a3: 'A3',
a5: 'A5',
a7: 'A7',
a9: 'A9',
a10: 'A10',
a11: 'A11',
u1: 'U1',
u2: 'U2',
u3: 'U3',
u5: 'U5',
f1: 'F1',
f2: 'F2',
f3: 'F3',
f4: 'F4',
f5: 'F5',
f6: 'F6',
f7: 'F7',
f8: 'F8',
f9: 'F9',
f10: 'F10',
f11: 'F11',
c1: 'C1',
r2: 'R2',
r3: 'R3',
r4: 'R4',
p1: 'P1',
p2: 'P2',
},
csdAndDICriteriaDisplayOrder: [
'db',
'g1',
'g2',
'g3',
'g4',
'g5',
'g6',
'g7',
'g8',
'g10',
'g11',
'g12',
'g13',
'g14',
'a1',
'a2',
'a3',
'a5',
'a7',
'a9',
'a10',
'a11',
'u1',
'u2',
'u3',
'u5',
'f1',
'f2',
'f3',
'f4',
'f5',
'f6',
'f7',
'f8',
'f9',
'f10',
'f11',
'c1',
'r2',
'r3',
'r4',
'p1',
'p2',
],
namespacesNoSpecial: {
0: 'Article',
1: 'Talk (article)',
2: 'User',
3: 'User talk',
4: 'Wikipedia',
5: 'Wikipedia talk',
6: 'File',
7: 'File talk',
8: 'MediaWiki',
9: 'MediaWiki talk',
10: 'Template',
11: 'Template talk',
12: 'Help',
13: 'Help talk',
14: 'Category',
15: 'Category talk',
100: 'Portal',
101: 'Portal talk',
108: 'Book',
109: 'Book talk',
118: 'Draft',
119: 'Draft talk',
710: 'TimedText',
711: 'TimedText talk',
828: 'Module',
829: 'Module talk',
},
};
return Config;
}());
 
var ListDialog = /** @class */ (function () {
function ListDialog() {
}
ListDialog.addRow = function (dlgtable, value, label) {
var contenttr = document.createElement('tr');
// "remove" button
var contenttd = document.createElement('td');
var removeButton = document.createElement('button');
removeButton.setAttribute('type', 'button');
removeButton.addEventListener('click', function () {
$(contenttr).remove();
}, false);
removeButton.textContent = 'Remove';
contenttd.appendChild(removeButton);
contenttr.appendChild(contenttd);
// value input box
contenttd = document.createElement('td');
var input = document.createElement('input');
input.setAttribute('type', 'text');
input.className = 'twinkle-config-customlist-value';
input.style.width = '97%';
if (value) {
input.setAttribute('value', value);
}
contenttd.appendChild(input);
contenttr.appendChild(contenttd);
// label input box
contenttd = document.createElement('td');
input = document.createElement('input');
input.setAttribute('type', 'text');
input.className = 'twinkle-config-customlist-label';
input.style.width = '98%';
if (label) {
input.setAttribute('value', label);
}
contenttd.appendChild(input);
contenttr.appendChild(contenttd);
dlgtable.appendChild(contenttr);
};
ListDialog.display = function (e) {
var $prefbutton = $(e.target);
var curvalue = $prefbutton.data('value');
var curpref = $prefbutton.data('pref');
var dialog = new Morebits.simpleWindow(720, 400);
dialog.setTitle(curpref.label);
dialog.setScriptName('Twinkle preferences');
var dialogcontent = document.createElement('div');
var dlgtable = document.createElement('table');
dlgtable.className = 'wikitable';
dlgtable.style.margin = '1.4em 1em';
dlgtable.style.width = 'auto';
var dlgtbody = document.createElement('tbody');
// header row
var dlgtr = document.createElement('tr');
// top-left cell
var dlgth = document.createElement('th');
dlgth.style.width = '5%';
dlgtr.appendChild(dlgth);
// value column header
dlgth = document.createElement('th');
dlgth.style.width = '35%';
dlgth.textContent = curpref.customListValueTitle ? curpref.customListValueTitle : 'Value';
dlgtr.appendChild(dlgth);
// label column header
dlgth = document.createElement('th');
dlgth.style.width = '60%';
dlgth.textContent = curpref.customListLabelTitle ? curpref.customListLabelTitle : 'Label';
dlgtr.appendChild(dlgth);
dlgtbody.appendChild(dlgtr);
// content rows
var gotRow = false;
$.each(curvalue, function (k, v) {
gotRow = true;
ListDialog.addRow(dlgtbody, v.value, v.label);
});
// if there are no values present, add a blank row to start the user off
if (!gotRow) {
ListDialog.addRow(dlgtbody);
}
// final "add" button
var dlgtfoot = document.createElement('tfoot');
dlgtr = document.createElement('tr');
var dlgtd = document.createElement('td');
dlgtd.setAttribute('colspan', '3');
var addButton = document.createElement('button');
addButton.style.minWidth = '8em';
addButton.setAttribute('type', 'button');
addButton.addEventListener('click', function () {
ListDialog.addRow(dlgtbody);
}, false);
addButton.textContent = 'Add';
dlgtd.appendChild(addButton);
dlgtr.appendChild(dlgtd);
dlgtfoot.appendChild(dlgtr);
dlgtable.appendChild(dlgtbody);
dlgtable.appendChild(dlgtfoot);
dialogcontent.appendChild(dlgtable);
// buttonpane buttons: [Save changes] [Reset] [Cancel]
var button = document.createElement('button');
button.setAttribute('type', 'submit'); // so Morebits.simpleWindow puts the button in the button pane
button.addEventListener('click', function () {
ListDialog.save($prefbutton, dlgtbody);
dialog.close();
}, false);
button.textContent = 'Save changes';
dialogcontent.appendChild(button);
button = document.createElement('button');
button.setAttribute('type', 'submit'); // so Morebits.simpleWindow puts the button in the button pane
button.addEventListener('click', function () {
ListDialog.reset($prefbutton, dlgtbody);
}, false);
button.textContent = 'Reset';
dialogcontent.appendChild(button);
button = document.createElement('button');
button.setAttribute('type', 'submit'); // so Morebits.simpleWindow puts the button in the button pane
button.addEventListener('click', function () {
dialog.close(); // the event parameter on this function seems to be broken
}, false);
button.textContent = 'Cancel';
dialogcontent.appendChild(button);
dialog.setContent(dialogcontent);
dialog.display();
};
// Resets the data value, re-populates based on the new (default) value, then saves the
// old data value again (less surprising behaviour)
ListDialog.reset = function (button, tbody) {
// reset value on button
var $button = $(button);
var curpref = $button.data('pref');
var oldvalue = $button.data('value');
Config.resetPref(curpref);
// reset form
var $tbody = $(tbody);
$tbody.find('tr').slice(1).remove(); // all rows except the first (header) row
// add the new values
var curvalue = $button.data('value');
$.each(curvalue, function (k, v) {
ListDialog.addRow(tbody, v.value, v.label);
});
// save the old value
$button.data('value', oldvalue);
};
ListDialog.save = function (button, tbody) {
var result = [];
var current = {};
$(tbody)
.find('input[type="text"]')
.each(function (inputkey, input) {
if ($(input).hasClass('twinkle-config-customlist-value')) {
current = { value: input.value };
}
else {
current.label = input.value;
// exclude totally empty rows
if (current.value || current.label) {
result.push(current);
}
}
});
$(button).data('value', result);
};
return ListDialog;
}());
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/Dialog.ts":
/*!*************************************************!*\
!*** ./node_modules/twinkle-core/src/Dialog.ts ***!
\*************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Dialog": function() { return /* binding */ Dialog; }
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _twinkle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./twinkle */ "./node_modules/twinkle-core/src/twinkle.ts");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/twinkle-core/src/utils.ts");
 
 
 
/**
* Light wrapper around Morebits.simpleWindow
* that sets the script name (Twinkle) and provides
* a method to set footer links at once
*/
var Dialog = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(Dialog, _super);
function Dialog(width, height) {
var _this = _super.call(this, width, height) || this;
_this.setScriptName(_twinkle__WEBPACK_IMPORTED_MODULE_1__.Twinkle.scriptName);
return _this;
}
Dialog.prototype.setFooterLinks = function (links) {
var _this = this;
if (!links) {
return;
}
(0,_utils__WEBPACK_IMPORTED_MODULE_2__.obj_entries)(links).forEach(function (link) {
_this.addFooterLink(link[0], link[1]);
});
};
return Dialog;
}(Morebits.simpleWindow));
 
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/Page.ts":
/*!***********************************************!*\
!*** ./node_modules/twinkle-core/src/Page.ts ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Page": function() { return /* binding */ Page; }
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _twinkle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./twinkle */ "./node_modules/twinkle-core/src/twinkle.ts");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/twinkle-core/src/utils.ts");
 
 
 
/**
* Light but immensely hacky wrapper around Morebits.wiki.page that presets the change tags
* and promisifies the core methods.
*/
var Page = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(Page, _super);
function Page(title, status) {
var _this = _super.call(this, title, status) || this;
// If changeTags is configured, apply it, otherwise override setEditSummary
// so that it appends the summaryAd
if (_twinkle__WEBPACK_IMPORTED_MODULE_1__.Twinkle.changeTags.length) {
// checks out if changeTags is a non-empty string or a non-empty array
_this.setChangeTags(_twinkle__WEBPACK_IMPORTED_MODULE_1__.Twinkle.changeTags);
}
else {
var setEditSummaryOriginal_1 = _this.setEditSummary.bind(_this);
_this.setEditSummary = function (summary) {
setEditSummaryOriginal_1(summary + _twinkle__WEBPACK_IMPORTED_MODULE_1__.Twinkle.summaryAd);
};
}
// This is ugly, because Morebits.wiki.page uses an implementation pattern
// that doesn't define any methods on Morebits.wiki.page.prototype.
var functionsToPromisify = [
'load',
'lookupCreation',
'save',
'append',
'prepend',
'newSection',
'deletePage',
'undeletePage',
'protect',
'stabilize',
];
functionsToPromisify.forEach(function (func) {
// TODO: check return argument types
var origFunc = _this[func].bind(_this);
_this[func] = function (onSuccess, onFailure) {
var _this = this;
var def = $.Deferred();
origFunc(function (arg) {
if (onSuccess) {
onSuccess.call(_this, // pass context as this, mostly needed everywhere
_this // pass first arg as this, only needed for fnAutoSave
// which takes pageobj as argument
);
}
// try to resolve with the api object
def.resolve(arg instanceof Morebits.wiki.api ? arg : _this);
}, function (arg) {
if (onFailure) {
onFailure.call(_this, _this); // same as above
}
if (arg instanceof Morebits.wiki.api) {
var err = new _utils__WEBPACK_IMPORTED_MODULE_2__.ApiError(arg.getErrorCode() + ': ' + arg.getErrorText());
err.code = arg.getErrorCode();
err.info = arg.getErrorText();
err.response = arg.getResponse();
def.reject(err);
}
else {
def.reject(new Error(arg));
}
});
return def;
};
});
return _this;
}
return Page;
}(Morebits.wiki.page));
 
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/init.ts":
/*!***********************************************!*\
!*** ./node_modules/twinkle-core/src/init.ts ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "userDisabledModules": function() { return /* binding */ userDisabledModules; },
/* harmony export */ "init": function() { return /* binding */ init; }
/* harmony export */ });
/* harmony import */ var _messenger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./messenger */ "./node_modules/twinkle-core/src/messenger.ts");
/* harmony import */ var _twinkle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./twinkle */ "./node_modules/twinkle-core/src/twinkle.ts");
/* harmony import */ var _Config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Config */ "./node_modules/twinkle-core/src/Config.ts");
/* harmony import */ var _portlet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./portlet */ "./node_modules/twinkle-core/src/portlet.ts");
/* harmony import */ var _twinkleModule__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./twinkleModule */ "./node_modules/twinkle-core/src/twinkleModule.ts");
/* harmony import */ var _siteConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./siteConfig */ "./node_modules/twinkle-core/src/siteConfig.ts");
/* harmony import */ var _Api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Api */ "./node_modules/twinkle-core/src/Api.ts");
 
 
 
 
 
 
 
/**
* List of names of modules disabled by user. Populated in init()
* before modules are initialised.
*/
var userDisabledModules = [];
/**
* Initialise Twinkle. This must be called AFTER all configurations in
* Twinkle.* and SiteConfig.* have been defined.
*/
function init() {
// Quick bail on special pages where no modules are active
if (mw.config.get('wgNamespaceNumber') === -1 &&
!_twinkle__WEBPACK_IMPORTED_MODULE_0__.Twinkle.activeSpecialPages.includes(mw.config.get('wgCanonicalSpecialPageName'))) {
return;
}
// Prevent clickjacking
if (window.top !== window.self) {
return;
}
// Set skin-specific configuration
(0,_portlet__WEBPACK_IMPORTED_MODULE_1__.setPortletConfig)();
// Set Morebits.l10n
Morebits.l10n.redirectTagAliases = _siteConfig__WEBPACK_IMPORTED_MODULE_2__.SiteConfig.redirectTagAliases;
if (typeof _siteConfig__WEBPACK_IMPORTED_MODULE_2__.SiteConfig.signatureTimestampFormat === 'function') {
Morebits.l10n.signatureTimestampFormat = _siteConfig__WEBPACK_IMPORTED_MODULE_2__.SiteConfig.signatureTimestampFormat;
}
// Initialise mw.Api, first used in initMessaging()
(0,_Api__WEBPACK_IMPORTED_MODULE_3__.initialiseMwApi)();
_twinkle__WEBPACK_IMPORTED_MODULE_0__.Twinkle.preModuleInitHooks.push(
// Get messages
function () {
(0,_messenger__WEBPACK_IMPORTED_MODULE_4__.initMessaging)();
},
// Get user config and perform init actions that rely on the config
function () {
return (0,_Config__WEBPACK_IMPORTED_MODULE_5__.loadUserConfig)().then(function () {
// Increases text size in Twinkle dialogs, if so configured
if ((0,_Config__WEBPACK_IMPORTED_MODULE_5__.getPref)('dialogLargeFont')) {
mw.util.addCSS('.morebits-dialog-content, .morebits-dialog-footerlinks { font-size: 100% !important; } ' +
'.morebits-dialog input, .morebits-dialog select, .morebits-dialog-content button { font-size: inherit !important; }');
}
userDisabledModules = userDisabledModules.concat((0,_Config__WEBPACK_IMPORTED_MODULE_5__.getPref)('disabledModules'), (0,_Config__WEBPACK_IMPORTED_MODULE_5__.getPref)('disabledSysopModules'));
return Promise.all(_twinkle__WEBPACK_IMPORTED_MODULE_0__.Twinkle.preModuleInitHooksWithConfig.map(function (func) { return func(); }));
});
});
Promise.all(_twinkle__WEBPACK_IMPORTED_MODULE_0__.Twinkle.preModuleInitHooks.map(function (func) { return func(); })).then(function () {
mw.hook('twinkle.preModuleInit').fire();
for (var _i = 0, _a = _twinkle__WEBPACK_IMPORTED_MODULE_0__.Twinkle.registeredModules; _i < _a.length; _i++) {
var module = _a[_i];
(0,_twinkleModule__WEBPACK_IMPORTED_MODULE_6__.registerModule)(module);
}
// Hide the lingering space if the TW menu is empty
if (mw.config.get('skin') === 'vector' && (0,_Config__WEBPACK_IMPORTED_MODULE_5__.getPref)('portletType') === 'menu' && $('#p-twinkle').length === 0) {
$('#p-cactions').css('margin-right', 'initial');
}
// Has any effect only on WP:TWPREF
_Config__WEBPACK_IMPORTED_MODULE_5__.Config.init();
});
}
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/messenger.ts":
/*!****************************************************!*\
!*** ./node_modules/twinkle-core/src/messenger.ts ***!
\****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "banana": function() { return /* binding */ banana; },
/* harmony export */ "language": function() { return /* binding */ language; },
/* harmony export */ "addMessages": function() { return /* binding */ addMessages; },
/* harmony export */ "msg": function() { return /* binding */ msg; },
/* harmony export */ "initMessaging": function() { return /* binding */ initMessaging; },
/* harmony export */ "loadTwinkleCoreMessages": function() { return /* binding */ loadTwinkleCoreMessages; },
/* harmony export */ "loadAdditionalMediaWikiMessages": function() { return /* binding */ loadAdditionalMediaWikiMessages; }
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var orange_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! orange-i18n */ "./node_modules/orange-i18n/dist/banana-i18n.js");
/* harmony import */ var orange_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(orange_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./node_modules/twinkle-core/src/utils.ts");
/* harmony import */ var _twinkle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./twinkle */ "./node_modules/twinkle-core/src/twinkle.ts");
/* harmony import */ var _Api__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Api */ "./node_modules/twinkle-core/src/Api.ts");
/* harmony import */ var _mw_messages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mw-messages */ "./node_modules/twinkle-core/src/mw-messages.ts");
/* harmony import */ var _i18n_en_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../i18n/en.json */ "./node_modules/twinkle-core/i18n/en.json");
// Some members in this module are exported but only for testing
// See index.ts for members actually exported out of the package.
 
 
 
 
 
 
 
/**
* Orange-i18n object
*/
var banana;
/**
* The language used for all messages in twinkle-core.
* This includes interface messages as well as edits made to the wiki.
* Ideally the interface messages should have been in wgUserLanguage
* and edits in wgContentLanguage, but this duality is not presently
* supported.
*/
// I believe this is the only use of mw.* at the top level
var language = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.urlParamValue)('uselang') || mw.config.get('wgContentLanguage');
var qqxMode;
var i18nParserPlugins = {
date: function (nodes) {
// Check if it's already Date or Morebits.date object
// otherwise assume we can construct a Morebits.date
// out of it
var mbDate = typeof nodes[0].getTime === 'function' ? new Morebits.date(nodes[0].getTime()) : new Morebits.date(nodes[0]);
var format = nodes[1];
// XXX: Don't assume the wiki's timezone is UTC
var zone = nodes[2] === 'utc' ? 'utc' : undefined;
if (format === 'relative') {
return mbDate.calendar(zone);
}
else {
return mbDate.format(format, zone);
}
},
// Embedded messages
int: function (nodes) {
var msgName = nodes[0], msgParams = nodes.slice(1);
return msg.apply(void 0, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArrays)([msgName], msgParams));
},
// Adapted from mediawiki.jqueryMsg
ns: function (nodes) {
var ns = String(nodes[0]).trim();
if (!/^\d+$/.test(ns)) {
ns = String(mw.config.get('wgNamespaceIds')[ns.replace(/ /g, '_').toLowerCase()]);
}
ns = mw.config.get('wgFormattedNamespaces')[ns];
return ns || '';
},
ucfirst: function (nodes) {
return Morebits.string.toUpperCaseFirstChar(nodes[0]);
},
lcfirst: function (nodes) {
return Morebits.string.toLowerCaseFirstChar(nodes[0]);
},
list: function (nodes) {
var list = nodes[0];
var text = '';
for (var i = 0; i < list.length; i++) {
text += list[i];
if (list.length - 2 === i) {
text += msg('and') + msg('word-separator');
}
else if (list.length - 1 !== i) {
text += msg('comma-separator');
}
}
return text;
},
// Experimental
sysop: function (nodes) {
return Morebits.userIsSysop ? nodes[1] : nodes[2];
},
};
/**
* Load messages into the message store.
* @param messages
*/
function addMessages(messages) {
banana.load(messages, language);
}
/**
* Get parsed message.
* @param msg - the message name
* @param parameters - the parameters for $1, $2, ... substitutions
*/
// type of msg must be "string", however switching it to "keyof typeof messages"
// is convenient during development for IDE tooling
function msg(msg) {
var parameters = [];
for (var _i = 1; _i < arguments.length; _i++) {
parameters[_i - 1] = arguments[_i];
}
if (!banana) {
// this will come up when msg() is accidentally used at the top level of code
// when the messages wouldn't have loaded
throw new Error("Can't emit messages before initMessaging() has run!");
}
if (qqxMode) {
return '(' + msg + ')';
}
return banana.i18n.apply(banana, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArrays)([msg], parameters));
}
// Populate default English messages, final fallback
// @ts-ignore this can be disabled through a build-stage variable injected by webpack's DefinePlugin
var EnglishMessagesAvailable = typeof EXCLUDE_ENGLISH_MESSAGES === 'undefined' || !EXCLUDE_ENGLISH_MESSAGES;
/**
* Initialize the message store. Called from init.ts.
*/
function initMessaging() {
banana = new (orange_i18n__WEBPACK_IMPORTED_MODULE_0___default())(language);
// Register plugins
(0,_utils__WEBPACK_IMPORTED_MODULE_1__.obj_entries)(i18nParserPlugins).forEach(function (_a) {
var name = _a[0], plugin = _a[1];
banana.registerParserPlugin(name, plugin);
});
// Set Morebits i18n
Morebits.i18n.setParser({ get: msg });
// QQX is a dummy "language" for documenting messages
// No need to load anything when in qqxMode
qqxMode = language === 'qqx';
if (qqxMode) {
return Promise.resolve();
}
if (EnglishMessagesAvailable) {
banana.load(_i18n_en_json__WEBPACK_IMPORTED_MODULE_3__, 'en');
}
var mwMessageList = _mw_messages__WEBPACK_IMPORTED_MODULE_4__.default.concat(_twinkle__WEBPACK_IMPORTED_MODULE_5__.Twinkle.extraMwMessages);
return Promise.all([loadMediaWikiMessages(mwMessageList, language), loadTwinkleCoreMessages(language)])
.catch(function (e) {
mw.notify('Failed to load messages needed for Twinkle', { type: 'error' });
})
.finally(function () {
addMessages(_twinkle__WEBPACK_IMPORTED_MODULE_5__.Twinkle.messageOverrides);
});
}
/**
* Load the messages available in MediaWiki using the API.
* These will include generic items such as month/day names, etc.
* See mw-messages.ts for the list of keys.
*/
function loadMediaWikiMessages(msgList, language) {
var promises = [];
for (var i = 0; i < msgList.length; i += 50) {
promises.push(
// Mediawiki namespace-based overrides of MW messages do get taken
// into account
_Api__WEBPACK_IMPORTED_MODULE_6__.mwApi.getMessages(msgList.slice(i, i + 50), {
amlang: language,
// cache them, as messages are not going to change that often
maxage: 31536000,
smaxage: 31536000,
// uselang enables public caching, see https://phabricator.wikimedia.org/T97096
uselang: 'content',
})
.then(function (msgsFromApi) {
addMessages(msgsFromApi);
}));
}
// @ts-ignore
return Promise.all(promises);
}
/**
* Load twinkle-core messages from Gerrit. Gerrit is quite slow. Also, it doesn't set any Cache-Control header.
* So we use client-side storage instead to prevent repeated slow fetches.
* Note: getting and setting data to/from localStorage (which mw.storage uses under the hood)
* is synchronous.
*/
function loadTwinkleCoreMessages(language) {
if (language === 'en' && EnglishMessagesAvailable) {
// English messages are already available as the final fallback
return Promise.resolve();
}
var storageKey = "tw-i18n-" + language;
var json = mw.storage.getObject(storageKey);
// Don't use data stale by more than 2 days
if (json && new Morebits.date(json['@timestamp']).add(2, 'days').isAfter(new Date())) {
initBanana(json);
return Promise.resolve();
}
return $.get('https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/gadgets/TwinkleCore/+/i18n/build-i18n/' +
language +
'.json?format=text').then(function (base64text) {
// Adapted from https://phabricator.wikimedia.org/diffusion/WGPI/browse/master/proveit.js
var json = JSON.parse(decodeURIComponent(window
.atob(base64text)
.split('')
.map(function (char) { return '%' + ('00' + char.charCodeAt(0).toString(16)).slice(-2); })
.join('')));
json['@timestamp'] = new Date().toISOString();
mw.storage.setObject(storageKey, json);
initBanana(json);
},
// If messages are requested for a language for which we don't have an i18n file,
// Gerrit raises a CORS error due to some reason.
function (err) {
mw.log.warn('[twinkle]: no messages loaded from gerrit.', err);
});
}
function initBanana(json) {
banana.setFallbackLocales(json['@fallbacks']);
delete json['@fallbacks'];
delete json['@timestamp'];
for (var _i = 0, _a = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.obj_entries)(json); _i < _a.length; _i++) {
var _b = _a[_i], lang = _b[0], data = _b[1];
if (data['@pluralrules']) {
banana.setPluralRules(lang, data['@pluralrules']);
}
if (data['@digittransforms']) {
banana.setDigitTransforms(lang, data['@digittransforms']);
}
}
banana.load(json);
}
/**
* Load messages from MediaWiki, in addition to what twinkle-core loads.
* Deprecated: Instead of using this, set extra messages in Twinkle.extraMwMessages
* array, and init() would fetch those too.
* @param messageList
* @deprecated
*/
function loadAdditionalMediaWikiMessages(messageList) {
return loadMediaWikiMessages(messageList, language);
}
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/modules/diffCore.ts":
/*!***********************************************************!*\
!*** ./node_modules/twinkle-core/src/modules/diffCore.ts ***!
\***********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "DiffCore": function() { return /* binding */ DiffCore; }
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Api */ "./node_modules/twinkle-core/src/Api.ts");
/* harmony import */ var _twinkleModule__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../twinkleModule */ "./node_modules/twinkle-core/src/twinkleModule.ts");
/* harmony import */ var _portlet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../portlet */ "./node_modules/twinkle-core/src/portlet.ts");
/* harmony import */ var _messenger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../messenger */ "./node_modules/twinkle-core/src/messenger.ts");
 
 
 
 
 
/**
* Diff module: shows a link to last edit on all pages.
* On diff pages, shows a link to a diff of edits since your last edit,
* and a diff of the version compared to the current version.
*
* Localisation: should work without any configuration.
* Built from source code at GitHub repository [https://github.com/veeven/twinkle-tewiki]
*/
* All changes should be made in the repository. Please do not attempt to edit this file directly.
var DiffCore = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(DiffCore, _super);
function DiffCore() {
var _this = _super.call(this) || this;
if (mw.config.get('wgNamespaceNumber') < 0 || !mw.config.get('wgArticleId')) {
return _this;
}
(0,_portlet__WEBPACK_IMPORTED_MODULE_1__.addPortletLink)(mw.util.getUrl(mw.config.get('wgPageName'), {
diff: 'cur',
oldid: 'prev',
}), (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('diff-last'), 'twinkle-lastdiff', (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('diff-last-tooltip'));
// Show additional tabs only on diff pages
if (!mw.util.getParamValue('diff')) {
return _this;
}
(0,_portlet__WEBPACK_IMPORTED_MODULE_1__.addPortletLink)(function () { return _this.evaluate(false); }, (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('diff-since'), 'tw-since', (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('diff-since-tooltip'));
(0,_portlet__WEBPACK_IMPORTED_MODULE_1__.addPortletLink)(function () { return _this.evaluate(true); }, (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('diff-sincemine'), 'tw-sincemine', (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('diff-sincemine-tooltip'));
(0,_portlet__WEBPACK_IMPORTED_MODULE_1__.addPortletLink)(mw.util.getUrl(mw.config.get('wgPageName'), {
diff: 'cur',
oldid: /oldid=(.+)/.exec($('#mw-diff-ntitle1').find('strong a').first().attr('href'))[1],
}), (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('diff-current'), 'tw-curdiff', (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('diff-current-tooltip'));
return _this;
}
DiffCore.prototype.evaluate = function (me) {
var user;
if (me) {
user = mw.config.get('wgUserName');
}
else {
var node = document.getElementById('mw-diff-ntitle2');
if (!node) {
// nothing to do?
return;
}
user = $(node).find('a').first().text();
}
Morebits.status.init(document.getElementById('mw-content-text'));
var wikipedia_api = new _Api__WEBPACK_IMPORTED_MODULE_3__.Api('Grabbing data of initial contributor', {
prop: 'revisions',
action: 'query',
titles: mw.config.get('wgPageName'),
rvlimit: 1,
rvprop: ['ids', 'user'],
rvstartid: mw.config.get('wgCurRevisionId') - 1,
rvuser: user,
format: 'json',
});
wikipedia_api.post().then(function (apiobj) {
var rev = apiobj.getResponse().query.pages[0].revisions;
var revid = rev && rev[0].revid;
if (!revid) {
apiobj.getStatusElement().error((0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('diff-error', user));
return;
}
window.location.href = mw.util.getUrl(mw.config.get('wgPageName'), {
diff: mw.config.get('wgCurRevisionId'),
oldid: revid,
});
});
wikipedia_api.post();
};
DiffCore.moduleName = 'Diff';
return DiffCore;
}(_twinkleModule__WEBPACK_IMPORTED_MODULE_4__.TwinkleModule));
 
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/modules/fluffCore.ts":
/*!************************************************************!*\
!*** ./node_modules/twinkle-core/src/modules/fluffCore.ts ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "FluffCore": function() { return /* binding */ Fluff; }
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _twinkle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../twinkle */ "./node_modules/twinkle-core/src/twinkle.ts");
/* harmony import */ var _messenger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../messenger */ "./node_modules/twinkle-core/src/messenger.ts");
/* harmony import */ var _twinkleModule__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../twinkleModule */ "./node_modules/twinkle-core/src/twinkleModule.ts");
/* harmony import */ var _Config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Config */ "./node_modules/twinkle-core/src/Config.ts");
 
 
 
 
 
/**
* "Fluff" module is used for reverting vandalism. It offers several types of
* revert modes.
*
* **Localisation**: You may wish to customise {@link trustedBots}.
* Apart from that, this module should work without any further configuration.
*/
var Fluff = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(Fluff, _super);
function Fluff() {
var _this = _super.call(this) || this;
_this.moduleName = 'fluff';
_this.skipTalk = null;
_this.rollbackInPlace = null;
_this.flaggedRevsEnabled = !!mw.loader.moduleRegistry['ext.flaggedRevs.basic'];
// Consolidated construction of fluff links
_this.linkBuilder = {
spanTag: function (color, content) {
var span = document.createElement('span');
span.style.color = color;
span.appendChild(document.createTextNode(content));
return span;
},
buildLink: function (color, text) {
var link = document.createElement('a');
link.appendChild(_this.linkBuilder.spanTag('Black', '['));
link.appendChild(_this.linkBuilder.spanTag(color, text));
link.appendChild(_this.linkBuilder.spanTag('Black', ']'));
link.href = '#';
return link;
},
/**
* @param {string} [vandal=null] - Username of the editor being reverted
* Provide a falsey value if the username is hidden, defaults to null
* @param {boolean} inline - True to create two links in a span, false
* to create three links in a div (optional)
* @param {number|string} [rev=wgCurRevisionId] - Revision ID being reverted (optional)
* @param {string} [page=wgPageName] - Page being reverted (optional)
*/
rollbackLinks: function (vandal, inline, rev, page) {
if (inline === void 0) { inline = false; }
vandal = vandal || null;
var elem = inline ? 'span' : 'div';
var revNode = document.createElement(elem);
rev = parseInt(rev, 10);
if (rev) {
revNode.setAttribute('id', 'tw-revert' + rev);
}
else {
revNode.setAttribute('id', 'tw-revert');
}
var normNode = document.createElement('strong');
var vandNode = document.createElement('strong');
var normLink = _this.linkBuilder.buildLink('SteelBlue', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('link-rollback'));
var vandLink = _this.linkBuilder.buildLink('Red', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('link-vandalism'));
$(normLink).click(function () {
_this.revert('norm', vandal, rev, page);
_this.disableLinks(revNode);
});
$(vandLink).click(function () {
_this.revert('vand', vandal, rev, page);
_this.disableLinks(revNode);
});
vandNode.appendChild(vandLink);
normNode.appendChild(normLink);
var separator = inline ? ' ' : ' || ';
if (!inline) {
var agfNode = document.createElement('strong');
var agfLink = _this.linkBuilder.buildLink('DarkOliveGreen', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('link-goodfaith-rollback'));
$(agfLink).click(function () {
_this.revert('agf', vandal, rev, page);
// this.disableLinks(revNode); // rollbackInPlace not relevant for any inline situations
});
agfNode.appendChild(agfLink);
revNode.appendChild(agfNode);
}
revNode.appendChild(document.createTextNode(separator));
revNode.appendChild(normNode);
revNode.appendChild(document.createTextNode(separator));
revNode.appendChild(vandNode);
return revNode;
},
// Build [restore this revision] links
restoreThisRevisionLink: function (revisionRef, inline) {
if (inline === void 0) { inline = false; }
// If not a specific revision number, should be wgDiffNewId/wgDiffOldId/wgRevisionId
revisionRef = typeof revisionRef === 'number' ? revisionRef : mw.config.get(revisionRef);
var elem = inline ? 'span' : 'div';
var revertToRevisionNode = document.createElement(elem);
revertToRevisionNode.setAttribute('id', 'tw-revert-to-' + revisionRef);
revertToRevisionNode.style.fontWeight = 'bold';
var revertToRevisionLink = _this.linkBuilder.buildLink('SaddleBrown', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('restore-revision'));
$(revertToRevisionLink).click(function () {
_this.revertToRevision(revisionRef);
});
if (inline) {
revertToRevisionNode.appendChild(document.createTextNode(' '));
}
revertToRevisionNode.appendChild(revertToRevisionLink);
return revertToRevisionNode;
},
};
_this.addLinks = {
contributions: function () {
// $('sp-contributions-footer-anon-range') relies on the fmbox
// id in [[MediaWiki:Sp-contributions-footer-anon-range]] and
// is used to show rollback/vandalism links for IP ranges
var isRange = !!$('#sp-contributions-footer-anon-range')[0];
if (mw.config.exists('wgRelevantUserName') || isRange) {
// Get the username these contributions are for
var username = mw.config.get('wgRelevantUserName');
if ((0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('showRollbackLinks').indexOf('contribs') !== -1 ||
(mw.config.get('wgUserName') !== username && (0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('showRollbackLinks').indexOf('others') !== -1) ||
(mw.config.get('wgUserName') === username && (0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('showRollbackLinks').indexOf('mine') !== -1)) {
var $list = $('#mw-content-text').find('ul li:has(span.mw-uctop):has(.mw-changeslist-diff)');
$list.each(function (key, current) {
// revid is also available in the href of both
// .mw-changeslist-date or .mw-changeslist-diff
var page = $(current).find('.mw-contributions-title').text();
// Get username for IP ranges (wgRelevantUserName is null)
if (isRange) {
// The :not is possibly unnecessary, as it appears that
// .mw-userlink is simply not present if the username is hidden
username = $(current).find('.mw-userlink:not(.history-deleted)').text();
}
// It's unlikely, but we can't easily check for revdel'd usernames
// since only a strong element is provided, with no easy selector [[phab:T255903]]
current.appendChild(_this.linkBuilder.rollbackLinks(username, true, current.dataset.mwRevid, page));
});
}
}
},
recentchanges: function () {
if ((0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('showRollbackLinks').indexOf('recent') !== -1) {
// Latest and revertable (not page creations, logs, categorizations, etc.)
var $list = $('.mw-changeslist .mw-changeslist-last.mw-changeslist-src-mw-edit');
// Exclude top-level header if "group changes" preference is used
// and find only individual lines or nested lines
$list = $list
.not('.mw-rcfilters-ui-highlights-enhanced-toplevel')
.find('.mw-changeslist-line-inner, td.mw-enhanced-rc-nested');
$list.each(function (key, current) {
// The :not is possibly unnecessary, as it appears that
// .mw-userlink is simply not present if the username is hidden
var vandal = $(current).find('.mw-userlink:not(.history-deleted)').text();
var href = $(current).find('.mw-changeslist-diff').attr('href');
var rev = mw.util.getParamValue('diff', href);
var page = current.dataset.targetPage;
current.appendChild(_this.linkBuilder.rollbackLinks(vandal, true, rev, page));
});
}
},
history: function () {
if ((0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('showRollbackLinks').indexOf('history') !== -1) {
// All revs
var histList = $('#pagehistory li').toArray();
// On first page of results, so add revert/rollback
// links to the top revision
if (!$('.mw-firstlink').length) {
var first = histList.shift();
var vandal = $(first).find('.mw-userlink:not(.history-deleted)').text();
// Check for first username different than the top user,
// only apply rollback links if/when found
// for faster than every
for (var i = 0; i < histList.length; i++) {
if ($(histList[i]).find('.mw-userlink').text() !== vandal) {
first.appendChild(_this.linkBuilder.rollbackLinks(vandal, true));
break;
}
}
}
// oldid
histList.forEach(function (rev) {
// From restoreThisRevision, non-transferable
// If the text has been revdel'd, it gets wrapped in a span with .history-deleted,
// and href will be undefined (and thus oldid is NaN)
var href = rev.querySelector('.mw-changeslist-date').href;
var oldid = parseInt(mw.util.getParamValue('oldid', href), 10);
if (!isNaN(oldid)) {
rev.appendChild(_this.linkBuilder.restoreThisRevisionLink(oldid, true));
}
});
}
},
diff: function () {
// Autofill user talk links on diffs with vanarticle for easy warning, but don't autowarn
var warnFromTalk = function (xtitle) {
var talkLink = $('#mw-diff-' + xtitle + '2 .mw-usertoollinks a').first();
if (talkLink.length) {
var extraParams = 'vanarticle=' + mw.util.rawurlencode(Morebits.pageNameNorm) + '&' + 'noautowarn=true';
// diffIDs for vanarticlerevid
extraParams += '&vanarticlerevid=';
extraParams += xtitle === 'otitle' ? mw.config.get('wgDiffOldId') : mw.config.get('wgDiffNewId');
var href = talkLink.attr('href');
if (href.indexOf('?') === -1) {
talkLink.attr('href', href + '?' + extraParams);
}
else {
talkLink.attr('href', href + '&' + extraParams);
}
}
};
// Older revision
warnFromTalk('otitle'); // Add quick-warn link to user talk link
// Don't load if there's a single revision or weird diff (cur on latest)
if (mw.config.get('wgDiffOldId') && mw.config.get('wgDiffOldId') !== mw.config.get('wgDiffNewId')) {
// Add a [restore this revision] link to the older revision
var oldTitle = document.getElementById('mw-diff-otitle1').parentNode;
oldTitle.insertBefore(_this.linkBuilder.restoreThisRevisionLink('wgDiffOldId'), oldTitle.firstChild);
}
// Newer revision
warnFromTalk('ntitle'); // Add quick-warn link to user talk link
// Add either restore or rollback links to the newer revision
// Don't show if there's a single revision or weird diff (prev on first)
if (document.getElementById('differences-nextlink')) {
// Not latest revision, add [restore this revision] link to newer revision
var newTitle = document.getElementById('mw-diff-ntitle1').parentNode;
newTitle.insertBefore(_this.linkBuilder.restoreThisRevisionLink('wgDiffNewId'), newTitle.firstChild);
}
else if ((0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('showRollbackLinks').indexOf('diff') !== -1 &&
mw.config.get('wgDiffOldId') &&
(mw.config.get('wgDiffOldId') !== mw.config.get('wgDiffNewId') ||
document.getElementById('differences-prevlink'))) {
// Normally .mw-userlink is a link, but if the
// username is hidden, it will be a span with
// .history-deleted as well. When a sysop views the
// hidden content, the span contains the username in a
// link element, which will *just* have
// .mw-userlink. The below thus finds the first
// instance of the class, which if hidden is the span
// and thus text returns undefined. Technically, this
// is a place where sysops *could* have more
// information available to them (as above, via
// &unhide=1), since the username will be available by
// checking a.mw-userlink instead, but revert() will
// need reworking around userHidden
var vandal = $('#mw-diff-ntitle2').find('.mw-userlink')[0].textContent;
var ntitle = document.getElementById('mw-diff-ntitle1').parentNode;
ntitle.insertBefore(_this.linkBuilder.rollbackLinks(vandal), ntitle.firstChild);
}
},
oldid: function () {
// Add a [restore this revision] link on old revisions
var title = document.getElementById('mw-revision-info').parentNode;
title.insertBefore(_this.linkBuilder.restoreThisRevisionLink('wgRevisionId'), title.firstChild);
},
};
_this.callbacks = {
toRevision: function (pageobj) {
var optional_summary = prompt((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('prompt-reason-restore'), ''); // padded out to widen prompt in Firefox
if (optional_summary === null) {
pageobj.getStatusElement().error((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('user-aborted'));
return;
}
var summary = _this.formatSummary((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('restore-summary', pageobj.getRevisionID()), pageobj.getRevisionUser(), optional_summary);
pageobj.setChangeTags(_twinkle__WEBPACK_IMPORTED_MODULE_3__.Twinkle.changeTags);
pageobj.setEditSummary(summary);
if ((0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('watchRevertedPages').indexOf('torev') !== -1) {
pageobj.setWatchlist((0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('watchRevertedExpiry'));
}
if ((0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('markRevertedPagesAsMinor').indexOf('torev') !== -1) {
pageobj.setMinorEdit(true);
}
Morebits.wiki.actionCompleted.redirect = pageobj.getPageName();
Morebits.wiki.actionCompleted.notice = (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('reversion-complete');
pageobj.revert();
},
main: function (apiobj) {
var page = apiobj.getResponse().query.pages[0];
if (!page.actions.edit) {
apiobj.statelem.error((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('cant-edit-protected'));
return;
}
var statelem = apiobj.statelem;
var params = apiobj.params;
var lastrevid = parseInt(page.lastrevid, 10);
var revs = page.revisions;
if (revs.length < 1) {
statelem.error((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('no-revisions'));
return;
}
var top = revs[0];
var lastuser = top.user;
// Should be handled by the API, but nice to quit early
if (lastrevid < params.revid) {
Morebits.status.error('Error', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('bad-revid', lastrevid));
return;
}
// Used for user-facing alerts, messages, etc., not edits or summaries
var userNorm = params.user || (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('hidden-user');
var index = 1;
if (params.revid !== lastrevid) {
Morebits.status.warn('Warning', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('revid-mismatch', lastrevid, params.revid));
// Treat ipv6 users on same 64 block as the same
if (lastuser === params.user ||
(mw.util.isIPv6Address(params.user) && Morebits.ip.get64(lastuser) === Morebits.ip.get64(params.user))) {
switch (params.type) {
case 'vand':
if (lastuser !== params.user) {
Morebits.status.info('Info', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('latest-rev-same-64', userNorm));
}
else {
Morebits.status.info('Info', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('latest-rev-same-user', userNorm));
}
break;
case 'agf':
Morebits.status.warn('Warning', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('latest-rev-other-user-goodfaith', userNorm));
return;
default:
Morebits.status.warn('Notice', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('latest-rev-other-user', userNorm));
return;
}
}
else if (params.type === 'vand' &&
// Okay to test on user since it will either fail or sysop will correctly access it
// Besides, none of the trusted bots are going to be revdel'd
_this.trustedBots.indexOf(top.user) !== -1 &&
revs.length > 1 &&
revs[1].revid === params.revid) {
Morebits.status.info('Info', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('latest-rev-bot', lastuser));
index = 2;
}
else {
Morebits.status.error('Error', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('latest-rev-reverted', lastuser));
return;
}
}
else {
// Expected revision is the same, so the users must match;
// this allows sysops to know whether the users are the same
params.user = lastuser;
userNorm = params.user || (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('hidden-user');
}
if (_this.trustedBots.indexOf(params.user) !== -1) {
switch (params.type) {
case 'vand':
Morebits.status.info('Info', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('bot-revert', userNorm));
index = 2;
params.user = revs[1].user;
params.userHidden = !!revs[1].userhidden;
break;
case 'agf':
Morebits.status.warn('Notice', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('bot-revert-goodfaith', userNorm));
return;
case 'norm':
/* falls through */
default:
var cont = confirm((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('bot-revert-prompt'));
if (cont) {
Morebits.status.info('Info', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('bot-revert-previous', userNorm));
index = 2;
params.user = revs[1].user;
params.userHidden = !!revs[1].userhidden;
userNorm = params.user || (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('hidden-user');
}
else {
Morebits.status.warn('Notice', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('bot-revert-selected', userNorm));
}
break;
}
}
var found = false;
var count = 0;
var seen64 = false;
for (var i = index; i < revs.length; ++i) {
++count;
if (revs[i].user !== params.user) {
// Treat ipv6 users on same 64 block as the same
if (mw.util.isIPv6Address(revs[i].user) &&
Morebits.ip.get64(revs[i].user) === Morebits.ip.get64(params.user)) {
if (!seen64) {
new Morebits.status('Note', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('ipv6-same-user'));
seen64 = true;
}
continue;
}
found = i;
break;
}
}
if (!found) {
statelem.error((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('no-previous-revision', userNorm, (0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('revertMaxRevisions')));
return;
}
if (!count) {
Morebits.status.error('Error', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('no-edits-revert'));
return;
}
var good_revision = revs[found];
var userHasAlreadyConfirmedAction = false;
if (params.type !== 'vand' && count > 1) {
if (!confirm((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('revert-multiple-prompt', userNorm, count))) {
Morebits.status.info('Notice', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('stopping'));
return;
}
userHasAlreadyConfirmedAction = true;
}
params.count = count;
params.goodid = good_revision.revid;
params.gooduser = good_revision.user;
params.gooduserHidden = !!good_revision.userhidden;
statelem.status((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('revision-age', params.goodid, count, params.gooduserHidden ? (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('hidden-user') : params.gooduser));
var summary, extra_summary;
switch (params.type) {
case 'agf':
extra_summary = prompt((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('summary-prompt'), ''); // padded out to widen prompt in Firefox
if (extra_summary === null) {
statelem.error((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('user-aborted'));
return;
}
userHasAlreadyConfirmedAction = true;
summary = _this.formatSummary((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('goodfaith-summary'), // %USER% will be replaced by username
params.userHidden ? null : params.user, extra_summary);
break;
case 'vand':
summary = _this.formatSummary((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('vandalism-summary', params.count, params.gooduserHidden ? (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('hidden-user') : params.gooduser), params.userHidden ? null : params.user);
break;
case 'norm':
/* falls through */
default:
if ((0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('offerReasonOnNormalRevert')) {
extra_summary = prompt((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('summary-prompt'), ''); // padded out to widen prompt in Firefox
if (extra_summary === null) {
statelem.error((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('user-aborted'));
return;
}
userHasAlreadyConfirmedAction = true;
}
summary = _this.formatSummary((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('normal-summary', params.count), params.userHidden ? null : params.user, extra_summary);
break;
}
if (((0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('confirmOnFluff') ||
// Mobile user agent taken from [[en:MediaWiki:Gadget-confirmationRollback-mobile.js]]
((0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('confirmOnMobileFluff') &&
/Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile|Opera Mini/i.test(navigator.userAgent))) &&
!userHasAlreadyConfirmedAction &&
!confirm((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('revert-confirm'))) {
statelem.error((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('user-aborted'));
return;
}
// Decide whether to notify the user on success
if (!_this.skipTalk &&
(0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('openTalkPage').indexOf(params.type) !== -1 &&
!params.userHidden &&
mw.config.get('wgUserName') !== params.user) {
params.notifyUser = true;
// Pass along to the warn module
params.vantimestamp = top.timestamp;
}
// figure out whether we need to/can review the edit
if (_this.flaggedRevsEnabled &&
// XXX: user group
(Morebits.userIsInGroup('reviewer') || Morebits.userIsSysop) &&
!!page.flagged &&
page.flagged.stable_revid >= params.goodid &&
!!page.flagged.pending_since) {
params.reviewRevert = true;
params.csrftoken = apiobj.getResponse().query.tokens.csrftoken;
}
var revertPage = new Morebits.wiki.page(params.pagename, (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('saving-reverted'));
revertPage.setEditSummary(summary);
revertPage.setChangeTags(_twinkle__WEBPACK_IMPORTED_MODULE_3__.Twinkle.changeTags);
revertPage.setOldID(params.goodid);
revertPage.setCallbackParameters(params);
if ((0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('watchRevertedPages').indexOf(params.type) !== -1) {
revertPage.setWatchlist((0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('watchRevertedExpiry'));
}
if ((0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('markRevertedPagesAsMinor').indexOf(params.type) !== -1) {
revertPage.setMinorEdit(true);
}
if (!_this.rollbackInPlace) {
Morebits.wiki.actionCompleted.redirect = params.pagename;
}
Morebits.wiki.actionCompleted.notice = (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('revert-complete');
revertPage.revert(_this.callbacks.complete);
},
// Only called from main, not from toRevision
complete: function (pageobj) {
var params = pageobj.getCallbackParameters();
if (params.notifyUser && !params.userHidden) {
Morebits.status.info('Info', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('opening-talk', params.user));
var windowQuery = {
title: 'User talk:' + params.user,
action: 'edit',
preview: 'yes',
vanarticle: params.pagename.replace(/_/g, ' '),
vanarticlerevid: params.revid,
vantimestamp: params.vantimestamp,
vanarticlegoodrevid: params.goodid,
type: params.type,
count: params.count,
};
switch ((0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('userTalkPageMode')) {
case 'tab':
window.open(mw.util.getUrl('', windowQuery), '_blank');
break;
case 'blank':
window.open(mw.util.getUrl('', windowQuery), '_blank', 'location=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=1200,height=800');
break;
case 'window':
/* falls through */
default:
window.open(mw.util.getUrl('', windowQuery), window.name === 'twinklewarnwindow' ? '_blank' : 'twinklewarnwindow', 'location=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=1200,height=800');
break;
}
}
// review the revert, if needed
if (params.reviewRevert) {
var query = {
action: 'review',
revid: pageobj.getSaveResponse().edit.newrevid,
token: params.csrftoken,
comment: (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('pcreview-comment') + _twinkle__WEBPACK_IMPORTED_MODULE_3__.Twinkle.summaryAd,
};
var wikipedia_api = new Morebits.wiki.api((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('pcreview-accepting'), query);
wikipedia_api.post();
}
},
};
// Only proceed if the user can actually edit the page in question
// (see #632 for contribs issue). wgIsProbablyEditable should take
// care of namespace/contentModel restrictions as well as explicit
// protections; it won't take care of cascading or TitleBlacklist.
if (mw.config.get('wgIsProbablyEditable')) {
// wgDiffOldId included for clarity in if else loop [[phab:T214985]]
if (mw.config.get('wgDiffNewId') || mw.config.get('wgDiffOldId')) {
// Reload alongside the revision slider
mw.hook('wikipage.diff').add(function () {
_this.addLinks.diff();
});
}
else if (mw.config.get('wgAction') === 'view' &&
mw.config.get('wgRevisionId') &&
mw.config.get('wgCurRevisionId') !== mw.config.get('wgRevisionId')) {
_this.addLinks.oldid();
}
else if (mw.config.get('wgAction') === 'history' && mw.config.get('wgArticleId')) {
_this.addLinks.history();
}
}
else if (mw.config.get('wgNamespaceNumber') === -1) {
_this.skipTalk = !(0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('openTalkPageOnAutoRevert');
_this.rollbackInPlace = (0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('rollbackInPlace');
if (mw.config.get('wgCanonicalSpecialPageName') === 'Contributions') {
_this.addLinks.contributions();
}
else if (mw.config.get('wgCanonicalSpecialPageName') === 'Recentchanges' ||
mw.config.get('wgCanonicalSpecialPageName') === 'Recentchangeslinked') {
// Reload with recent changes updates
// structuredChangeFilters.ui.initialized is just on load
mw.hook('wikipage.content').add(function (item) {
if (item.is('div')) {
_this.addLinks.recentchanges();
}
});
}
}
return _this;
}
Fluff.prototype.disableLinks = function (parentNode) {
// Array.from not available in IE11 :(
$(parentNode)
.children()
.each(function (_ix, node) {
node.innerHTML = node.textContent; // Feels like cheating
$(node).css('font-weight', 'normal').css('color', 'darkgray');
});
};
Fluff.prototype.revert = function (type, vandal, rev, page) {
var _this = this;
if (mw.util.isIPv6Address(vandal)) {
vandal = Morebits.ip.sanitizeIPv6(vandal);
}
var pagename = page || mw.config.get('wgPageName');
var revid = rev || mw.config.get('wgCurRevisionId');
if (this.rollbackInPlace) {
var notifyStatus = document.createElement('span');
mw.notify(notifyStatus, {
autoHide: false,
title: 'Rollback on ' + page,
tag: 'twinklefluff_' + rev,
});
Morebits.status.init(notifyStatus);
}
else {
Morebits.status.init(document.getElementById('mw-content-text'));
$('#catlinks').remove();
}
var params = {
type: type,
user: vandal,
userHidden: !vandal,
pagename: pagename,
revid: revid,
};
// Largely recapitulates Morebits.wiki.page.load, but we want to
// process multiple revisions as well as discover flagged status
var query = {
action: 'query',
prop: ['info', 'revisions'].concat(this.flaggedRevsEnabled ? 'flagged' : []),
titles: pagename,
inprop: 'watched',
intestactions: 'edit',
rvlimit: (0,_Config__WEBPACK_IMPORTED_MODULE_2__.getPref)('revertMaxRevisions'),
rvprop: ['ids', 'timestamp', 'user'],
curtimestamp: '',
meta: 'tokens',
type: 'csrf',
format: 'json',
};
var wikipedia_api = new Morebits.wiki.api((0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('fetching-data'), query);
wikipedia_api.params = params;
wikipedia_api.post().then(function (apiobj) { return _this.callbacks.main(apiobj); });
};
Fluff.prototype.revertToRevision = function (oldrev) {
Morebits.status.init(document.getElementById('mw-content-text'));
// This is only here because we want the fancy edit summary from
// this.formatSummary, so we need to load the revision user
// before reverting. If not for that, we could just skip loading.
var revertPage = new Morebits.wiki.page(mw.config.get('wgPageName'), (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('saving-reverted'));
revertPage.setOldID(oldrev);
revertPage.load(this.callbacks.toRevision);
};
// Format a nicer edit summary than the default Morebits revert one, mainly by
// including user contribs and talk links and appending a custom reason.
// If builtInString contains the string "%USER%", it will be replaced
// by an appropriate user link if a user name is provided
Fluff.prototype.formatSummary = function (builtInString, userName, customString) {
var result = builtInString;
// append user's custom reason
if (customString) {
result += ': ' + Morebits.string.toUpperCaseFirstChar(customString);
}
// find number of UTF-8 bytes the resulting string takes up, and possibly add
// a contributions or contributions+talk link if it doesn't push the edit summary
// over the 499-byte limit
if (/%USER%/.test(builtInString)) {
if (userName) {
var resultLen = unescape(encodeURIComponent(result.replace('%USER%', ''))).length;
var contribsLink = '[[Special:Contributions/' + userName + '|' + userName + ']]';
var contribsLen = unescape(encodeURIComponent(contribsLink)).length;
if (resultLen + contribsLen <= 499) {
var talkLink = ' ([[User talk:' + userName + '|talk]])';
if (resultLen + contribsLen + unescape(encodeURIComponent(talkLink)).length <= 499) {
result = Morebits.string.safeReplace(result, '%USER%', contribsLink + talkLink);
}
else {
result = Morebits.string.safeReplace(result, '%USER%', contribsLink);
}
}
else {
result = Morebits.string.safeReplace(result, '%USER%', userName);
}
}
else {
result = Morebits.string.safeReplace(result, '%USER%', (0,_messenger__WEBPACK_IMPORTED_MODULE_1__.msg)('hidden-user'));
}
}
return result;
};
Fluff.moduleName = 'fluff';
return Fluff;
}(_twinkleModule__WEBPACK_IMPORTED_MODULE_4__.TwinkleModule));
 
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/modules/xfdCore.ts":
/*!**********************************************************!*\
!*** ./node_modules/twinkle-core/src/modules/xfdCore.ts ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "XfdCore": function() { return /* binding */ XfdCore; },
/* harmony export */ "XfdMode": function() { return /* binding */ XfdMode; },
/* harmony export */ "num2order": function() { return /* binding */ num2order; }
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _twinkle__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../twinkle */ "./node_modules/twinkle-core/src/twinkle.ts");
/* harmony import */ var _Page__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Page */ "./node_modules/twinkle-core/src/Page.ts");
/* harmony import */ var _Api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Api */ "./node_modules/twinkle-core/src/Api.ts");
/* harmony import */ var _messenger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../messenger */ "./node_modules/twinkle-core/src/messenger.ts");
/* harmony import */ var _Config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Config */ "./node_modules/twinkle-core/src/Config.ts");
/* harmony import */ var _Dialog__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Dialog */ "./node_modules/twinkle-core/src/Dialog.ts");
/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../namespaces */ "./node_modules/twinkle-core/src/namespaces.ts");
/* harmony import */ var _twinkleModule__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../twinkleModule */ "./node_modules/twinkle-core/src/twinkleModule.ts");
 
 
 
 
 
 
 
 
 
var XfdCore = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(XfdCore, _super);
function XfdCore() {
var _this = _super.call(this) || this;
_this.moduleName = 'XFD';
_this.portletName = 'XFD';
_this.portletId = 'twinkle-xfd';
_this.windowTitle = 'Start a deletion discussion (XfD)';
// Disable on:
// * special pages
// * non-existent pages
// * files on Commons, whether there is a local page or not (unneeded local pages of files on Commons are
// eligible for CSD F2, or R4 if it's a redirect)
if (mw.config.get('wgNamespaceNumber') < 0 ||
!mw.config.get('wgArticleId') ||
(mw.config.get('wgNamespaceNumber') === 6 && document.getElementById('mw-sharedupload'))) {
return _this;
}
for (var _i = 0, _a = XfdCore.modeList; _i < _a.length; _i++) {
var mode = _a[_i];
if (mode.isDefaultChoice()) {
// @ts-ignore
_this.mode = new mode();
break;
}
}
_this.portletTooltip = _this.getMenuTooltip();
_this.addMenu();
return _this;
}
XfdCore.prototype.getMenuTooltip = function () {
if (this.mode) {
return this.mode.getMenuTooltip();
}
else {
// can be overridden per mode so doesn't need i18n here
return 'Start a deletion discussion';
}
};
XfdCore.prototype.makeWindow = function () {
var Window = new _Dialog__WEBPACK_IMPORTED_MODULE_1__.Dialog(700, 400);
Window.setTitle(this.windowTitle);
Window.setFooterLinks(this.footerlinks);
this.makeForm(Window);
};
// invoked only once
XfdCore.prototype.makeForm = function (Window) {
var _this = this;
this.Window = Window;
var form = new Morebits.quickForm(function () {
_this.mode.evaluate();
});
form.append({
type: 'select',
name: 'venue',
label: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('xfd-venue-label'),
tooltip: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('xfd-venue-tooltip'),
event: this.onCategoryChange.bind(this),
list: XfdCore.modeList.map(function (mode) { return ({
type: 'option',
label: mode.venueLabel,
selected: _this.mode instanceof mode,
value: mode.venueCode,
}); }),
});
form.append({
type: 'div',
id: 'wrong-venue-warn',
style: 'color: red; font-style: italic',
});
form.append({
type: 'checkbox',
list: [
{
label: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('notify-creator-label'),
value: 'notify',
name: 'notifycreator',
tooltip: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('notify-creator-tooltip'),
checked: true,
},
],
});
this.fieldset = form.append({
type: 'field',
label: 'Work area',
name: 'work_area',
});
var previewlink = document.createElement('a');
$(previewlink).click(function () {
_this.mode.preview(_this.result); // |result| is defined below
});
previewlink.style.cursor = 'pointer';
previewlink.textContent = 'Preview';
form.append({ type: 'div', id: 'xfdpreview', label: [previewlink] });
form.append({ type: 'div', id: 'twinklexfd-previewbox', style: 'display: none' });
form.append({ type: 'submit' });
this.result = form.render();
Window.setContent(this.result);
Window.display();
this.result.previewer = new Morebits.wiki.preview(document.getElementById('twinklexfd-previewbox'));
// We must init the controls
var evt = document.createEvent('Event');
evt.initEvent('change', true, true);
this.result.venue.dispatchEvent(evt);
return form;
};
// invoked on every mode change
XfdCore.prototype.onCategoryChange = function (evt) {
var venueCode = evt.target.value;
var form = evt.target.form;
var mode = XfdCore.modeList.filter(function (mode) {
return mode.venueCode === venueCode;
})[0];
if (!mode) {
throw new Error((0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('bad-venue', venueCode)); // should never happen
}
// @ts-ignore
this.mode = new mode();
this.mode.result = this.result;
this.mode.Window = this.Window;
$('#wrong-venue-warn').text(this.mode.getVenueWarning() || '');
form.previewer.closePreview();
var renderedFieldset = this.mode.generateFieldset().render();
$(this.result).find('fieldset[name=work_area]').replaceWith(renderedFieldset);
this.mode.postRender(renderedFieldset);
};
XfdCore.userPreferences = function () {
return {
title: 'XfD (deletion discussions)',
preferences: [
{
name: 'logXfdNominations',
label: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('pref-logxfdnominations-label'),
helptip: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('pref-logxfdnominations-tooltip'),
type: 'boolean',
default: false,
},
{
name: 'xfdLogPageName',
label: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('pref-xfdlogpagename-label'),
helptip: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('pref-xfdlogpagename-tooltip'),
type: 'string',
default: 'XfD log',
},
// TwinkleConfig.xfdWatchPage (string)
// The watchlist setting of the page being nominated for XfD.
{
name: 'xfdWatchPage',
label: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('pref-xfdwatchpage-label'),
helptip: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('pref-xfdwatchpage-tooltip'),
type: 'enum',
enumValues: _Config__WEBPACK_IMPORTED_MODULE_3__.Config.watchlistEnums,
default: 'default',
},
// TwinkleConfig.xfdWatchDiscussion (string)
// The watchlist setting of the newly created XfD page (for those processes that create discussion
// pages for each nomination), or the list page for the other processes.
{
name: 'xfdWatchDiscussion',
label: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('pref-xfdwatchdiscussion-label'),
helptip: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('pref-xfdwatchdiscussion-tooltip'),
type: 'enum',
enumValues: _Config__WEBPACK_IMPORTED_MODULE_3__.Config.watchlistEnums,
default: 'default',
},
// TwinkleConfig.xfdWatchList (string)
// The watchlist setting of the XfD list page, *if* the discussion is on a separate page.
{
name: 'xfdWatchList',
label: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('pref-xfdwatchlist-label'),
helptip: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('pref-xfdwatchlist-tooltip'),
type: 'enum',
enumValues: _Config__WEBPACK_IMPORTED_MODULE_3__.Config.watchlistEnums,
default: 'no',
},
// TwinkleConfig.xfdWatchUser (string)
// The watchlist setting of the user talk page if they receive a notification.
{
name: 'xfdWatchUser',
label: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('pref-xfdwatchuser-label'),
helptip: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('pref-xfdwatchuser-tooltip'),
type: 'enum',
enumValues: _Config__WEBPACK_IMPORTED_MODULE_3__.Config.watchlistEnums,
default: 'default',
},
],
};
};
XfdCore.moduleName = 'XFD';
return XfdCore;
}(_twinkleModule__WEBPACK_IMPORTED_MODULE_4__.TwinkleModule));
 
var XfdMode = /** @class */ (function () {
function XfdMode() {
}
// must be overridden, unless the venue is never the default choice
XfdMode.isDefaultChoice = function () {
return false;
};
XfdMode.prototype.getMenuTooltip = function () {
return 'Nominate page for deletion';
};
XfdMode.prototype.generateFieldset = function () {
this.fieldset = new Morebits.quickForm.element({
type: 'field',
label: this.getFieldsetLabel(),
name: 'work_area',
});
return this.fieldset;
};
XfdMode.prototype.appendReasonArea = function () {
this.fieldset.append({
type: 'textarea',
name: 'reason',
label: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('reason'),
value: $(this.result).find('textarea').val() || '',
tooltip: (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('reason-tooltip'),
});
};
/**
* Actions performed after the form is rendered.
* @param renderedFieldset
*/
XfdMode.prototype.postRender = function (renderedFieldset) { };
/**
* Return any warnings about the choice of the selected venue (e.g. using
* Articles for Deletion for requesting deletion of template).
* This is displayed in red.
*/
XfdMode.prototype.getVenueWarning = function () { };
// Overridden for tfd, cfd, cfds
/**
* Pre-process parameters, called from evaluate() and preview().
*/
XfdMode.prototype.preprocessParams = function () { };
// Overridden for ffd and rfd, which need special treatment
XfdMode.prototype.preview = function (form) {
this.params = Morebits.quickForm.getInputData(form);
this.preprocessParams();
this.showPreview(form);
};
// This is good enough to use without override for all venues except rm
XfdMode.prototype.showPreview = function (form) {
var templatetext = this.getDiscussionWikitext();
form.previewer.beginRender(templatetext, 'WP:TW'); // Force wikitext
};
/**
* Executes on form submission
*/
XfdMode.prototype.evaluate = function () {
this.params = Morebits.quickForm.getInputData(this.result);
this.preprocessParams();
if (!this.validateInput()) {
return;
}
Morebits.simpleWindow.setButtonsEnabled(false);
Morebits.status.init(this.result);
this.tm = new Morebits.taskManager(this);
};
/**
* Hook for form validation. If this returns false, form submission is aborted
*/
XfdMode.prototype.validateInput = function () {
return true;
};
/**
* Print reason text if we fail to post the reason to the designated place on the wiki, so that
* the user can reuse the text.
* Should be invoked as a onFailure method in Morebits.taskManager.
* This function shouldn't need to be overridden.
*/
XfdMode.prototype.printReasonText = function () {
Morebits.status.printUserText(this.params.reason, (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('deletion-reason-here'));
};
/**
* Callback to redirect to the discussion page when everything is done. Relies on the discussion page
* being known as either `this.params.discussionpage` or `this.params.logpage`.
*/
XfdMode.prototype.redirectToDiscussion = function () {
var redirPage = this.params.discussionpage || this.params.logpage;
Morebits.status.actionCompleted((0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('nomination-complete-redirect'));
setTimeout(function () {
window.location.href = mw.util.getUrl(redirPage);
}, Morebits.wiki.actionCompleted.timeOut);
};
/**
* Only applicable for XFD processes that use separate discussion pages for every page.
* This is English-language specific (XXX)
*/
XfdMode.prototype.determineDiscussionPage = function () {
var _this = this;
var params = this.params;
var wikipedia_api = new _Api__WEBPACK_IMPORTED_MODULE_5__.Api((0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('looking-old-nominations'), {
action: 'query',
list: 'allpages',
apprefix: new mw.Title(this.discussionPagePrefix).getMain() + '/' + Morebits.pageNameNorm,
apnamespace: 4,
apfilterredir: 'nonredirects',
aplimit: 'max',
format: 'json',
});
return wikipedia_api.post().then(function (apiobj) {
var response = apiobj.getResponse();
var titles = response.query.allpages;
// There has been no earlier entries with this prefix, just go on.
if (titles.length <= 0) {
params.numbering = params.number = '';
}
else {
var number = 0;
var order_re = new RegExp('^' +
Morebits.string.escapeRegExp(_this.discussionPagePrefix + '/' + Morebits.pageNameNorm) +
'\\s*\\(\\s*(\\d+)(?:(?:th|nd|rd|st) nom(?:ination)?)?\\s*\\)\\s*$');
for (var i = 0; i < titles.length; ++i) {
var title = titles[i].title;
// First, simple test, is there an instance with this exact name?
if (title === _this.discussionPagePrefix + '/' + Morebits.pageNameNorm) {
number = Math.max(number, 1);
continue;
}
var match = order_re.exec(title);
// No match; A non-good value
if (!match) {
continue;
}
// A match, set number to the max of current
number = Math.max(number, Number(match[1]));
}
params.number = num2order(number + 1);
params.numbering = number > 0 ? ' (' + params.number + ' nomination)' : '';
}
params.discussionpage = _this.discussionPagePrefix + '/' + Morebits.pageNameNorm + params.numbering;
apiobj.getStatusElement().info('next in order is ' + params.discussionpage);
});
};
/**
* Post an edit request to the talk page if the page could not
* be tagged with a deletion tag (usually because the page is protected)
* @param pageobj
*/
XfdMode.prototype.autoEditRequest = function (pageobj) {
var params = this.params;
var talkName = new mw.Title(pageobj.getPageName()).getTalkPage().toText();
if (talkName === pageobj.getPageName()) {
pageobj.getStatusElement().error((0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('protected-no-editreq'));
return $.Deferred().reject();
}
pageobj.getStatusElement().warn((0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('protected-editreq'));
var editRequest = '{{subst:Xfd edit protected|page=' +
pageobj.getPageName() +
'|discussion=' +
params.discussionpage +
'|tag=<nowiki>' +
params.tagText +
'</nowiki>}}';
var talk_page = new _Page__WEBPACK_IMPORTED_MODULE_6__.Page(talkName, (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('posting-editreq'));
talk_page.setNewSectionTitle((0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('xfd-editreq-title', params.venue));
talk_page.setNewSectionText(editRequest);
talk_page.setCreateOption('recreate');
talk_page.setWatchlist((0,_Config__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchPage'));
talk_page.setFollowRedirect(true); // should never be needed, but if the article is moved, we would want to
// follow the redirect
return talk_page.newSection().catch(function () {
talk_page.getStatusElement().warn((0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('xfd-editreq-failed'));
return $.Deferred().reject();
});
};
XfdMode.prototype.fetchCreatorInfo = function () {
var _this = this;
var thispage = new _Page__WEBPACK_IMPORTED_MODULE_6__.Page(Morebits.pageNameNorm, (0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('fetching-creator'));
thispage.setLookupNonRedirectCreator(this.params.lookupNonRedirectCreator);
return thispage.lookupCreation().then(function () {
_this.params.initialContrib = thispage.getCreator();
thispage.getStatusElement().info('Found ' + thispage.getCreator());
});
};
XfdMode.prototype.notifyTalkPage = function (notifyTarget, statusElement) {
// Ensure items with User talk or no namespace prefix both end
// up at user talkspace as expected, but retain the
// prefix-less username for addToLog
var params = this.params;
var notifyTitle = mw.Title.newFromText(notifyTarget, _namespaces__WEBPACK_IMPORTED_MODULE_7__.NS_USER_TALK);
var targetNS = notifyTitle.getNamespaceId();
var usernameOrTarget = notifyTitle.getRelativeText(_namespaces__WEBPACK_IMPORTED_MODULE_7__.NS_USER_TALK);
statusElement = statusElement || new Morebits.status((0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('notifying-creator', usernameOrTarget));
var notifyPageTitle = notifyTitle.toText();
if (targetNS === 3) {
// Disallow warning yourself
if (usernameOrTarget === mw.config.get('wgUserName')) {
params.initialContrib = null; // disable initial contributor logging in userspace log
statusElement.warn((0,_messenger__WEBPACK_IMPORTED_MODULE_2__.msg)('notify-self-skip', usernameOrTarget));
return $.Deferred().resolve();
}
}
var usertalkpage = new _Page__WEBPACK_IMPORTED_MODULE_6__.Page(notifyPageTitle, statusElement);
usertalkpage.setAppendText('\n\n' + this.getNotifyText());
usertalkpage.setEditSummary(this.getNotifyEditSummary());
usertalkpage.setCreateOption('recreate');
// XXX: Different pref for RfD target notifications: XXX: handle this better!
if (params.venue === 'RfD' && targetNS !== 3) {
usertalkpage.setWatchlist((0,_Config__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchRelated'));
}
else {
usertalkpage.setWatchlist((0,_Config__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchUser'));
}
usertalkpage.setFollowRedirect(true, false);
return usertalkpage.append().catch(function () {
// if user could not be notified, null this out for correct userspace logging,
// but don't reject the promise
params.initialContrib = null;
});
};
// Overridden for all venues except FFD and RFD
XfdMode.prototype.getNotifyText = function () {
return "{{subst:" + this.params.venue + " notice|1=" + Morebits.pageNameNorm + "}} [[వాడుకరి:Veeven|వీవెన్]] ([[వాడుకరి చర్చ:Veeven|చర్చ]]) 15:49, 15 నవంబరు 2021 (UTC)";
};
// Not overridden for any venue
XfdMode.prototype.getNotifyEditSummary = function () {
return ('Notification: [[' +
this.params.discussionpage +
'|listing]] of [[:' +
Morebits.pageNameNorm +
']] at [[WP:' +
this.getFieldsetLabel() +
']].');
};
XfdMode.prototype.notifyCreator = function () {
if (!this.params.notifycreator) {
this.params.intialContrib = null;
return $.Deferred().resolve();
}
return this.notifyTalkPage(this.params.initialContrib);
};
/**
* Log the XFD nomination to the userspace log.
* Should be called after notifyTalkPage() which may unset this.params.initialContrib
*/
XfdMode.prototype.addToLog = function () {
var params = this.params;
// noLogOnXfdNomination contains lowercased venue codes for historical reasons
if (!(0,_Config__WEBPACK_IMPORTED_MODULE_3__.getPref)('logXfdNominations') || (0,_Config__WEBPACK_IMPORTED_MODULE_3__.getPref)('noLogOnXfdNomination').indexOf(params.venue.toLowerCase()) !== -1) {
return $.Deferred().resolve();
}
var usl = new Morebits.userspaceLogger((0,_Config__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdLogPageName')); // , 'Adding entry to userspace log');
usl.initialText =
"This is a log of all [[WP:XFD|deletion discussion]] nominations made by this user using [[WP:TW|Twinkle]]'s XfD module.\n\n" +
'If you no longer wish to keep this log, you can turn it off using the [[Wikipedia:Twinkle/Preferences|preferences panel]], and ' +
'nominate this page for speedy deletion under [[WP:CSD#U1|CSD U1]].' +
(Morebits.userIsSysop ? '\n\nThis log does not track XfD-related deletions made using Twinkle.' : '');
usl.changeTags = _twinkle__WEBPACK_IMPORTED_MODULE_8__.Twinkle.changeTags;
return usl.log(this.getUserspaceLoggingText(), this.getUserspaceLoggingEditSummary());
};
XfdMode.prototype.getUserspaceLoggingEditSummary = function () {
return 'Logging ' + this.params.venue + ' nomination of [[:' + Morebits.pageNameNorm + ']].';
};
XfdMode.prototype.getUserspaceLoggingText1 = function () {
return "\n\t\t\t# [[:వాడుకరి:Veeven/twinkle/twinkle.js]]: nominated at [[WP:$1|$1]]
; notified {{user|1=$2}}\n\t\t";
};
XfdMode.prototype.getUserspaceLoggingText = function () {
var params = this.params;
// If a logged file is deleted but exists on commons, the wikilink will be blue, so provide a link to the log
var fileLogLink = mw.config.get('wgNamespaceNumber') === _namespaces__WEBPACK_IMPORTED_MODULE_7__.NS_FILE
? ' ([{{fullurl:Special:Log|page=' + mw.util.wikiUrlencode(mw.config.get('wgPageName')) + '}} log])'
: '';
// CFD/S and RM don't have canonical links
var nominatedLink = params.discussionpage ? '[[' + params.discussionpage + '|nominated]]' : 'nominated';
var appendText = '# [[:' +
Morebits.pageNameNorm +
']]:' +
fileLogLink +
' ' +
nominatedLink +
' at [[WP:' +
params.venue +
'|' +
params.venue +
']]';
appendText += this.getUserspaceLoggingExtraInfo();
if (params.initialContrib && params.notifycreator) {
appendText += '; notified {{user|1=' + params.initialContrib + '}}';
}
appendText += ' 15:49, 15 నవంబరు 2021 (UTC)';
if (params.reason) {
appendText += "\n#* '''Reason''': " + Morebits.string.formatReasonForLog(params.reason);
}
return appendText;
};
XfdMode.prototype.getUserspaceLoggingExtraInfo = function () {
return '';
};
return XfdMode;
}());
 
/** Get ordinal number figure */
function num2order(num) {
switch (num) {
case 1:
return '';
case 2:
return '2nd';
case 3:
return '3rd';
default:
return num + 'th';
}
}
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/mw-messages.ts":
/*!******************************************************!*\
!*** ./node_modules/twinkle-core/src/mw-messages.ts ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
// See full list of available messages at
// https://github.com/wikimedia/mediawiki/blob/master/languages/i18n/en.json
/* harmony default export */ __webpack_exports__["default"] = ([
'colon-separator',
'semicolon-separator',
'word-separator',
'comma-separator',
'and',
'parentheses',
'percent',
'blanknamespace',
// ProtectCore
'protectlogpage',
'stable-logpage',
'duration-hours',
'duration-days',
'duration-weeks',
// for some reason MW doesn't have a duration-months message, we have to provide that separately
'duration-years',
'protect-expiry-indefinite',
'group-autoconfirmed',
'group-sysop',
'protectexpiry',
'restriction-edit',
'restriction-move',
'restriction-create',
'restriction-level-autoconfirmed',
'restriction-level-sysop',
// BlockCore
'block-expiry',
'blocklogpage',
// Morebits.date
'period-am',
'period-pm',
'january',
'jan',
'february',
'feb',
'march',
'mar',
'april',
'apr',
'may_long',
'may',
'june',
'jun',
'july',
'jul',
'august',
'aug',
'september',
'sep',
'october',
'oct',
'november',
'nov',
'december',
'dec',
'sunday',
'sun',
'monday',
'mon',
'tuesday',
'tue',
'wednesday',
'wed',
'thursday',
'thu',
'friday',
'fri',
'saturday',
'sat',
'sunday',
'sun',
]);
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/namespaces.ts":
/*!*****************************************************!*\
!*** ./node_modules/twinkle-core/src/namespaces.ts ***!
\*****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "NS_MAIN": function() { return /* binding */ NS_MAIN; },
/* harmony export */ "NS_TALK": function() { return /* binding */ NS_TALK; },
/* harmony export */ "NS_SPECIAL": function() { return /* binding */ NS_SPECIAL; },
/* harmony export */ "NS_FILE": function() { return /* binding */ NS_FILE; },
/* harmony export */ "NS_TEMPLATE": function() { return /* binding */ NS_TEMPLATE; },
/* harmony export */ "NS_CATEGORY": function() { return /* binding */ NS_CATEGORY; },
/* harmony export */ "NS_PROJECT": function() { return /* binding */ NS_PROJECT; },
/* harmony export */ "NS_USER": function() { return /* binding */ NS_USER; },
/* harmony export */ "NS_USER_TALK": function() { return /* binding */ NS_USER_TALK; }
/* harmony export */ });
var namespaceIds = mw.config.get('wgNamespaceIds');
var NS_MAIN = namespaceIds[''];
var NS_TALK = namespaceIds.talk;
var NS_SPECIAL = namespaceIds.special;
var NS_FILE = namespaceIds.file;
var NS_TEMPLATE = namespaceIds.template;
var NS_CATEGORY = namespaceIds.category;
var NS_PROJECT = namespaceIds.project;
var NS_USER = namespaceIds.user;
var NS_USER_TALK = namespaceIds.user_talk;
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/portlet.ts":
/*!**************************************************!*\
!*** ./node_modules/twinkle-core/src/portlet.ts ***!
\**************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "setPortletConfig": function() { return /* binding */ setPortletConfig; },
/* harmony export */ "addPortletLink": function() { return /* binding */ addPortletLink; }
/* harmony export */ });
/* harmony import */ var _Config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Config */ "./node_modules/twinkle-core/src/Config.ts");
 
/**
* Set portlet configurations, which are skin-specific
* XXX: move to Config.ts and avoid the function
*/
function setPortletConfig() {
// Some skin dependent config.
switch (mw.config.get('skin')) {
case 'vector':
(0,_Config__WEBPACK_IMPORTED_MODULE_0__.setDefaultConfig)([
{ name: 'portletArea', value: 'right-navigation' },
{ name: 'portletId', value: 'p-twinkle' },
{ name: 'portletName', value: 'TW' },
{ name: 'portletType', value: 'menu' },
{ name: 'portletNext', value: 'p-search' },
]);
break;
case 'timeless':
(0,_Config__WEBPACK_IMPORTED_MODULE_0__.setDefaultConfig)([
{ name: 'portletArea', value: '#page-tools .sidebar-inner' },
{ name: 'portletId', value: 'p-twinkle' },
{ name: 'portletName', value: 'Twinkle' },
{ name: 'portletType', value: null },
{ name: 'portletNext', value: 'p-userpagetools' },
]);
break;
default:
(0,_Config__WEBPACK_IMPORTED_MODULE_0__.setDefaultConfig)([
{ name: 'portletArea', value: null },
{ name: 'portletId', value: 'p-cactions' },
{ name: 'portletName', value: null },
{ name: 'portletType', value: null },
{ name: 'portletNext', value: null },
]);
}
}
/**
* Builds a portlet menu if it doesn't exist yet, and add the portlet link.
* @param task: Either a URL for the portlet link or a function to execute.
* @param text
* @param id
* @param tooltip
*/
function addPortletLink(task, text, id, tooltip) {
if ((0,_Config__WEBPACK_IMPORTED_MODULE_0__.getPref)('portletArea') !== null) {
addPortlet((0,_Config__WEBPACK_IMPORTED_MODULE_0__.getPref)('portletArea'), (0,_Config__WEBPACK_IMPORTED_MODULE_0__.getPref)('portletId'), (0,_Config__WEBPACK_IMPORTED_MODULE_0__.getPref)('portletName'), (0,_Config__WEBPACK_IMPORTED_MODULE_0__.getPref)('portletType'), (0,_Config__WEBPACK_IMPORTED_MODULE_0__.getPref)('portletNext'));
}
var link = mw.util.addPortletLink((0,_Config__WEBPACK_IMPORTED_MODULE_0__.getPref)('portletId'), typeof task === 'string' ? task : '#', text, id, tooltip);
$('.client-js .skin-vector #p-cactions').css('margin-right', 'initial');
if (typeof task === 'function') {
$(link).click(function (ev) {
task();
ev.preventDefault();
});
}
if ($.collapsibleTabs) {
$.collapsibleTabs.handleResize();
}
return link;
}
/**
* Adds a portlet menu to one of the navigation areas on the page.
* This is necessarily quite a hack since skins, navigation areas, and
* portlet menu types all work slightly different.
*
* Available navigation areas depend on the skin used.
* Vector:
* For each option, the outer nav class contains "vector-menu", the inner div class is "vector-menu-content", and the ul is "vector-menu-content-list"
* "mw-panel", outer nav class contains "vector-menu-portal". Existing portlets/elements: "p-logo", "p-navigation", "p-interaction", "p-tb", "p-coll-print_export"
* "left-navigation", outer nav class contains "vector-menu-tabs" or "vector-menu-dropdown". Existing portlets: "p-namespaces", "p-variants" (menu)
* "right-navigation", outer nav class contains "vector-menu-tabs" or "vector-menu-dropdown". Existing portlets: "p-views", "p-cactions" (menu), "p-search"
* Special layout of p-personal portlet (part of "head") through specialized styles.
* Monobook:
* "column-one", outer nav class "portlet", inner div class "pBody". Existing portlets: "p-cactions", "p-personal", "p-logo", "p-navigation", "p-search", "p-interaction", "p-tb", "p-coll-print_export"
* Special layout of p-cactions and p-personal through specialized styles.
* Modern:
* "mw_contentwrapper" (top nav), outer nav class "portlet", inner div class "pBody". Existing portlets or elements: "p-cactions", "mw_content"
* "mw_portlets" (sidebar), outer nav class "portlet", inner div class "pBody". Existing portlets: "p-navigation", "p-search", "p-interaction", "p-tb", "p-coll-print_export"
*
* @param navigation - id of the target navigation area (skin dependant, on vector either of "left-navigation", "right-navigation", or "mw-panel")
* @param id - id of the portlet menu to create, preferably start with "p-".
* @param text - name of the portlet menu to create. Visibility depends on the class used.
* @param type - type of portlet. Currently only used for the vector non-sidebar portlets, pass "menu" to make this portlet a drop down menu.
* @param nextnodeid - the id of the node before which the new item should be added, should be another item in the same list, or undefined to place it at the end.
*
* @returns the DOM node of the new item (a DIV element) or null
*/
function addPortlet(navigation, id, text, type, nextnodeid) {
// sanity checks, and get required DOM nodes
var root = document.getElementById(navigation) || document.querySelector(navigation);
if (!root) {
return null;
}
var item = document.getElementById(id);
if (item) {
if (item.parentNode && item.parentNode === root) {
return item;
}
return null;
}
var nextnode;
if (nextnodeid) {
nextnode = document.getElementById(nextnodeid);
}
// verify/normalize input
var skin = mw.config.get('skin');
if (skin !== 'vector' || (navigation !== 'left-navigation' && navigation !== 'right-navigation')) {
type = null; // menu supported only in vector's #left-navigation & #right-navigation
}
var outerNavClass, innerDivClass;
switch (skin) {
case 'vector':
// XXX: portal doesn't work
if (navigation !== 'portal' && navigation !== 'left-navigation' && navigation !== 'right-navigation') {
navigation = 'mw-panel';
}
outerNavClass =
'mw-portlet vector-menu vector-menu-' +
(navigation === 'mw-panel' ? 'portal' : type === 'menu' ? 'dropdown vector-menu-dropdown-noicon' : 'tabs');
innerDivClass = 'vector-menu-content';
break;
case 'modern':
if (navigation !== 'mw_portlets' && navigation !== 'mw_contentwrapper') {
navigation = 'mw_portlets';
}
outerNavClass = 'portlet';
break;
case 'timeless':
outerNavClass = 'mw-portlet';
innerDivClass = 'mw-portlet-body';
break;
default:
navigation = 'column-one';
outerNavClass = 'portlet';
break;
}
// Build the DOM elements.
var outerNav = document.createElement('nav');
outerNav.setAttribute('aria-labelledby', id + '-label');
outerNav.className = outerNavClass + ' emptyPortlet';
outerNav.id = id;
if (nextnode && nextnode.parentNode === root) {
root.insertBefore(outerNav, nextnode);
}
else {
root.appendChild(outerNav);
}
var h3 = document.createElement('h3');
h3.id = id + '-label';
var ul = document.createElement('ul');
if (skin === 'vector') {
ul.className = 'vector-menu-content-list';
// add invisible checkbox to keep menu open when clicked
// similar to the p-cactions ("More") menu
if (outerNavClass.indexOf('vector-menu-dropdown') !== -1) {
var chkbox = document.createElement('input');
chkbox.className = 'vector-menu-checkbox';
chkbox.setAttribute('type', 'checkbox');
chkbox.setAttribute('aria-labelledby', id + '-label');
outerNav.appendChild(chkbox);
// Vector gets its title in a span; all others except
// timeless have no title, and it has no span
var span = document.createElement('span');
span.appendChild(document.createTextNode(text));
h3.appendChild(span);
var a = document.createElement('a');
a.href = '#';
$(a).click(function (e) {
e.preventDefault();
});
h3.appendChild(a);
}
}
else {
// Basically just Timeless
h3.appendChild(document.createTextNode(text));
}
outerNav.appendChild(h3);
if (innerDivClass) {
var innerDiv = document.createElement('div');
innerDiv.className = innerDivClass;
innerDiv.appendChild(ul);
outerNav.appendChild(innerDiv);
}
else {
outerNav.appendChild(ul);
}
return outerNav;
}
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/siteConfig.ts":
/*!*****************************************************!*\
!*** ./node_modules/twinkle-core/src/siteConfig.ts ***!
\*****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "SiteConfig": function() { return /* binding */ SiteConfig; }
/* harmony export */ });
/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespaces */ "./node_modules/twinkle-core/src/namespaces.ts");
 
/**
* Site configuration for Twinkle.
* These are usually MediaWiki configurations that are wiki-specific, but that
* either can't be retrieved by Twinkle automatically, or are too expensive to
* fetch.
*/
var SiteConfig;
(function (SiteConfig) {
/**
* Regex expression to check if a username is likely to be a bot.
*/
SiteConfig.botUsernameRegex = /bot\b/i;
/**
* Namespaces where FlaggedRevs (pending changes protection) is enabled.
* Needs to put in unless {@link https://phabricator.wikimedia.org/T218479 phab:T218479} happens.
* Copy the `$wgFlaggedRevsNamespaces` value for your wiki which you can find on
* https://noc.wikimedia.org/conf/highlight.php?file=flaggedrevs.php
* Used in protect module.
*/
SiteConfig.flaggedRevsNamespaces = [_namespaces__WEBPACK_IMPORTED_MODULE_0__.NS_MAIN, _namespaces__WEBPACK_IMPORTED_MODULE_0__.NS_PROJECT];
/**
* Local alias for Special:PermanentLink.
* Check using /w/api.php?action=query&meta=siteinfo&formatversion=2&siprop=specialpagealiases
* Include the namespace prefix.
* If there are multiple aliases, enter any one - preferably the one that's shorter
*/
SiteConfig.permalinkSpecialPageName = 'Special:PermanentLink';
/**
* Aliases for #REDIRECT tag.
* These are always case-insensitive.
* Please copy as-is from API output (name: "redirect")
* /w/api.php?action=query&format=json&meta=siteinfo&formatversion=2&siprop=magicwords
*/
SiteConfig.redirectTagAliases = ['#REDIRECT'];
/**
* Function to parse the signature timestamp format. This should be a function
* that takes a string as input and returns an array of 5 numbers - the year,
* month (0-indexed), date, hour and minute, all of them ACCORDING TO UTC
* (even if your wiki doesn't use UTC as the default time zone!)
* This can be skipped if your wiki's signature timestamp format is same as the
* MediaWiki default - used on en.wikipedia, commons, meta, etc.
*/
SiteConfig.signatureTimestampFormat = null;
})(SiteConfig || (SiteConfig = {}));
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/twinkle.ts":
/*!**************************************************!*\
!*** ./node_modules/twinkle-core/src/twinkle.ts ***!
\**************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Twinkle": function() { return /* binding */ Twinkle; }
/* harmony export */ });
/**
* Defined as a namespace: anything that's exported from here (such as
* addInitCallback) is accessible from outside (as Twinkle.addInitCallback)
* Other items (like initCallbacks) can only be accessed from within here
*/
// eslint-disable-next-line @typescript-eslint/no-namespace
var Twinkle;
(function (Twinkle) {
/**
* Localised script name
*/
Twinkle.scriptName = 'Twinkle';
/**
* User agent
* @see https://meta.wikimedia.org/wiki/User-Agent_policy
*/
Twinkle.userAgent = 'Twinkle (' + mw.config.get('wgWikiID') + ')';
/**
* Custom change tag(s) to be applied to all Twinkle actions, create at [[Special:Tags]]
* Use of changeTags is recommended over summaryAd as it enables better usage tracking,
* however summaryAd is set by default as it doesn't require creation of a tag
*/
Twinkle.changeTags = '';
/**
* Text appended to all edit summaries and log summaries for Twinkle actions. This is automatically
* used by Twinkle.page if changeTags isn't specified above. This may also be used manually
* for any actions that don't support use of change tags.
*
* You'd want to override this, providing a link to the local project page
* about Twinkle.
*/
Twinkle.summaryAd = " (" + Twinkle.scriptName + ")";
/**
* List of functions that to be run before any modules are initialised. If
* a function returns a promise, it will be awaited. Ensure that the promise
* resolves. Twinkle modules will not be initialised if any of these functions
* throws an error or returns a rejected promise.
*/
Twinkle.preModuleInitHooks = [];
/**
* Initialisation hooks that can access the user config via getPref().
* These are executed after the user config is loaded and before modules are
* initialised. If a hook returns a promise, it will be awaited.
*/
Twinkle.preModuleInitHooksWithConfig = [];
/**
* List of registered modules
*/
Twinkle.registeredModules = [];
/**
* List of special pages where Twinkle is active.
*/
Twinkle.activeSpecialPages = ['Block', 'Contributions', 'Recentchanges', 'Recentchangeslinked'].concat(Morebits.userIsSysop ? ['DeletedContributions', 'Prefixindex'] : []);
/**
* Override twinkle-core messages - such as for places where the wiki's processes need to be mentioned
* and thus are not suitable to be included as translations.
*/
Twinkle.messageOverrides = {};
/**
* List of additional MediaWiki messages to be fetched.
*/
Twinkle.extraMwMessages = [];
})(Twinkle || (Twinkle = {}));
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/twinkleModule.ts":
/*!********************************************************!*\
!*** ./node_modules/twinkle-core/src/twinkleModule.ts ***!
\********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "TwinkleModule": function() { return /* binding */ TwinkleModule; },
/* harmony export */ "registerModule": function() { return /* binding */ registerModule; }
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _Config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Config */ "./node_modules/twinkle-core/src/Config.ts");
/* harmony import */ var _portlet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./portlet */ "./node_modules/twinkle-core/src/portlet.ts");
/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./init */ "./node_modules/twinkle-core/src/init.ts");
/* harmony import */ var _twinkle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./twinkle */ "./node_modules/twinkle-core/src/twinkle.ts");
 
 
 
 
 
/**
* Base class for all Twinkle modules
*/
var TwinkleModule = /** @class */ (function () {
function TwinkleModule() {
}
/**
* Return a PreferenceGroup with the preferences added by this module
*/
TwinkleModule.userPreferences = function () { };
/**
* Add a preference to this module's preference group
* @param pref
*/
TwinkleModule.prototype.addPreference = function (pref) {
_Config__WEBPACK_IMPORTED_MODULE_0__.Config.addPreference(this.moduleName, pref);
};
/**
* Add menu portlet
*/
TwinkleModule.prototype.addMenu = function () {
var _this = this;
(0,_portlet__WEBPACK_IMPORTED_MODULE_1__.addPortletLink)(function () { return _this.makeWindow(); }, this.portletName, this.portletId || 'twinkle-' + this.moduleName.toLowerCase(), this.portletTooltip);
};
/**
* Generate the GUI dialog for this module. Invoked when the portlet
* generated by addMenu is clicked.
*/
TwinkleModule.prototype.makeWindow = function () { };
return TwinkleModule;
}());
 
function registerModule(module) {
var prefs = module.userPreferences();
if (prefs) {
_Config__WEBPACK_IMPORTED_MODULE_0__.Config.addGroup(module.moduleName, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, prefs), { module: module.moduleName }));
(0,_Config__WEBPACK_IMPORTED_MODULE_0__.setDefaultConfig)(prefs.preferences.map(function (pref) {
return {
name: pref.name,
value: pref.default,
};
}));
}
if (!_init__WEBPACK_IMPORTED_MODULE_3__.userDisabledModules.includes(module.moduleName)) {
// new module() inits the module, which usually means adding the portlet link
// the result is assigned to Twinkle object only for debugging purposes
_twinkle__WEBPACK_IMPORTED_MODULE_4__.Twinkle[module.moduleName.toLowerCase()] = new module();
}
}
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/src/utils.ts":
/*!************************************************!*\
!*** ./node_modules/twinkle-core/src/utils.ts ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ApiError": function() { return /* binding */ ApiError; },
/* harmony export */ "makeArray": function() { return /* binding */ makeArray; },
/* harmony export */ "isTextRedirect": function() { return /* binding */ isTextRedirect; },
/* harmony export */ "stripNs": function() { return /* binding */ stripNs; },
/* harmony export */ "addNs": function() { return /* binding */ addNs; },
/* harmony export */ "urlParamValue": function() { return /* binding */ urlParamValue; },
/* harmony export */ "link": function() { return /* binding */ link; },
/* harmony export */ "sortByNamespace": function() { return /* binding */ sortByNamespace; },
/* harmony export */ "generateArrowLinks": function() { return /* binding */ generateArrowLinks; },
/* harmony export */ "generateBatchPageLinks": function() { return /* binding */ generateBatchPageLinks; },
/* harmony export */ "makeOptoutLink": function() { return /* binding */ makeOptoutLink; },
/* harmony export */ "makeTemplate": function() { return /* binding */ makeTemplate; },
/* harmony export */ "obj_values": function() { return /* binding */ obj_values; },
/* harmony export */ "obj_entries": function() { return /* binding */ obj_entries; },
/* harmony export */ "obj_fromEntries": function() { return /* binding */ obj_fromEntries; },
/* harmony export */ "arr_includes": function() { return /* binding */ arr_includes; },
/* harmony export */ "arr_find": function() { return /* binding */ arr_find; },
/* harmony export */ "arr_flatMap": function() { return /* binding */ arr_flatMap; },
/* harmony export */ "str_includes": function() { return /* binding */ str_includes; },
/* harmony export */ "str_startsWith": function() { return /* binding */ str_startsWith; },
/* harmony export */ "str_endsWith": function() { return /* binding */ str_endsWith; }
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _siteConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./siteConfig */ "./node_modules/twinkle-core/src/siteConfig.ts");
 
 
var ApiError = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(ApiError, _super);
function ApiError() {
return _super !== null && _super.apply(this, arguments) || this;
}
return ApiError;
}(Error));
 
function makeArray(obj) {
if (!obj) {
return [];
}
if (Array.isArray(obj)) {
return obj;
}
return [obj];
}
/**
* Check if page is a redirect given the page text.
* @param text
*/
function isTextRedirect(text) {
return _siteConfig__WEBPACK_IMPORTED_MODULE_1__.SiteConfig.redirectTagAliases.map(function (str) {
return new RegExp('^\\s*' + str, 'i');
})
.some(function (regex) {
return regex.test(text);
});
}
/**
* Remove namespace name from title if present
* Exception-safe wrapper around mw.Title
* @param {string} title
*/
function stripNs(title) {
var title_obj = mw.Title.newFromUserInput(title);
if (!title_obj) {
return title; // user entered invalid input; do nothing
}
return title_obj.getNameText();
}
/**
* Add namespace name to page title if not already given
* CAUTION: namespace name won't be added if a namespace (*not* necessarily
* the same as the one given) already is there in the title
* @param {string} title
* @param {number} namespaceNumber
*/
function addNs(title, namespaceNumber) {
var title_obj = mw.Title.newFromUserInput(title, namespaceNumber);
if (!title_obj) {
return title; // user entered invalid input; do nothing
}
return title_obj.toText();
}
/**
* Get URL parameter.
* Alias for mw.util.getParamValue
* @param param
*/
function urlParamValue(param) {
return mw.util.getParamValue(param);
}
function link(displaytext, title, params) {
return "<a target=\"_blank\" href=\"" + mw.util.getUrl(title, params) + "\">" + displaytext + "</a>";
}
/**
* Used in batch, unlink, and deprod to sort pages by namespace, as
* json formatversion=2 sorts by pageid instead (#1251)
*/
function sortByNamespace(first, second) {
return first.ns - second.ns || (first.title > second.title ? 1 : -1);
}
/**
* Used in batch listings to link to the page in question with >
*/
function generateArrowLinks(checkbox) {
var link = Morebits.htmlNode('a', ' >');
link.setAttribute('class', 'tw-arrowpage-link');
link.setAttribute('href', mw.util.getUrl(checkbox.value));
link.setAttribute('target', '_blank');
checkbox.nextElementSibling.append(link);
}
/**
* Used in deprod and unlink listings to link the page title
*/
function generateBatchPageLinks(checkbox) {
var $checkbox = $(checkbox);
var link = Morebits.htmlNode('a', $checkbox.val());
link.setAttribute('class', 'tw-batchpage-link');
link.setAttribute('href', mw.util.getUrl($checkbox.val()));
link.setAttribute('target', '_blank');
$checkbox.next().prepend([link, ' ']);
}
function makeOptoutLink(module) {
if (!module) {
return '';
}
return 'notwinkle.test/?module=' + module;
}
/**
* Make template wikitext from the template name and parameters
* @param {string} name - name of the template. Include "subst:" if necessary
* @param {Object} parameters - object with keys and values being the template param names and values.
* Use numbers as keys for unnamed parameters.
* If a value is falsy (undefined or null or empty string), the param doesn't appear in output.
* @returns {string}
*/
function makeTemplate(name, parameters) {
var parameterText = obj_entries(parameters)
.filter(function (_a) {
var k = _a[0], v = _a[1];
return !!v;
}) // ignore params with no value
.map(function (_a) {
var name = _a[0], value = _a[1];
return "|" + name + "=" + value;
})
.join('');
return '{{' + name + parameterText + '}}';
}
// Non-polluting shims for common ES6 functions
/**
* Shim for Object.values
* @param obj
*/
function obj_values(obj) {
// @ts-ignore
return Object.values ? Object.values(obj) : Object.keys(obj).map(function (k) { return obj[k]; });
}
/**
* Shim for Object.entries
* @param obj
*/
function obj_entries(obj) {
// @ts-ignore
return Object.entries ? Object.entries(obj) : Object.keys(obj).map(function (k) { return [k, obj[k]]; });
}
/**
* Shim for Object.fromEntries
* @param entries
*/
function obj_fromEntries(entries) {
// @ts-ignore
if (Object.fromEntries) {
// @ts-ignore
return Object.fromEntries(entries);
}
var obj = {};
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
var _a = entries_1[_i], key = _a[0], val = _a[1];
obj[key] = val;
}
return obj;
}
/**
* Shim for Array.prototype.includes
* @param arr
* @param item
* @deprecated as this is now shimmed in MediaWiki
*/
function arr_includes(arr, item) {
return arr.indexOf(item) !== -1;
}
/**
* Shim for Array.prototype.find
* @param arr
* @param predicate
* @deprecated as this is now shimmed in MediaWiki
*/
function arr_find(arr, predicate) {
return Array.prototype.find ? arr.find(predicate) : arr.filter(predicate)[0];
}
/**
* Shim for Array.prototype.flatMap
* @param arr
* @param callbackfn
*/
function arr_flatMap(arr, callbackfn) {
// @ts-ignore
if (Array.prototype.flatMap) {
// @ts-ignore
return arr.flatMap(callbackfn);
}
return arr.map(callbackfn).reduce(function (previousValue, currentValue) { return previousValue.concat(currentValue); }, []);
}
/**
* Shim for String.prototype.includes
* @param str
* @param item
*/
function str_includes(str, item) {
return str.indexOf(item) !== -1;
}
/**
* Shim for String.prototype.startsWith
* @param str
* @param text
*/
function str_startsWith(str, text) {
// @ts-ignore
return String.prototype.startsWith ? str.startsWith(text) : str.indexOf(text) === 0;
}
/**
* Shim for String.prototype.endsWith
* @param str
* @param text
*/
function str_endsWith(str, text) {
// @ts-ignore
if (String.prototype.endsWith) {
// @ts-ignore
return str.endsWith(text);
}
else {
var lastIdx = str.lastIndexOf(text);
return lastIdx !== -1 && lastIdx === str.length - text.length;
}
}
 
 
/***/ }),
 
/***/ "./src/common.ts":
/*!***********************!*\
!*** ./src/common.ts ***!
\***********************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "hatnoteRegex": function() { return /* binding */ hatnoteRegex; },
/* harmony export */ "makeFindSourcesDiv": function() { return /* binding */ makeFindSourcesDiv; },
/* harmony export */ "optoutTemplates": function() { return /* binding */ optoutTemplates; }
/* harmony export */ });
/**
* Functions or expressions shared across multiple modules
*/
// Various hatnote templates, used when tagging (csd/xfd/tag/prod/protect) to
// ensure MOS:ORDER
var hatnoteRegex = 'short description|hatnote|main|correct title|dablink|distinguish|for|further|selfref|year dab|similar names|highway detail hatnote|broader|about(?:-distinguish| other people)?|other\\s?(?:hurricane(?: use)?s|people|persons|places|ships|uses(?: of)?)|redirect(?:-(?:distinguish|synonym|multi))?|see\\s?(?:wiktionary|also(?: if exists)?)';
var findSources;
// Used in XFD and PROD
function makeFindSourcesDiv(divID) {
if (!$(divID).length) {
return;
}
if (!findSources) {
var parser = new Morebits.wiki.preview($(divID)[0]);
parser
.beginRender('({{Find sources|' + Morebits.pageNameNorm + '}})', 'WP:AFD')
.then(function () {
// Save for second-time around
findSources = parser.previewbox.innerHTML;
$(divID).removeClass('morebits-previewbox');
});
}
else {
$(divID).html(findSources);
}
}
var optoutTemplates = ['Template:Retired', 'Template:Deceased Wikipedian'];
 
 
/***/ }),
 
/***/ "./src/fluff.ts":
/*!**********************!*\
!*** ./src/fluff.ts ***!
\**********************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Fluff": function() { return /* binding */ Fluff; }
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core */ "./node_modules/twinkle-core/src/modules/fluffCore.ts");
 
 
var Fluff = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(Fluff, _super);
function Fluff() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.trustedBots = [];
_this.hiddenName = 'an unknown user';
return _this;
}
return Fluff;
}(_core__WEBPACK_IMPORTED_MODULE_1__.FluffCore));
 
 
 
/***/ }),
 
/***/ "./src/globals.ts":
/*!************************!*\
!*** ./src/globals.ts ***!
\************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core */ "./node_modules/twinkle-core/src/twinkle.ts");
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core */ "./node_modules/twinkle-core/src/twinkleModule.ts");
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./core */ "./node_modules/twinkle-core/src/messenger.ts");
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core */ "./node_modules/twinkle-core/src/Page.ts");
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./core */ "./node_modules/twinkle-core/src/Api.ts");
/**
* Allow global access for certain objects for debugging and console-based testing
*/
 
// @ts-ignore
window.Twinkle = _core__WEBPACK_IMPORTED_MODULE_0__.Twinkle;
$.extend(_core__WEBPACK_IMPORTED_MODULE_0__.Twinkle, {
registerModule: _core__WEBPACK_IMPORTED_MODULE_1__.registerModule,
msg: _core__WEBPACK_IMPORTED_MODULE_2__.msg,
Page: _core__WEBPACK_IMPORTED_MODULE_3__.Page,
Api: _core__WEBPACK_IMPORTED_MODULE_4__.Api,
});
// Make jQuery Deferred exceptions hit the source map during debugging
// @ts-ignore
if (typeof __webpack_exports__ !== 'undefined') {
jQuery.Deferred.exceptionHook = function (err) {
throw err;
};
}
 
 
/***/ }),
 
/***/ "./src/mw-messages.ts":
/*!****************************!*\
!*** ./src/mw-messages.ts ***!
\****************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/**
* This file contains the list of MediaWiki messages to be load, in addition
* to what twinkle-core loads.
*/
/* harmony default export */ __webpack_exports__["default"] = ([
// Put "restriction-level-" messages for all protection groups here
// Check using /w/api.php?action=query&meta=siteinfo&formatversion=2&siprop=restrictions
// (except sysop and autoconfirmed which are already added by core)
// if there are user groups for which FlaggedRevs (pending changes) can be configured,
// put the "group-" messages for them here, eg. "group-reviewer"
]);
 
 
/***/ }),
 
/***/ "./src/xfd.ts":
/*!********************!*\
!*** ./src/xfd.ts ***!
\********************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Xfd": function() { return /* binding */ Xfd; }
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./core */ "./node_modules/twinkle-core/src/Page.ts");
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core */ "./node_modules/twinkle-core/src/Config.ts");
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./core */ "./node_modules/twinkle-core/src/Api.ts");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ "./node_modules/twinkle-core/src/utils.ts");
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./core */ "./node_modules/twinkle-core/src/modules/xfdCore.ts");
/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./common */ "./src/common.ts");
 
 
 
 
 
var Afd = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(Afd, _super);
function Afd() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.discussionPagePrefix = 'Wikipedia:Articles for deletion';
return _this;
}
Afd.isDefaultChoice = function () {
return mw.config.get('wgNamespaceNumber') === 0 && !Morebits.isPageRedirect();
};
Afd.prototype.getFieldsetLabel = function () {
return 'Articles for deletion';
};
Afd.prototype.getVenueWarning = function () {
if (mw.config.get('wgNamespaceNumber') !== 0) {
return 'AfD is generally appropriate only for articles.';
}
else if (mw.config.get('wgIsRedirect')) {
return 'Please use RfD for redirects.';
}
};
Afd.prototype.getMenuTooltip = function () {
return 'Nominate article for deletion or move';
};
Afd.prototype.generateFieldset = function () {
this.fieldset = _super.prototype.generateFieldset.call(this);
this.fieldset.append({
type: 'div',
label: '',
style: 'margin-bottom: 5px;',
});
this.fieldset.append({
type: 'checkbox',
list: [
{
label: 'Wrap deletion tag with <noinclude>',
value: 'noinclude',
name: 'noinclude',
tooltip: "Will wrap the deletion tag in &lt;noinclude&gt; tags, so that it won't transclude. This option is not normally required.",
},
],
});
this.fieldset.append({
type: 'select',
name: 'xfdcat',
label: 'Choose what category this nomination belongs in:',
list: [
{ type: 'option', label: 'Unknown', value: '?', selected: true },
{ type: 'option', label: 'Media and music', value: 'M' },
{ type: 'option', label: 'Organisation, corporation, or product', value: 'O' },
{ type: 'option', label: 'Biographical', value: 'B' },
{ type: 'option', label: 'Society topics', value: 'S' },
{ type: 'option', label: 'Web or internet', value: 'W' },
{ type: 'option', label: 'Games or sports', value: 'G' },
{ type: 'option', label: 'Science and technology', value: 'T' },
{ type: 'option', label: 'Fiction and the arts', value: 'F' },
{ type: 'option', label: 'Places and transportation', value: 'P' },
{ type: 'option', label: 'Indiscernible or unclassifiable topic', value: 'I' },
{ type: 'option', label: 'Debate not yet sorted', value: 'U' },
],
});
// delsort categories taken from [[WP:DS/C]], inspired by off [[User:Enterprisey/delsort.js]]
var delsortCategories = {
'People': [
'People',
'Academics and educators',
'Actors and filmmakers',
'Artists',
'Authors',
'Bands and musicians',
'Businesspeople',
'Politicians',
'Sportspeople',
'Women',
'Lists of people',
],
'Arts': ['Arts', 'Fictional elements', 'Science fiction and fantasy'],
'Arts/Culinary': ['Food and drink', 'Wine'],
'Arts/Language': [
'Language',
'Academic journals',
'Bibliographies',
'Journalism',
'Literature',
'Logic',
'News media',
'Philosophy',
'Poetry',
],
'Arts/Performing': [
'Albums and songs',
'Dance',
'Film',
'Magic',
'Music',
'Radio',
'Television',
'Theatre',
'Video games',
],
'Arts/Visual arts': ['Visual arts', 'Architecture', 'Fashion', 'Photography'],
'Arts/Comics and animation': ['Comics and animation', 'Anime and manga', 'Webcomics'],
'Places of interest': ['Museums and libraries', 'Shopping malls'],
'Topical': [
'Animal',
'Bilateral relations',
'Conservatism',
'Conspiracy theories',
'Crime',
'Disability',
'Discrimination',
'Entertainment',
'Ethnic groups',
'Events',
'Finance',
'Games',
'Health and fitness',
'History',
'Law',
'Military',
'Organizations',
'Paranormal',
'Piracy',
'Politics',
'Terrorism',
],
'Topical/Business': ['Business', 'Advertising', 'Companies', 'Management', 'Products'],
'Topical/Culture': [
'Beauty pageants',
'Fashion',
'Mythology',
'Popular culture',
'Sexuality and gender',
],
'Topical/Education': ['Education', 'Fraternities and sororities', 'Schools'],
'Topical/Religion': [
'Religion',
'Atheism',
'Bible',
'Buddhism',
'Christianity',
'Islam',
'Judaism',
'Hinduism',
'Paganism',
'Sikhism',
'Spirituality',
],
'Topical/Science': [
'Science',
'Archaeology',
'Astronomy',
'Behavioural science',
'Biology',
'Economics',
'Engineering',
'Environment',
'Geography',
'Mathematics',
'Medicine',
'Organisms',
'Psychiatry',
'Psychology',
'Social science',
],
'Topical/Sports': [
'Sports',
'American football',
'Baseball',
'Basketball',
'Bodybuilding',
'Boxing',
'Cricket',
'Cycling',
'Football',
'Golf',
'Handball',
'Horse racing',
'Ice hockey',
'Motorsport',
'Rugby union',
'Softball',
'Martial arts',
'Wrestling',
],
'Topical/Technology': [
'Technology',
'Aviation',
'Computing',
'Firearms',
'Internet',
'Software',
'Transportation',
'Websites',
],
'Wikipedia page type': ['Disambiguations', 'Lists'],
'Geographic/Africa': [
'Africa',
'Algeria',
'Democratic Republic of the Congo',
'Egypt',
'Ethiopia',
'Ghana',
'Kenya',
'Libya',
'Mauritius',
'Morocco',
'Nigeria',
'Somalia',
'South Africa',
'Zimbabwe',
],
'Geographic/Asia': [
'Asia',
'Afghanistan',
'Bangladesh',
'Brunei',
'Cambodia',
'China',
'Hong Kong',
'Indonesia',
'Japan',
'Korea',
'Laos',
'Malaysia',
'Maldives',
'Mongolia',
'Myanmar',
'Nepal',
'Pakistan',
'Philippines',
'Singapore',
'South Korea',
'Sri Lanka',
'Taiwan',
'Thailand',
'Vietnam',
],
'Geographic/Asia/Central Asia': [
'Central Asia',
'Kazakhstan',
'Kyrgyzstan',
'Tajikistan',
'Turkmenistan',
'Uzbekistan',
],
'Geographic/Asia/Middle East': [
'Middle East',
'Bahrain',
'Iran',
'Iraq',
'Israel',
'Jordan',
'Kuwait',
'Lebanon',
'Libya',
'Palestine',
'Qatar',
'Saudi Arabia',
'Syria',
'United Arab Emirates',
'Yemen',
],
'Geographic/Asia/India': ['India', 'Kerala'],
'Geographic/Europe': [
'Europe',
'Albania',
'Armenia',
'Austria',
'Azerbaijan',
'Belarus',
'Belgium',
'Bosnia and Herzegovina',
'Bulgaria',
'Croatia',
'Cyprus',
'Czech Republic',
'Denmark',
'Estonia',
'Finland',
'France',
'Georgia (country)',
'Germany',
'Greece',
'Hungary',
'Iceland',
'Ireland',
'Italy',
'Jersey',
'Kosovo',
'Latvia',
'Lithuania',
'Luxembourg',
'Malta',
'Moldova',
'Montenegro',
'Netherlands',
'North Macedonia',
'Norway',
'Poland',
'Portugal',
'Romania',
'Russia',
'Serbia',
'Slovakia',
'Slovenia',
'Spain',
'Sweden',
'Switzerland',
'Turkey',
'Ukraine',
'Yugoslavia',
],
'Geographic/Europe/United Kingdom': [
'United Kingdom',
'England',
'Northern Ireland',
'Scotland',
'Wales',
],
'Geographic/Oceania': ['Oceania', 'Antarctica', 'Australia', 'New Zealand'],
'Geographic/Americas/Canada': [
'Canada',
'Alberta',
'British Columbia',
'Manitoba',
'Nova Scotia',
'Ontario',
'Quebec',
],
'Geographic/Americas/Latin America': [
'Latin America',
'Caribbean',
'South America',
'Argentina',
'Barbados',
'Belize',
'Bolivia',
'Brazil',
'Chile',
'Colombia',
'Costa Rica',
'Cuba',
'Ecuador',
'El Salvador',
'Grenada',
'Guatemala',
'Haiti',
'Mexico',
'Nicaragua',
'Panama',
'Paraguay',
'Peru',
'Puerto Rico',
'Trinidad and Tobago',
'Uruguay',
'Venezuela',
],
'Geographic/Americas/USA': [
'United States of America',
'Alabama',
'Alaska',
'Arizona',
'Arkansas',
'California',
'Colorado',
'Connecticut',
'Delaware',
'Florida',
'Georgia (U.S. state)',
'Hawaii',
'Idaho',
'Illinois',
'Indiana',
'Iowa',
'Kansas',
'Kentucky',
'Louisiana',
'Maine',
'Maryland',
'Massachusetts',
'Michigan',
'Minnesota',
'Mississippi',
'Missouri',
'Montana',
'Nebraska',
'Nevada',
'New Hampshire',
'New Jersey',
'New Mexico',
'New York',
'North Carolina',
'North Dakota',
'Ohio',
'Oklahoma',
'Oregon',
'Pennsylvania',
'Rhode Island',
'South Carolina',
'South Dakota',
'Tennessee',
'Texas',
'Utah',
'Vermont',
'Virginia',
'Washington',
'Washington, D.C.',
'West Virginia',
'Wisconsin',
'Wyoming',
],
'Geographic/Unsorted': ['Islands'],
};
var delsort = this.fieldset.append({
type: 'select',
multiple: true,
name: 'delsortCats',
label: 'Choose deletion sorting categories: ',
tooltip: 'Select a few categories that are specifically relevant to the subject of the article. Be as precise as possible; categories like People and USA should only be used when no other categories apply.',
});
$.each(delsortCategories, function (groupname, list) {
var group = delsort.append({ type: 'optgroup', label: groupname });
list.forEach(function (item) {
group.append({ type: 'option', label: item, value: item });
});
});
this.appendReasonArea();
return this.fieldset;
};
Afd.prototype.postRender = function (renderedFieldset) {
(0,_common__WEBPACK_IMPORTED_MODULE_1__.makeFindSourcesDiv)('#twinkle-xfd-findsources');
$(renderedFieldset)
.find('[name=delsortCats]')
.attr('data-placeholder', 'Select delsort pages')
.select2({
width: '100%',
matcher: Morebits.select2.matchers.optgroupFull,
templateResult: Morebits.select2.highlightSearchMatches,
language: {
// This actually works but apparently the type is wrong
// @ts-ignore
searching: Morebits.select2.queryInterceptor,
},
// Link text to the page itself
templateSelection: function (choice) {
return $('<a>')
.text(choice.text)
.attr({
href: mw.util.getUrl('Wikipedia:WikiProject_Deletion_sorting/' + choice.text),
target: '_blank',
});
},
});
mw.util.addCSS(
// Remove black border
'.select2-container--default.select2-container--focus .select2-selection--multiple { border: 1px solid #aaa; }' +
// Reduce padding
'.select2-results .select2-results__option { padding-top: 1px; padding-bottom: 1px; }' +
'.select2-results .select2-results__group { padding-top: 1px; padding-bottom: 1px; } ' +
// Adjust font size
'.select2-container .select2-dropdown .select2-results { font-size: 13px; }' +
'.select2-container .selection .select2-selection__rendered { font-size: 13px; }' +
// Make the tiny cross larger
'.select2-selection__choice__remove { font-size: 130%; }');
};
Afd.prototype.evaluate = function () {
var _this = this;
_super.prototype.evaluate.call(this);
this.tm.add(this.checkPage, []);
this.tm.add(this.determineDiscussionPage, []);
this.tm.add(this.createDiscussionPage, [this.checkPage, this.determineDiscussionPage], this.printReasonText);
// create discussion page before linking or transcluding it from anywhere, so that
// there's no need to do any purging later (#364)
this.tm.add(this.tagPage, [this.checkPage, this.createDiscussionPage]); // tagPage has an arg coming from checkPage
this.tm.add(this.addToList, [this.createDiscussionPage]);
this.tm.add(this.addToDelsortLists, [this.createDiscussionPage]);
this.tm.add(this.patrolPage, [this.checkPage]);
this.tm.add(this.fetchCreatorInfo, []);
this.tm.add(this.notifyCreator, [this.createDiscussionPage, this.fetchCreatorInfo]);
this.tm.add(this.addToLog, [this.notifyCreator]);
this.tm.execute().then(function () { return _this.redirectToDiscussion(); });
};
Afd.prototype.preprocessParams = function () {
this.params.lookupNonRedirectCreator = true; // for this.fetchCreatorInfo()
};
/**
* Check to see that the page still exists, is not already tagged for AfD, etc.
*/
Afd.prototype.checkPage = function () {
var _this = this;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(mw.config.get('wgPageName'), 'Adding deletion tag to article');
pageobj.setFollowRedirect(true); // should never be needed, but if the article is moved, we would want to follow the redirect
return pageobj.load().then(function () {
var text = pageobj.getPageText();
var statelem = pageobj.getStatusElement();
_this.params.articleLoadTime = pageobj.getLoadTime();
if (!pageobj.exists()) {
statelem.error("It seems that the page doesn't exist; perhaps it has already been deleted");
return $.Deferred().reject(); // Cancel future operations
}
// Check for existing AfD tag, for the benefit of new page patrollers
var textNoAfd = text.replace(/<!--.*AfD.*\n\{\{(?:Article for deletion\/dated|AfDM).*\}\}\n<!--.*(?:\n<!--.*)?AfD.*(?:\s*\n)?/g, '');
if (text !== textNoAfd) {
if (confirm('An AfD tag was found on this article. Maybe someone beat you to it. \nClick OK to replace the current AfD tag (not recommended), or Cancel to abandon your nomination.')) {
pageobj.setPageText(textNoAfd);
}
else {
statelem.error('Article already tagged with AfD tag, and you chose to abort');
window.location.reload();
return $.Deferred().reject(); // Cancel future operations
}
}
return pageobj;
});
};
Afd.prototype.tagPage = function (pageobj) {
var params = this.params;
params.tagText =
(params.noinclude ? '<noinclude>{{' : '{{') +
(params.number === '' ? 'subst:afd|help=off' : 'subst:afdx|' + params.number + '|help=off') +
(params.noinclude ? '}}</noinclude>\n' : '}}\n');
if (pageobj.canEdit()) {
var text = pageobj.getPageText();
// Remove some tags that should always be removed on AfD.
text = text.replace(/\{\{\s*(dated prod|dated prod blp|Prod blp\/dated|Proposed deletion\/dated|prod2|Proposed deletion endorsed|Userspace draft)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/gi, '');
// Then, test if there are speedy deletion-related templates on the article.
var textNoSd = text.replace(/\{\{\s*(db(-\w*)?|delete|(?:hang|hold)[- ]?on)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/gi, '');
if (text !== textNoSd &&
confirm('A speedy deletion tag was found on this page. Should it be removed?')) {
text = textNoSd;
}
// Insert tag after short description or any hatnotes
var wikipage = new Morebits.wikitext.page(text);
text = wikipage.insertAfterTemplates(params.tagText, _common__WEBPACK_IMPORTED_MODULE_1__.hatnoteRegex).getText();
pageobj.setPageText(text);
pageobj.setEditSummary('Nominated for deletion; see [[:' + params.discussionpage + ']].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchPage'));
pageobj.setCreateOption('nocreate');
return pageobj.save();
}
else {
return this.autoEditRequest(pageobj);
}
};
Afd.prototype.getDiscussionWikitext = function () {
var params = this.params;
return ((0,_utils__WEBPACK_IMPORTED_MODULE_4__.makeTemplate)('subst:afd2', {
text: Morebits.string.formatReasonText(params.reason, true),
pg: Morebits.pageNameNorm,
cat: params.xfdcat,
}) +
params.delsortCats
.map(function (cat) {
return '\n{{subst:delsort|' + cat + '|~~~~}}';
})
.join(''));
};
Afd.prototype.createDiscussionPage = function () {
var _this = this;
var params = this.params;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(params.discussionpage, 'Creating article deletion discussion page');
return pageobj.load().then(function () {
pageobj.setPageText(_this.getDiscussionWikitext());
pageobj.setEditSummary('Creating deletion discussion page for [[:' + Morebits.pageNameNorm + ']].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchDiscussion'));
pageobj.setCreateOption('createonly');
return pageobj.save();
});
};
Afd.prototype.addToList = function () {
var params = this.params;
var date = new Morebits.date(params.articleLoadTime);
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page('Wikipedia:Articles for deletion/Log/' + date.format('YYYY MMMM D', 'utc'), "Adding discussion to today's list");
pageobj.setFollowRedirect(true);
return pageobj.load().then(function () {
var statelem = pageobj.getStatusElement();
var added_data = '{{subst:afd3|pg=' + Morebits.pageNameNorm + params.numbering + '}}\n';
var text;
// add date header if the log is found to be empty (a bot should do this automatically)
if (!pageobj.exists()) {
text = '{{subst:AfD log}}\n' + added_data;
}
else {
var old_text = pageobj.getPageText() + '\n'; // MW strips trailing blanks, but we like them, so we add a fake one
text = old_text.replace(/(<!-- Add new entries to the TOP of the following list -->\n+)/, '$1' + added_data);
if (text === old_text) {
var linknode = document.createElement('a');
linknode.setAttribute('href', mw.util.getUrl('Wikipedia:Twinkle/Fixing AFD') + '?action=purge');
linknode.appendChild(document.createTextNode('How to fix AFD'));
statelem.error([
'Could not find the target spot for the discussion. To fix this problem, please see ',
linknode,
'.',
]);
return $.Deferred().reject();
}
}
pageobj.setPageText(text);
pageobj.setEditSummary('Adding [[:' + params.discussionpage + ']].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchList'));
pageobj.setCreateOption('recreate');
return pageobj.save();
});
};
Afd.prototype.addToDelsortLists = function () {
var params = this.params;
var promises = params.delsortCats.map(function (cat) {
var delsortPage = new _core__WEBPACK_IMPORTED_MODULE_2__.Page('Wikipedia:WikiProject Deletion sorting/' + cat, 'Adding to list of ' + cat + '-related deletion discussions');
delsortPage.setFollowRedirect(true); // In case a category gets renamed
return delsortPage.load().then(function () {
var discussionPage = params.discussionpage;
var text = delsortPage
.getPageText()
.replace('directly below this line -->', 'directly below this line -->\n{{' + discussionPage + '}}');
delsortPage.setPageText(text);
delsortPage.setEditSummary('Listing [[:' + discussionPage + ']].');
delsortPage.setCreateOption('nocreate');
return delsortPage.save().catch(function () { }); // failures aren't important
});
});
return $.when.apply($, promises);
};
Afd.prototype.patrolPage = function () {
if ((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('markXfdPagesAsPatrolled')) {
new _core__WEBPACK_IMPORTED_MODULE_2__.Page(Morebits.pageNameNorm).triage();
}
return $.Deferred().resolve(); // XXX
};
Afd.prototype.getNotifyText = function () {
return ((0,_utils__WEBPACK_IMPORTED_MODULE_4__.makeTemplate)('subst:afd notice', {
1: Morebits.pageNameNorm,
order: this.params.numbering ? "|order=&#32;" + this.params.numbering : '',
}) + ' [[వాడుకరి:Veeven|వీవెన్]] ([[వాడుకరి చర్చ:Veeven|చర్చ]]) 15:49, 15 నవంబరు 2021 (UTC)');
};
Afd.venueCode = 'AfD';
Afd.venueLabel = 'AfD (Articles for deletion)';
return Afd;
}(_core__WEBPACK_IMPORTED_MODULE_5__.XfdMode));
var Tfd = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(Tfd, _super);
function Tfd() {
return _super !== null && _super.apply(this, arguments) || this;
}
Tfd.prototype.getFieldsetLabel = function () {
return 'Templates for discussion';
};
Tfd.prototype.getMenuTooltip = function () {
return 'Start a discussion for deleting or merging this template';
};
Tfd.isDefaultChoice = function () {
return [10, 828].indexOf(mw.config.get('wgNamespaceNumber')) !== -1;
};
Tfd.prototype.generateFieldset = function () {
this.fieldset = _super.prototype.generateFieldset.call(this);
var templateOrModule = mw.config.get('wgPageContentModel') === 'Scribunto' ? 'module' : 'template';
this.fieldset.append({
type: 'select',
label: 'Choose type of action wanted: ',
name: 'xfdcat',
event: function (e) {
var target = e.target, tfdtarget = target.form.tfdtarget;
// add/remove extra input box
if (target.value === 'TfM' && !tfdtarget) {
tfdtarget = new Morebits.quickForm.element({
name: 'tfdtarget',
type: 'input',
label: 'Other ' + templateOrModule + ' to be merged: ',
tooltip: 'Required. Should not include the ' +
Morebits.string.toUpperCaseFirstChar(templateOrModule) +
': namespace prefix.',
required: true,
});
target.parentNode.appendChild(tfdtarget.render());
}
else {
$(Morebits.quickForm.getElementContainer(tfdtarget)).remove();
tfdtarget = null;
}
},
list: [
{ type: 'option', label: 'Deletion', value: 'TfD', selected: true },
{ type: 'option', label: 'Merge', value: 'TfM' },
],
});
this.fieldset.append({
type: 'select',
name: 'templatetype',
label: 'Deletion tag display style: ',
tooltip: 'Which <code>type=</code> parameter to pass to the TfD tag template.',
list: templateOrModule === 'module'
? [{ type: 'option', value: 'module', label: 'Module', selected: true }]
: [
{ type: 'option', value: 'standard', label: 'Standard', selected: true },
{
type: 'option',
value: 'sidebar',
label: 'Sidebar/infobox',
selected: !!$('.infobox').length,
},
{
type: 'option',
value: 'inline',
label: 'Inline template',
selected: !!$('.mw-parser-output > p .Inline-Template').length,
},
{ type: 'option', value: 'tiny', label: 'Tiny inline' },
],
});
this.fieldset.append({
type: 'checkbox',
list: [
{
label: 'Wrap deletion tag with <noinclude> (for substituted templates only)',
value: 'noinclude',
name: 'noinclude',
tooltip: "Will wrap the deletion tag in &lt;noinclude&gt; tags, so that it won't get substituted along with the template.",
disabled: templateOrModule === 'module',
checked: !!$('.box-Subst_only').length,
},
],
});
this.fieldset.append({
type: 'checkbox',
list: [
{
label: 'Notify users of the template',
value: 'devpages',
name: 'devpages',
tooltip: 'A notification template will be sent to Twinkle, AWB, and RedWarn if this is true.',
checked: true,
},
],
});
this.appendReasonArea();
return this.fieldset;
};
Tfd.prototype.preprocessParams = function () {
if (this.params.tfdtarget) {
this.params.tfdtarget = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.stripNs)(this.params.tfdtarget);
}
// Modules can't be tagged, TfD instructions are to place on /doc subpage
this.params.scribunto = mw.config.get('wgPageContentModel') === 'Scribunto';
if (this.params.xfdcat === 'TfM') {
this.params.otherTemplateName =
(this.params.scribunto ? 'Module:' : 'Template:') + this.params.tfdtarget;
}
};
Tfd.prototype.evaluate = function () {
var _this = this;
_super.prototype.evaluate.call(this);
this.tm.add(this.tagPage, []);
this.tm.add(this.addToList, [this.tagPage], this.printReasonText);
this.tm.add(this.watchModule, []);
this.tm.add(this.fetchCreatorInfo, []);
this.tm.add(this.notifyCreator, [this.fetchCreatorInfo]);
this.tm.add(this.notifyOtherCreator, [this.fetchCreatorInfo]);
this.tm.add(this.notifyDevs, [this.addToList]);
this.tm.add(this.addToLog, [this.notifyCreator]);
this.tm.execute().then(function () { return _this.redirectToDiscussion(); });
};
Tfd.prototype.tagPage = function () {
return this.params.xfdcat === 'TfM' ? this.tagPagesForMerge() : this.tagPageForDeletion();
};
// One of the oddities due to our choice of not relying on the local time.
Tfd.prototype.setLogPageAndDiscussionPage = function (timestamp) {
var date = new Morebits.date(timestamp);
this.params.logpage =
'Wikipedia:Templates for discussion/Log/' + date.format('YYYY MMMM D', 'utc');
this.params.discussionpage = this.params.logpage + '#' + Morebits.pageNameNorm;
};
Tfd.prototype.tagPageForDeletion = function () {
var _this = this;
var params = this.params;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(Morebits.pageNameNorm + (params.scribunto ? '/doc' : ''), 'Tagging ' +
(params.scribunto ? 'module documentation' : 'template') +
' with ' +
'deletion tag');
pageobj.setFollowRedirect(true); // should never be needed, but if the page is moved, we would want to follow the redirect
return pageobj.load().then(function () {
_this.setLogPageAndDiscussionPage(pageobj.getLoadTime());
var text = pageobj.getPageText();
params.tagText =
'{{Template for discussion/dated|page=Veeven/twinkle/twinkle.js|link=Wikipedia:Templates for discussion/Log/2021 November 15#Template:Veeven/twinkle/twinkle.js|type=' + params.templatetype : '') +
'|help=off' +
(params.templatetype !== 'standard' ? '}}
';
if (pageobj.getContentModel() === 'sanitized-css') {
params.tagText = '/* ' + params.tagText + ' */';
}
else {
if (params.noinclude) {
params.tagText = '<noinclude>' + params.tagText + '</noinclude>';
}
// No newline for inline
params.tagText +=
params.templatetype === 'standard' || params.templatetype === 'sidebar' ? '\n' : '';
}
if (pageobj.canEdit() &&
['wikitext', 'sanitized-css'].indexOf(pageobj.getContentModel()) !== -1) {
pageobj.setPageText(params.tagText + text);
pageobj.setEditSummary('Nominated for deletion; see [[:' + params.discussionpage + ']].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchPage'));
if (params.scribunto) {
pageobj.setCreateOption('recreate'); // Module /doc might not exist
}
return pageobj.save();
}
else {
return _this.autoEditRequest(pageobj);
}
});
};
Tfd.prototype.tagPagesForMerge = function () {
var _this = this;
var params = this.params;
var docOrNot = params.scribunto ? '/doc' : '';
var moduleDocOrTemplate = params.scribunto ? 'module documentation' : 'template';
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page("" + Morebits.pageNameNorm + docOrNot, "Tagging " + moduleDocOrTemplate + " with merge tag");
pageobj.setFollowRedirect(true); // should never be needed, but if the page is moved, we would want to follow the redirect
var thispageTagging = pageobj.load().then(function () {
_this.setLogPageAndDiscussionPage(pageobj.getLoadTime());
return _this.tagForMerge(pageobj, _this.params);
});
var otherpageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page("" + params.otherTemplateName + docOrNot, "Tagging other " + moduleDocOrTemplate + " with merge tag");
otherpageobj.setFollowRedirect(true);
var otherpageTagging = otherpageobj.load().then(function () {
_this.setLogPageAndDiscussionPage(pageobj.getLoadTime());
return _this.tagForMerge(otherpageobj, $.extend({}, params, {
otherTemplateName: Morebits.pageNameNorm,
}));
});
return $.when(thispageTagging, otherpageTagging);
};
/**
* @param {Page} pageobj - pageobj should be already loaded
* @param {Object} params - we can't just use this.params since
* that would be incorrect when tagging the "other" page
*/
Tfd.prototype.tagForMerge = function (pageobj, params) {
var text = pageobj.getPageText();
params.tagText =
'{{subst:tfm|help=off|' +
(params.templatetype !== 'standard' ? 'type=' + params.templatetype + '|' : '') +
'1=' +
params.otherTemplateName.replace(/^(?:Template|Module):/, '') +
'}}';
if (pageobj.getContentModel() === 'sanitized-css') {
params.tagText = '/* ' + params.tagText + ' */';
}
else {
if (params.noinclude) {
params.tagText = '<noinclude>' + params.tagText + '</noinclude>';
}
// No newline for inline
params.tagText +=
params.templatetype === 'standard' || params.templatetype === 'sidebar' ? '\n' : '';
}
if (pageobj.canEdit() &&
['wikitext', 'sanitized-css'].indexOf(pageobj.getContentModel()) !== -1) {
pageobj.setPageText(params.tagText + text);
pageobj.setEditSummary('Listed for merging with [[:' +
params.otherTemplateName +
']]; see [[:' +
params.discussionpage +
']].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchPage'));
if (params.scribunto) {
pageobj.setCreateOption('recreate'); // Module /doc might not exist
}
return pageobj.save();
}
else {
return this.autoEditRequest(pageobj);
}
};
Tfd.prototype.addToList = function () {
var _this = this;
var params = this.params;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(params.logpage, "Adding discussion to today's log");
pageobj.setFollowRedirect(true);
return pageobj.load().then(function () {
var statelem = pageobj.getStatusElement();
var added_data = _this.getDiscussionWikitext();
var text;
// add date header if the log is found to be empty (a bot should do this automatically)
if (!pageobj.exists()) {
text = '{{subst:TfD log}}\n' + added_data;
}
else {
var old_text = pageobj.getPageText();
text = old_text.replace('-->', '-->\n' + added_data);
if (text === old_text) {
statelem.error('failed to find target spot for the discussion');
return $.Deferred().reject();
}
}
pageobj.setPageText(text);
pageobj.setEditSummary('Adding ' +
(params.xfdcat === 'TfD' ? 'deletion nomination' : 'merge listing') +
' of [[:' +
Morebits.pageNameNorm +
']].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchDiscussion'));
pageobj.setCreateOption('recreate');
return pageobj.save();
});
};
Tfd.prototype.notifyOtherCreator = function () {
var _this = this;
if (!this.params.otherTemplateName) {
return $.Deferred().resolve();
}
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(this.params.otherTemplateName, 'Finding other page creator');
pageobj.lookupCreation().then(function () {
var otherpagecreator = pageobj.getCreator();
pageobj.getStatusElement().info('Found ' + otherpagecreator);
if (otherpagecreator === _this.params.initialContrib) {
return;
}
return _this.notifyTalkPage(otherpagecreator);
});
};
Tfd.prototype.notifyDevs = function () {
var _this = this;
if (!this.params.devpages) {
return $.Deferred().resolve();
}
var inCategories = mw.config.get('wgCategories');
var categoryNotificationPageMap = {
'Templates used by Twinkle': 'Wikipedia talk:Twinkle',
'Templates used by AutoWikiBrowser': 'Wikipedia talk:AutoWikiBrowser',
'Templates used by RedWarn': 'Wikipedia talk:RedWarn',
};
return $.when.apply($, (0,_utils__WEBPACK_IMPORTED_MODULE_4__.obj_entries)(categoryNotificationPageMap)
.filter(function (_a) {
var cat = _a[0], page = _a[1];
return inCategories.includes(cat);
})
.map(function (_a) {
var cat = _a[0], page = _a[1];
return _this.notifyTalkPage(page, new Morebits.status('Notifying ' + page + ' of template nomination'));
}));
};
Tfd.prototype.watchModule = function () {
var params = this.params;
if (!params.scribunto) {
return $.Deferred().resolve();
}
var watchPref = (0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchPage');
// action=watch has no way to rely on user
// preferences (T262912), so we do it manually.
// The watchdefault pref appears to reliably return '1' (string),
// but that's not consistent among prefs so might as well be "correct"
var watchModule = watchPref !== 'no' &&
(watchPref !== 'default' || !!parseInt(mw.user.options.get('watchdefault'), 10));
if (!watchModule) {
return $.Deferred().resolve();
}
var watch_query = {
action: 'watch',
titles: [mw.config.get('wgPageName')],
token: mw.user.tokens.get('watchToken'),
// Expiry (note: mb.w.api delete params with value false)
watchlistexpiry: watchPref !== 'default' && watchPref !== 'yes' && watchPref,
};
if (params.xfdcat === 'TfM') {
// Watch other module too
watch_query.titles.push(params.otherTemplateName);
}
return new _core__WEBPACK_IMPORTED_MODULE_6__.Api('Adding Module to watchlist', watch_query).post();
};
Tfd.prototype.getDiscussionWikitext = function () {
return (0,_utils__WEBPACK_IMPORTED_MODULE_4__.makeTemplate)('subst:' + this.params.xfdcat + '2', {
text: Morebits.string.formatReasonText(this.params.reason, true),
1: mw.config.get('wgTitle'),
module: this.params.scribunto ? 'Module:' : '',
2: this.params.tfdtarget,
});
};
Tfd.prototype.getNotifyText = function () {
var text = "{{subst:tfd notice";
if (this.params.xfdcat === 'TfM') {
text = '\n{{subst:Tfm notice|2=' + this.params.tfdtarget;
}
text += "|1=" + Morebits.pageNameNorm + "}} [[వాడుకరి:Veeven|వీవెన్]] ([[వాడుకరి చర్చ:Veeven|చర్చ]]) 15:49, 15 నవంబరు 2021 (UTC)";
return text;
};
Tfd.prototype.getUserspaceLoggingExtraInfo = function () {
var params = this.params, text = '';
if (params.xfdcat === 'TfM') {
text += ' (merge)';
if (params.tfdtarget) {
var contentModel = mw.config.get('wgPageContentModel') === 'Scribunto' ? 'Module:' : 'Template:';
text += '; Other ' + contentModel.toLowerCase() + ' [[';
if (!/^:?(?:template|module):/i.test(params.tfdtarget)) {
text += contentModel;
}
text += params.tfdtarget + ']]';
}
}
return text;
};
Tfd.venueCode = 'TfD';
Tfd.venueLabel = 'TfD (Templates for discussion)';
return Tfd;
}(_core__WEBPACK_IMPORTED_MODULE_5__.XfdMode));
var Ffd = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(Ffd, _super);
function Ffd() {
return _super !== null && _super.apply(this, arguments) || this;
}
Ffd.isDefaultChoice = function () {
return mw.config.get('wgNamespaceNumber') === 6;
};
Ffd.prototype.getFieldsetLabel = function () {
return 'Files for discussion';
};
Ffd.prototype.getMenuTooltip = function () {
return 'Start a discussion for deleting this file';
};
Ffd.prototype.getVenueWarning = function () {
if (mw.config.get('wgNamespaceNumber') !== 6) {
return "FFD is selected but this page doesn't look like a file!";
}
};
Ffd.prototype.generateFieldset = function () {
this.fieldset = _super.prototype.generateFieldset.call(this);
this.appendReasonArea();
return this.fieldset;
};
Ffd.prototype.preview = function (form) {
var _this = this;
this.params = Morebits.quickForm.getInputData(form);
this.preprocessParams();
this.fetchCreatorInfo().then(function () {
_this.showPreview(form);
});
};
Ffd.prototype.evaluate = function () {
var _this = this;
_super.prototype.evaluate.call(this);
this.tm.add(this.fetchCreatorInfo, []);
this.tm.add(this.tagPage, []);
this.tm.add(this.addToList, [this.fetchCreatorInfo, this.tagPage], this.printReasonText);
this.tm.add(this.notifyCreator, [this.fetchCreatorInfo]);
this.tm.add(this.addToLog, [this.notifyCreator]);
this.tm.execute().then(function () { return _this.redirectToDiscussion(); });
};
Ffd.prototype.tagPage = function () {
var _this = this;
var params = this.params;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(mw.config.get('wgPageName'), 'Adding deletion tag to file page');
pageobj.setFollowRedirect(true);
return pageobj.load().then(function () {
var text = pageobj.getPageText();
var date = new Morebits.date(pageobj.getLoadTime()).format('YYYY MMMM D', 'utc');
params.logpage = 'Wikipedia:Files for discussion/' + date;
params.discussionpage = params.logpage + '#' + Morebits.pageNameNorm;
params.tagText = '{{ffd|log=' + date + '|help=off}}\n';
if (pageobj.canEdit()) {
text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, '');
pageobj.setPageText(params.tagText + text);
pageobj.setEditSummary('Listed for discussion at [[:' + params.discussionpage + ']].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchPage'));
pageobj.setCreateOption('recreate'); // it might be possible for a file to exist without a description page
return pageobj.save();
}
else {
return _this.autoEditRequest(pageobj);
}
});
};
Ffd.prototype.addToList = function () {
var _this = this;
var params = this.params;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(params.logpage, "Adding discussion to today's list");
pageobj.setFollowRedirect(true);
return pageobj.load().then(function () {
var text = pageobj.getPageText();
// add date header if the log is found to be empty (a bot should do this automatically)
if (!pageobj.exists()) {
text = '{{subst:FfD log}}';
}
pageobj.setPageText(text + '\n\n' + _this.getDiscussionWikitext());
pageobj.setEditSummary('Adding [[:' + Morebits.pageNameNorm + ']].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchDiscussion'));
pageobj.setCreateOption('recreate');
return pageobj.save();
});
};
Ffd.prototype.getDiscussionWikitext = function () {
return (0,_utils__WEBPACK_IMPORTED_MODULE_4__.makeTemplate)('subst:ffd2', {
Reason: Morebits.string.formatReasonText(this.params.reason, true),
1: mw.config.get('wgTitle'),
Uploader: this.params.initialContrib,
});
};
Ffd.venueCode = 'FfD';
Ffd.venueLabel = 'FfD (Files for discussion)';
return Ffd;
}(_core__WEBPACK_IMPORTED_MODULE_5__.XfdMode));
var Cfd = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(Cfd, _super);
function Cfd() {
return _super !== null && _super.apply(this, arguments) || this;
}
Cfd.isDefaultChoice = function () {
return (mw.config.get('wgNamespaceNumber') === 14 ||
(mw.config.get('wgNamespaceNumber') === 10 && /-stub$/.test(Morebits.pageNameNorm)));
};
Cfd.prototype.getFieldsetLabel = function () {
return 'Categories for discussion';
};
Cfd.prototype.getMenuTooltip = function () {
return 'Nominate article for deletion or move';
};
Cfd.prototype.getVenueWarning = function () {
if ([10, 14].indexOf(mw.config.get('wgNamespaceNumber')) === -1) {
return 'CfD is only for categories and stub templates.';
}
};
Cfd.prototype.generateFieldset = function () {
this.fieldset = _super.prototype.generateFieldset.call(this);
var isCategory = mw.config.get('wgNamespaceNumber') === 14;
this.fieldset.append({
type: 'select',
label: 'Choose type of action wanted: ',
name: 'xfdcat',
list: isCategory
? [
{ type: 'option', label: 'Deletion', value: 'CfD', selected: true },
{ type: 'option', label: 'Merge', value: 'CfM' },
{ type: 'option', label: 'Renaming', value: 'CfR' },
{ type: 'option', label: 'Split', value: 'CfS' },
{ type: 'option', label: 'Convert into article', value: 'CfC' },
]
: [
{ type: 'option', label: 'Stub Deletion', value: 'SfD-t', selected: true },
{ type: 'option', label: 'Stub Renaming', value: 'SfR-t' },
],
event: function (e) {
var value = e.target.value, cfdtarget = e.target.form.cfdtarget, cfdtarget2 = e.target.form.cfdtarget2;
// update enabled status
cfdtarget.disabled = value === 'CfD' || value === 'SfD-t';
if (isCategory) {
// update label
if (value === 'CfS') {
Morebits.quickForm.setElementLabel(cfdtarget, 'Target categories: ');
}
else if (value === 'CfC') {
Morebits.quickForm.setElementLabel(cfdtarget, 'Target article: ');
}
else {
Morebits.quickForm.setElementLabel(cfdtarget, 'Target category: ');
}
// add/remove extra input box
if (value === 'CfS') {
if (cfdtarget2) {
cfdtarget2.disabled = false;
$(cfdtarget2).show();
}
else {
cfdtarget2 = document.createElement('input');
cfdtarget2.setAttribute('name', 'cfdtarget2');
cfdtarget2.setAttribute('type', 'text');
cfdtarget2.setAttribute('required', 'true');
cfdtarget.parentNode.appendChild(cfdtarget2);
}
}
else {
$(cfdtarget2).prop('disabled', true);
$(cfdtarget2).hide();
}
}
else {
// Update stub template label
Morebits.quickForm.setElementLabel(cfdtarget, 'Target stub template: ');
}
},
});
this.fieldset.append({
type: 'input',
name: 'cfdtarget',
label: 'Target category: ',
disabled: true,
required: true,
value: '',
});
this.appendReasonArea();
return this.fieldset;
};
Cfd.prototype.preprocessParams = function () {
if (this.params.cfdtarget) {
this.params.cfdtarget = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.stripNs)(this.params.cfdtarget);
}
if (this.params.cfdtarget2) {
this.params.cfdtarget2 = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.stripNs)(this.params.cfdtarget2);
}
// Used for customized actions in edit summaries and the notification template
var summaryActions = {
'CfD': 'deletion',
'SfD-t': 'deletion',
'CfM': 'merging',
'CfR': 'renaming',
'SfR-t': 'renaming',
'CfS': 'splitting',
'CfC': 'conversion',
};
this.params.action = summaryActions[this.params.xfdcat];
this.params.stub = mw.config.get('wgNamespaceNumber') !== 14;
};
Cfd.prototype.evaluate = function () {
var _this = this;
_super.prototype.evaluate.call(this);
this.tm.add(this.tagPage, []);
this.tm.add(this.addToList, [this.tagPage], this.printReasonText);
this.tm.add(this.fetchCreatorInfo, []);
this.tm.add(this.notifyCreator, [this.fetchCreatorInfo, this.tagPage]);
this.tm.add(this.addToLog, [this.notifyCreator]);
this.tm.execute().then(function () { return _this.redirectToDiscussion(); });
};
Cfd.prototype.tagPage = function () {
var _this = this;
var params = this.params;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(mw.config.get('wgPageName'), 'Tagging category with ' + params.action + ' tag');
pageobj.setFollowRedirect(true); // should never be needed, but if the page is moved, we would want to follow the redirect
return pageobj.load().then(function () {
// Set data for future actions first
var date = new Morebits.date(pageobj.getLoadTime());
params.logpage =
'Wikipedia:Categories for discussion/Log/' + date.format('YYYY MMMM D', 'utc');
params.discussionpage = params.logpage + '#' + Morebits.pageNameNorm;
var text = pageobj.getPageText();
params.tagText =
(0,_utils__WEBPACK_IMPORTED_MODULE_4__.makeTemplate)('subst:' + params.xfdcat, {
1: params.cfdtarget,
2: params.cfdtarget2,
}) + '\n';
var editsummary = (params.stub ? 'Stub template' : 'Category') +
' being considered for ' +
params.action +
(params.xfdcat === 'CfC' ? ' to an article' : '') +
'; see [[:' +
params.discussionpage +
']].';
if (pageobj.canEdit()) {
pageobj.setPageText(params.tagText + text);
pageobj.setEditSummary(editsummary);
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchPage'));
pageobj.setCreateOption('recreate'); // since categories can be populated without an actual page at that title
return pageobj.save();
}
else {
return _this.autoEditRequest(pageobj);
}
});
};
Cfd.prototype.addToList = function () {
var _this = this;
var params = this.params;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(params.logpage, "Adding discussion to today's list");
pageobj.setFollowRedirect(true);
return pageobj.load().then(function () {
var statelem = pageobj.getStatusElement();
var added_data = _this.getDiscussionWikitext();
var text;
// add date header if the log is found to be empty (a bot should do this automatically)
if (!pageobj.exists()) {
text = '{{subst:CfD log}}\n' + added_data;
}
else {
var old_text = pageobj.getPageText();
text = old_text.replace('below this line -->', 'below this line -->\n' + added_data);
if (text === old_text) {
statelem.error('failed to find target spot for the discussion');
return $.Deferred().reject();
}
}
pageobj.setPageText(text);
pageobj.setEditSummary('Adding ' + params.action + ' nomination of [[:' + Morebits.pageNameNorm + ']].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchDiscussion'));
pageobj.setCreateOption('recreate');
return pageobj.save();
});
};
Cfd.prototype.getDiscussionWikitext = function () {
return (0,_utils__WEBPACK_IMPORTED_MODULE_4__.makeTemplate)('subst:' + this.params.xfdcat + '2', {
text: Morebits.string.formatReasonText(this.params.reason, true),
1: mw.config.get('wgTitle'),
2: this.params.cfdtarget,
3: this.params.cfdtarget2,
});
};
Cfd.prototype.getNotifyText = function () {
return ((0,_utils__WEBPACK_IMPORTED_MODULE_4__.makeTemplate)('subst:cfd notice', {
action: this.params.action,
1: Morebits.pageNameNorm,
stub: mw.config.get('wgNamespaceNumber') === 10 ? 'yes' : null,
}) + ' [[వాడుకరి:Veeven|వీవెన్]] ([[వాడుకరి చర్చ:Veeven|చర్చ]]) 15:49, 15 నవంబరు 2021 (UTC)');
};
Cfd.prototype.getUserspaceLoggingExtraInfo = function () {
var params = this.params, text = '';
text += ' (' + params.xfdcat + ')';
if (params.cfdtarget) {
var categoryOrTemplate = params.xfdcat.charAt(0) === 's' ? 'Template:' : ':Category:';
text += '; ' + params.action + ' to [[' + categoryOrTemplate + params.cfdtarget + ']]';
if (params.xfdcat === 'CfS' && params.cfdtarget2) {
text += ', [[' + categoryOrTemplate + params.cfdtarget2 + ']]';
}
}
return text;
};
Cfd.venueCode = 'CfD';
Cfd.venueLabel = 'CfD (Categories for discussion)';
return Cfd;
}(_core__WEBPACK_IMPORTED_MODULE_5__.XfdMode));
var Cfds = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(Cfds, _super);
function Cfds() {
return _super !== null && _super.apply(this, arguments) || this;
}
Cfds.prototype.getMenuTooltip = function () {
return 'Nominate article for deletion or move';
};
Cfds.prototype.getFieldsetLabel = function () {
return 'Categories for speedy renaming';
};
Cfds.prototype.getVenueWarning = function () {
if ([10, 14].indexOf(mw.config.get('wgNamespaceNumber')) === -1) {
return 'CfD is only for categories and stub templates.';
}
};
Cfds.prototype.generateFieldset = function () {
this.fieldset = _super.prototype.generateFieldset.call(this);
this.fieldset.append({
type: 'select',
label: 'C2 sub-criterion: ',
name: 'xfdcat',
tooltip: 'See WP:CFDS for full explanations.',
list: [
{
type: 'option',
label: 'C2A: Typographic and spelling fixes',
value: 'C2A',
selected: true,
},
{ type: 'option', label: 'C2B: Naming conventions and disambiguation', value: 'C2B' },
{
type: 'option',
label: 'C2C: Consistency with names of similar categories',
value: 'C2C',
},
{ type: 'option', label: 'C2D: Rename to match article name', value: 'C2D' },
{ type: 'option', label: 'C2E: Author request', value: 'C2E' },
{ type: 'option', label: 'C2F: One eponymous article', value: 'C2F' },
],
});
this.fieldset.append({
type: 'input',
name: 'cfdstarget',
label: 'New name: ',
required: true,
});
this.appendReasonArea();
return this.fieldset;
};
Cfds.prototype.preprocessParams = function () {
if (this.params.cfdstarget) {
// Add namespace if not given (CFDS)
this.params.cfdstarget = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.addNs)(this.params.cfdstarget, 14);
}
};
Cfds.prototype.evaluate = function () {
var _this = this;
_super.prototype.evaluate.call(this);
this.tm.add(this.tagPage, []);
this.tm.add(this.addToList, [], this.printReasonText);
this.tm.add(this.addToLog, [this.addToList]);
this.tm.execute().then(function () { return _this.redirectToDiscussion(); });
};
Cfds.prototype.tagPage = function () {
var _this = this;
var params = this.params;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(mw.config.get('wgPageName'), 'Tagging category with rename tag');
pageobj.setFollowRedirect(true);
return pageobj.load().then(function () {
var text = pageobj.getPageText();
params.tagText =
'<!--BEGIN CFD TEMPLATE-->
<!-- Please do not remove or change this [[Template:Cfr-speedy]] message until the survey and discussion at [[WP:CFD]] is closed -->
{{#ifeq:{{NAMESPACE}}|వాడుకరి| |{{error:not substituted|Cfr-speedy}}<div style="display:none;">}}
{{Cfr-speedy full|&#39; + params.cfdstarget.replace(/^:?Category:/, &#39;&#39;) + &#39;|month=November|year=2021|timestamp = 20211115154943}}
<!-- End of Cfr-speedy message, feel free to edit beyond this point -->
<!--END CFD TEMPLATE-->
\n';
if (pageobj.canEdit()) {
pageobj.setPageText(params.tagText + text);
pageobj.setEditSummary('Listed for speedy renaming; see [[WP:CFDS|Categories for discussion/Speedy]].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchPage'));
pageobj.setCreateOption('recreate'); // since categories can be populated without an actual page at that title
return pageobj.save();
}
else {
return _this.autoEditRequest(pageobj);
}
});
};
Cfds.prototype.addToList = function () {
var _this = this;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page('Wikipedia:Categories for discussion/Speedy', 'Adding discussion to the list');
pageobj.setFollowRedirect(true);
return pageobj.load().then(function () {
var old_text = pageobj.getPageText();
var statelem = pageobj.getStatusElement();
var text = old_text.replace('BELOW THIS LINE -->', 'BELOW THIS LINE -->\n' + _this.getDiscussionWikitext());
if (text === old_text) {
statelem.error('failed to find target spot for the discussion');
return $.Deferred().reject();
}
pageobj.setPageText(text);
pageobj.setEditSummary('Adding [[:' + Morebits.pageNameNorm + ']].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchDiscussion'));
pageobj.setCreateOption('recreate');
return pageobj.save();
});
};
Cfds.prototype.getDiscussionWikitext = function () {
var params = this.params;
return ('* [[:' +
Morebits.pageNameNorm +
']] to [[:' +
params.cfdstarget +
']]\u00A0\u2013 ' +
params.xfdcat +
(params.reason ? ': ' + Morebits.string.formatReasonText(params.reason) : '.') +
' [[వాడుకరి:Veeven|వీవెన్]] ([[వాడుకరి చర్చ:Veeven|చర్చ]]) 15:49, 15 నవంబరు 2021 (UTC)');
// U+00A0 NO-BREAK SPACE; U+2013 EN RULE
};
Cfds.prototype.getUserspaceLoggingExtraInfo = function () {
var params = this.params, text = '';
text += ' (' + params.xfdcat + ')';
// Ensure there's more than just 'Category:'
if (params.cfdstarget && params.cfdstarget.length > 9) {
text += '; New name: [[:' + params.cfdstarget + ']]';
}
return text;
};
Cfds.venueCode = 'CfDS';
Cfds.venueLabel = 'CfDS (Categories for speedy renaming)';
return Cfds;
}(_core__WEBPACK_IMPORTED_MODULE_5__.XfdMode));
var Mfd = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(Mfd, _super);
function Mfd() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.discussionPagePrefix = 'Wikipedia:Miscellany for deletion';
return _this;
}
Mfd.isDefaultChoice = function () {
return ([0, 6, 10, 14, 828].indexOf(mw.config.get('wgNamespaceNumber')) === -1 ||
Morebits.pageNameNorm.indexOf('Template:User ', 0) === 0);
};
Mfd.prototype.getMenuTooltip = function () {
return 'Nominate article for deletion or move';
};
Mfd.prototype.getFieldsetLabel = function () {
return 'Miscellany for deletion';
};
Mfd.prototype.generateFieldset = function () {
this.fieldset = _super.prototype.generateFieldset.call(this);
this.fieldset.append({
type: 'checkbox',
list: [
{
label: 'Wrap deletion tag with <noinclude>',
value: 'noinclude',
name: 'noinclude',
tooltip: "Will wrap the deletion tag in &lt;noinclude&gt; tags, so that it won't transclude. Select this option for userboxes.",
},
],
});
if ((mw.config.get('wgNamespaceNumber') === 2 /* User: */ ||
mw.config.get('wgNamespaceNumber') === 3) /* User talk: */ &&
mw.config.exists('wgRelevantUserName')) {
this.fieldset.append({
type: 'checkbox',
list: [
{
label: 'Notify owner of userspace (if they are not the page creator)',
value: 'notifyuserspace',
name: 'notifyuserspace',
tooltip: 'If the user in whose userspace this page is located is not the page creator (for example, the page is a rescued article stored as a userspace draft), notify the userspace owner as well.',
checked: true,
},
],
});
}
this.appendReasonArea();
return this.fieldset;
};
Mfd.prototype.preprocessParams = function () {
this.params.userspaceOwner = mw.config.get('wgRelevantUserName');
};
Mfd.prototype.evaluate = function () {
var _this = this;
_super.prototype.evaluate.call(this);
this.tm.add(this.determineDiscussionPage, []);
this.tm.add(this.tagPage, [this.determineDiscussionPage]);
this.tm.add(this.addToList, [this.determineDiscussionPage]);
this.tm.add(this.createDiscussionPage, [this.determineDiscussionPage], this.printReasonText);
this.tm.add(this.fetchCreatorInfo, []);
this.tm.add(this.notifyCreator, [this.fetchCreatorInfo]);
this.tm.add(this.notifyUserspaceOwner, [this.fetchCreatorInfo]);
this.tm.add(this.addToLog, [this.notifyCreator, this.notifyUserspaceOwner]);
this.tm.execute().then(function () { return _this.redirectToDiscussion(); });
};
Mfd.prototype.tagPage = function () {
var _this = this;
var params = this.params;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(mw.config.get('wgPageName'), 'Tagging page with deletion tag');
pageobj.setFollowRedirect(true); // should never be needed, but if the page is moved, we would want to follow the redirect
return pageobj.load().then(function () {
var text = pageobj.getPageText();
params.tagText =
'{{' + (params.number === '' ? 'mfd' : 'mfdx|' + params.number) + '|help=off}}';
if (['javascript', 'css', 'sanitized-css'].indexOf(mw.config.get('wgPageContentModel')) !== -1) {
params.tagText = '/* ' + params.tagText + ' */\n';
}
else {
params.tagText += '\n';
if (params.noinclude) {
params.tagText = '<noinclude>' + params.tagText + '</noinclude>';
}
}
if (pageobj.canEdit() &&
['wikitext', 'javascript', 'css', 'sanitized-css'].indexOf(pageobj.getContentModel()) !== -1) {
pageobj.setPageText(params.tagText + text);
pageobj.setEditSummary('Nominated for deletion; see [[:' + params.discussionpage + ']].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchPage'));
pageobj.setCreateOption('nocreate');
return pageobj.save();
}
else {
return _this.autoEditRequest(pageobj);
}
});
};
Mfd.prototype.createDiscussionPage = function () {
var _this = this;
var params = this.params;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(params.discussionpage, 'Creating deletion discussion page');
return pageobj.load().then(function () {
pageobj.setPageText(_this.getDiscussionWikitext());
pageobj.setEditSummary('Creating deletion discussion page for [[:' + Morebits.pageNameNorm + ']].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchDiscussion'));
pageobj.setCreateOption('createonly');
return pageobj.save();
});
};
Mfd.prototype.getDiscussionWikitext = function () {
return (0,_utils__WEBPACK_IMPORTED_MODULE_4__.makeTemplate)('subst:mfd2', {
text: Morebits.string.formatReasonText(this.params.reason, true),
pg: Morebits.pageNameNorm,
});
};
Mfd.prototype.addToList = function () {
var params = this.params;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page('Wikipedia:Miscellany for deletion', "Adding discussion to today's list");
pageobj.setPageSection(2);
pageobj.setFollowRedirect(true);
return pageobj.load().then(function () {
var text = pageobj.getPageText();
var statelem = pageobj.getStatusElement();
var date = new Morebits.date(pageobj.getLoadTime());
var date_header = date.format('===MMMM D, YYYY===\n', 'utc');
var date_header_regex = new RegExp(date.format('(===[\\s]*MMMM[\\s]+D,[\\s]+YYYY[\\s]*===)', 'utc'));
var added_data = '{{Wikipedia:Miscellany for deletion/' + Morebits.pageNameNorm + params.numbering + '}}
';
if (date_header_regex.test(text)) {
// we have a section already
statelem.info("Found today's section, proceeding to add new entry");
text = text.replace(date_header_regex, '$1\n' + added_data);
}
else {
// we need to create a new section
statelem.info('No section for today found, proceeding to create one');
text = text.replace('===', date_header + added_data + '\n\n===');
}
pageobj.setPageText(text);
pageobj.setEditSummary('Adding [[:' + params.discussionpage + ']].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchList'));
pageobj.setCreateOption('recreate');
return pageobj.save();
});
};
Mfd.prototype.notifyUserspaceOwner = function () {
var params = this.params;
// Notify the user who owns the subpage if they are not the creator
if (params.notifyuserspace && params.userspaceOwner !== params.initialContrib) {
// Don't log if notifying creator above, will log then
return this.notifyTalkPage(params.userspaceOwner, new Morebits.status('Notifying owner of userspace (' + params.userspaceOwner + ')'));
}
else {
return $.Deferred().resolve();
}
};
Mfd.prototype.getNotifyText = function () {
var text = "{{subst:mfd notice";
if (this.params.numbering) {
text += "|order=&#32;" + this.params.numbering;
}
text += "|1=" + Morebits.pageNameNorm + "}} [[వాడుకరి:Veeven|వీవెన్]] ([[వాడుకరి చర్చ:Veeven|చర్చ]]) 15:49, 15 నవంబరు 2021 (UTC)";
return text;
};
Mfd.prototype.getUserspaceLoggingExtraInfo = function () {
var params = this.params, text = '';
if (params.notifyuserspace &&
params.userspaceOwner &&
params.userspaceOwner !== params.initialContrib) {
text += '; notified {{user|1=' + params.userspaceOwner + '}}';
}
return text;
};
Mfd.venueCode = 'mfD';
Mfd.venueLabel = 'MfD (Miscellany for deletion)';
return Mfd;
}(_core__WEBPACK_IMPORTED_MODULE_5__.XfdMode));
var Rfd = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(Rfd, _super);
function Rfd() {
return _super !== null && _super.apply(this, arguments) || this;
}
Rfd.isDefaultChoice = function () {
return !!mw.config.get('wgIsRedirect') || !!document.getElementById('softredirect');
};
Rfd.prototype.getFieldsetLabel = function () {
return 'Redirects for discussion';
};
Rfd.prototype.getMenuTooltip = function () {
return 'Nominate redirect to be deleted or retargeted';
};
Rfd.prototype.getUserspaceLoggingExtraInfo = function () {
var params = this.params, text = '';
if (params.rfdtarget) {
text += '; Target: [[:' + params.rfdtarget + ']]';
if (params.relatedpage) {
text += ' (notified)';
}
}
return text;
};
Rfd.prototype.generateFieldset = function () {
this.fieldset = _super.prototype.generateFieldset.call(this);
this.fieldset.append({
type: 'checkbox',
list: [
{
label: 'Notify target page if possible',
value: 'relatedpage',
name: 'relatedpage',
tooltip: "A notification template will be placed on the talk page of this redirect's target if this is true.",
checked: true,
},
],
});
this.appendReasonArea();
return this.fieldset;
};
Rfd.prototype.preview = function (form) {
var _this = this;
this.params = Morebits.quickForm.getInputData(form);
this.findTarget().then(function () {
_this.showPreview(form);
});
};
Rfd.prototype.evaluate = function () {
var _this = this;
_super.prototype.evaluate.call(this);
this.tm.add(this.findTarget, []);
this.tm.add(this.tagPage, [this.findTarget]);
this.tm.add(this.addToList, [this.findTarget, this.tagPage], this.printReasonText);
this.tm.add(this.fetchCreatorInfo, []);
this.tm.add(this.notifyCreator, [this.fetchCreatorInfo, this.tagPage]);
this.tm.add(this.notifyTargetTalk, [this.fetchCreatorInfo, this.tagPage]);
this.tm.add(this.addToLog, [this.notifyCreator]);
this.tm.execute().then(function () { return _this.redirectToDiscussion(); });
};
// Creates: params.rfdtarget, params.curtimestamp, params.section, params.logpage, params.discussionpage
Rfd.prototype.findTarget = function () {
var _this = this;
// Used by regular redirects to find the target, but for all redirects,
// avoid relying on the client clock to build the log page
var isSoftRedirect = !!document.getElementById('softredirect');
var query = {
action: 'query',
curtimestamp: true,
format: 'json',
// Find current target of redirect (for hard redirects only)
titles: !isSoftRedirect && mw.config.get('wgPageName'),
redirects: !isSoftRedirect,
};
if (isSoftRedirect) {
// For soft redirects, define the target early
// to skip target checks in findTargetCallback
this.params.rfdtarget = document
.getElementById('softredirect')
.textContent.replace(/^:+/, '');
}
var wikipedia_api = new _core__WEBPACK_IMPORTED_MODULE_6__.Api('Finding target of redirect', query);
return wikipedia_api.post().then(function (apiobj) {
var response = apiobj.getResponse();
_this.params.curtimestamp = response.curtimestamp;
var date = new Morebits.date(_this.params.curtimestamp);
_this.params.logpage =
'Wikipedia:Redirects for discussion/Log/' + date.format('YYYY MMMM D', 'utc');
_this.params.discussionpage = _this.params.logpage + '#' + Morebits.pageNameNorm;
if (!isSoftRedirect) {
var target = response.query.redirects && response.query.redirects[0].to;
if (!target) {
var message = 'No target found. this page does not appear to be a redirect, aborting';
if (mw.config.get('wgAction') === 'history') {
message +=
'. If this is a soft redirect, try again from the content page, not the page history.';
}
apiobj.getStatusElement().error(message);
return $.Deferred().reject();
}
_this.params.rfdtarget = target;
_this.params.section = response.query.redirects[0].tofragment;
}
});
};
Rfd.prototype.tagPage = function () {
var _this = this;
var params = this.params;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(mw.config.get('wgPageName'), 'Adding deletion tag to redirect');
pageobj.setFollowRedirect(false);
return pageobj.load().then(function () {
var text = pageobj.getPageText();
// Imperfect for edit request but so be it
params.tagText =
'{{Rfd/core||month = November
|day = 15
|year = 2021
|time = 15:49
|timestamp = 20211115154943}}
<!-- Do not use the "Rfd/core" template directly; the above line is generated by {{subst:Rfd}}. -->
<!-- End of RFD message. Feel free to edit beyond this point. -->
');
pageobj.setEditSummary('Listed for discussion at [[:' + params.discussionpage + ']].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchPage'));
pageobj.setCreateOption('nocreate');
return pageobj.save();
}
else {
return _this.autoEditRequest(pageobj);
}
});
};
Rfd.prototype.getDiscussionWikitext = function () {
var params = this.params;
return (0,_utils__WEBPACK_IMPORTED_MODULE_4__.makeTemplate)('subst:rfd2', {
text: (params.reason ? Morebits.string.formatReasonText(params.reason) : '') + ' [[వాడుకరి:Veeven|వీవెన్]] ([[వాడుకరి చర్చ:Veeven|చర్చ]]) 15:49, 15 నవంబరు 2021 (UTC)',
redirect: Morebits.pageNameNorm,
target: params.rfdtarget && params.rfdtarget + (params.section ? '#' + params.section : ''),
});
};
Rfd.prototype.addToList = function () {
var _this = this;
var params = this.params;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(params.logpage, "Adding discussion to today's log");
pageobj.setFollowRedirect(true);
return pageobj.load().then(function () {
var statelem = pageobj.getStatusElement();
var added_data = _this.getDiscussionWikitext();
var text;
// add date header if the log is found to be empty (a bot should do this automatically)
if (!pageobj.exists()) {
text = '{{subst:RfD log}}' + added_data;
}
else {
var old_text = pageobj.getPageText();
text = old_text.replace(/(<!-- Add new entries directly below this line\.? -->)/, '$1\n' + added_data);
if (text === old_text) {
statelem.error('failed to find target spot for the discussion');
return $.Deferred().reject();
}
}
pageobj.setPageText(text);
pageobj.setEditSummary('Adding [[:' + Morebits.pageNameNorm + ']].');
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchDiscussion'));
pageobj.setCreateOption('recreate');
return pageobj.save();
});
};
Rfd.prototype.notifyTargetTalk = function () {
if (!this.params.relatedpage) {
return $.Deferred().resolve();
}
var targetTalk = new mw.Title(this.params.rfdtarget).getTalkPage();
var statelem = new Morebits.status('Notifying target talk page', 'doing');
// On the offchance it's a circular redirect
if (this.params.rfdtarget === mw.config.get('wgPageName')) {
statelem.warn('Circular redirect; skipping target page notification');
return $.Deferred().resolve();
}
if (document.getElementById('softredirect')) {
statelem.warn('Soft redirect; skipping target page notification');
return $.Deferred().resolve();
}
// Don't issue if target talk is the initial contributor's talk or your own
if (targetTalk.getNamespaceId() === 3 &&
targetTalk.getNameText() === this.params.initialContrib) {
statelem.warn('Target is initial contributor; skipping target page notification');
return $.Deferred().resolve();
}
if (targetTalk.getNamespaceId() === 3 &&
targetTalk.getNameText() === mw.config.get('wgUserName')) {
statelem.warn('You (' +
mw.config.get('wgUserName') +
') are the target; skipping target page notification');
return $.Deferred().resolve();
}
return this.notifyTalkPage(targetTalk.toText(), statelem);
};
Rfd.venueCode = 'RfD';
Rfd.venueLabel = 'RfD (Redirects for discussion)';
return Rfd;
}(_core__WEBPACK_IMPORTED_MODULE_5__.XfdMode));
var Rm = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(Rm, _super);
function Rm() {
return _super !== null && _super.apply(this, arguments) || this;
}
Rm.prototype.getFieldsetLabel = function () {
return 'Requested moves';
};
Rm.prototype.getVenueWarning = function () {
if (mw.config.get('wgNamespaceNumber') === 14) {
// category
return 'Please use CfD or CfDS for category renames.';
}
};
Rm.prototype.generateFieldset = function () {
var _this = this;
this.fieldset = _super.prototype.generateFieldset.call(this);
this.fieldset.append({
type: 'checkbox',
list: [
{
label: 'Uncontroversial technical request',
value: 'rmtr',
name: 'rmtr',
tooltip: 'Use this option when you are unable to perform this uncontroversial move yourself because of a technical reason (e.g. a page already exists at the new title, or the page is protected)',
checked: false,
event: function (evt) {
_this.result.newname.required = evt.target.checked;
},
},
],
});
this.fieldset.append({
type: 'input',
name: 'newname',
label: 'New title: ',
tooltip: 'Required for technical requests. Otherwise, if unsure of the appropriate title, you may leave it blank.',
});
this.appendReasonArea();
return this.fieldset;
};
Rm.prototype.getDiscussionWikitext = function () {
var pageName = new mw.Title(Morebits.pageNameNorm).getSubjectPage().toText();
var params = this.params;
return ((params.rmtr
? '{{subst:RMassist|1=' + pageName + '|2=' + params.newname
: '{{subst:Requested move|current1=' + pageName + '|new1=' + params.newname) +
'|reason=' +
params.reason +
'}}');
};
Rm.prototype.preprocessParams = function () {
this.params.discussionpage = this.params.rmtr
? 'Wikipedia:Requested moves/Technical requests'
: new mw.Title(Morebits.pageNameNorm).getTalkPage().toText();
};
Rm.prototype.showPreview = function (form) {
var templatetext = this.getDiscussionWikitext();
form.previewer.beginRender(templatetext, this.params.discussionpage);
};
Rm.prototype.evaluate = function () {
var _this = this;
_super.prototype.evaluate.call(this);
this.tm.add(this.addToList, [], this.printReasonText);
this.tm.add(this.addToLog, [this.addToList]);
this.tm.execute().then(function () { return _this.redirectToDiscussion(); });
};
Rm.prototype.addToList = function () {
return this.params.rmtr ? this.listAtRMTR() : this.listAtTalk();
};
Rm.prototype.listAtTalk = function () {
var params = this.params;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(params.discussionpage, 'Adding entry on talk page');
pageobj.setAppendText('\n\n' + this.getDiscussionWikitext());
pageobj.setFollowRedirect(true);
pageobj.setEditSummary('Proposing move' + (params.newname ? ' to [[:' + params.newname + ']]' : ''));
pageobj.setCreateOption('recreate'); // since the talk page need not exist
pageobj.setWatchlist((0,_core__WEBPACK_IMPORTED_MODULE_3__.getPref)('xfdWatchDiscussion'));
return pageobj.append();
};
Rm.prototype.listAtRMTR = function () {
var _this = this;
var pageobj = new _core__WEBPACK_IMPORTED_MODULE_2__.Page(this.params.discussionpage, 'Adding entry at WP:RM/TR');
pageobj.setFollowRedirect(true);
pageobj.setPageSection(2);
return pageobj.load().then(function () {
var text = pageobj.getPageText();
var statelem = pageobj.getStatusElement();
var hiddenCommentRE = /---- and enter on a new line.* -->/;
var newtext = text.replace(hiddenCommentRE, '$&\n' + _this.getDiscussionWikitext());
if (text === newtext) {
statelem.error('failed to find target spot for the entry');
return $.Deferred().reject();
}
pageobj.setPageText(newtext);
pageobj.setEditSummary('Adding [[:' + Morebits.pageNameNorm + ']].');
return pageobj.save();
});
};
Rm.prototype.getUserspaceLoggingExtraInfo = function () {
var params = this.params, text = '';
if (params.rmtr) {
text += ' (technical)';
}
if (params.newname) {
text += '; New name: [[:' + params.newname + ']]';
}
return text;
};
Rm.venueCode = 'RM';
Rm.venueLabel = 'RM (Requested moves)';
return Rm;
}(_core__WEBPACK_IMPORTED_MODULE_5__.XfdMode));
_core__WEBPACK_IMPORTED_MODULE_5__.XfdCore.modeList = [Afd, Rfd, Cfd, Cfds, Tfd, Ffd, Mfd, Rm];
var Xfd = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(Xfd, _super);
function Xfd() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.footerlinks = {
'About deletion discussions': 'WP:XFD',
'XfD prefs': 'WP:TW/PREF#xfd',
'Twinkle help': 'WP:TW/DOC#xfd',
'Give feedback': 'WT:TW',
};
return _this;
}
Xfd.userPreferences = function () {
var prefs = _super.userPreferences.call(this);
prefs.preferences = prefs.preferences.concat([
{
name: 'noLogOnXfdNomination',
label: 'Do not create a userspace log entry when nominating at this venue',
type: 'set',
setValues: {
afd: 'AfD',
tfd: 'TfD',
ffd: 'FfD',
cfd: 'CfD',
cfds: 'CfD/S',
mfd: 'MfD',
rfd: 'RfD',
rm: 'RM',
},
default: [],
},
// TwinkleConfig.xfdWatchRelated (string)
// The watchlist setting of the target of a redirect being nominated for RfD.
{
name: 'xfdWatchRelated',
label: "Add the redirect's target page to watchlist (when notifying)",
helptip: 'This only applies for RfD, when leaving a notification on the talk page of the target of the redirect',
type: 'enum',
enumValues: _core__WEBPACK_IMPORTED_MODULE_3__.Config.watchlistEnums,
default: 'default',
},
{
name: 'markXfdPagesAsPatrolled',
label: 'Mark page as patrolled/reviewed when nominating for AFD (if possible)',
type: 'boolean',
default: true,
},
]);
return prefs;
};
return Xfd;
}(_core__WEBPACK_IMPORTED_MODULE_5__.XfdCore));
 
 
 
/***/ }),
 
/***/ "./node_modules/twinkle-core/i18n/en.json":
/*!************************************************!*\
!*** ./node_modules/twinkle-core/i18n/en.json ***!
\************************************************/
/***/ (function(module) {
 
"use strict";
module.exports = JSON.parse('{"@metadata":{"authors":["SD0001"]},"tooltip-mark":"?","relative-today":"[Today at] h:mm A","relative-prevday":"[Yesterday at] h:mm A","relative-nextday":"[Tomorrow at] h:mm A","relative-thisweek":"dddd [at] h:mm A","relative-pastweek":"[Last] dddd [at] h:mm A","relative-other":"YYYY-MM-DD","done":"Done","api-error":"$1 \\"$2\\" occurred while contacting the API.","invalid-token-retrying":"Invalid token. Getting a new token and retrying...","getting-token":"Retrieving token...","opening-page":"Opening page \\"$1\\"","retrieving-page":"Retrieving page...","protected-edit-warning":"You are about to make an edit to the fully protected page \\"$1\\" (protection expiring {{date:$1|relative|utc}} (UTC)).\\n\\nClick OK to proceed with the edit, or Cancel to skip this edit.","protected-indef-edit-warning":"You are about to make an edit to the fully protected page \\"$1\\" (protected indefinitely).\\n\\nClick OK to proceed with the edit, or Cancel to skip this edit.","protected-aborted":"Edit to fully protected page was aborted.","saving-page":"Saving page...","getting-creator":"Retrieving page creation information","token-fetch-fail":"Failed to retrieve edit token.","invalid-title":"The page title is invalid: $1","cross-redirect-abort":"$1 is a cross-namespace redirect to $2, aborted","redirected":"Redirected from $1 to $2","redirect-resolution-fail":"Could not resolve redirects for: $1","api-error-unknown":"Unknown error received from API while saving page","editconflict-purging":"Edit conflict detected, purging server cache","editconflict-retrying":"Edit conflict detected, reapplying edit","save-failed-retrying":"Save failed, retrying in $1 seconds ...","moving-page":"moving page...","batch-starting":"Performing batch operation","batch-no-pages":"no pages specified","batch-done-page":"completed ([[$1]])","batch-progress":"Done ($1/$2 actions completed successfully)","submit":"Submit Query","bullet-separator":" •&#32;","revert-mismatch":"The retrieved revision does not match the requested revision.","revert-curid-fail":"Failed to retrieve current revision ID.","revert-user-fail":"Failed to retrieve user who made the revision.","revert-summary":"Restored revision $1 by $2","hidden-user":"an unknown user","querying-user":"Querying user \\"$1\\"","fetching-userinfo":"Retrieving user information...","failed-timestamp":"Failed to retrieve current timestamp.","failed-token":"Failed to retrieve token.","failed-userinfo":"Failed to retrieve user info for $1.","already-blocked-indef":"$1 is already blocked (indefinitely; by $2), would you like to override the block?","already-blocked":"$1 is already blocked (until {{date:$2|relative}}; by $3), would you like to override the block?","reblock-aborted":"Reblock aborted","invalid-block-expiry":"You must provide a valid block expiration.","ip-indef-confirm":"$1 is an IP address, do you really want to block it indefinitely? \\n\\nClick OK to proceed with the block, or Cancel to abort.","ip-indef-aborted":"Indefinite block of IP address was aborted.","admin-block-confirm":"$1 is an administrator, are you sure you want to block them? \\n\\nClick OK to proceed with the block, or Cancel to abort.","admin-block-aborted":"Block of administrator was aborted.","partial-usertalk":"Partial blocks cannot prevent talk page access unless also restricting {{ns:3}} namespace.","blocking":"blocking user...","not-blocked":"User is not blocked.","indirect-block":"User is not directly blocked, but rather $1 is.","unblocking":"unblocking user...","notify-fail-iprange":"Cannot notify IP ranges","notify-self-skip":"You ($1) created this page; skipping user notification","notify-fail-noexist":"Cannot notify the user because the user does not exist.","notify-fail-template":"User talk page transcludes {{$1}}, aborting notification","notify-fail-optout":"User has opted out of this notification, aborting","notify-fail-bot":"User is a bot, aborting notification","notify-fail-blocked":"User is indefinitely blocked, aborting notification","notifying-user":"Notifying $1","watching-user":"Watching user page...","info":"Info","note":"Note","error":"Error","link-rollback":"rollback","link-vandalism":"vandalism","link-goodfaith-rollback":"rollback (AGF)","restore-revision":"restore this version","fetching-data":"Grabbing data of earlier revisions","saving-reverted":"Saving reverted contents","prompt-reason-restore":"Please specify a reason for the revert: ","reversion-complete":"Reversion completed","cant-edit-protected":"Unable to edit the page, it\'s probably protected.","no-revisions":"We have less than one additional revision, thus impossible to revert.","bad-revid":"The most recent revision ID received from the server, <strong>$1</strong>, is less than the ID of the displayed revision. This could indicate that the current revision has been deleted, the server is lagging, or that bad data has been received. Stopping revert.","revid-mismatch":"Latest revision <strong>$1</strong> doesn\'t equal our revision <strong>$2</strong>","latest-rev-same-user":"Latest revision was also made by <strong>$1</strong>. As we assume vandalism, we will proceed to revert.","latest-rev-same-64":"Latest revision was made by <strong>$1</strong>, which is on the same /64 subnet. As we assume vandalism, we will proceed to revert.","latest-rev-other-user-goodfaith":"Latest revision was made by <strong>$1</strong>. As we assume good faith, we will stop the revert, as the problem might have been fixed.","latest-rev-other-user":"Latest revision was made by <strong>$1</strong>, but we will stop the revert.","latest-rev-bot":"Latest revision was made by <strong>$1</strong>, a trusted bot, and the revision before was made by our vandal, so we will proceed with the revert.","latest-rev-reverted":"Latest revision was made by <strong>$1</strong>, so it might have already been reverted, we will stop the revert.","bot-revert":"Vandalism revert was chosen on <strong>$1</strong>. As this is a trusted bot, we assume you wanted to revert vandalism made by the previous user instead.","bot-revert-goodfaith":"Good faith revert was chosen on <strong>$1</strong>. This is a trusted bot and thus AGF rollback will not proceed.","bot-revert-prompt":"Normal revert was chosen, but the most recent edit was made by a trusted bot ($1). Do you want to revert the revision before instead?","bot-revert-previous":"Normal revert was chosen on <strong>$1</strong>. This is a trusted bot, and per confirmation, we\'ll revert the previous revision instead.","bot-revert-selected":"Normal revert was chosen on <strong>$1</strong>. This is a trusted bot, but per confirmation, revert on selected revision will proceed.","ipv6-same-user":"Treating consecutive IPv6 addresses in the same /64 as the same user","no-previous-revision":"No previous revision found. Perhaps <strong>$1</strong> is the only contributor, or they have made more than {{formatnum:$2}} edits in a row.","no-edits-revert":"As it is not possible to revert zero revisions, we will stop this revert. It could be that the edit has already been reverted, but the revision ID was still the same.","revert-multiple-prompt":"$1 has made {{formatnum:$2}} edits in a row. Are you sure you want to revert them all?","stopping":"Stopping revert.","revision-age":" revision <strong>$1</strong> that was made <strong>{{formatnum:$2}}</strong> revisions ago by $3","summary-prompt":"An optional comment for the edit summary: ","user-aborted":"Aborted by user.","restore-summary":"Restored revision $1 by %USER%","goodfaith-summary":"Reverted good faith edits by %USER%","vandalism-summary":"Reverted {{formatnum:$1}} {{plural:$1|edit|edits}} by %USER% to last revision by $2","normal-summary":"Reverted {{formatnum:$1}} {{plural:$1|edit|edits}} by %USER%","revert-confirm":"Reverting page: are you sure?","revert-complete":"Reversion completed","opening-talk":"Opening user talk page edit form for user <strong>$1</strong>","pcreview-comment":"Automatically reviewing reversion","pcreview-accepting":"Automatically accepting your changes","diff-last":"Last","diff-last-tooltip":"Show most recent diff","diff-since":"Since","diff-since-tooltip":"Show difference between last diff and the revision made by previous user","diff-sincemine":"Since mine","diff-sincemine-tooltip":"Show difference between last diff and my last revision","diff-current":"Current","diff-current-tooltip":"Show difference to current revision","diff-error":"no suitable earlier revision found, or $1 is the only contributor. Aborting.","reason":"Reason:","reason-tooltip":"You can use wikimarkup in your reason. Twinkle will automatically sign your post.","loading":"Loading...","select-all":"Select All","deselect-all":"Deselect All","fetching-list":"Grabbing list of pages","option-delete":"Delete pages","option-talks":"Delete associated talk pages (except user talk pages)","option-redirects":"Delete redirects to deleted pages","option-subpages":"Delete subpages of deleted pages","option-subpage-talks":"Delete talk pages of deleted subpages","option-subpage-redirects":"Delete redirects to deleted subpages","option-subpage-unlink":"Unlink backlinks to each deleted subpage (in Main and Portal namespaces only)","option-unlink":"Unlink backlinks to each page (in Main and Portal namespaces only)","option-unlink-file":"Remove usages of each file (in all namespaces)","pages-label":"Pages to delete","complete":"Batch deletion is now complete","confirm-protected":"You are about to delete {{formatnum:$1}} fully protected page(s). Are you sure?","dbatch-give-reason":"You need to give a reason, you cabal crony!","dbatch-no-pages":"nothing to delete, aborting","deleting":"Deleting pages","starting":"Initiating requested tasks","deleting-page":"Deleting page $1","deleting-subpages":"Deleting subpages","deleting-subpage":"Deleting subpage $1","fetching-backlinks":"Grabbing backlinks","fetching-filelinks":"Grabbing file links","fetching-redirects":"Grabbing redirects","check-talk":"Checking whether talk page exists","deleting-redirects":"Deleting redirects to $1","delete-redirect-summary":"Redirect to deleted page \\"$1\\"","deleting-talk":"Deleting talk page of page $1","delete-talk-summary":"Talk page of deleted page \\"$1\\"","unlink-page":"Unlinking backlinks to $1","unlink-on":"Unlinking on $1","unlink-summary":"Removing link(s) to deleted page $1","unlink-img-on":"Removing file usages on $1","img-comment":"Commented out because image was deleted","unlink-img-summary":"Removing instance of file $1 that has been deleted because \\"$2\\"","undbatch-restore-talks":"Restore talk pages of undeleted pages if they existed","undbatch-pages-label":"Pages to undelete","undbatch-complete":"Batch undeletion is now complete","undbatch-confirm-protected":"You are about to undelete {{formatnum:$1}} fully create protected page(s). Are you sure?","undbatch-no-pages":"nothing to undelete, aborting","undeleting":"Undeleting pages","undeleting-page":"Undeleting page $1","check-talk-deleted":"Checking talk page for deleted revisions","undeleting-talk-status":"Undeleting talk page of $1","undeleting-talk-summary":"Undeleting talk page of \\"$1\\"","create-protected-indef":"(fully create protected indefinitely)","create-protected":"(fully create protected, expires $1 (UTC))","unlink-title":"Unlinking backlinks","unlink-title-file":"Unlinking backlinks and file usages","unlink-intro":"This tool allows you to unlink all incoming links (\\"backlinks\\") that point to this page. For instance, <code>[[$1|link text]]</code> would become <code>link text</code> and <code>[[$1]]</code> would become <code>$1</code>. Use it with caution.","unlink-intro-file":"This tool allows you to unlink all incoming links (\\"backlinks\\") that point to this page and/or hide all inclusions of this file by wrapping them in &lt;!-- --&gt; comment markup. For instance, <code>[[:$1|link text]]</code> would become <code>link text</code> and <code>[[$1]]</code> would become <code>&lt;!-- [[$1]] --&gt;</code>. Use it with caution.","unlink-give-reason":"You must specify a reason for unlinking.","unlink-select-one":"You must select at least one item to unlink.","unlink-status-links-files":"Unlinking backlinks and instances of file usage","unlink-status-links":"Unlinking backlinks","unlink-status-files":"Unlinking instances of file usage","unlink-in":"Unlinking in page \\"$1\\"","no-file-usage":"No instances of file usage found.","file-usage":"File usage","first-n-files":"First {{formatnum:$1}} file usages shown.","backlinks":"Backlinks","no-backlinks":"No backlinks found.","first-n-links":"First {{formatnum:$1}} backlinks shown.","change-twpref":"You can change this with your Twinkle preferences, linked at the bottom of this Twinkle window","selected-namespaces":"Selected namespaces: {{list:$1}}","commented-out":"Commented out","no-links-files-found":"Didn\'t find any backlinks or file usages on the page.","no-links-found":"Didn\'t find any backlinks on the page.","no-files-found":"Didn\'t find any file usages on the page.","summary-links-files":"Commenting out use(s) of file / Removing link(s) to \\"$1\\"","summary-links":"Removing link(s) to \\"$1\\"","summary-files":"Commenting out use(s) of file to \\"$1\\"","protect-action-type":"Type of action","protect-protect-label":"Protect page","protect-protect-tooltip":"Apply actual protection to the page.","protect-tag-label":"Tag page with protection template","protect-tag-tooltip":"If the protecting admin forgot to apply a protection template, or you have just protected the page without tagging, you can use this to apply the appropriate protection tag.","protect-request-label":"Request page protection","protect-request-tooltip":"If you want to request protection via WP:RPP.","protect-request-sysop-tooltip":"If you want to request protection via WP:RPP instead of doing the protection by yourself.","preset":"Preset","choose-preset":"Choose a preset:","prev-protections":"Previous protections","past-protected":"This page has been protected in the past","sysops-contacted":"Have you attempted to contact the protecting admins ({{list:$1}}) first?","unprotected-time":"unprotected {{date:$1|relative|utc}}","expired-time":"expired {{date:$1|relative|utc}}","expires-time":"expires {{date:$1|relative|utc}}","reset-time":"reset {{date:$1|relative|utc}}","duration-months":"$1 {{plural:$1|month|months}}","protect-options":"Protection options","protect-edit-modify":"Modify edit protection","protect-edit-modify-tooltip":"If this is turned off, the edit protection level, and expiry time, will be left as is.","protect-edit-label":"Edit protection:","protect-move-modify":"Modify move protection","protect-move-modify-tooltip":"If this is turned off, the move protection level, and expiry time, will be left as is.","protect-move-label":"Move protection:","protect-stable-modify":"Modify pending changes protection","protect-stable-modify-tooltip":"If this is turned off, the pending changes level, and expiry time, will be left as is.","protect-stable-label":"Pending changes:","protect-create-label":"Create protection:","protect-reason":"Reason (for protection log):","protect-current-label":"Current protection level","protect-current-none":"<b>no protection</b>","protect-current":"<b>$1: $2</b>","protect-current-cascading":"<b>$1: $2 (cascading)</b>","protect-current-stable":"<b>Pending changes: $1</b>","protect-cascade-from":"<b>Cascading protection</b> from [[$1]]","by-sysop":"by [[{{ns:3}}:$1|$1]]","duration-label":"Duration:","protect-notes-label":"Notes:","note-requested-label":"$1 request","note-requested-tooltip":"Add a note to the protection log that this was requested at $1","note-requested":"requested at $1","request-revid-label":"$1 revision ID","request-revid-tooltip":"Optional revision ID of the $1 page where protection was requested.","protect-select-tag":"Choose protection template:","protect-tag-small-label":"Iconify","protect-tag-small-tooltip":"Will use the |small=yes feature of the template, and only render it as a keylock","protect-tag-noinclude-label":"Wrap protection template with &lt;noinclude&gt;","protect-tag-noinclude-tooltip":"Will wrap the protection template in &lt;noinclude&gt; tags, so that it won\'t transclude","protect-request-preset-label":"Type of protection","protect-request-type-label":"Type and reason:","temporary":"Temporary","custom-expiry-prompt":"Enter a custom expiry time. \\nYou can use relative times, like \\"1 minute\\" or \\"19 days\\", or absolute timestamps, \\"yyyymmddhhmm\\" (e.g. \\"200602011405\\" is Feb 1, 2006, at 14:05 UTC).","all-users":"All","custom-expiry-label":"Custom...","protect-request-exists":"There is already a protection request for this page at [[$1]], aborting.","protect-tag-adding":"Applying protection template","protect-tag-none-status":"nothing to do","protect-tag-exists-prompt":"{{$1}} was found on the page. \\nClick OK to remove it, or click Cancel to leave it there.","protect-tag-removing":"Removing protection template","protect-tag-abort":"Redirect category shell present","nothing-to-do":"nothing to do","block-window-title":"Block or issue block template to $1","block-self-warn":"You are about to block yourself! Are you sure you want to proceed?","block-action":"Block user","block-action-tooltip":"Block the relevant user with the given options. If partial block is unchecked, this will be a sitewide block.","block-partial":"Partial block","block-partial-tooltip":"Enable partial blocks and partial block templates.","block-tag":"Add block template to user talk page","block-tag-tooltip":"Add block template to user talk page","block-64-field-label":"Convert to /64 rangeblock","block-64-help":"It\'s usually fine, if not better, to block the /64 range ([[Special:Contributions/$1|$1]]).","block-64-label":"Block the /64 instead","block-64-template":"Any template issued will go to the original IP: $1","block-tag-options":"Template options","block-block-options":"Block options","block-expiry-indefinite":"indefinite","unblock-label":"Unblock this user","block-custom-expiry":"Custom expiry","block-custom-expiry-tooltip":"You can use relative times, like \\"1 minute\\" or \\"19 days\\", or absolute timestamps, \\"yyyymmddhhmm\\" (e.g. \\"200602011405\\" is Feb 1, 2006, at 14:05 UTC).","fetching-userinfo-error":"Error fetching user info","block-prior-label":"Prior block settings","block-pages-label":"Specific pages to block from editing","block-pages-tooltip":"10 page max.","block-namespaces-label":"Namespace blocks","block-namespaces-tooltip":"Block from editing these namespaces.","block-nocreate-label":"Block account creation","block-noemail-label":"Block user from sending email","block-disabletalk-label":"Prevent this user from editing their own talk page while blocked","block-partial-disabletalk-tooltip":"If issuing a partial block, this MUST remain unchecked unless you are also preventing them from editing User talk space","block-auto-label":"Autoblock any IP addresses used (hardblock)","block-hard-label":"Block logged-in users from using this IP address (hardblock)","block-watch-label":"Watch user and user talk pages","block-reason-label":"Reason (for block log):","block-reason-tooltip":"Consider adding helpful details to the default message.","block-see-label":"See also:","block-see-tooltip":"Insert a \\"see also\\" message to indicate whether the filter log or deleted contributions played a role in the decision to block.","block-see-filter":"Filter log","block-see-deleted":"Deleted contribs","block-tag-template":"Choose talk page template:","block-linked-label":"Linked page","block-linked-tooltip":"A page can be linked within the notice, perhaps if it was the primary target of disruption. Leave empty for no page to be linked.","block-partial-area-label":"Area blocked from","block-partial-area-tooltip":"Optional explanation of the pages or namespaces the user was blocked from editing.","block-tag-expiry":"Period of blocking:","block-tag-expiry-tooltip":"The period the blocking is due for, for example 24 hours, 2 weeks, indefinite etc...","block-tag-reason-label":"You have been blocked for ...","block-tag-reason-tooltip":"An optional reason, to replace the default generic reason. Only available for the generic block templates.","block-tag-noexpiry-label":"Do not include expiry in template","block-tag-noexpiry-tooltip":"Instead of including the duration, make the block template read \\"You have been blocked temporarily...\\"","block-tag-notalk-label":"Talk page access disabled","block-tag-notalk-tooltip":"Make the block template state that the user\'s talk page access has been removed","block-tag-noemail-label":"User blocked from sending email","block-tag-noemail-tooltip":"If the area is not provided, make the block template state that the user\'s email access has been removed","block-tag-nocreate-label":"User blocked from creating accounts","block-tag-nocreate-tooltip":"If the area is not provided, make the block template state that the user\'s ability to create accounts has been removed","select2-badsearch":"Incomplete or invalid search term","block-namespaces-placeholder":"Select namespaces to block user from","block-pages-placeholder":"Select pages to block user from","block-current-partial":"$1 is partially blocked","block-current":"$1 is blocked sitewide","block-current-range":"$1 is blocked sitewide as a rangeblock","block-current-in-range":"$1 is blocked sitewide within a /$2 rangeblock ($3)","block-current-partial-range":"$1 is partially blocked as a rangeblock","block-current-partial-in-range":"$1 is partially blocked within a /$2 rangeblock ($3)","block-expiry-date":"expires {{date:$1|relative|utc}}","block-current-change":"This form will change the existing block.","block-current-add":"This form will add an additional block.","unblocked-ago":"unblocked {{date:$1|relative|utc}}","block-expired":"$1, expired {{date:$2|relative|utc}}","block-log-current":"Previous blocks","block-log-past":"This user has been blocked in the past","block-partial-blank":"No pages or namespaces were selected, nor were email or account creation restrictions applied; please select at least one option to apply a partial block!","block-warn-noexpiry":"Please provide an expiry!","block-warn-indef-ip":"Can\'t indefinitely block an IP address!","block-warn-noreason":"Please provide a reason for the block!","block-doing":"Executing block","block-warn-partial-usertalk":"Partial blocks cannot prevent talk page access unless also restricting them from editing User talk space!","block-conflict":"The block status of $1 has changed. Last block log entry:","block-conflict-block":"Blocked by $1 with comment \\"$2\\". Expiring {{date:$3|relative|utc}}. Do you want to override with your settings?","block-conflict-unblock":"Unblocked by $1 with comment \\"$2\\". ({{date:$3|relative|utc}}.) Do you want to override with your settings?","block-noop":"Please give Twinkle something to do!","block-complete":"Actions complete, loading user talk page in a few seconds","block-tagging-status":"User talk page modification","block-blank-talk":"Blanking talk page per preferences and creating a new talk page section for this month","block-new-section":"Will create a new talk page section for this month, as none was found","search-tags":"Filter tag list:","summary-added":"Added {{list:$1}} {{plural:$2|tag|tags}}","summary-removed":"Removed {{list:$1}} {{plural:$2|tag|tags}}","summary-added-removed":"Added {{list:$1}}; and removed {{list:$2}} {{plural:$3|tag|tags}}","status-added":"Added $1 {{plural:$1|tag|tags}}","status-removed":"Removed $1 {{plural:$1|tag|tags}}","status-added-removed":"Added $1 {{plural:$1|tag|tags}}; Removed $2 {{plural:$2|tag|tags}}","untag-from-read":"For removal of existing tags, please open Tag menu from the current version of article","tags-present-header":"Tags already present","mark-patrolled":"Mark the page as patrolled/reviewed","tag-complete":"Tagging complete, reloading $1 in a few seconds","select-one":"You must select at least one tag!","getting-redirects":"Getting template redirects","cant-reposition":"Failed to find {{$1}} on the page... skip repositioning","cant-remove":"Failed to find {{$1}} on the page... cannot remove","untagging":"Untagging","removing":"Already present tags: removing de-selected tags","resolved-redirect":"Resolved template redirect {{$1}} to {{$2}}","tagging-status":"Tagging $1","tag-fetching-redirects":"Getting redirects for {{list:$1}}","xfd-venue-label":"Deletion discussion venue:","xfd-venue-tooltip":"When activated, a default choice is made, based on what namespace you are in. This default should be the most appropriate.","notify-creator-label":"Notify page creator if possible","notify-creator-tooltip":"A notification template will be placed on the creator\'s talk page if this is true.","deletion-reason-here":"Your deletion rationale is provided below, which you can copy and paste into a new XFD dialog if you wish to try again:","looking-old-nominations":"Looking for prior nominations of this page","bad-venue":"Unrecognised venue: $1","nomination-complete-redirect":"Nomination complete, now redirecting to the discussion page","protected-no-editreq":"Page protected and nowhere to add an edit request, aborting","protected-editreq":"Page protected, requesting edit","posting-editreq":"Automatically posting edit request on talk page","xfd-editreq-title":"Edit request to complete $1 nomination","xfd-editreq-failed":"Unable to add edit request, the talk page may be protected","fetching-creator":"Finding page creator","notifying-creator":"Notifying initial contributor ($1)","pref-logxfdnominations-label":"Keep a log in userspace of all pages you nominate for a deletion discussion (XfD)","pref-logxfdnominations-tooltip":"The userspace log offers a good way to keep track of all pages you nominate for XfD using Twinkle.","pref-xfdlogpagename-label":"Keep the deletion discussion userspace log at this user subpage","pref-xfdlogpagename-tooltip":"Enter a subpage name in this box. You will find your XfD log at User:<i>username</i>/<i>subpage name</i>. Only works if you turn on the XfD userspace log.","pref-xfdwatchpage-label":"Add the nominated page to watchlist","pref-xfdwatchdiscussion-label":"Add the deletion discussion page to watchlist","pref-xfdwatchlist-label":"Add the daily log or list page to the watchlist","pref-xfdwatchlist-tooltip":"This only applies for venues where the discussion takes place on a newly-created page which is transcluded on to a log or list page.","pref-xfdwatchuser-label":"Add user talk page of initial contributor to watchlist (when notifying)"}');
 
/***/ }),
 
/***/ "./src/messages.json":
/*!***************************!*\
!*** ./src/messages.json ***!
\***************************/
/***/ (function(module) {
 
"use strict";
module.exports = JSON.parse('{"@comment":"This file contains project-specific overrides for twinkle-core messages."}');
 
/***/ })
 
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ !function() {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function() { return module['default']; } :
/******/ function() { return module; };
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
!function() {
"use strict";
/*!************************!*\
!*** ./src/twinkle.ts ***!
\************************/
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core */ "./node_modules/twinkle-core/src/twinkle.ts");
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./core */ "./node_modules/twinkle-core/src/siteConfig.ts");
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./core */ "./node_modules/twinkle-core/src/init.ts");
/* harmony import */ var _messages_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./messages.json */ "./src/messages.json");
/* harmony import */ var _mw_messages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mw-messages */ "./src/mw-messages.ts");
/* harmony import */ var _fluff__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./fluff */ "./src/fluff.ts");
/* harmony import */ var _xfd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./xfd */ "./src/xfd.ts");
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./core */ "./node_modules/twinkle-core/src/modules/diffCore.ts");
/* harmony import */ var _globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./globals */ "./src/globals.ts");
 
 
 
// import modules
 
 
// no customisation; import directly from core
 
// register some globals for debugging, as per twinkle v2
 
// Check if account is experienced enough to use Twinkle
if (!Morebits.userIsInGroup('autoconfirmed') && !Morebits.userIsInGroup('confirmed')) {
throw new Error('Twinkle: forbidden!');
}
_core__WEBPACK_IMPORTED_MODULE_1__.Twinkle.userAgent = "Twinkle (" + mw.config.get('wgWikiID') + ")";
_core__WEBPACK_IMPORTED_MODULE_1__.Twinkle.summaryAd = ' ([[Project:TW|TW]])';
_core__WEBPACK_IMPORTED_MODULE_1__.Twinkle.changeTags = '';
_core__WEBPACK_IMPORTED_MODULE_1__.Twinkle.messageOverrides = _messages_json__WEBPACK_IMPORTED_MODULE_2__;
_core__WEBPACK_IMPORTED_MODULE_1__.Twinkle.extraMwMessages = _mw_messages__WEBPACK_IMPORTED_MODULE_3__.default;
// List of module classes enabled
_core__WEBPACK_IMPORTED_MODULE_1__.Twinkle.registeredModules = [_fluff__WEBPACK_IMPORTED_MODULE_4__.Fluff, _core__WEBPACK_IMPORTED_MODULE_5__.DiffCore, _xfd__WEBPACK_IMPORTED_MODULE_6__.Xfd];
/**
* Adjust the following configurations if necessary
* Check the documentation for each property here:
* https://twinkle.toolforge.org/core-docs/modules/siteconfig.html
*/
_core__WEBPACK_IMPORTED_MODULE_7__.SiteConfig.permalinkSpecialPageName = 'Special:PermanentLink';
/* <nowiki> */
_core__WEBPACK_IMPORTED_MODULE_7__.SiteConfig.botUsernameRegex = /bot\b/i;
!function(){var e={795:function(e){function t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,i(e,t)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}e.exports=function(){"use strict";var e=function(){function e(e){this.locale=e}var t=e.prototype;return t.convertPlural=function(t,i){var a=new RegExp("\\d+=","i");if(!i||0===i.length)return"";for(var n=0;n<i.length;n++){var r=i[n];if(a.test(r)){if(parseInt(r.slice(0,r.indexOf("=")),10)===t)return r.slice(r.indexOf("=")+1);i[n]=void 0}}i=i.filter((function(e){return!!e}));var o=e.pluralRules[this.locale];o||(o={one:"i = 1 and v = 0"});var s=this.getPluralForm(t,o);return i[s=Math.min(s,i.length-1)]},t.getPluralForm=function(e,t){for(var i=["zero","one","two","few","many","other"],a=0,n=mw.libs.pluralRuleParser,r=0;r<i.length;r++)if(t[i[r]]){if(n(t[i[r]],e))return a;a++}return a},t.convertNumber=function(e,t){var i=this.digitTransformTable(this.locale),a=String(e),n="";if(!i)return e;if(t){if(parseFloat(e,10)===e)return e;var r=[];for(var o in i)r[i[o]]=o;i=r}for(var s=0;s<a.length;s++)i[a[s]]?n+=i[a[s]]:n+=a[s];return t?parseFloat(n,10):n},t.convertGrammar=function(e,t){return e},t.gender=function(e,t){if(!t||0===t.length)return"";for(;t.length<2;)t.push(t[t.length-1]);return"male"===e?t[0]:"female"===e?t[1]:3===t.length?t[2]:t[0]},t.digitTransformTable=function(t){return!!e.digitTransforms[t]&&e.digitTransforms[t].split("")},e}();e.pluralRules={},e.digitTransforms={};var i={bs:function(e){function i(){return e.apply(this,arguments)||this}return t(i,e),i.prototype.convertGrammar=function(e,t){switch(t){case"instrumental":e="s "+e;break;case"lokativ":e="o "+e}return e},i}(e),default:e,dsb:function(e){function i(){return e.apply(this,arguments)||this}return t(i,e),i.prototype.convertGrammar=function(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e}return e},i}(e),fi:function(e){function i(){return e.apply(this,arguments)||this}return t(i,e),i.prototype.convertGrammar=function(e,t){var i=e.match(/[aou][^äöy]*$/i),a=e;switch(e.match(/wiki$/i)&&(i=!1),e.match(/[bcdfghjklmnpqrstvwxz]$/i)&&(e+="i"),t){case"genitive":e+="n";break;case"elative":e+=i?"sta":"stä";break;case"partitive":e+=i?"a":"ä";break;case"illative":e+=e.slice(-1)+"n";break;case"inessive":e+=i?"ssa":"ssä";break;default:e=a}return e},i}(e),ga:function(e){function i(){return e.apply(this,arguments)||this}return t(i,e),i.prototype.convertGrammar=function(e,t){if("ainmlae"===t)switch(e){case"an Domhnach":e="Dé Domhnaigh";break;case"an Luan":e="Dé Luain";break;case"an Mháirt":e="Dé Mháirt";break;case"an Chéadaoin":e="Dé Chéadaoin";break;case"an Déardaoin":e="Déardaoin";break;case"an Aoine":e="Dé hAoine";break;case"an Satharn":e="Dé Sathairn"}return e},i}(e),he:function(e){function i(){return e.apply(this,arguments)||this}return t(i,e),i.prototype.convertGrammar=function(e,t){switch(t){case"prefixed":case"תחילית":"ו"===e.slice(0,1)&&"וו"!==e.slice(0,2)&&(e="ו"+e),"ה"===e.slice(0,1)&&(e=e.slice(1)),(e.slice(0,1)<"א"||e.slice(0,1)>"ת")&&(e="־"+e)}return e},i}(e),hsb:function(e){function i(){return e.apply(this,arguments)||this}return t(i,e),i.prototype.convertGrammar=function(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e}return e},i}(e),hu:function(e){function i(){return e.apply(this,arguments)||this}return t(i,e),i.prototype.convertGrammar=function(e,t){switch(t){case"rol":e+="ról";break;case"ba":e+="ba";break;case"k":e+="k"}return e},i}(e),hy:function(e){function i(){return e.apply(this,arguments)||this}return t(i,e),i.prototype.convertGrammar=function(e,t){return"genitive"===t&&("ա"===e.slice(-1)?e=e.slice(0,-1)+"այի":"ո"===e.slice(-1)?e=e.slice(0,-1)+"ոյի":"գիրք"===e.slice(-4)?e=e.slice(0,-4)+"գրքի":e+="ի"),e},i}(e),la:function(e){function i(){return e.apply(this,arguments)||this}return t(i,e),i.prototype.convertGrammar=function(e,t){switch(t){case"genitive":e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/u[ms]$/i,"i")).replace(/ommunia$/i,"ommunium")).replace(/a$/i,"ae")).replace(/libri$/i,"librorum")).replace(/nuntii$/i,"nuntiorum")).replace(/tio$/i,"tionis")).replace(/ns$/i,"ntis")).replace(/as$/i,"atis")).replace(/es$/i,"ei");break;case"accusative":e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/u[ms]$/i,"um")).replace(/ommunia$/i,"am")).replace(/a$/i,"ommunia")).replace(/libri$/i,"libros")).replace(/nuntii$/i,"nuntios")).replace(/tio$/i,"tionem")).replace(/ns$/i,"ntem")).replace(/as$/i,"atem")).replace(/es$/i,"em");break;case"ablative":e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/u[ms]$/i,"o")).replace(/ommunia$/i,"ommunibus")).replace(/a$/i,"a")).replace(/libri$/i,"libris")).replace(/nuntii$/i,"nuntiis")).replace(/tio$/i,"tione")).replace(/ns$/i,"nte")).replace(/as$/i,"ate")).replace(/es$/i,"e")}return e},i}(e),os:function(e){function i(){return e.apply(this,arguments)||this}return t(i,e),i.prototype.convertGrammar=function(e,t){var i,a,n,r;switch(i="мæ",a="",n="",r="",e.match(/тæ$/i)?(e=e.slice(0,-1),i="æм"):e.match(/[аæеёиоыэюя]$/i)?a="й":e.match(/у$/i)?e.slice(-2,-1).match(/[аæеёиоыэюя]$/i)||(a="й"):e.match(/[бвгджзйклмнопрстфхцчшщьъ]$/i)||(n="-"),t){case"genitive":r=n+a+"ы";break;case"dative":r=n+a+"æн";break;case"allative":r=n+i;break;case"ablative":r="й"===a?n+a+"æ":n+a+"æй";break;case"superessive":r=n+a+"ыл";break;case"equative":r=n+a+"ау";break;case"comitative":r=n+"имæ"}return e+r},i}(e),ru:function(e){function i(){return e.apply(this,arguments)||this}return t(i,e),i.prototype.convertGrammar=function(e,t){return"genitive"===t&&("ь"===e.slice(-1)?e=e.slice(0,-1)+"я":"ия"===e.slice(-2)?e=e.slice(0,-2)+"ии":"ка"===e.slice(-2)?e=e.slice(0,-2)+"ки":"ти"===e.slice(-2)?e=e.slice(0,-2)+"тей":"ды"===e.slice(-2)?e=e.slice(0,-2)+"дов":"ник"===e.slice(-3)&&(e=e.slice(0,-3)+"ника")),e},i}(e),sl:function(e){function i(){return e.apply(this,arguments)||this}return t(i,e),i.prototype.convertGrammar=function(e,t){switch(t){case"mestnik":e="o "+e;break;case"orodnik":e="z "+e}return e},i}(e),uk:function(e){function i(){return e.apply(this,arguments)||this}return t(i,e),i.prototype.convertGrammar=function(e,t){switch(t){case"genitive":"ь"===e.slice(-1)?e=e.slice(0,-1)+"я":"ія"===e.slice(-2)?e=e.slice(0,-2)+"ії":"ка"===e.slice(-2)?e=e.slice(0,-2)+"ки":"ти"===e.slice(-2)?e=e.slice(0,-2)+"тей":"ды"===e.slice(-2)?e=e.slice(0,-2)+"дов":"ник"===e.slice(-3)&&(e=e.slice(0,-3)+"ника");break;case"accusative":"ія"===e.slice(-2)&&(e=e.slice(0,-2)+"ію")}return e},i}(e)},a=new RegExp("(?:([A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁːˑˠ-ˤˮͰ-ͳͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-҂Ҋ-ԯԱ-Ֆՙ-՟ա-և։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ঀংঃঅ-ঌএঐও-নপ-রলশ-হঽ-ীেৈোৌৎৗড়ঢ়য়-ৡ০-ৱ৴-৺ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ીૉોૌૐૠૡ૦-૰ૹଂଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽାୀେୈୋୌୗଡ଼ଢ଼ୟ-ୡ୦-୷ஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹாிுூெ-ைொ-ௌௐௗ௦-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౚౠౡ౦-౯౿ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊೋೕೖೞೠೡ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ീെ-ൈൊ-ൌൎൗൟ-ൡ൦-൵൹-ൿංඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-෴ก-ะาำเ-ๆ๏-๛ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆ໐-໙ໜ-ໟༀ-༗༚-༴༶༸༾-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿚က-ာေးျြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃႄႇ-ႌႎ-ႜ႞-ჅჇჍა-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፼ᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙿᚁ-ᚚᚠ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះៈ។-៚ៜ០-៩᠐-᠙ᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸ᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧚ᨀ-ᨖᨙᨚ᨞-ᩕᩗᩡᩣᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-ᭋ᭐-᭪᭴-᭼ᮂ-ᮡᮦᮧ᮪ᮮ-ᯥᯧᯪ-ᯬᯮ᯲᯳᯼-ᰫᰴᰵ᰻-᱉ᱍ-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳳᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〮〯〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎ㆐-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿕ꀀ-ꒌꓐ-ꘌꘐ-ꘫꙀ-ꙮꚀ-ꚝꚠ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꞭꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꣽ꤀-ꤥ꤮-ꥆꥒ꥓꥟-ꥼꦃ-ꦲꦴꦵꦺꦻꦽ-꧍ꧏ-꧙꧞-ꧤꧦ-ꧾꨀ-ꨨꨯꨰꨳꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-ꩻꩽ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫫꫮ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭥꭰ-ꯤꯦꯧꯩ-꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]|\ud800[\udc00-\udc0b]|\ud800[\udc0d-\udc26]|\ud800[\udc28-\udc3a]|𐀼|𐀽|\ud800[\udc3f-\udc4d]|\ud800[\udc50-\udc5d]|\ud800[\udc80-\udcfa]|𐄀|𐄂|\ud800[\udd07-\udd33]|\ud800[\udd37-\udd3f]|\ud800[\uddd0-\uddfc]|\ud800[\ude80-\ude9c]|\ud800[\udea0-\uded0]|\ud800[\udf00-\udf23]|\ud800[\udf30-\udf4a]|\ud800[\udf50-\udf75]|\ud800[\udf80-\udf9d]|\ud800[\udf9f-\udfc3]|\ud800[\udfc8-\udfd5]|\ud801[\udc00-\udc9d]|\ud801[\udca0-\udca9]|\ud801[\udd00-\udd27]|\ud801[\udd30-\udd63]|𐕯|\ud801[\ude00-\udf36]|\ud801[\udf40-\udf55]|\ud801[\udf60-\udf67]|𑀀|\ud804[\udc02-\udc37]|\ud804[\udc47-\udc4d]|\ud804[\udc66-\udc6f]|\ud804[\udc82-\udcb2]|𑂷|𑂸|\ud804[\udcbb-\udcc1]|\ud804[\udcd0-\udce8]|\ud804[\udcf0-\udcf9]|\ud804[\udd03-\udd26]|𑄬|\ud804[\udd36-\udd43]|\ud804[\udd50-\udd72]|\ud804[\udd74-\udd76]|\ud804[\udd82-\uddb5]|\ud804[\uddbf-\uddc9]|𑇍|\ud804[\uddd0-\udddf]|\ud804[\udde1-\uddf4]|\ud804[\ude00-\ude11]|\ud804[\ude13-\ude2e]|𑈲|𑈳|𑈵|\ud804[\ude38-\ude3d]|\ud804[\ude80-\ude86]|𑊈|\ud804[\ude8a-\ude8d]|\ud804[\ude8f-\ude9d]|\ud804[\ude9f-\udea9]|\ud804[\udeb0-\udede]|\ud804[\udee0-\udee2]|\ud804[\udef0-\udef9]|𑌂|𑌃|\ud804[\udf05-\udf0c]|𑌏|𑌐|\ud804[\udf13-\udf28]|\ud804[\udf2a-\udf30]|𑌲|𑌳|\ud804[\udf35-\udf39]|\ud804[\udf3d-\udf3f]|\ud804[\udf41-\udf44]|𑍇|𑍈|\ud804[\udf4b-\udf4d]|𑍐|𑍗|\ud804[\udf5d-\udf63]|\ud805[\udc80-\udcb2]|𑒹|\ud805[\udcbb-\udcbe]|𑓁|\ud805[\udcc4-\udcc7]|\ud805[\udcd0-\udcd9]|\ud805[\udd80-\uddb1]|\ud805[\uddb8-\uddbb]|𑖾|\ud805[\uddc1-\udddb]|\ud805[\ude00-\ude32]|𑘻|𑘼|𑘾|\ud805[\ude41-\ude44]|\ud805[\ude50-\ude59]|\ud805[\ude80-\udeaa]|𑚬|𑚮|𑚯|𑚶|\ud805[\udec0-\udec9]|\ud805[\udf00-\udf19]|𑜠|𑜡|𑜦|\ud805[\udf30-\udf3f]|\ud806[\udca0-\udcf2]|𑣿|\ud806[\udec0-\udef8]|\ud808[\udc00-\udf99]|\ud809[\udc00-\udc6e]|\ud809[\udc70-\udc74]|\ud809[\udc80-\udd43]|\ud80c[\udc00-\udfff]|\ud80d[\udc00-\udc2e]|\ud811[\udc00-\ude46]|\ud81a[\udc00-\ude38]|\ud81a[\ude40-\ude5e]|\ud81a[\ude60-\ude69]|𖩮|𖩯|\ud81a[\uded0-\udeed]|𖫵|\ud81a[\udf00-\udf2f]|\ud81a[\udf37-\udf45]|\ud81a[\udf50-\udf59]|\ud81a[\udf5b-\udf61]|\ud81a[\udf63-\udf77]|\ud81a[\udf7d-\udf8f]|\ud81b[\udf00-\udf44]|\ud81b[\udf50-\udf7e]|\ud81b[\udf93-\udf9f]|𛀀|𛀁|\ud82f[\udc00-\udc6a]|\ud82f[\udc70-\udc7c]|\ud82f[\udc80-\udc88]|\ud82f[\udc90-\udc99]|𛲜|𛲟|\ud834[\udc00-\udcf5]|\ud834[\udd00-\udd26]|\ud834[\udd29-\udd66]|\ud834[\udd6a-\udd72]|𝆃|𝆄|\ud834[\udd8c-\udda9]|\ud834[\uddae-\udde8]|\ud834[\udf60-\udf71]|\ud835[\udc00-\udc54]|\ud835[\udc56-\udc9c]|𝒞|𝒟|𝒢|𝒥|𝒦|\ud835[\udca9-\udcac]|\ud835[\udcae-\udcb9]|𝒻|\ud835[\udcbd-\udcc3]|\ud835[\udcc5-\udd05]|\ud835[\udd07-\udd0a]|\ud835[\udd0d-\udd14]|\ud835[\udd16-\udd1c]|\ud835[\udd1e-\udd39]|\ud835[\udd3b-\udd3e]|\ud835[\udd40-\udd44]|𝕆|\ud835[\udd4a-\udd50]|\ud835[\udd52-\udea5]|\ud835[\udea8-\udeda]|\ud835[\udedc-\udf14]|\ud835[\udf16-\udf4e]|\ud835[\udf50-\udf88]|\ud835[\udf8a-\udfc2]|\ud835[\udfc4-\udfcb]|\ud836[\udc00-\uddff]|\ud836[\ude37-\ude3a]|\ud836[\ude6d-\ude74]|\ud836[\ude76-\ude83]|\ud836[\ude85-\ude8b]|\ud83c[\udd10-\udd2e]|\ud83c[\udd30-\udd69]|\ud83c[\udd70-\udd9a]|\ud83c[\udde6-\ude02]|\ud83c[\ude10-\ude3a]|\ud83c[\ude40-\ude48]|🉐|🉑|[\ud840-\ud868][\udc00-\udfff]|\ud869[\udc00-\uded6]|\ud869[\udf00-\udfff]|[\ud86a-\ud86c][\udc00-\udfff]|\ud86d[\udc00-\udf34]|\ud86d[\udf40-\udfff]|\ud86e[\udc00-\udc1d]|\ud86e[\udc20-\udfff]|[\ud86f-\ud872][\udc00-\udfff]|\ud873[\udc00-\udea1]|\ud87e[\udc00-\ude1d]|[\udb80-\udbbe][\udc00-\udfff]|\udbbf[\udc00-\udffd]|[\udbc0-\udbfe][\udc00-\udfff]|\udbff[\udc00-\udffd])|([֐־׀׃׆׈-׿߀-ߪߴߵߺ-ࠕࠚࠤࠨ࠮-ࡘ࡜-࢟‏יִײַ-ﬨשׁ-ﭏ؈؋؍؛-ي٭-ٯٱ-ەۥۦۮۯۺ-ܐܒ-ܯ݋-ޥޱ-޿ࢠ-࣢ﭐ-ﴽ﵀-﷏ﷰ-﷼﷾﷿ﹰ-﻾]|\ud802[\udc00-\udd1e]|\ud802[\udd20-\ude00]|𐨄|\ud802[\ude07-\ude0b]|\ud802[\ude10-\ude37]|\ud802[\ude3b-\ude3e]|\ud802[\ude40-\udee4]|\ud802[\udee7-\udf38]|\ud802[\udf40-\udfff]|\ud803[\udc00-\ude5f]|\ud803[\ude7f-\udfff]|\ud83a[\udc00-\udccf]|\ud83a[\udcd7-\udfff]|\ud83b[\udc00-\uddff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\ude00-\udeef]|\ud83b[\udef2-\udeff]))"),n=function(){function e(e){this.locale=e,this.language=new(i[e]||i.default)(e)}var t=e.prototype;return t.emit=function(e,t){var i,a,n,o=this;switch(typeof e){case"string":case"number":i=e;break;case"object":a=e.slice(1).map((function(e){return o.emit(e,t)})),i="function"==typeof this[n=e[0].toLowerCase()]?this[n](a,t):"{{"+new r(this.locale).simpleParse(e[0],t)+a.map((function(e){return"|"+e}))+"}}";break;case"undefined":i="";break;default:throw new Error("unexpected type in AST: "+typeof e)}return i},t.concat=function(e){var t="";return e.forEach((function(e){t+=e})),t},t.replace=function(e,t){var i=parseInt(e[0],10);return i<t.length?t[i]:"$"+(i+1)},t.plural=function(e){var t=parseFloat(this.language.convertNumber(e[0],10)),i=e.slice(1);return i.length?this.language.convertPlural(t,i):""},t.gender=function(e){var t=e[0],i=e.slice(1);return this.language.gender(t,i)},t.grammar=function(e){var t=e[0],i=e[1];return i&&t&&this.language.convertGrammar(i,t)},t.bidi=function(e){var t=function(e){var t=e.match(a);return t?void 0===t[2]?"ltr":"rtl":null}(e[0]);return"ltr"===t?"‪"+e[0]+"‬":"rtl"===t?"‫"+e[0]+"‬":e[0]},t.formatnum=function(e){var t=!!e[1]&&"R"===e[1],i=e[0];return"string"==typeof i||"number"==typeof i?this.language.convertNumber(i,t):i},e}(),r=function(){function e(e){this.locale=e,this.emitter=new n(this.locale)}var t=e.prototype;return t.parse=function(e,t){if(e.includes("{{")){var i=function(e){var t,i,a,n,r,o,s,l=0;function d(e){return function(){for(var t=0;t<e.length;t++){var i=e[t]();if(null!==i)return i}return null}}function c(e){for(var t=l,i=[],a=0;a<e.length;a++){var n=e[a]();if(null===n)return l=t,null;i.push(n)}return i}function u(e,t){return function(){for(var i=l,a=[],n=t();null!==n;)a.push(n),n=t();return a.length<e?(l=i,null):a}}function p(t){var i=t.length;return function(){var a=null;return e.slice(l,l+i)===t&&(a=t,l+=i),a}}function f(t){return function(){var i=e.slice(l).match(t);return null===i?null:(l+=i[0].length,i[0])}}var g,m,h=p("|"),b=p(":"),v=p("\\"),w=f(/^./),y=p("$"),k=f(/^\d+/),x=f(/^[^{}$\\]/),T=f(/^[^{}$\\|]/);function C(){var e=c([v,w]);return null===e?null:e[1]}function P(){var e=c([y,k]);return null===e?null:["REPLACE",parseInt(e[1],10)-1]}function N(){var e=c([h,u(0,o)]);if(null===e)return null;var t=e[1];return t.length>1?["CONCAT"].concat(t):t[0]}function A(){var e=c([n,b,P]);return null===e?null:[e[0],e[2]]}function M(){var e=c([n,b,o]);return null===e?null:[e[0],e[2]]}t=d([C,T]),i=d([C,x]),g=f(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/),m=function(e){return e.toString()},n=function(){var e=g();return null===e?null:m(e)},a=d([function(){var e=c([d([A,M]),u(0,N)]);return null===e?null:e[0].concat(e[1])},function(){var e=c([n,u(0,N)]);return null===e?null:[e[0]].concat(e[1])}]);var E=p("{{"),$=p("}}");function R(){var e=c([E,a,$]);return null===e?null:e[1]}if(r=d([R,P,function(){var e=u(1,i)();return null===e?null:e.join("")}]),o=d([R,P,function(){var e=u(1,t)();return null===e?null:e.join("")}]),null===(s=function(){var e=u(0,r)();return null===e?null:["CONCAT"].concat(e)}())||l!==e.length)throw new Error("Parse error at position "+l.toString()+" in input: "+e);return s}(e);return this.emitter.emit(i,t)}return this.simpleParse(e,t)},t.simpleParse=function(e,t){return e.replace(/\$(\d+)/g,(function(e,i){var a=parseInt(i,10)-1;return void 0!==t[a]?t[a]:"$"+i}))},e}(),o=function(){function e(e){this.sourceMap=new Map}var t=e.prototype;return t.load=function(e,t){if("object"!=typeof e)throw new Error("Invalid message source. Must be an object");if(t){if(!/^[a-zA-Z0-9-]+$/.test(t))throw new Error("Invalid locale "+t);for(var i in e)if(0!==i.indexOf("@")){if("object"==typeof e[i])return this.load(e);if("string"!=typeof e[i])throw new Error("Invalid message for message "+i+" in "+t+" locale.");break}this.sourceMap.has(t)?this.sourceMap.set(t,Object.assign(this.sourceMap.get(t),e)):this.sourceMap.set(t,e)}else for(t in e)this.load(e[t],t)},t.getMessage=function(e,t){var i=this.sourceMap.get(t);return i?i[e]:null},t.hasLocale=function(e){return this.sourceMap.has(e)},e}();return function(){function t(e,t){var i=void 0===t?{}:t,a=i.finalFallback,n=void 0===a?"en":a,s=i.messages;this.locale=e,this.parser=new r(this.locale),this.messageStore=new o,s&&this.load(s,this.locale),this.fallbackLocales=[],this.finalFallback=n}var i=t.prototype;return i.load=function(e,t){return this.messageStore.load(e,t||this.locale)},i.i18n=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),a=1;a<t;a++)i[a-1]=arguments[a];return this.parser.parse(this.getMessage(e),i)},i.setLocale=function(e){this.locale=e,this.parser=new r(this.locale)},i.getFallbackLocales=function(){return[].concat(this.fallbackLocales,[this.finalFallback])},i.setFallbackLocales=function(e){this.fallbackLocales=e},i.setPluralRules=function(t,i){e.pluralRules[t]=i},i.setDigitTransforms=function(t,i){e.digitTransforms[t]=i},i.getMessage=function(e){for(var t=this.locale,i=0,a=this.getFallbackLocales();t;){var n=t.split("-"),r=n.length;do{var o=n.slice(0,r).join("-"),s=this.messageStore.getMessage(e,o);if("string"==typeof s)return s;r--}while(r);t=a[i],i++}return e},i.registerParserPlugin=function(e,t){n.prototype[e]=t},t}()}()},871:function(e,t,i){"use strict";var n;!function(e){e.scriptName="Twinkle",e.userAgent="Twinkle ("+mw.config.get("wgWikiID")+")",e.changeTags="",e.summaryAd=" ("+e.scriptName+")",e.preModuleInitHooks=[],e.preModuleInitHooksWithConfig=[],e.registeredModules=[],e.activeSpecialPages=["Block","Contributions","Recentchanges","Recentchangeslinked"].concat(Morebits.userIsSysop?["DeletedContributions","Prefixindex"]:[]),e.messageOverrides={},e.extraMwMessages=[]}(n||(n={}));var r,o=mw.config.get("wgNamespaceIds"),s=o[""],l=(o.talk,o.special,o.file),d=(o.template,o.category,o.project),c=(o.user,o.user_talk);!function(e){e.botUsernameRegex=/bot\b/i,e.flaggedRevsNamespaces=[s,d],e.permalinkSpecialPageName="Special:PermanentLink",e.redirectTagAliases=["#REDIRECT"],e.signatureTimestampFormat=null}(r||(r={}));var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};function p(e,t){function i(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var f=function(){return(f=Object.assign||function(e){for(var t,i=1,a=arguments.length;i<a;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};Object.create;function g(){for(var e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;var a=Array(e),n=0;for(t=0;t<i;t++)for(var r=arguments[t],o=0,s=r.length;o<s;o++,n++)a[n]=r[o];return a}Object.create;var m=i(795),h=i.n(m),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t}(Error);function v(e){var t=mw.Title.newFromUserInput(e);return t?t.getNameText():e}function w(e,t){return"{{"+e+k(t).filter((function(e){e[0];return!!e[1]})).map((function(e){return"|"+e[0]+"="+e[1]})).join("")+"}}"}function y(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function k(e){return Object.entries?Object.entries(e):Object.keys(e).map((function(t){return[t,e[t]]}))}var x,T=function(e){function t(t,i,a){return i=$.extend({action:"query",format:"json",formatversion:"2",uselang:E,errorlang:E,errorsuselocal:!0,tags:n.changeTags},i),e.call(this,t,i,null,a,null)||this}return p(t,e),t.prototype.post=function(t){return t||(t={}),t.headers||(t.headers={}),t.headers["Api-User-Agent"]=n.userAgent,e.prototype.post.call(this,t)},t}(Morebits.wiki.api);var C,P,N,A=["colon-separator","semicolon-separator","word-separator","comma-separator","and","parentheses","percent","blanknamespace","protectlogpage","stable-logpage","duration-hours","duration-days","duration-weeks","duration-years","protect-expiry-indefinite","group-autoconfirmed","group-sysop","protectexpiry","restriction-edit","restriction-move","restriction-create","restriction-level-autoconfirmed","restriction-level-sysop","block-expiry","blocklogpage","period-am","period-pm","january","jan","february","feb","march","mar","april","apr","may_long","may","june","jun","july","jul","august","aug","september","sep","october","oct","november","nov","december","dec","sunday","sun","monday","mon","tuesday","tue","wednesday","wed","thursday","thu","friday","fri","saturday","sat","sunday","sun"],M=JSON.parse('{"@metadata":{"authors":["SD0001"]},"tooltip-mark":"?","relative-today":"[Today at] h:mm A","relative-prevday":"[Yesterday at] h:mm A","relative-nextday":"[Tomorrow at] h:mm A","relative-thisweek":"dddd [at] h:mm A","relative-pastweek":"[Last] dddd [at] h:mm A","relative-other":"YYYY-MM-DD","done":"Done","api-error":"$1 \\"$2\\" occurred while contacting the API.","invalid-token-retrying":"Invalid token. Getting a new token and retrying...","getting-token":"Retrieving token...","opening-page":"Opening page \\"$1\\"","retrieving-page":"Retrieving page...","protected-edit-warning":"You are about to make an edit to the fully protected page \\"$1\\" (protection expiring {{date:$1|relative|utc}} (UTC)).\\n\\nClick OK to proceed with the edit, or Cancel to skip this edit.","protected-indef-edit-warning":"You are about to make an edit to the fully protected page \\"$1\\" (protected indefinitely).\\n\\nClick OK to proceed with the edit, or Cancel to skip this edit.","protected-aborted":"Edit to fully protected page was aborted.","saving-page":"Saving page...","getting-creator":"Retrieving page creation information","token-fetch-fail":"Failed to retrieve edit token.","invalid-title":"The page title is invalid: $1","cross-redirect-abort":"$1 is a cross-namespace redirect to $2, aborted","redirected":"Redirected from $1 to $2","redirect-resolution-fail":"Could not resolve redirects for: $1","api-error-unknown":"Unknown error received from API while saving page","editconflict-purging":"Edit conflict detected, purging server cache","editconflict-retrying":"Edit conflict detected, reapplying edit","save-failed-retrying":"Save failed, retrying in $1 seconds ...","moving-page":"moving page...","batch-starting":"Performing batch operation","batch-no-pages":"no pages specified","batch-done-page":"completed ([[$1]])","batch-progress":"Done ($1/$2 actions completed successfully)","submit":"Submit Query","bullet-separator":" •&#32;","revert-mismatch":"The retrieved revision does not match the requested revision.","revert-curid-fail":"Failed to retrieve current revision ID.","revert-user-fail":"Failed to retrieve user who made the revision.","revert-summary":"Restored revision $1 by $2","hidden-user":"an unknown user","querying-user":"Querying user \\"$1\\"","fetching-userinfo":"Retrieving user information...","failed-timestamp":"Failed to retrieve current timestamp.","failed-token":"Failed to retrieve token.","failed-userinfo":"Failed to retrieve user info for $1.","already-blocked-indef":"$1 is already blocked (indefinitely; by $2), would you like to override the block?","already-blocked":"$1 is already blocked (until {{date:$2|relative}}; by $3), would you like to override the block?","reblock-aborted":"Reblock aborted","invalid-block-expiry":"You must provide a valid block expiration.","ip-indef-confirm":"$1 is an IP address, do you really want to block it indefinitely? \\n\\nClick OK to proceed with the block, or Cancel to abort.","ip-indef-aborted":"Indefinite block of IP address was aborted.","admin-block-confirm":"$1 is an administrator, are you sure you want to block them? \\n\\nClick OK to proceed with the block, or Cancel to abort.","admin-block-aborted":"Block of administrator was aborted.","partial-usertalk":"Partial blocks cannot prevent talk page access unless also restricting {{ns:3}} namespace.","blocking":"blocking user...","not-blocked":"User is not blocked.","indirect-block":"User is not directly blocked, but rather $1 is.","unblocking":"unblocking user...","notify-fail-iprange":"Cannot notify IP ranges","notify-self-skip":"You ($1) created this page; skipping user notification","notify-fail-noexist":"Cannot notify the user because the user does not exist.","notify-fail-template":"User talk page transcludes {{$1}}, aborting notification","notify-fail-optout":"User has opted out of this notification, aborting","notify-fail-bot":"User is a bot, aborting notification","notify-fail-blocked":"User is indefinitely blocked, aborting notification","notifying-user":"Notifying $1","watching-user":"Watching user page...","info":"Info","note":"Note","error":"Error","link-rollback":"rollback","link-vandalism":"vandalism","link-goodfaith-rollback":"rollback (AGF)","restore-revision":"restore this version","fetching-data":"Grabbing data of earlier revisions","saving-reverted":"Saving reverted contents","prompt-reason-restore":"Please specify a reason for the revert: ","reversion-complete":"Reversion completed","cant-edit-protected":"Unable to edit the page, it\'s probably protected.","no-revisions":"We have less than one additional revision, thus impossible to revert.","bad-revid":"The most recent revision ID received from the server, <strong>$1</strong>, is less than the ID of the displayed revision. This could indicate that the current revision has been deleted, the server is lagging, or that bad data has been received. Stopping revert.","revid-mismatch":"Latest revision <strong>$1</strong> doesn\'t equal our revision <strong>$2</strong>","latest-rev-same-user":"Latest revision was also made by <strong>$1</strong>. As we assume vandalism, we will proceed to revert.","latest-rev-same-64":"Latest revision was made by <strong>$1</strong>, which is on the same /64 subnet. As we assume vandalism, we will proceed to revert.","latest-rev-other-user-goodfaith":"Latest revision was made by <strong>$1</strong>. As we assume good faith, we will stop the revert, as the problem might have been fixed.","latest-rev-other-user":"Latest revision was made by <strong>$1</strong>, but we will stop the revert.","latest-rev-bot":"Latest revision was made by <strong>$1</strong>, a trusted bot, and the revision before was made by our vandal, so we will proceed with the revert.","latest-rev-reverted":"Latest revision was made by <strong>$1</strong>, so it might have already been reverted, we will stop the revert.","bot-revert":"Vandalism revert was chosen on <strong>$1</strong>. As this is a trusted bot, we assume you wanted to revert vandalism made by the previous user instead.","bot-revert-goodfaith":"Good faith revert was chosen on <strong>$1</strong>. This is a trusted bot and thus AGF rollback will not proceed.","bot-revert-prompt":"Normal revert was chosen, but the most recent edit was made by a trusted bot ($1). Do you want to revert the revision before instead?","bot-revert-previous":"Normal revert was chosen on <strong>$1</strong>. This is a trusted bot, and per confirmation, we\'ll revert the previous revision instead.","bot-revert-selected":"Normal revert was chosen on <strong>$1</strong>. This is a trusted bot, but per confirmation, revert on selected revision will proceed.","ipv6-same-user":"Treating consecutive IPv6 addresses in the same /64 as the same user","no-previous-revision":"No previous revision found. Perhaps <strong>$1</strong> is the only contributor, or they have made more than {{formatnum:$2}} edits in a row.","no-edits-revert":"As it is not possible to revert zero revisions, we will stop this revert. It could be that the edit has already been reverted, but the revision ID was still the same.","revert-multiple-prompt":"$1 has made {{formatnum:$2}} edits in a row. Are you sure you want to revert them all?","stopping":"Stopping revert.","revision-age":" revision <strong>$1</strong> that was made <strong>{{formatnum:$2}}</strong> revisions ago by $3","summary-prompt":"An optional comment for the edit summary: ","user-aborted":"Aborted by user.","restore-summary":"Restored revision $1 by %USER%","goodfaith-summary":"Reverted good faith edits by %USER%","vandalism-summary":"Reverted {{formatnum:$1}} {{plural:$1|edit|edits}} by %USER% to last revision by $2","normal-summary":"Reverted {{formatnum:$1}} {{plural:$1|edit|edits}} by %USER%","revert-confirm":"Reverting page: are you sure?","revert-complete":"Reversion completed","opening-talk":"Opening user talk page edit form for user <strong>$1</strong>","pcreview-comment":"Automatically reviewing reversion","pcreview-accepting":"Automatically accepting your changes","diff-last":"Last","diff-last-tooltip":"Show most recent diff","diff-since":"Since","diff-since-tooltip":"Show difference between last diff and the revision made by previous user","diff-sincemine":"Since mine","diff-sincemine-tooltip":"Show difference between last diff and my last revision","diff-current":"Current","diff-current-tooltip":"Show difference to current revision","diff-error":"no suitable earlier revision found, or $1 is the only contributor. Aborting.","reason":"Reason:","reason-tooltip":"You can use wikimarkup in your reason. Twinkle will automatically sign your post.","loading":"Loading...","select-all":"Select All","deselect-all":"Deselect All","fetching-list":"Grabbing list of pages","option-delete":"Delete pages","option-talks":"Delete associated talk pages (except user talk pages)","option-redirects":"Delete redirects to deleted pages","option-subpages":"Delete subpages of deleted pages","option-subpage-talks":"Delete talk pages of deleted subpages","option-subpage-redirects":"Delete redirects to deleted subpages","option-subpage-unlink":"Unlink backlinks to each deleted subpage (in Main and Portal namespaces only)","option-unlink":"Unlink backlinks to each page (in Main and Portal namespaces only)","option-unlink-file":"Remove usages of each file (in all namespaces)","pages-label":"Pages to delete","complete":"Batch deletion is now complete","confirm-protected":"You are about to delete {{formatnum:$1}} fully protected page(s). Are you sure?","dbatch-give-reason":"You need to give a reason, you cabal crony!","dbatch-no-pages":"nothing to delete, aborting","deleting":"Deleting pages","starting":"Initiating requested tasks","deleting-page":"Deleting page $1","deleting-subpages":"Deleting subpages","deleting-subpage":"Deleting subpage $1","fetching-backlinks":"Grabbing backlinks","fetching-filelinks":"Grabbing file links","fetching-redirects":"Grabbing redirects","check-talk":"Checking whether talk page exists","deleting-redirects":"Deleting redirects to $1","delete-redirect-summary":"Redirect to deleted page \\"$1\\"","deleting-talk":"Deleting talk page of page $1","delete-talk-summary":"Talk page of deleted page \\"$1\\"","unlink-page":"Unlinking backlinks to $1","unlink-on":"Unlinking on $1","unlink-summary":"Removing link(s) to deleted page $1","unlink-img-on":"Removing file usages on $1","img-comment":"Commented out because image was deleted","unlink-img-summary":"Removing instance of file $1 that has been deleted because \\"$2\\"","undbatch-restore-talks":"Restore talk pages of undeleted pages if they existed","undbatch-pages-label":"Pages to undelete","undbatch-complete":"Batch undeletion is now complete","undbatch-confirm-protected":"You are about to undelete {{formatnum:$1}} fully create protected page(s). Are you sure?","undbatch-no-pages":"nothing to undelete, aborting","undeleting":"Undeleting pages","undeleting-page":"Undeleting page $1","check-talk-deleted":"Checking talk page for deleted revisions","undeleting-talk-status":"Undeleting talk page of $1","undeleting-talk-summary":"Undeleting talk page of \\"$1\\"","create-protected-indef":"(fully create protected indefinitely)","create-protected":"(fully create protected, expires $1 (UTC))","unlink-title":"Unlinking backlinks","unlink-title-file":"Unlinking backlinks and file usages","unlink-intro":"This tool allows you to unlink all incoming links (\\"backlinks\\") that point to this page. For instance, <code>[[$1|link text]]</code> would become <code>link text</code> and <code>[[$1]]</code> would become <code>$1</code>. Use it with caution.","unlink-intro-file":"This tool allows you to unlink all incoming links (\\"backlinks\\") that point to this page and/or hide all inclusions of this file by wrapping them in &lt;!-- --&gt; comment markup. For instance, <code>[[:$1|link text]]</code> would become <code>link text</code> and <code>[[$1]]</code> would become <code>&lt;!-- [[$1]] --&gt;</code>. Use it with caution.","unlink-give-reason":"You must specify a reason for unlinking.","unlink-select-one":"You must select at least one item to unlink.","unlink-status-links-files":"Unlinking backlinks and instances of file usage","unlink-status-links":"Unlinking backlinks","unlink-status-files":"Unlinking instances of file usage","unlink-in":"Unlinking in page \\"$1\\"","no-file-usage":"No instances of file usage found.","file-usage":"File usage","first-n-files":"First {{formatnum:$1}} file usages shown.","backlinks":"Backlinks","no-backlinks":"No backlinks found.","first-n-links":"First {{formatnum:$1}} backlinks shown.","change-twpref":"You can change this with your Twinkle preferences, linked at the bottom of this Twinkle window","selected-namespaces":"Selected namespaces: {{list:$1}}","commented-out":"Commented out","no-links-files-found":"Didn\'t find any backlinks or file usages on the page.","no-links-found":"Didn\'t find any backlinks on the page.","no-files-found":"Didn\'t find any file usages on the page.","summary-links-files":"Commenting out use(s) of file / Removing link(s) to \\"$1\\"","summary-links":"Removing link(s) to \\"$1\\"","summary-files":"Commenting out use(s) of file to \\"$1\\"","protect-action-type":"Type of action","protect-protect-label":"Protect page","protect-protect-tooltip":"Apply actual protection to the page.","protect-tag-label":"Tag page with protection template","protect-tag-tooltip":"If the protecting admin forgot to apply a protection template, or you have just protected the page without tagging, you can use this to apply the appropriate protection tag.","protect-request-label":"Request page protection","protect-request-tooltip":"If you want to request protection via WP:RPP.","protect-request-sysop-tooltip":"If you want to request protection via WP:RPP instead of doing the protection by yourself.","preset":"Preset","choose-preset":"Choose a preset:","prev-protections":"Previous protections","past-protected":"This page has been protected in the past","sysops-contacted":"Have you attempted to contact the protecting admins ({{list:$1}}) first?","unprotected-time":"unprotected {{date:$1|relative|utc}}","expired-time":"expired {{date:$1|relative|utc}}","expires-time":"expires {{date:$1|relative|utc}}","reset-time":"reset {{date:$1|relative|utc}}","duration-months":"$1 {{plural:$1|month|months}}","protect-options":"Protection options","protect-edit-modify":"Modify edit protection","protect-edit-modify-tooltip":"If this is turned off, the edit protection level, and expiry time, will be left as is.","protect-edit-label":"Edit protection:","protect-move-modify":"Modify move protection","protect-move-modify-tooltip":"If this is turned off, the move protection level, and expiry time, will be left as is.","protect-move-label":"Move protection:","protect-stable-modify":"Modify pending changes protection","protect-stable-modify-tooltip":"If this is turned off, the pending changes level, and expiry time, will be left as is.","protect-stable-label":"Pending changes:","protect-create-label":"Create protection:","protect-reason":"Reason (for protection log):","protect-current-label":"Current protection level","protect-current-none":"<b>no protection</b>","protect-current":"<b>$1: $2</b>","protect-current-cascading":"<b>$1: $2 (cascading)</b>","protect-current-stable":"<b>Pending changes: $1</b>","protect-cascade-from":"<b>Cascading protection</b> from [[$1]]","by-sysop":"by [[{{ns:3}}:$1|$1]]","duration-label":"Duration:","protect-notes-label":"Notes:","note-requested-label":"$1 request","note-requested-tooltip":"Add a note to the protection log that this was requested at $1","note-requested":"requested at $1","request-revid-label":"$1 revision ID","request-revid-tooltip":"Optional revision ID of the $1 page where protection was requested.","protect-select-tag":"Choose protection template:","protect-tag-small-label":"Iconify","protect-tag-small-tooltip":"Will use the |small=yes feature of the template, and only render it as a keylock","protect-tag-noinclude-label":"Wrap protection template with &lt;noinclude&gt;","protect-tag-noinclude-tooltip":"Will wrap the protection template in &lt;noinclude&gt; tags, so that it won\'t transclude","protect-request-preset-label":"Type of protection","protect-request-type-label":"Type and reason:","temporary":"Temporary","custom-expiry-prompt":"Enter a custom expiry time. \\nYou can use relative times, like \\"1 minute\\" or \\"19 days\\", or absolute timestamps, \\"yyyymmddhhmm\\" (e.g. \\"200602011405\\" is Feb 1, 2006, at 14:05 UTC).","all-users":"All","custom-expiry-label":"Custom...","protect-request-exists":"There is already a protection request for this page at [[$1]], aborting.","protect-tag-adding":"Applying protection template","protect-tag-none-status":"nothing to do","protect-tag-exists-prompt":"{{$1}} was found on the page. \\nClick OK to remove it, or click Cancel to leave it there.","protect-tag-removing":"Removing protection template","protect-tag-abort":"Redirect category shell present","nothing-to-do":"nothing to do","block-window-title":"Block or issue block template to $1","block-self-warn":"You are about to block yourself! Are you sure you want to proceed?","block-action":"Block user","block-action-tooltip":"Block the relevant user with the given options. If partial block is unchecked, this will be a sitewide block.","block-partial":"Partial block","block-partial-tooltip":"Enable partial blocks and partial block templates.","block-tag":"Add block template to user talk page","block-tag-tooltip":"Add block template to user talk page","block-64-field-label":"Convert to /64 rangeblock","block-64-help":"It\'s usually fine, if not better, to block the /64 range ([[Special:Contributions/$1|$1]]).","block-64-label":"Block the /64 instead","block-64-template":"Any template issued will go to the original IP: $1","block-tag-options":"Template options","block-block-options":"Block options","block-expiry-indefinite":"indefinite","unblock-label":"Unblock this user","block-custom-expiry":"Custom expiry","block-custom-expiry-tooltip":"You can use relative times, like \\"1 minute\\" or \\"19 days\\", or absolute timestamps, \\"yyyymmddhhmm\\" (e.g. \\"200602011405\\" is Feb 1, 2006, at 14:05 UTC).","fetching-userinfo-error":"Error fetching user info","block-prior-label":"Prior block settings","block-pages-label":"Specific pages to block from editing","block-pages-tooltip":"10 page max.","block-namespaces-label":"Namespace blocks","block-namespaces-tooltip":"Block from editing these namespaces.","block-nocreate-label":"Block account creation","block-noemail-label":"Block user from sending email","block-disabletalk-label":"Prevent this user from editing their own talk page while blocked","block-partial-disabletalk-tooltip":"If issuing a partial block, this MUST remain unchecked unless you are also preventing them from editing User talk space","block-auto-label":"Autoblock any IP addresses used (hardblock)","block-hard-label":"Block logged-in users from using this IP address (hardblock)","block-watch-label":"Watch user and user talk pages","block-reason-label":"Reason (for block log):","block-reason-tooltip":"Consider adding helpful details to the default message.","block-see-label":"See also:","block-see-tooltip":"Insert a \\"see also\\" message to indicate whether the filter log or deleted contributions played a role in the decision to block.","block-see-filter":"Filter log","block-see-deleted":"Deleted contribs","block-tag-template":"Choose talk page template:","block-linked-label":"Linked page","block-linked-tooltip":"A page can be linked within the notice, perhaps if it was the primary target of disruption. Leave empty for no page to be linked.","block-partial-area-label":"Area blocked from","block-partial-area-tooltip":"Optional explanation of the pages or namespaces the user was blocked from editing.","block-tag-expiry":"Period of blocking:","block-tag-expiry-tooltip":"The period the blocking is due for, for example 24 hours, 2 weeks, indefinite etc...","block-tag-reason-label":"You have been blocked for ...","block-tag-reason-tooltip":"An optional reason, to replace the default generic reason. Only available for the generic block templates.","block-tag-noexpiry-label":"Do not include expiry in template","block-tag-noexpiry-tooltip":"Instead of including the duration, make the block template read \\"You have been blocked temporarily...\\"","block-tag-notalk-label":"Talk page access disabled","block-tag-notalk-tooltip":"Make the block template state that the user\'s talk page access has been removed","block-tag-noemail-label":"User blocked from sending email","block-tag-noemail-tooltip":"If the area is not provided, make the block template state that the user\'s email access has been removed","block-tag-nocreate-label":"User blocked from creating accounts","block-tag-nocreate-tooltip":"If the area is not provided, make the block template state that the user\'s ability to create accounts has been removed","select2-badsearch":"Incomplete or invalid search term","block-namespaces-placeholder":"Select namespaces to block user from","block-pages-placeholder":"Select pages to block user from","block-current-partial":"$1 is partially blocked","block-current":"$1 is blocked sitewide","block-current-range":"$1 is blocked sitewide as a rangeblock","block-current-in-range":"$1 is blocked sitewide within a /$2 rangeblock ($3)","block-current-partial-range":"$1 is partially blocked as a rangeblock","block-current-partial-in-range":"$1 is partially blocked within a /$2 rangeblock ($3)","block-expiry-date":"expires {{date:$1|relative|utc}}","block-current-change":"This form will change the existing block.","block-current-add":"This form will add an additional block.","unblocked-ago":"unblocked {{date:$1|relative|utc}}","block-expired":"$1, expired {{date:$2|relative|utc}}","block-log-current":"Previous blocks","block-log-past":"This user has been blocked in the past","block-partial-blank":"No pages or namespaces were selected, nor were email or account creation restrictions applied; please select at least one option to apply a partial block!","block-warn-noexpiry":"Please provide an expiry!","block-warn-indef-ip":"Can\'t indefinitely block an IP address!","block-warn-noreason":"Please provide a reason for the block!","block-doing":"Executing block","block-warn-partial-usertalk":"Partial blocks cannot prevent talk page access unless also restricting them from editing User talk space!","block-conflict":"The block status of $1 has changed. Last block log entry:","block-conflict-block":"Blocked by $1 with comment \\"$2\\". Expiring {{date:$3|relative|utc}}. Do you want to override with your settings?","block-conflict-unblock":"Unblocked by $1 with comment \\"$2\\". ({{date:$3|relative|utc}}.) Do you want to override with your settings?","block-noop":"Please give Twinkle something to do!","block-complete":"Actions complete, loading user talk page in a few seconds","block-tagging-status":"User talk page modification","block-blank-talk":"Blanking talk page per preferences and creating a new talk page section for this month","block-new-section":"Will create a new talk page section for this month, as none was found","search-tags":"Filter tag list:","summary-added":"Added {{list:$1}} {{plural:$2|tag|tags}}","summary-removed":"Removed {{list:$1}} {{plural:$2|tag|tags}}","summary-added-removed":"Added {{list:$1}}; and removed {{list:$2}} {{plural:$3|tag|tags}}","status-added":"Added $1 {{plural:$1|tag|tags}}","status-removed":"Removed $1 {{plural:$1|tag|tags}}","status-added-removed":"Added $1 {{plural:$1|tag|tags}}; Removed $2 {{plural:$2|tag|tags}}","untag-from-read":"For removal of existing tags, please open Tag menu from the current version of article","tags-present-header":"Tags already present","mark-patrolled":"Mark the page as patrolled/reviewed","tag-complete":"Tagging complete, reloading $1 in a few seconds","select-one":"You must select at least one tag!","getting-redirects":"Getting template redirects","cant-reposition":"Failed to find {{$1}} on the page... skip repositioning","cant-remove":"Failed to find {{$1}} on the page... cannot remove","untagging":"Untagging","removing":"Already present tags: removing de-selected tags","resolved-redirect":"Resolved template redirect {{$1}} to {{$2}}","tagging-status":"Tagging $1","tag-fetching-redirects":"Getting redirects for {{list:$1}}","xfd-venue-label":"Deletion discussion venue:","xfd-venue-tooltip":"When activated, a default choice is made, based on what namespace you are in. This default should be the most appropriate.","notify-creator-label":"Notify page creator if possible","notify-creator-tooltip":"A notification template will be placed on the creator\'s talk page if this is true.","deletion-reason-here":"Your deletion rationale is provided below, which you can copy and paste into a new XFD dialog if you wish to try again:","looking-old-nominations":"Looking for prior nominations of this page","bad-venue":"Unrecognised venue: $1","nomination-complete-redirect":"Nomination complete, now redirecting to the discussion page","protected-no-editreq":"Page protected and nowhere to add an edit request, aborting","protected-editreq":"Page protected, requesting edit","posting-editreq":"Automatically posting edit request on talk page","xfd-editreq-title":"Edit request to complete $1 nomination","xfd-editreq-failed":"Unable to add edit request, the talk page may be protected","fetching-creator":"Finding page creator","notifying-creator":"Notifying initial contributor ($1)","pref-logxfdnominations-label":"Keep a log in userspace of all pages you nominate for a deletion discussion (XfD)","pref-logxfdnominations-tooltip":"The userspace log offers a good way to keep track of all pages you nominate for XfD using Twinkle.","pref-xfdlogpagename-label":"Keep the deletion discussion userspace log at this user subpage","pref-xfdlogpagename-tooltip":"Enter a subpage name in this box. You will find your XfD log at User:<i>username</i>/<i>subpage name</i>. Only works if you turn on the XfD userspace log.","pref-xfdwatchpage-label":"Add the nominated page to watchlist","pref-xfdwatchdiscussion-label":"Add the deletion discussion page to watchlist","pref-xfdwatchlist-label":"Add the daily log or list page to the watchlist","pref-xfdwatchlist-tooltip":"This only applies for venues where the discussion takes place on a newly-created page which is transcluded on to a log or list page.","pref-xfdwatchuser-label":"Add user talk page of initial contributor to watchlist (when notifying)"}'),E=(P="uselang",mw.util.getParamValue(P)||mw.config.get("wgContentLanguage")),R={date:function(e){var t="function"==typeof e[0].getTime?new Morebits.date(e[0].getTime()):new Morebits.date(e[0]),i=e[1],a="utc"===e[2]?"utc":void 0;return"relative"===i?t.calendar(a):t.format(i,a)},int:function(e){var t=e[0],i=e.slice(1);return S.apply(void 0,g([t],i))},ns:function(e){var t=String(e[0]).trim();return/^\d+$/.test(t)||(t=String(mw.config.get("wgNamespaceIds")[t.replace(/ /g,"_").toLowerCase()])),(t=mw.config.get("wgFormattedNamespaces")[t])||""},ucfirst:function(e){return Morebits.string.toUpperCaseFirstChar(e[0])},lcfirst:function(e){return Morebits.string.toLowerCaseFirstChar(e[0])},list:function(e){for(var t=e[0],i="",a=0;a<t.length;a++)i+=t[a],t.length-2===a?i+=S("and")+S("word-separator"):t.length-1!==a&&(i+=S("comma-separator"));return i},sysop:function(e){return Morebits.userIsSysop?e[1]:e[2]}};function D(e){C.load(e,E)}function S(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(!C)throw new Error("Can't emit messages before initMessaging() has run!");return N?"("+e+")":C.i18n.apply(C,g([e],t))}var I;function L(e,t){for(var i=[],a=0;a<e.length;a+=50)i.push(x.getMessages(e.slice(a,a+50),{amlang:t,maxage:31536e3,smaxage:31536e3,uselang:"content"}).then((function(e){D(e)})));return Promise.all(i)}function F(e){if("en"===e)return Promise.resolve();var t="tw-i18n-"+e,i=mw.storage.getObject(t);return i&&new Morebits.date(i["@timestamp"]).add(2,"days").isAfter(new Date)?(W(i),Promise.resolve()):$.get("https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/gadgets/TwinkleCore/+/i18n/build-i18n/"+e+".json?format=text").then((function(e){var i=JSON.parse(decodeURIComponent(window.atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join("")));i["@timestamp"]=(new Date).toISOString(),mw.storage.setObject(t,i),W(i)}),(function(e){mw.log.warn("[twinkle]: no messages loaded from gerrit.",e)}))}function W(e){C.setFallbackLocales(e["@fallbacks"]),delete e["@fallbacks"],delete e["@timestamp"];for(var t=0,i=k(e);t<i.length;t++){var a=i[t],n=a[0],r=a[1];r["@pluralrules"]&&C.setPluralRules(n,r["@pluralrules"]),r["@digittransforms"]&&C.setDigitTransforms(n,r["@digittransforms"])}C.load(e)}var O={optionsVersion:2,userTalkPageMode:"tab",dialogLargeFont:!1,disabledModules:[],disabledSysopModules:[],portletArea:null,portletId:null,portletName:null,portletType:null,portletNext:null,autolevelStaleDays:3,revertMaxRevisions:50,batchMax:5e3,batchChunks:50,summaryAd:" ([[WP:TW|TW]])",deletionSummaryAd:" ([[WP:TW|TW]])",protectionSummaryAd:" ([[WP:TW|TW]])",logXfdNominations:!1,xfdLogPageName:"XfD log",noLogOnXfdNomination:[],xfdWatchDiscussion:"default",xfdWatchList:"no",xfdWatchPage:"default",xfdWatchUser:"default",xfdWatchRelated:"default",markXfdPagesAsPatrolled:!0,autoMenuAfterRollback:!1,openTalkPage:["agf","norm","vand"],openTalkPageOnAutoRevert:!1,rollbackInPlace:!1,markRevertedPagesAsMinor:["vand"],watchRevertedPages:["agf","norm","vand","torev"],watchRevertedExpiry:"1 month",offerReasonOnNormalRevert:!0,confirmOnFluff:!1,confirmOnMobileFluff:!0,showRollbackLinks:["diff","others"],speedySelectionStyle:"buttonClick",watchSpeedyPages:["g3","g5","g10","g11","g12"],watchSpeedyExpiry:"1 month",markSpeedyPagesAsPatrolled:!1,defaultWarningGroup:"1",combinedSingletMenus:!1,showSharedIPNotice:!0,watchWarnings:"1 month",oldSelect:!1,customWarningList:[],spiWatchReport:"yes",topWelcomes:!1,watchWelcomes:"3 months",insertUsername:!0,quickWelcomeMode:"norm",quickWelcomeTemplate:"welcome",customWelcomeList:[],customWelcomeSignature:!0,markSharedIPAsMinor:!0,markTalkbackAsMinor:!0,insertTalkbackSignature:!0,talkbackHeading:"New message from "+mw.config.get("wgUserName"),mailHeading:"You've got mail!"};function U(e){e.forEach((function(e){O[e.name]=e.value}))}function B(e){return"object"==typeof I&&void 0!==I[e]?I[e]:"object"==typeof window.TwinkleConfig&&void 0!==window.TwinkleConfig[e]?window.TwinkleConfig[e]:"object"==typeof window.FriendlyConfig&&void 0!==window.FriendlyConfig[e]?window.FriendlyConfig[e]:O[e]}var q=function(){function e(){}return e.addGroup=function(t,i){e.sections[t]=i},e.addPreference=function(t,i){e.sections[t].preferences.push(i)},e.init=function(){if(mw.config.get("wgNamespaceNumber")===mw.config.get("wgNamespaceIds").project&&"Twinkle/Preferences"===mw.config.get("wgTitle")&&"view"===mw.config.get("wgAction")){if(!document.getElementById("twinkle-config"))return;document.getElementById("twinkle-config-titlebar").style.backgroundImage="url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB%2FqqA%2BAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEhQTFRFr73ZobTPusjdsMHZp7nVwtDhzNbnwM3fu8jdq7vUt8nbxtDkw9DhpbfSvMrfssPZqLvVztbno7bRrr7W1d%2Fs1N7qydXk0NjpkW7Q%2BgAAADVJREFUeNoMwgESQCAAAMGLkEIi%2FP%2BnbnbpdB59app5Vdg0sXAoMZCpGoFbK6ciuy6FX4ABAEyoAef0BXOXAAAAAElFTkSuQmCC)";var t=document.getElementById("twinkle-config-content");if(t.textContent="",window.TwinkleConfig||window.FriendlyConfig){var i=document.createElement("p");i.innerHTML='<table class="plainlinks ombox ombox-content"><tr><td class="mbox-image"><img alt="" src="https://upload.wikimedia.org/wikipedia/commons/3/38/Imbox_content.png" /></td><td class="mbox-text"><p><big><b>Before modifying your settings here,</b> you must remove your old Twinkle and Friendly settings from your personal skin JavaScript.</big></p><p>To do this, you can <a href="'+mw.util.getUrl("User:"+mw.config.get("wgUserName")+"/"+mw.config.get("skin")+".js",{action:"edit"})+'" target="_blank"><b>edit your personal skin javascript file</b></a> or <a href="'+mw.util.getUrl("User:"+mw.config.get("wgUserName")+"/common.js",{action:"edit"})+'" target="_blank"><b>your common.js file</b></a>, removing all lines of code that refer to <code>TwinkleConfig</code> and <code>FriendlyConfig</code>.</p></td></tr></table>',t.appendChild(i)}var a=document.createElement("div");a.className="toc",a.style.marginLeft="0.4em";var n=document.createElement("div");n.id="toctitle";var r=document.createElement("h2");r.textContent="Contents ",n.appendChild(r);var o=document.createElement("span");o.className="toctoggle",o.appendChild(document.createTextNode("["));var s=document.createElement("a");s.className="internal",s.setAttribute("href","#tw-tocshowhide"),s.textContent="hide",o.appendChild(s),o.appendChild(document.createTextNode("]")),n.appendChild(o),a.appendChild(n);var l=document.createElement("ul");s.addEventListener("click",(function(){var e=$(l);e.toggle(),e.find(":visible").length?s.textContent="hide":s.textContent="show"}),!1),a.appendChild(l),t.appendChild(a);var d=document.createElement("form");d.setAttribute("action","javascript:void(0)"),d.addEventListener("submit",e.save,!0),t.appendChild(d);var c=document.createElement("table");c.style.width="100%",d.appendChild(c),y(e.sections).forEach((function(t){if(t.hidden||t.adminOnly&&!Morebits.userIsSysop)return!0;var i=document.createElement("li");i.className="toclevel-1";var a=document.createElement("a");a.setAttribute("href","#"+t.module),a.appendChild(document.createTextNode(t.title)),i.appendChild(a),l.appendChild(i);var n=document.createElement("tr"),r=document.createElement("td");r.setAttribute("colspan","3");var o=document.createElement("h4");o.style.borderBottom="1px solid gray",o.style.marginTop="0.2em",o.id=t.module,o.appendChild(document.createTextNode(t.title)),r.appendChild(o),n.appendChild(r),c.appendChild(n);var s=1;return t.preferences.forEach((function(t){if(t.adminOnly&&!Morebits.userIsSysop)return!0;(n=document.createElement("tr")).style.marginBottom="0.2em",s++%2==0&&(n.style.backgroundColor="rgba(128, 128, 128, 0.1)"),r=document.createElement("td");var i,a,o=B(t.name);switch(t.type){case"boolean":r.setAttribute("colspan","2"),i=document.createElement("label"),(a=document.createElement("input")).setAttribute("type","checkbox"),a.setAttribute("id",t.name),a.setAttribute("name",t.name),!0===o&&a.setAttribute("checked","checked"),i.appendChild(a),i.appendChild(document.createTextNode(" "+t.label)),r.appendChild(i);break;case"string":case"integer":r.style.textAlign="right",r.style.paddingRight="0.5em",(i=document.createElement("label")).setAttribute("for",t.name),i.appendChild(document.createTextNode(t.label+":")),r.appendChild(i),n.appendChild(r),(r=document.createElement("td")).style.paddingRight="1em",(a=document.createElement("input")).setAttribute("type","text"),a.setAttribute("id",t.name),a.setAttribute("name",t.name),"integer"===t.type&&(a.setAttribute("size",6),a.setAttribute("type","number"),a.setAttribute("step","1")),o&&a.setAttribute("value",o),r.appendChild(a);break;case"enum":r.style.textAlign="right",r.style.paddingRight="0.5em",(i=document.createElement("label")).setAttribute("for",t.name),i.appendChild(document.createTextNode(t.label+":")),r.appendChild(i),n.appendChild(r),(r=document.createElement("td")).style.paddingRight="1em",(a=document.createElement("select")).setAttribute("id",t.name),a.setAttribute("name",t.name),$.each(t.enumValues,(function(e,t){var i=document.createElement("option");i.setAttribute("value",e),(o===e||"boolean"==typeof o&&(o&&"yes"===e||!o&&"no"===e))&&i.setAttribute("selected","selected"),i.appendChild(document.createTextNode(t)),a.appendChild(i)})),r.appendChild(a);break;case"set":r.setAttribute("colspan","2"),(i=document.createElement("label")).appendChild(document.createTextNode(t.label+":")),r.appendChild(i);var l=document.createElement("div");l.style.paddingLeft="1em";var d=function(e,i){var a=document.createElement("label");a.style.marginRight="0.7em",a.style.display="inline-block";var n=document.createElement("input");n.setAttribute("type","checkbox"),n.setAttribute("id",t.name+"_"+e),n.setAttribute("name",t.name+"_"+e),o&&-1!==o.indexOf(e)&&n.setAttribute("checked","checked"),"unlinkNamespaces"===t.name&&o&&-1!==o.indexOf(parseInt(e,10))&&n.setAttribute("checked","checked"),a.appendChild(n),a.appendChild(document.createTextNode(i)),l.appendChild(a)};t.setDisplayOrder?$.each(t.setDisplayOrder,(function(e,i){d(i,t.setValues[i])})):$.each(t.setValues,d),r.appendChild(l);break;case"customList":r.style.textAlign="right",r.style.paddingRight="0.5em",(i=document.createElement("label")).setAttribute("for",t.name),i.appendChild(document.createTextNode(t.label+":")),r.appendChild(i),n.appendChild(r),(r=document.createElement("td")).style.paddingRight="1em";var u=document.createElement("button");u.setAttribute("id",t.name),u.setAttribute("name",t.name),u.setAttribute("type","button"),u.addEventListener("click",G.display,!1),$(u).data({value:o,pref:t}),u.appendChild(document.createTextNode("Edit items")),r.appendChild(u);break;default:alert("twinkleconfig: unknown data type for preference "+t.name)}if(n.appendChild(r),(r=document.createElement("td")).style.fontSize="90%",r.style.color="gray",t.helptip&&(r.innerHTML=t.helptip.replace(/{{(.+?)}}/g,'{{<a href="'+mw.util.getUrl("Template:")+'$1" target="_blank">$1</a>}}')),"customList"!==t.type){var p=document.createElement("a");p.setAttribute("href","#tw-reset"),p.setAttribute("id","twinkle-config-reset-"+t.name),p.addEventListener("click",e.resetPrefLink,!1),p.style.cssFloat="right",p.style.margin="0 0.6em",p.appendChild(document.createTextNode("Reset")),r.appendChild(p)}return n.appendChild(r),c.appendChild(n),!0})),!0}));var u=document.createElement("div");u.setAttribute("id","twinkle-config-buttonpane"),u.style.backgroundColor="#BCCADF",u.style.padding="0.5em";var p=document.createElement("button");p.setAttribute("id","twinkle-config-submit"),p.setAttribute("type","submit"),p.appendChild(document.createTextNode("Save changes")),u.appendChild(p);var f=document.createElement("span");f.className="plainlinks",f.style.marginLeft="2.4em",f.style.fontSize="90%";var g=document.createElement("a");if(g.setAttribute("href","#tw-reset-all"),g.setAttribute("id","twinkle-config-resetall"),g.addEventListener("click",e.resetAllPrefs,!1),g.appendChild(document.createTextNode("Restore defaults")),f.appendChild(g),u.appendChild(f),d.appendChild(u),window.location.hash){var m=window.location.hash;window.location.hash="",window.location.hash=m}}else if(mw.config.get("wgNamespaceNumber")===mw.config.get("wgNamespaceIds").user&&0===mw.config.get("wgTitle").indexOf(mw.config.get("wgUserName"))&&".js"===mw.config.get("wgPageName").slice(-3)){var h=document.createElement("div");h.setAttribute("id","twinkle-config-headerbox");var b,v=mw.config.get("wgPageName").slice(mw.config.get("wgPageName").lastIndexOf("/")+1,mw.config.get("wgPageName").lastIndexOf(".js"));"twinkleoptions"===v?(h.setAttribute("class","config-twopt-box"),mw.config.get("wgArticleId")>0?h.appendChild(document.createTextNode("This page contains your Twinkle preferences. You can change them using the ")):h.appendChild(document.createTextNode("You can customize Twinkle to suit your preferences by using the ")),(b=document.createElement("a")).setAttribute("href",mw.util.getUrl(mw.config.get("wgFormattedNamespaces")[mw.config.get("wgNamespaceIds").project]+":Twinkle/Preferences")),b.appendChild(document.createTextNode("Twinkle preferences panel")),h.appendChild(b),h.appendChild(document.createTextNode(", or by editing this page.")),$(h).insertAfter($("#contentSub"))):-1!==["monobook","vector","cologneblue","modern","timeless","minerva","common"].indexOf(v)&&(h.setAttribute("class","config-userskin-box"),h.appendChild(document.createTextNode("If you want to set Twinkle preferences, you can use the ")),(b=document.createElement("a")).setAttribute("href",mw.util.getUrl(mw.config.get("wgFormattedNamespaces")[mw.config.get("wgNamespaceIds").project]+":Twinkle/Preferences")),b.appendChild(document.createTextNode("Twinkle preferences panel")),h.appendChild(b),h.appendChild(document.createTextNode(".")),$(h).insertAfter($("#contentSub")))}},e.resetPrefLink=function(t){var i=t.target.id.substring(21);return y(e.sections).forEach((function(t){if(t.hidden||t.adminOnly&&!Morebits.userIsSysop)return!0;var a=!1;return t.preferences.forEach((function(t){return t.name!==i||(e.resetPref(t),a=!0,!1)})),!a&&void 0})),!1},e.resetPref=function(e){switch(e.type){case"boolean":document.getElementById(e.name).checked=O[e.name];break;case"string":case"integer":case"enum":document.getElementById(e.name).value=O[e.name];break;case"set":$.each(e.setValues,(function(t){var i=document.getElementById(e.name+"_"+t);i&&(i.checked=-1!==O[e.name].indexOf(t))}));break;case"customList":$(document.getElementById(e.name)).data("value",O[e.name]);break;default:alert("twinkleconfig: unknown data type for preference "+e.name)}},e.resetAllPrefs=function(){return y(e.sections).forEach((function(t){return t.hidden||t.adminOnly&&!Morebits.userIsSysop||t.preferences.forEach((function(t){t.adminOnly&&!Morebits.userIsSysop||e.resetPref(t)})),!0})),!1},e.save=function(t){Morebits.status.init(document.getElementById("twinkle-config-content"));var i=mw.config.get("wgFormattedNamespaces")[mw.config.get("wgNamespaceIds").user]+":"+mw.config.get("wgUserName")+"/twinkleoptions.js",a=new Morebits.wiki.page(i,"Saving preferences to "+i);return a.setCallbackParameters(t.target),a.load(e.writePrefs),!1},e.writePrefs=function(t){var i=t.getCallbackParameters(),a={optionsVersion:2.1};y(e.sections).forEach((function(e){e.adminOnly&&!Morebits.userIsSysop||e.preferences.forEach((function(t){var n;if(!t.adminOnly||Morebits.userIsSysop)if(e.hidden)I&&(n=I[t.name]);else switch(t.type){case"boolean":n=i[t.name].checked;break;case"string":case"enum":n=i[t.name].value;break;case"integer":n=parseInt(i[t.name].value,10),isNaN(n)&&(Morebits.status.warn("Saving","The value you specified for "+t.name+" ("+i[t.name].value+") was invalid. The save will continue, but the invalid data value will be skipped."),n=null);break;case"set":n=[],t.setDisplayOrder?$.each(t.setDisplayOrder,(function(e,a){i[t.name+"_"+a].checked&&n.push(a)})):$.each(t.setValues,(function(e){i[t.name+"_"+e].checked&&n.push(e)}));break;case"customList":n=$(i[t.name]).data("value");break;default:alert("twinkleconfig: unknown data type for preference "+t.name)}void 0===n||function(e,t){if(Array.isArray(e)){if(e.length!==t.length)return!1;for(var i=e.sort(),a=t.sort(),n=0;i[n];++n){if("object"==typeof i[n]&&(i[n].label!==a[n].label||i[n].value!==a[n].value))return!1;if(i[n].toString()!==a[n].toString())return!1}return!0}return e===t}(n,O[t.name])||(a[t.name]=n)}))}));var r="// twinkleoptions.js: personal Twinkle preferences file\n//\n// NOTE: The easiest way to change your Twinkle preferences is by using the\n// Twinkle preferences panel, at [["+Morebits.pageNameNorm+']].\n//\n// This file is AUTOMATICALLY GENERATED. Any changes you make (aside from\n// changing the configuration parameters in a valid-JavaScript way) will be\n// overwritten the next time you click "save" in the Twinkle preferences\n// panel. If modifying this file, make sure to use correct JavaScript.\n// <no"+"wiki>\n\nwindow.Twinkle.prefs = ';r+=JSON.stringify(a,null,2),r+=";\n\n// </no"+"wiki>\n// End of twinkleoptions.js\n",t.setPageText(r),t.setEditSummary("Saving Twinkle preferences: automatic edit from [[:"+Morebits.pageNameNorm+"]]"),t.setChangeTags(n.changeTags),t.setCreateOption("recreate"),t.save(e.saveSuccess)},e.saveSuccess=function(e){e.getStatusElement().info("successful");var t=document.createElement("div");t.className="successbox",t.style.fontSize="100%",t.style.marginTop="2em",t.innerHTML='<p><b>Your Twinkle preferences have been saved.</b></p><p>To see the changes, you will need to <b>clear your browser cache entirely</b> (see <a href="'+mw.util.getUrl("WP:BYPASS")+'" title="WP:BYPASS">WP:BYPASS</a> for instructions).</p>',Morebits.status.root.appendChild(t);var i=document.createElement("br");i.style.clear="both",Morebits.status.root.appendChild(i)},e.sections={general:{title:"General",module:"general",preferences:[{name:"userTalkPageMode",label:"When opening a user talk page, open it",type:"enum",enumValues:{window:"In a window, replacing other user talks",tab:"In a new tab",blank:"In a totally new window"},default:"tab"},{name:"dialogLargeFont",label:"Use larger text in Twinkle dialogs",type:"boolean",default:!1},{name:"disabledModules",label:"Turn off the selected Twinkle modules",helptip:"Anything you select here will NOT be available for use, so act with care. Uncheck to reactivate.",type:"set",setValues:{arv:"ARV",warn:"Warn",welcome:"Welcome",shared:"Shared IP",talkback:"Talkback",speedy:"CSD",prod:"PROD",xfd:"XfD",image:"Image (DI)",protect:"Protect (RPP)",tag:"Tag",diff:"Diff",unlink:"Unlink",fluff:"Revert and rollback"},default:[]},{name:"disabledSysopModules",label:"Turn off the selected admin-only modules",helptip:"Anything you select here will NOT be available for use, so act with care. Uncheck to reactivate.",adminOnly:!0,type:"set",setValues:{block:"Block",deprod:"DePROD",batchdelete:"D-batch",batchprotect:"P-batch",batchundelete:"Und-batch"},default:[]}]},hidden:{title:"Hidden",hidden:!0,preferences:[{name:"portletArea",type:"string"},{name:"portletId",type:"string"},{name:"portletName",type:"string"},{name:"portletType",type:"string"},{name:"portletNext",type:"string"},{name:"revertMaxRevisions",type:"integer",default:50},{name:"autolevelStaleDays",type:"integer",default:3},{name:"batchMax",type:"integer",adminOnly:!0,default:5e3},{name:"batchChunks",type:"integer",adminOnly:!0,default:50}]}},e.watchlistEnums={yes:"Add to watchlist (indefinitely)",no:"Don't add to watchlist",default:"Follow your site preferences","1 week":"Watch for 1 week","1 month":"Watch for 1 month","3 months":"Watch for 3 months","6 months":"Watch for 6 months"},e.commonSets={csdCriteria:{db:"Custom rationale ({{db}})",g1:"G1",g2:"G2",g3:"G3",g4:"G4",g5:"G5",g6:"G6",g7:"G7",g8:"G8",g10:"G10",g11:"G11",g12:"G12",g13:"G13",g14:"G14",a1:"A1",a2:"A2",a3:"A3",a5:"A5",a7:"A7",a9:"A9",a10:"A10",a11:"A11",u1:"U1",u2:"U2",u3:"U3",u5:"U5",f1:"F1",f2:"F2",f3:"F3",f7:"F7",f8:"F8",f9:"F9",f10:"F10",c1:"C1",r2:"R2",r3:"R3",r4:"R4",p1:"P1",p2:"P2"},csdCriteriaDisplayOrder:["db","g1","g2","g3","g4","g5","g6","g7","g8","g10","g11","g12","g13","g14","a1","a2","a3","a5","a7","a9","a10","a11","u1","u2","u3","u5","f1","f2","f3","f7","f8","f9","f10","c1","r2","r3","r4","p1","p2"],csdCriteriaNotification:{db:"Custom rationale ({{db}})",g1:"G1",g2:"G2",g3:"G3",g4:"G4",g6:'G6 ("copy-paste move" only)',g10:"G10",g11:"G11",g12:"G12",g13:"G13",g14:"G14",a1:"A1",a2:"A2",a3:"A3",a5:"A5",a7:"A7",a9:"A9",a10:"A10",a11:"A11",u3:"U3",u5:"U5",f1:"F1",f2:"F2",f3:"F3",f7:"F7",f9:"F9",f10:"F10",c1:"C1",r2:"R2",r3:"R3",r4:"R4",p1:"P1",p2:"P2"},csdCriteriaNotificationDisplayOrder:["db","g1","g2","g3","g4","g6","g10","g11","g12","g13","g14","a1","a2","a3","a5","a7","a9","a10","a11","u3","u5","f1","f2","f3","f7","f9","f10","c1","r2","r3","r4","p1","p2"],csdAndDICriteria:{db:"Custom rationale ({{db}})",g1:"G1",g2:"G2",g3:"G3",g4:"G4",g5:"G5",g6:"G6",g7:"G7",g8:"G8",g10:"G10",g11:"G11",g12:"G12",g13:"G13",g14:"G14",a1:"A1",a2:"A2",a3:"A3",a5:"A5",a7:"A7",a9:"A9",a10:"A10",a11:"A11",u1:"U1",u2:"U2",u3:"U3",u5:"U5",f1:"F1",f2:"F2",f3:"F3",f4:"F4",f5:"F5",f6:"F6",f7:"F7",f8:"F8",f9:"F9",f10:"F10",f11:"F11",c1:"C1",r2:"R2",r3:"R3",r4:"R4",p1:"P1",p2:"P2"},csdAndDICriteriaDisplayOrder:["db","g1","g2","g3","g4","g5","g6","g7","g8","g10","g11","g12","g13","g14","a1","a2","a3","a5","a7","a9","a10","a11","u1","u2","u3","u5","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","c1","r2","r3","r4","p1","p2"],namespacesNoSpecial:{0:"Article",1:"Talk (article)",2:"User",3:"User talk",4:"Wikipedia",5:"Wikipedia talk",6:"File",7:"File talk",8:"MediaWiki",9:"MediaWiki talk",10:"Template",11:"Template talk",12:"Help",13:"Help talk",14:"Category",15:"Category talk",100:"Portal",101:"Portal talk",108:"Book",109:"Book talk",118:"Draft",119:"Draft talk",710:"TimedText",711:"TimedText talk",828:"Module",829:"Module talk"}},e}(),G=function(){function e(){}return e.addRow=function(e,t,i){var a=document.createElement("tr"),n=document.createElement("td"),r=document.createElement("button");r.setAttribute("type","button"),r.addEventListener("click",(function(){$(a).remove()}),!1),r.textContent="Remove",n.appendChild(r),a.appendChild(n),n=document.createElement("td");var o=document.createElement("input");o.setAttribute("type","text"),o.className="twinkle-config-customlist-value",o.style.width="97%",t&&o.setAttribute("value",t),n.appendChild(o),a.appendChild(n),n=document.createElement("td"),(o=document.createElement("input")).setAttribute("type","text"),o.className="twinkle-config-customlist-label",o.style.width="98%",i&&o.setAttribute("value",i),n.appendChild(o),a.appendChild(n),e.appendChild(a)},e.display=function(t){var i=$(t.target),a=i.data("value"),n=i.data("pref"),r=new Morebits.simpleWindow(720,400);r.setTitle(n.label),r.setScriptName("Twinkle preferences");var o=document.createElement("div"),s=document.createElement("table");s.className="wikitable",s.style.margin="1.4em 1em",s.style.width="auto";var l=document.createElement("tbody"),d=document.createElement("tr"),c=document.createElement("th");c.style.width="5%",d.appendChild(c),(c=document.createElement("th")).style.width="35%",c.textContent=n.customListValueTitle?n.customListValueTitle:"Value",d.appendChild(c),(c=document.createElement("th")).style.width="60%",c.textContent=n.customListLabelTitle?n.customListLabelTitle:"Label",d.appendChild(c),l.appendChild(d);var u=!1;$.each(a,(function(t,i){u=!0,e.addRow(l,i.value,i.label)})),u||e.addRow(l);var p=document.createElement("tfoot");d=document.createElement("tr");var f=document.createElement("td");f.setAttribute("colspan","3");var g=document.createElement("button");g.style.minWidth="8em",g.setAttribute("type","button"),g.addEventListener("click",(function(){e.addRow(l)}),!1),g.textContent="Add",f.appendChild(g),d.appendChild(f),p.appendChild(d),s.appendChild(l),s.appendChild(p),o.appendChild(s);var m=document.createElement("button");m.setAttribute("type","submit"),m.addEventListener("click",(function(){e.save(i,l),r.close()}),!1),m.textContent="Save changes",o.appendChild(m),(m=document.createElement("button")).setAttribute("type","submit"),m.addEventListener("click",(function(){e.reset(i,l)}),!1),m.textContent="Reset",o.appendChild(m),(m=document.createElement("button")).setAttribute("type","submit"),m.addEventListener("click",(function(){r.close()}),!1),m.textContent="Cancel",o.appendChild(m),r.setContent(o),r.display()},e.reset=function(t,i){var a=$(t),n=a.data("pref"),r=a.data("value");q.resetPref(n),$(i).find("tr").slice(1).remove();var o=a.data("value");$.each(o,(function(t,a){e.addRow(i,a.value,a.label)})),a.data("value",r)},e.save=function(e,t){var i=[],a={};$(t).find('input[type="text"]').each((function(e,t){$(t).hasClass("twinkle-config-customlist-value")?a={value:t.value}:(a.label=t.value,(a.value||a.label)&&i.push(a))})),$(e).data("value",i)},e}();function j(e,t,i,a){null!==B("portletArea")&&function(e,t,i,a,n){var r=document.getElementById(e)||document.querySelector(e);if(!r)return null;var o,s=document.getElementById(t);if(s)return s.parentNode&&s.parentNode===r?s:null;n&&(o=document.getElementById(n));var l,d,c=mw.config.get("skin");("vector"!==c||"left-navigation"!==e&&"right-navigation"!==e)&&(a=null);switch(c){case"vector":"portal"!==e&&"left-navigation"!==e&&"right-navigation"!==e&&(e="mw-panel"),l="mw-portlet vector-menu vector-menu-"+("mw-panel"===e?"portal":"menu"===a?"dropdown vector-menu-dropdown-noicon":"tabs"),d="vector-menu-content";break;case"modern":"mw_portlets"!==e&&"mw_contentwrapper"!==e&&(e="mw_portlets"),l="portlet";break;case"timeless":l="mw-portlet",d="mw-portlet-body";break;default:e="column-one",l="portlet"}var u=document.createElement("nav");u.setAttribute("aria-labelledby",t+"-label"),u.className=l+" emptyPortlet",u.id=t,o&&o.parentNode===r?r.insertBefore(u,o):r.appendChild(u);var p=document.createElement("h3");p.id=t+"-label";var f=document.createElement("ul");if("vector"===c){if(f.className="vector-menu-content-list",-1!==l.indexOf("vector-menu-dropdown")){var g=document.createElement("input");g.className="vector-menu-checkbox",g.setAttribute("type","checkbox"),g.setAttribute("aria-labelledby",t+"-label"),u.appendChild(g);var m=document.createElement("span");m.appendChild(document.createTextNode(i)),p.appendChild(m);var h=document.createElement("a");h.href="#",$(h).click((function(e){e.preventDefault()})),p.appendChild(h)}}else p.appendChild(document.createTextNode(i));if(u.appendChild(p),d){var b=document.createElement("div");b.className=d,b.appendChild(f),u.appendChild(b)}else u.appendChild(f)}(B("portletArea"),B("portletId"),B("portletName"),B("portletType"),B("portletNext"));var n=mw.util.addPortletLink(B("portletId"),"string"==typeof e?e:"#",t,i,a);return $(".client-js .skin-vector #p-cactions").css("margin-right","initial"),"function"==typeof e&&$(n).click((function(t){e(),t.preventDefault()})),$.collapsibleTabs&&$.collapsibleTabs.handleResize(),n}var Y=function(){function e(){}return e.userPreferences=function(){},e.prototype.addPreference=function(e){q.addPreference(this.moduleName,e)},e.prototype.addMenu=function(){var e=this;j((function(){return e.makeWindow()}),this.portletName,this.portletId||"twinkle-"+this.moduleName.toLowerCase(),this.portletTooltip)},e.prototype.makeWindow=function(){},e}();function _(e){var t=e.userPreferences();t&&(q.addGroup(e.moduleName,f(f({},t),{module:e.moduleName})),U(t.preferences.map((function(e){return{name:e.name,value:e.default}})))),V.includes(e.moduleName)||(n[e.moduleName.toLowerCase()]=new e)}var V=[];var H=JSON.parse('{"@comment":"This file contains project-specific overrides for twinkle-core messages."}'),z=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.trustedBots=[],t.hiddenName="an unknown user",t}return p(t,e),t}(function(e){function t(){var t=e.call(this)||this;return t.moduleName="fluff",t.skipTalk=null,t.rollbackInPlace=null,t.flaggedRevsEnabled=!!mw.loader.moduleRegistry["ext.flaggedRevs.basic"],t.linkBuilder={spanTag:function(e,t){var i=document.createElement("span");return i.style.color=e,i.appendChild(document.createTextNode(t)),i},buildLink:function(e,i){var a=document.createElement("a");return a.appendChild(t.linkBuilder.spanTag("Black","[")),a.appendChild(t.linkBuilder.spanTag(e,i)),a.appendChild(t.linkBuilder.spanTag("Black","]")),a.href="#",a},rollbackLinks:function(e,i,a,n){void 0===i&&(i=!1),e=e||null;var r=i?"span":"div",o=document.createElement(r);(a=parseInt(a,10))?o.setAttribute("id","tw-revert"+a):o.setAttribute("id","tw-revert");var s=document.createElement("strong"),l=document.createElement("strong"),d=t.linkBuilder.buildLink("SteelBlue",S("link-rollback")),c=t.linkBuilder.buildLink("Red",S("link-vandalism"));$(d).click((function(){t.revert("norm",e,a,n),t.disableLinks(o)})),$(c).click((function(){t.revert("vand",e,a,n),t.disableLinks(o)})),l.appendChild(c),s.appendChild(d);var u=i?" ":" || ";if(!i){var p=document.createElement("strong"),f=t.linkBuilder.buildLink("DarkOliveGreen",S("link-goodfaith-rollback"));$(f).click((function(){t.revert("agf",e,a,n)})),p.appendChild(f),o.appendChild(p)}return o.appendChild(document.createTextNode(u)),o.appendChild(s),o.appendChild(document.createTextNode(u)),o.appendChild(l),o},restoreThisRevisionLink:function(e,i){void 0===i&&(i=!1),e="number"==typeof e?e:mw.config.get(e);var a=i?"span":"div",n=document.createElement(a);n.setAttribute("id","tw-revert-to-"+e),n.style.fontWeight="bold";var r=t.linkBuilder.buildLink("SaddleBrown",S("restore-revision"));return $(r).click((function(){t.revertToRevision(e)})),i&&n.appendChild(document.createTextNode(" ")),n.appendChild(r),n}},t.addLinks={contributions:function(){var e=!!$("#sp-contributions-footer-anon-range")[0];if(mw.config.exists("wgRelevantUserName")||e){var i=mw.config.get("wgRelevantUserName");if(-1!==B("showRollbackLinks").indexOf("contribs")||mw.config.get("wgUserName")!==i&&-1!==B("showRollbackLinks").indexOf("others")||mw.config.get("wgUserName")===i&&-1!==B("showRollbackLinks").indexOf("mine"))$("#mw-content-text").find("ul li:has(span.mw-uctop):has(.mw-changeslist-diff)").each((function(a,n){var r=$(n).find(".mw-contributions-title").text();e&&(i=$(n).find(".mw-userlink:not(.history-deleted)").text()),n.appendChild(t.linkBuilder.rollbackLinks(i,!0,n.dataset.mwRevid,r))}))}},recentchanges:function(){if(-1!==B("showRollbackLinks").indexOf("recent")){var e=$(".mw-changeslist .mw-changeslist-last.mw-changeslist-src-mw-edit");(e=e.not(".mw-rcfilters-ui-highlights-enhanced-toplevel").find(".mw-changeslist-line-inner, td.mw-enhanced-rc-nested")).each((function(e,i){var a=$(i).find(".mw-userlink:not(.history-deleted)").text(),n=$(i).find(".mw-changeslist-diff").attr("href"),r=mw.util.getParamValue("diff",n),o=i.dataset.targetPage;i.appendChild(t.linkBuilder.rollbackLinks(a,!0,r,o))}))}},history:function(){if(-1!==B("showRollbackLinks").indexOf("history")){var e=$("#pagehistory li").toArray();if(!$(".mw-firstlink").length)for(var i=e.shift(),a=$(i).find(".mw-userlink:not(.history-deleted)").text(),n=0;n<e.length;n++)if($(e[n]).find(".mw-userlink").text()!==a){i.appendChild(t.linkBuilder.rollbackLinks(a,!0));break}e.forEach((function(e){var i=e.querySelector(".mw-changeslist-date").href,a=parseInt(mw.util.getParamValue("oldid",i),10);isNaN(a)||e.appendChild(t.linkBuilder.restoreThisRevisionLink(a,!0))}))}},diff:function(){var e=function(e){var t=$("#mw-diff-"+e+"2 .mw-usertoollinks a").first();if(t.length){var i="vanarticle="+mw.util.rawurlencode(Morebits.pageNameNorm)+"&noautowarn=true";i+="&vanarticlerevid=",i+="otitle"===e?mw.config.get("wgDiffOldId"):mw.config.get("wgDiffNewId");var a=t.attr("href");-1===a.indexOf("?")?t.attr("href",a+"?"+i):t.attr("href",a+"&"+i)}};if(e("otitle"),mw.config.get("wgDiffOldId")&&mw.config.get("wgDiffOldId")!==mw.config.get("wgDiffNewId")){var i=document.getElementById("mw-diff-otitle1").parentNode;i.insertBefore(t.linkBuilder.restoreThisRevisionLink("wgDiffOldId"),i.firstChild)}if(e("ntitle"),document.getElementById("differences-nextlink")){var a=document.getElementById("mw-diff-ntitle1").parentNode;a.insertBefore(t.linkBuilder.restoreThisRevisionLink("wgDiffNewId"),a.firstChild)}else if(-1!==B("showRollbackLinks").indexOf("diff")&&mw.config.get("wgDiffOldId")&&(mw.config.get("wgDiffOldId")!==mw.config.get("wgDiffNewId")||document.getElementById("differences-prevlink"))){var n=$("#mw-diff-ntitle2").find(".mw-userlink")[0].textContent,r=document.getElementById("mw-diff-ntitle1").parentNode;r.insertBefore(t.linkBuilder.rollbackLinks(n),r.firstChild)}},oldid:function(){var e=document.getElementById("mw-revision-info").parentNode;e.insertBefore(t.linkBuilder.restoreThisRevisionLink("wgRevisionId"),e.firstChild)}},t.callbacks={toRevision:function(e){var i=prompt(S("prompt-reason-restore"),"");if(null!==i){var a=t.formatSummary(S("restore-summary",e.getRevisionID()),e.getRevisionUser(),i);e.setChangeTags(n.changeTags),e.setEditSummary(a),-1!==B("watchRevertedPages").indexOf("torev")&&e.setWatchlist(B("watchRevertedExpiry")),-1!==B("markRevertedPagesAsMinor").indexOf("torev")&&e.setMinorEdit(!0),Morebits.wiki.actionCompleted.redirect=e.getPageName(),Morebits.wiki.actionCompleted.notice=S("reversion-complete"),e.revert()}else e.getStatusElement().error(S("user-aborted"))},main:function(e){var i=e.getResponse().query.pages[0];if(i.actions.edit){var a=e.statelem,r=e.params,o=parseInt(i.lastrevid,10),s=i.revisions;if(s.length<1)a.error(S("no-revisions"));else{var l=s[0],d=l.user;if(o<r.revid)Morebits.status.error("Error",S("bad-revid",o));else{var c=r.user||S("hidden-user"),u=1;if(r.revid!==o)if(Morebits.status.warn("Warning",S("revid-mismatch",o,r.revid)),d===r.user||mw.util.isIPv6Address(r.user)&&Morebits.ip.get64(d)===Morebits.ip.get64(r.user))switch(r.type){case"vand":d!==r.user?Morebits.status.info("Info",S("latest-rev-same-64",c)):Morebits.status.info("Info",S("latest-rev-same-user",c));break;case"agf":return void Morebits.status.warn("Warning",S("latest-rev-other-user-goodfaith",c));default:return void Morebits.status.warn("Notice",S("latest-rev-other-user",c))}else{if(!("vand"===r.type&&-1!==t.trustedBots.indexOf(l.user)&&s.length>1&&s[1].revid===r.revid))return void Morebits.status.error("Error",S("latest-rev-reverted",d));Morebits.status.info("Info",S("latest-rev-bot",d)),u=2}else r.user=d,c=r.user||S("hidden-user");if(-1!==t.trustedBots.indexOf(r.user))switch(r.type){case"vand":Morebits.status.info("Info",S("bot-revert",c)),u=2,r.user=s[1].user,r.userHidden=!!s[1].userhidden;break;case"agf":return void Morebits.status.warn("Notice",S("bot-revert-goodfaith",c));case"norm":default:confirm(S("bot-revert-prompt"))?(Morebits.status.info("Info",S("bot-revert-previous",c)),u=2,r.user=s[1].user,r.userHidden=!!s[1].userhidden,c=r.user||S("hidden-user")):Morebits.status.warn("Notice",S("bot-revert-selected",c))}for(var p=!1,f=0,g=!1,m=u;m<s.length;++m)if(++f,s[m].user!==r.user){if(mw.util.isIPv6Address(s[m].user)&&Morebits.ip.get64(s[m].user)===Morebits.ip.get64(r.user)){g||(new Morebits.status("Note",S("ipv6-same-user")),g=!0);continue}p=m;break}if(p)if(f){var h,b,v=s[p],w=!1;if("vand"!==r.type&&f>1){if(!confirm(S("revert-multiple-prompt",c,f)))return void Morebits.status.info("Notice",S("stopping"));w=!0}switch(r.count=f,r.goodid=v.revid,r.gooduser=v.user,r.gooduserHidden=!!v.userhidden,a.status(S("revision-age",r.goodid,f,r.gooduserHidden?S("hidden-user"):r.gooduser)),r.type){case"agf":if(null===(b=prompt(S("summary-prompt"),"")))return void a.error(S("user-aborted"));w=!0,h=t.formatSummary(S("goodfaith-summary"),r.userHidden?null:r.user,b);break;case"vand":h=t.formatSummary(S("vandalism-summary",r.count,r.gooduserHidden?S("hidden-user"):r.gooduser),r.userHidden?null:r.user);break;case"norm":default:if(B("offerReasonOnNormalRevert")){if(null===(b=prompt(S("summary-prompt"),"")))return void a.error(S("user-aborted"));w=!0}h=t.formatSummary(S("normal-summary",r.count),r.userHidden?null:r.user,b)}if(!(B("confirmOnFluff")||B("confirmOnMobileFluff")&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile|Opera Mini/i.test(navigator.userAgent))||w||confirm(S("revert-confirm"))){t.skipTalk||-1===B("openTalkPage").indexOf(r.type)||r.userHidden||mw.config.get("wgUserName")===r.user||(r.notifyUser=!0,r.vantimestamp=l.timestamp),t.flaggedRevsEnabled&&(Morebits.userIsInGroup("reviewer")||Morebits.userIsSysop)&&i.flagged&&i.flagged.stable_revid>=r.goodid&&i.flagged.pending_since&&(r.reviewRevert=!0,r.csrftoken=e.getResponse().query.tokens.csrftoken);var y=new Morebits.wiki.page(r.pagename,S("saving-reverted"));y.setEditSummary(h),y.setChangeTags(n.changeTags),y.setOldID(r.goodid),y.setCallbackParameters(r),-1!==B("watchRevertedPages").indexOf(r.type)&&y.setWatchlist(B("watchRevertedExpiry")),-1!==B("markRevertedPagesAsMinor").indexOf(r.type)&&y.setMinorEdit(!0),t.rollbackInPlace||(Morebits.wiki.actionCompleted.redirect=r.pagename),Morebits.wiki.actionCompleted.notice=S("revert-complete"),y.revert(t.callbacks.complete)}else a.error(S("user-aborted"))}else Morebits.status.error("Error",S("no-edits-revert"));else a.error(S("no-previous-revision",c,B("revertMaxRevisions")))}}}else e.statelem.error(S("cant-edit-protected"))},complete:function(e){var t=e.getCallbackParameters();if(t.notifyUser&&!t.userHidden){Morebits.status.info("Info",S("opening-talk",t.user));var i={title:"User talk:"+t.user,action:"edit",preview:"yes",vanarticle:t.pagename.replace(/_/g," "),vanarticlerevid:t.revid,vantimestamp:t.vantimestamp,vanarticlegoodrevid:t.goodid,type:t.type,count:t.count};switch(B("userTalkPageMode")){case"tab":window.open(mw.util.getUrl("",i),"_blank");break;case"blank":window.open(mw.util.getUrl("",i),"_blank","location=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=1200,height=800");break;case"window":default:window.open(mw.util.getUrl("",i),"twinklewarnwindow"===window.name?"_blank":"twinklewarnwindow","location=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=1200,height=800")}}if(t.reviewRevert){var a={action:"review",revid:e.getSaveResponse().edit.newrevid,token:t.csrftoken,comment:S("pcreview-comment")+n.summaryAd};new Morebits.wiki.api(S("pcreview-accepting"),a).post()}}},mw.config.get("wgIsProbablyEditable")?mw.config.get("wgDiffNewId")||mw.config.get("wgDiffOldId")?mw.hook("wikipage.diff").add((function(){t.addLinks.diff()})):"view"===mw.config.get("wgAction")&&mw.config.get("wgRevisionId")&&mw.config.get("wgCurRevisionId")!==mw.config.get("wgRevisionId")?t.addLinks.oldid():"history"===mw.config.get("wgAction")&&mw.config.get("wgArticleId")&&t.addLinks.history():-1===mw.config.get("wgNamespaceNumber")&&(t.skipTalk=!B("openTalkPageOnAutoRevert"),t.rollbackInPlace=B("rollbackInPlace"),"Contributions"===mw.config.get("wgCanonicalSpecialPageName")?t.addLinks.contributions():"Recentchanges"!==mw.config.get("wgCanonicalSpecialPageName")&&"Recentchangeslinked"!==mw.config.get("wgCanonicalSpecialPageName")||mw.hook("wikipage.content").add((function(e){e.is("div")&&t.addLinks.recentchanges()}))),t}return p(t,e),t.prototype.disableLinks=function(e){$(e).children().each((function(e,t){t.innerHTML=t.textContent,$(t).css("font-weight","normal").css("color","darkgray")}))},t.prototype.revert=function(e,t,i,a){var n=this;mw.util.isIPv6Address(t)&&(t=Morebits.ip.sanitizeIPv6(t));var r=a||mw.config.get("wgPageName"),o=i||mw.config.get("wgCurRevisionId");if(this.rollbackInPlace){var s=document.createElement("span");mw.notify(s,{autoHide:!1,title:"Rollback on "+a,tag:"twinklefluff_"+i}),Morebits.status.init(s)}else Morebits.status.init(document.getElementById("mw-content-text")),$("#catlinks").remove();var l={type:e,user:t,userHidden:!t,pagename:r,revid:o},d={action:"query",prop:["info","revisions"].concat(this.flaggedRevsEnabled?"flagged":[]),titles:r,inprop:"watched",intestactions:"edit",rvlimit:B("revertMaxRevisions"),rvprop:["ids","timestamp","user"],curtimestamp:"",meta:"tokens",type:"csrf",format:"json"},c=new Morebits.wiki.api(S("fetching-data"),d);c.params=l,c.post().then((function(e){return n.callbacks.main(e)}))},t.prototype.revertToRevision=function(e){Morebits.status.init(document.getElementById("mw-content-text"));var t=new Morebits.wiki.page(mw.config.get("wgPageName"),S("saving-reverted"));t.setOldID(e),t.load(this.callbacks.toRevision)},t.prototype.formatSummary=function(e,t,i){var a=e;if(i&&(a+=": "+Morebits.string.toUpperCaseFirstChar(i)),/%USER%/.test(e))if(t){var n=unescape(encodeURIComponent(a.replace("%USER%",""))).length,r="[[Special:Contributions/"+t+"|"+t+"]]",o=unescape(encodeURIComponent(r)).length;if(n+o<=499){var s=" ([[User talk:"+t+"|talk]])";a=n+o+unescape(encodeURIComponent(s)).length<=499?Morebits.string.safeReplace(a,"%USER%",r+s):Morebits.string.safeReplace(a,"%USER%",r)}else a=Morebits.string.safeReplace(a,"%USER%",t)}else a=Morebits.string.safeReplace(a,"%USER%",S("hidden-user"));return a},t.moduleName="fluff",t}(Y)),X=function(e){function t(t,i){var a=e.call(this,t,i)||this;if(n.changeTags.length)a.setChangeTags(n.changeTags);else{var r=a.setEditSummary.bind(a);a.setEditSummary=function(e){r(e+n.summaryAd)}}return["load","lookupCreation","save","append","prepend","newSection","deletePage","undeletePage","protect","stabilize"].forEach((function(e){var t=a[e].bind(a);a[e]=function(e,i){var a=this,n=$.Deferred();return t((function(t){e&&e.call(a,a),n.resolve(t instanceof Morebits.wiki.api?t:a)}),(function(e){if(i&&i.call(a,a),e instanceof Morebits.wiki.api){var t=new b(e.getErrorCode()+": "+e.getErrorText());t.code=e.getErrorCode(),t.info=e.getErrorText(),t.response=e.getResponse(),n.reject(t)}else n.reject(new Error(e))})),n}})),a}return p(t,e),t}(Morebits.wiki.page),K=function(e){function t(t,i){var a=e.call(this,t,i)||this;return a.setScriptName(n.scriptName),a}return p(t,e),t.prototype.setFooterLinks=function(e){var t=this;e&&k(e).forEach((function(e){t.addFooterLink(e[0],e[1])}))},t}(Morebits.simpleWindow),J=function(e){function t(){var i=e.call(this)||this;if(i.moduleName="XFD",i.portletName="XFD",i.portletId="twinkle-xfd",i.windowTitle="Start a deletion discussion (XfD)",mw.config.get("wgNamespaceNumber")<0||!mw.config.get("wgArticleId")||6===mw.config.get("wgNamespaceNumber")&&document.getElementById("mw-sharedupload"))return i;for(var a=0,n=t.modeList;a<n.length;a++){var r=n[a];if(r.isDefaultChoice()){i.mode=new r;break}}return i.portletTooltip=i.getMenuTooltip(),i.addMenu(),i}return p(t,e),t.prototype.getMenuTooltip=function(){return this.mode?this.mode.getMenuTooltip():"Start a deletion discussion"},t.prototype.makeWindow=function(){var e=new K(700,400);e.setTitle(this.windowTitle),e.setFooterLinks(this.footerlinks),this.makeForm(e)},t.prototype.makeForm=function(e){var i=this;this.Window=e;var a=new Morebits.quickForm((function(){i.mode.evaluate()}));a.append({type:"select",name:"venue",label:S("xfd-venue-label"),tooltip:S("xfd-venue-tooltip"),event:this.onCategoryChange.bind(this),list:t.modeList.map((function(e){return{type:"option",label:e.venueLabel,selected:i.mode instanceof e,value:e.venueCode}}))}),a.append({type:"div",id:"wrong-venue-warn",style:"color: red; font-style: italic"}),a.append({type:"checkbox",list:[{label:S("notify-creator-label"),value:"notify",name:"notifycreator",tooltip:S("notify-creator-tooltip"),checked:!0}]}),this.fieldset=a.append({type:"field",label:"Work area",name:"work_area"});var n=document.createElement("a");$(n).click((function(){i.mode.preview(i.result)})),n.style.cursor="pointer",n.textContent="Preview",a.append({type:"div",id:"xfdpreview",label:[n]}),a.append({type:"div",id:"twinklexfd-previewbox",style:"display: none"}),a.append({type:"submit"}),this.result=a.render(),e.setContent(this.result),e.display(),this.result.previewer=new Morebits.wiki.preview(document.getElementById("twinklexfd-previewbox"));var r=document.createEvent("Event");return r.initEvent("change",!0,!0),this.result.venue.dispatchEvent(r),a},t.prototype.onCategoryChange=function(e){var i=e.target.value,a=e.target.form,n=t.modeList.filter((function(e){return e.venueCode===i}))[0];if(!n)throw new Error(S("bad-venue",i));this.mode=new n,this.mode.result=this.result,this.mode.Window=this.Window,$("#wrong-venue-warn").text(this.mode.getVenueWarning()||""),a.previewer.closePreview();var r=this.mode.generateFieldset().render();$(this.result).find("fieldset[name=work_area]").replaceWith(r),this.mode.postRender(r)},t.userPreferences=function(){return{title:"XfD (deletion discussions)",preferences:[{name:"logXfdNominations",label:S("pref-logxfdnominations-label"),helptip:S("pref-logxfdnominations-tooltip"),type:"boolean",default:!1},{name:"xfdLogPageName",label:S("pref-xfdlogpagename-label"),helptip:S("pref-xfdlogpagename-tooltip"),type:"string",default:"XfD log"},{name:"xfdWatchPage",label:S("pref-xfdwatchpage-label"),helptip:S("pref-xfdwatchpage-tooltip"),type:"enum",enumValues:q.watchlistEnums,default:"default"},{name:"xfdWatchDiscussion",label:S("pref-xfdwatchdiscussion-label"),helptip:S("pref-xfdwatchdiscussion-tooltip"),type:"enum",enumValues:q.watchlistEnums,default:"default"},{name:"xfdWatchList",label:S("pref-xfdwatchlist-label"),helptip:S("pref-xfdwatchlist-tooltip"),type:"enum",enumValues:q.watchlistEnums,default:"no"},{name:"xfdWatchUser",label:S("pref-xfdwatchuser-label"),helptip:S("pref-xfdwatchuser-tooltip"),type:"enum",enumValues:q.watchlistEnums,default:"default"}]}},t.moduleName="XFD",t}(Y),Z=function(){function e(){}return e.isDefaultChoice=function(){return!1},e.prototype.getMenuTooltip=function(){return"Nominate page for deletion"},e.prototype.generateFieldset=function(){return this.fieldset=new Morebits.quickForm.element({type:"field",label:this.getFieldsetLabel(),name:"work_area"}),this.fieldset},e.prototype.appendReasonArea=function(){this.fieldset.append({type:"textarea",name:"reason",label:S("reason"),value:$(this.result).find("textarea").val()||"",tooltip:S("reason-tooltip")})},e.prototype.postRender=function(e){},e.prototype.getVenueWarning=function(){},e.prototype.preprocessParams=function(){},e.prototype.preview=function(e){this.params=Morebits.quickForm.getInputData(e),this.preprocessParams(),this.showPreview(e)},e.prototype.showPreview=function(e){var t=this.getDiscussionWikitext();e.previewer.beginRender(t,"WP:TW")},e.prototype.evaluate=function(){this.params=Morebits.quickForm.getInputData(this.result),this.preprocessParams(),this.validateInput()&&(Morebits.simpleWindow.setButtonsEnabled(!1),Morebits.status.init(this.result),this.tm=new Morebits.taskManager(this))},e.prototype.validateInput=function(){return!0},e.prototype.printReasonText=function(){Morebits.status.printUserText(this.params.reason,S("deletion-reason-here"))},e.prototype.redirectToDiscussion=function(){var e=this.params.discussionpage||this.params.logpage;Morebits.status.actionCompleted(S("nomination-complete-redirect")),setTimeout((function(){window.location.href=mw.util.getUrl(e)}),Morebits.wiki.actionCompleted.timeOut)},e.prototype.determineDiscussionPage=function(){var e=this,t=this.params;return new T(S("looking-old-nominations"),{action:"query",list:"allpages",apprefix:new mw.Title(this.discussionPagePrefix).getMain()+"/"+Morebits.pageNameNorm,apnamespace:4,apfilterredir:"nonredirects",aplimit:"max",format:"json"}).post().then((function(i){var a=i.getResponse().query.allpages;if(a.length<=0)t.numbering=t.number="";else{for(var n=0,r=new RegExp("^"+Morebits.string.escapeRegExp(e.discussionPagePrefix+"/"+Morebits.pageNameNorm)+"\\s*\\(\\s*(\\d+)(?:(?:th|nd|rd|st) nom(?:ination)?)?\\s*\\)\\s*$"),o=0;o<a.length;++o){var s=a[o].title;if(s!==e.discussionPagePrefix+"/"+Morebits.pageNameNorm){var l=r.exec(s);l&&(n=Math.max(n,Number(l[1])))}else n=Math.max(n,1)}t.number=function(e){switch(e){case 1:return"";case 2:return"2nd";case 3:return"3rd";default:return e+"th"}}(n+1),t.numbering=n>0?" ("+t.number+" nomination)":""}t.discussionpage=e.discussionPagePrefix+"/"+Morebits.pageNameNorm+t.numbering,i.getStatusElement().info("next in order is "+t.discussionpage)}))},e.prototype.autoEditRequest=function(e){var t=this.params,i=new mw.Title(e.getPageName()).getTalkPage().toText();if(i===e.getPageName())return e.getStatusElement().error(S("protected-no-editreq")),$.Deferred().reject();e.getStatusElement().warn(S("protected-editreq"));var a="{{subst:Xfd edit protected|page="+e.getPageName()+"|discussion="+t.discussionpage+"|tag=<no"+"wiki>"+t.tagText+"</no"+"wiki>}}",n=new X(i,S("posting-editreq"));return n.setNewSectionTitle(S("xfd-editreq-title",t.venue)),n.setNewSectionText(a),n.setCreateOption("recreate"),n.setWatchlist(B("xfdWatchPage")),n.setFollowRedirect(!0),n.newSection().catch((function(){return n.getStatusElement().warn(S("xfd-editreq-failed")),$.Deferred().reject()}))},e.prototype.fetchCreatorInfo=function(){var e=this,t=new X(Morebits.pageNameNorm,S("fetching-creator"));return t.setLookupNonRedirectCreator(this.params.lookupNonRedirectCreator),t.lookupCreation().then((function(){e.params.initialContrib=t.getCreator(),t.getStatusElement().info("Found "+t.getCreator())}))},e.prototype.notifyTalkPage=function(e,t){var i=this.params,a=mw.Title.newFromText(e,c),n=a.getNamespaceId(),r=a.getRelativeText(c);t=t||new Morebits.status(S("notifying-creator",r));var o=a.toText();if(3===n&&r===mw.config.get("wgUserName"))return i.initialContrib=null,t.warn(S("notify-self-skip",r)),$.Deferred().resolve();var s=new X(o,t);return s.setAppendText("\n\n"+this.getNotifyText()),s.setEditSummary(this.getNotifyEditSummary()),s.setCreateOption("recreate"),"RfD"===i.venue&&3!==n?s.setWatchlist(B("xfdWatchRelated")):s.setWatchlist(B("xfdWatchUser")),s.setFollowRedirect(!0,!1),s.append().catch((function(){i.initialContrib=null}))},e.prototype.getNotifyText=function(){return"{{subst:"+this.params.venue+" notice|1="+Morebits.pageNameNorm+"}} ~~~~"},e.prototype.getNotifyEditSummary=function(){return"Notification: [["+this.params.discussionpage+"|listing]] of [[:"+Morebits.pageNameNorm+"]] at [[WP:"+this.getFieldsetLabel()+"]]."},e.prototype.notifyCreator=function(){return this.params.notifycreator?this.notifyTalkPage(this.params.initialContrib):(this.params.intialContrib=null,$.Deferred().resolve())},e.prototype.addToLog=function(){var e=this.params;if(!B("logXfdNominations")||-1!==B("noLogOnXfdNomination").indexOf(e.venue.toLowerCase()))return $.Deferred().resolve();var t=new Morebits.userspaceLogger(B("xfdLogPageName"));return t.initialText="This is a log of all [[WP:XFD|deletion discussion]] nominations made by this user using [[WP:TW|Twinkle]]'s XfD module.\n\nIf you no longer wish to keep this log, you can turn it off using the [[Wikipedia:Twinkle/Preferences|preferences panel]], and nominate this page for speedy deletion under [[WP:CSD#U1|CSD U1]]."+(Morebits.userIsSysop?"\n\nThis log does not track XfD-related deletions made using Twinkle.":""),t.changeTags=n.changeTags,t.log(this.getUserspaceLoggingText(),this.getUserspaceLoggingEditSummary())},e.prototype.getUserspaceLoggingEditSummary=function(){return"Logging "+this.params.venue+" nomination of [[:"+Morebits.pageNameNorm+"]]."},e.prototype.getUserspaceLoggingText1=function(){return"\n\t\t\t# [[:{{subst:FULLPAGENAME}}]]: {{subst:#ifeq:{{subst:NAMESPACENUMBER}}|6| ([{{fullurl:Special:Log|page={{urlencode:{{subst:FULLPAGENAME}}}}}} log])|}} nominated at [[WP:{{subst:uc:$1}}|$1]]{{subst:#if:$2|; notified {{user|1=$2}}|}}\n\t\t"},e.prototype.getUserspaceLoggingText=function(){var e=this.params,t=mw.config.get("wgNamespaceNumber")===l?" ([{{fullurl:Special:Log|page="+mw.util.wikiUrlencode(mw.config.get("wgPageName"))+"}} log])":"",i=e.discussionpage?"[["+e.discussionpage+"|nominated]]":"nominated",a="# [[:"+Morebits.pageNameNorm+"]]:"+t+" "+i+" at [[WP:"+e.venue+"|"+e.venue+"]]";return a+=this.getUserspaceLoggingExtraInfo(),e.initialContrib&&e.notifycreator&&(a+="; notified {{user|1="+e.initialContrib+"}}"),a+=" ~~~~~",e.reason&&(a+="\n#* '''Reason''': "+Morebits.string.formatReasonForLog(e.reason)),a},e.prototype.getUserspaceLoggingExtraInfo=function(){return""},e}();var Q;var ee=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.discussionPagePrefix="Wikipedia:Articles for deletion",t}return p(t,e),t.isDefaultChoice=function(){return 0===mw.config.get("wgNamespaceNumber")&&!Morebits.isPageRedirect()},t.prototype.getFieldsetLabel=function(){return"Articles for deletion"},t.prototype.getVenueWarning=function(){return 0!==mw.config.get("wgNamespaceNumber")?"AfD is generally appropriate only for articles.":mw.config.get("wgIsRedirect")?"Please use RfD for redirects.":void 0},t.prototype.getMenuTooltip=function(){return"Nominate article for deletion or move"},t.prototype.generateFieldset=function(){this.fieldset=e.prototype.generateFieldset.call(this),this.fieldset.append({type:"div",label:"",style:"margin-bottom: 5px;"}),this.fieldset.append({type:"checkbox",list:[{label:"Wrap deletion tag with <noinclude>",value:"noinclude",name:"noinclude",tooltip:"Will wrap the deletion tag in &lt;noinclude&gt; tags, so that it won't transclude. This option is not normally required."}]}),this.fieldset.append({type:"select",name:"xfdcat",label:"Choose what category this nomination belongs in:",list:[{type:"option",label:"Unknown",value:"?",selected:!0},{type:"option",label:"Media and music",value:"M"},{type:"option",label:"Organisation, corporation, or product",value:"O"},{type:"option",label:"Biographical",value:"B"},{type:"option",label:"Society topics",value:"S"},{type:"option",label:"Web or internet",value:"W"},{type:"option",label:"Games or sports",value:"G"},{type:"option",label:"Science and technology",value:"T"},{type:"option",label:"Fiction and the arts",value:"F"},{type:"option",label:"Places and transportation",value:"P"},{type:"option",label:"Indiscernible or unclassifiable topic",value:"I"},{type:"option",label:"Debate not yet sorted",value:"U"}]});var t=this.fieldset.append({type:"select",multiple:!0,name:"delsortCats",label:"Choose deletion sorting categories: ",tooltip:"Select a few categories that are specifically relevant to the subject of the article. Be as precise as possible; categories like People and USA should only be used when no other categories apply."});return $.each({People:["People","Academics and educators","Actors and filmmakers","Artists","Authors","Bands and musicians","Businesspeople","Politicians","Sportspeople","Women","Lists of people"],Arts:["Arts","Fictional elements","Science fiction and fantasy"],"Arts/Culinary":["Food and drink","Wine"],"Arts/Language":["Language","Academic journals","Bibliographies","Journalism","Literature","Logic","News media","Philosophy","Poetry"],"Arts/Performing":["Albums and songs","Dance","Film","Magic","Music","Radio","Television","Theatre","Video games"],"Arts/Visual arts":["Visual arts","Architecture","Fashion","Photography"],"Arts/Comics and animation":["Comics and animation","Anime and manga","Webcomics"],"Places of interest":["Museums and libraries","Shopping malls"],Topical:["Animal","Bilateral relations","Conservatism","Conspiracy theories","Crime","Disability","Discrimination","Entertainment","Ethnic groups","Events","Finance","Games","Health and fitness","History","Law","Military","Organizations","Paranormal","Piracy","Politics","Terrorism"],"Topical/Business":["Business","Advertising","Companies","Management","Products"],"Topical/Culture":["Beauty pageants","Fashion","Mythology","Popular culture","Sexuality and gender"],"Topical/Education":["Education","Fraternities and sororities","Schools"],"Topical/Religion":["Religion","Atheism","Bible","Buddhism","Christianity","Islam","Judaism","Hinduism","Paganism","Sikhism","Spirituality"],"Topical/Science":["Science","Archaeology","Astronomy","Behavioural science","Biology","Economics","Engineering","Environment","Geography","Mathematics","Medicine","Organisms","Psychiatry","Psychology","Social science"],"Topical/Sports":["Sports","American football","Baseball","Basketball","Bodybuilding","Boxing","Cricket","Cycling","Football","Golf","Handball","Horse racing","Ice hockey","Motorsport","Rugby union","Softball","Martial arts","Wrestling"],"Topical/Technology":["Technology","Aviation","Computing","Firearms","Internet","Software","Transportation","Websites"],"Wikipedia page type":["Disambiguations","Lists"],"Geographic/Africa":["Africa","Algeria","Democratic Republic of the Congo","Egypt","Ethiopia","Ghana","Kenya","Libya","Mauritius","Morocco","Nigeria","Somalia","South Africa","Zimbabwe"],"Geographic/Asia":["Asia","Afghanistan","Bangladesh","Brunei","Cambodia","China","Hong Kong","Indonesia","Japan","Korea","Laos","Malaysia","Maldives","Mongolia","Myanmar","Nepal","Pakistan","Philippines","Singapore","South Korea","Sri Lanka","Taiwan","Thailand","Vietnam"],"Geographic/Asia/Central Asia":["Central Asia","Kazakhstan","Kyrgyzstan","Tajikistan","Turkmenistan","Uzbekistan"],"Geographic/Asia/Middle East":["Middle East","Bahrain","Iran","Iraq","Israel","Jordan","Kuwait","Lebanon","Libya","Palestine","Qatar","Saudi Arabia","Syria","United Arab Emirates","Yemen"],"Geographic/Asia/India":["India","Kerala"],"Geographic/Europe":["Europe","Albania","Armenia","Austria","Azerbaijan","Belarus","Belgium","Bosnia and Herzegovina","Bulgaria","Croatia","Cyprus","Czech Republic","Denmark","Estonia","Finland","France","Georgia (country)","Germany","Greece","Hungary","Iceland","Ireland","Italy","Jersey","Kosovo","Latvia","Lithuania","Luxembourg","Malta","Moldova","Montenegro","Netherlands","North Macedonia","Norway","Poland","Portugal","Romania","Russia","Serbia","Slovakia","Slovenia","Spain","Sweden","Switzerland","Turkey","Ukraine","Yugoslavia"],"Geographic/Europe/United Kingdom":["United Kingdom","England","Northern Ireland","Scotland","Wales"],"Geographic/Oceania":["Oceania","Antarctica","Australia","New Zealand"],"Geographic/Americas/Canada":["Canada","Alberta","British Columbia","Manitoba","Nova Scotia","Ontario","Quebec"],"Geographic/Americas/Latin America":["Latin America","Caribbean","South America","Argentina","Barbados","Belize","Bolivia","Brazil","Chile","Colombia","Costa Rica","Cuba","Ecuador","El Salvador","Grenada","Guatemala","Haiti","Mexico","Nicaragua","Panama","Paraguay","Peru","Puerto Rico","Trinidad and Tobago","Uruguay","Venezuela"],"Geographic/Americas/USA":["United States of America","Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia (U.S. state)","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","Washington, D.C.","West Virginia","Wisconsin","Wyoming"],"Geographic/Unsorted":["Islands"]},(function(e,i){var a=t.append({type:"optgroup",label:e});i.forEach((function(e){a.append({type:"option",label:e,value:e})}))})),this.appendReasonArea(),this.fieldset},t.prototype.postRender=function(e){!function(e){if($(e).length)if(Q)$(e).html(Q);else{var t=new Morebits.wiki.preview($(e)[0]);t.beginRender("({{Find sources|"+Morebits.pageNameNorm+"}})","WP:AFD").then((function(){Q=t.previewbox.innerHTML,$(e).removeClass("morebits-previewbox")}))}}("#twinkle-xfd-findsources"),$(e).find("[name=delsortCats]").attr("data-placeholder","Select delsort pages").select2({width:"100%",matcher:Morebits.select2.matchers.optgroupFull,templateResult:Morebits.select2.highlightSearchMatches,language:{searching:Morebits.select2.queryInterceptor},templateSelection:function(e){return $("<a>").text(e.text).attr({href:mw.util.getUrl("Wikipedia:WikiProject_Deletion_sorting/"+e.text),target:"_blank"})}}),mw.util.addCSS(".select2-container--default.select2-container--focus .select2-selection--multiple { border: 1px solid #aaa; }.select2-results .select2-results__option { padding-top: 1px; padding-bottom: 1px; }.select2-results .select2-results__group { padding-top: 1px; padding-bottom: 1px; } .select2-container .select2-dropdown .select2-results { font-size: 13px; }.select2-container .selection .select2-selection__rendered { font-size: 13px; }.select2-selection__choice__remove { font-size: 130%; }")},t.prototype.evaluate=function(){var t=this;e.prototype.evaluate.call(this),this.tm.add(this.checkPage,[]),this.tm.add(this.determineDiscussionPage,[]),this.tm.add(this.createDiscussionPage,[this.checkPage,this.determineDiscussionPage],this.printReasonText),this.tm.add(this.tagPage,[this.checkPage,this.createDiscussionPage]),this.tm.add(this.addToList,[this.createDiscussionPage]),this.tm.add(this.addToDelsortLists,[this.createDiscussionPage]),this.tm.add(this.patrolPage,[this.checkPage]),this.tm.add(this.fetchCreatorInfo,[]),this.tm.add(this.notifyCreator,[this.createDiscussionPage,this.fetchCreatorInfo]),this.tm.add(this.addToLog,[this.notifyCreator]),this.tm.execute().then((function(){return t.redirectToDiscussion()}))},t.prototype.preprocessParams=function(){this.params.lookupNonRedirectCreator=!0},t.prototype.checkPage=function(){var e=this,t=new X(mw.config.get("wgPageName"),"Adding deletion tag to article");return t.setFollowRedirect(!0),t.load().then((function(){var i=t.getPageText(),a=t.getStatusElement();if(e.params.articleLoadTime=t.getLoadTime(),!t.exists())return a.error("It seems that the page doesn't exist; perhaps it has already been deleted"),$.Deferred().reject();var n=i.replace(/<!--.*AfD.*\n\{\{(?:Article for deletion\/dated|AfDM).*\}\}\n<!--.*(?:\n<!--.*)?AfD.*(?:\s*\n)?/g,"");if(i!==n){if(!confirm("An AfD tag was found on this article. Maybe someone beat you to it. \nClick OK to replace the current AfD tag (not recommended), or Cancel to abandon your nomination."))return a.error("Article already tagged with AfD tag, and you chose to abort"),window.location.reload(),$.Deferred().reject();t.setPageText(n)}return t}))},t.prototype.tagPage=function(e){var t=this.params;if(t.tagText=(t.noinclude?"<noinclude>{{":"{{")+(""===t.number?"subst:afd|help=off":"subst:afdx|"+t.number+"|help=off")+(t.noinclude?"}}</noinclude>\n":"}}\n"),e.canEdit()){var i=e.getPageText(),a=(i=i.replace(/\{\{\s*(dated prod|dated prod blp|Prod blp\/dated|Proposed deletion\/dated|prod2|Proposed deletion endorsed|Userspace draft)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/gi,"")).replace(/\{\{\s*(db(-\w*)?|delete|(?:hang|hold)[- ]?on)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/gi,"");return i!==a&&confirm("A speedy deletion tag was found on this page. Should it be removed?")&&(i=a),i=new Morebits.wikitext.page(i).insertAfterTemplates(t.tagText,"short description|hatnote|main|correct title|dablink|distinguish|for|further|selfref|year dab|similar names|highway detail hatnote|broader|about(?:-distinguish| other people)?|other\\s?(?:hurricane(?: use)?s|people|persons|places|ships|uses(?: of)?)|redirect(?:-(?:distinguish|synonym|multi))?|see\\s?(?:wiktionary|also(?: if exists)?)").getText(),e.setPageText(i),e.setEditSummary("Nominated for deletion; see [[:"+t.discussionpage+"]]."),e.setWatchlist(B("xfdWatchPage")),e.setCreateOption("nocreate"),e.save()}return this.autoEditRequest(e)},t.prototype.getDiscussionWikitext=function(){var e=this.params;return w("subst:afd2",{text:Morebits.string.formatReasonText(e.reason,!0),pg:Morebits.pageNameNorm,cat:e.xfdcat})+e.delsortCats.map((function(e){return"\n{{subst:delsort|"+e+"|~~~~}}"})).join("")},t.prototype.createDiscussionPage=function(){var e=this,t=this.params,i=new X(t.discussionpage,"Creating article deletion discussion page");return i.load().then((function(){return i.setPageText(e.getDiscussionWikitext()),i.setEditSummary("Creating deletion discussion page for [[:"+Morebits.pageNameNorm+"]]."),i.setWatchlist(B("xfdWatchDiscussion")),i.setCreateOption("createonly"),i.save()}))},t.prototype.addToList=function(){var e=this.params,t=new Morebits.date(e.articleLoadTime),i=new X("Wikipedia:Articles for deletion/Log/"+t.format("YYYY MMMM D","utc"),"Adding discussion to today's list");return i.setFollowRedirect(!0),i.load().then((function(){var t,a=i.getStatusElement(),n="{{subst:afd3|pg="+Morebits.pageNameNorm+e.numbering+"}}\n";if(i.exists()){var r=i.getPageText()+"\n";if((t=r.replace(/(<!-- Add new entries to the TOP of the following list -->\n+)/,"$1"+n))===r){var o=document.createElement("a");return o.setAttribute("href",mw.util.getUrl("Wikipedia:Twinkle/Fixing AFD")+"?action=purge"),o.appendChild(document.createTextNode("How to fix AFD")),a.error(["Could not find the target spot for the discussion. To fix this problem, please see ",o,"."]),$.Deferred().reject()}}else t="{{subst:AfD log}}\n"+n;return i.setPageText(t),i.setEditSummary("Adding [[:"+e.discussionpage+"]]."),i.setWatchlist(B("xfdWatchList")),i.setCreateOption("recreate"),i.save()}))},t.prototype.addToDelsortLists=function(){var e=this.params,t=e.delsortCats.map((function(t){var i=new X("Wikipedia:WikiProject Deletion sorting/"+t,"Adding to list of "+t+"-related deletion discussions");return i.setFollowRedirect(!0),i.load().then((function(){var t=e.discussionpage,a=i.getPageText().replace("directly below this line --\x3e","directly below this line --\x3e\n{{"+t+"}}");return i.setPageText(a),i.setEditSummary("Listing [[:"+t+"]]."),i.setCreateOption("nocreate"),i.save().catch((function(){}))}))}));return $.when.apply($,t)},t.prototype.patrolPage=function(){return B("markXfdPagesAsPatrolled")&&new X(Morebits.pageNameNorm).triage(),$.Deferred().resolve()},t.prototype.getNotifyText=function(){return w("subst:afd notice",{1:Morebits.pageNameNorm,order:this.params.numbering?"|order=&#32;"+this.params.numbering:""})+" ~~~~"},t.venueCode="AfD",t.venueLabel="AfD (Articles for deletion)",t}(Z),te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.getFieldsetLabel=function(){return"Templates for discussion"},t.prototype.getMenuTooltip=function(){return"Start a discussion for deleting or merging this template"},t.isDefaultChoice=function(){return-1!==[10,828].indexOf(mw.config.get("wgNamespaceNumber"))},t.prototype.generateFieldset=function(){this.fieldset=e.prototype.generateFieldset.call(this);var t="Scribunto"===mw.config.get("wgPageContentModel")?"module":"template";return this.fieldset.append({type:"select",label:"Choose type of action wanted: ",name:"xfdcat",event:function(e){var i=e.target,a=i.form.tfdtarget;"TfM"!==i.value||a?($(Morebits.quickForm.getElementContainer(a)).remove(),a=null):(a=new Morebits.quickForm.element({name:"tfdtarget",type:"input",label:"Other "+t+" to be merged: ",tooltip:"Required. Should not include the "+Morebits.string.toUpperCaseFirstChar(t)+": namespace prefix.",required:!0}),i.parentNode.appendChild(a.render()))},list:[{type:"option",label:"Deletion",value:"TfD",selected:!0},{type:"option",label:"Merge",value:"TfM"}]}),this.fieldset.append({type:"select",name:"templatetype",label:"Deletion tag display style: ",tooltip:"Which <code>type=</code> parameter to pass to the TfD tag template.",list:"module"===t?[{type:"option",value:"module",label:"Module",selected:!0}]:[{type:"option",value:"standard",label:"Standard",selected:!0},{type:"option",value:"sidebar",label:"Sidebar/infobox",selected:!!$(".infobox").length},{type:"option",value:"inline",label:"Inline template",selected:!!$(".mw-parser-output > p .Inline-Template").length},{type:"option",value:"tiny",label:"Tiny inline"}]}),this.fieldset.append({type:"checkbox",list:[{label:"Wrap deletion tag with <noinclude> (for substituted templates only)",value:"noinclude",name:"noinclude",tooltip:"Will wrap the deletion tag in &lt;noinclude&gt; tags, so that it won't get substituted along with the template.",disabled:"module"===t,checked:!!$(".box-Subst_only").length}]}),this.fieldset.append({type:"checkbox",list:[{label:"Notify users of the template",value:"devpages",name:"devpages",tooltip:"A notification template will be sent to Twinkle, AWB, and RedWarn if this is true.",checked:!0}]}),this.appendReasonArea(),this.fieldset},t.prototype.preprocessParams=function(){this.params.tfdtarget&&(this.params.tfdtarget=v(this.params.tfdtarget)),this.params.scribunto="Scribunto"===mw.config.get("wgPageContentModel"),"TfM"===this.params.xfdcat&&(this.params.otherTemplateName=(this.params.scribunto?"Module:":"Template:")+this.params.tfdtarget)},t.prototype.evaluate=function(){var t=this;e.prototype.evaluate.call(this),this.tm.add(this.tagPage,[]),this.tm.add(this.addToList,[this.tagPage],this.printReasonText),this.tm.add(this.watchModule,[]),this.tm.add(this.fetchCreatorInfo,[]),this.tm.add(this.notifyCreator,[this.fetchCreatorInfo]),this.tm.add(this.notifyOtherCreator,[this.fetchCreatorInfo]),this.tm.add(this.notifyDevs,[this.addToList]),this.tm.add(this.addToLog,[this.notifyCreator]),this.tm.execute().then((function(){return t.redirectToDiscussion()}))},t.prototype.tagPage=function(){return"TfM"===this.params.xfdcat?this.tagPagesForMerge():this.tagPageForDeletion()},t.prototype.setLogPageAndDiscussionPage=function(e){var t=new Morebits.date(e);this.params.logpage="Wikipedia:Templates for discussion/Log/"+t.format("YYYY MMMM D","utc"),this.params.discussionpage=this.params.logpage+"#"+Morebits.pageNameNorm},t.prototype.tagPageForDeletion=function(){var e=this,t=this.params,i=new X(Morebits.pageNameNorm+(t.scribunto?"/doc":""),"Tagging "+(t.scribunto?"module documentation":"template")+" with deletion tag");return i.setFollowRedirect(!0),i.load().then((function(){e.setLogPageAndDiscussionPage(i.getLoadTime());var a=i.getPageText();return t.tagText="{{subst:template for discussion|help=off"+("standard"!==t.templatetype?"|type="+t.templatetype:"")+"}}","sanitized-css"===i.getContentModel()?t.tagText="/* "+t.tagText+" */":(t.noinclude&&(t.tagText="<noinclude>"+t.tagText+"</noinclude>"),t.tagText+="standard"===t.templatetype||"sidebar"===t.templatetype?"\n":""),i.canEdit()&&-1!==["wikitext","sanitized-css"].indexOf(i.getContentModel())?(i.setPageText(t.tagText+a),i.setEditSummary("Nominated for deletion; see [[:"+t.discussionpage+"]]."),i.setWatchlist(B("xfdWatchPage")),t.scribunto&&i.setCreateOption("recreate"),i.save()):e.autoEditRequest(i)}))},t.prototype.tagPagesForMerge=function(){var e=this,t=this.params,i=t.scribunto?"/doc":"",a=t.scribunto?"module documentation":"template",n=new X(""+Morebits.pageNameNorm+i,"Tagging "+a+" with merge tag");n.setFollowRedirect(!0);var r=n.load().then((function(){return e.setLogPageAndDiscussionPage(n.getLoadTime()),e.tagForMerge(n,e.params)})),o=new X(""+t.otherTemplateName+i,"Tagging other "+a+" with merge tag");o.setFollowRedirect(!0);var s=o.load().then((function(){return e.setLogPageAndDiscussionPage(n.getLoadTime()),e.tagForMerge(o,$.extend({},t,{otherTemplateName:Morebits.pageNameNorm}))}));return $.when(r,s)},t.prototype.tagForMerge=function(e,t){var i=e.getPageText();return t.tagText="{{subst:tfm|help=off|"+("standard"!==t.templatetype?"type="+t.templatetype+"|":"")+"1="+t.otherTemplateName.replace(/^(?:Template|Module):/,"")+"}}","sanitized-css"===e.getContentModel()?t.tagText="/* "+t.tagText+" */":(t.noinclude&&(t.tagText="<noinclude>"+t.tagText+"</noinclude>"),t.tagText+="standard"===t.templatetype||"sidebar"===t.templatetype?"\n":""),e.canEdit()&&-1!==["wikitext","sanitized-css"].indexOf(e.getContentModel())?(e.setPageText(t.tagText+i),e.setEditSummary("Listed for merging with [[:"+t.otherTemplateName+"]]; see [[:"+t.discussionpage+"]]."),e.setWatchlist(B("xfdWatchPage")),t.scribunto&&e.setCreateOption("recreate"),e.save()):this.autoEditRequest(e)},t.prototype.addToList=function(){var e=this,t=this.params,i=new X(t.logpage,"Adding discussion to today's log");return i.setFollowRedirect(!0),i.load().then((function(){var a,n=i.getStatusElement(),r=e.getDiscussionWikitext();if(i.exists()){var o=i.getPageText();if((a=o.replace("--\x3e","--\x3e\n"+r))===o)return n.error("failed to find target spot for the discussion"),$.Deferred().reject()}else a="{{subst:TfD log}}\n"+r;return i.setPageText(a),i.setEditSummary("Adding "+("TfD"===t.xfdcat?"deletion nomination":"merge listing")+" of [[:"+Morebits.pageNameNorm+"]]."),i.setWatchlist(B("xfdWatchDiscussion")),i.setCreateOption("recreate"),i.save()}))},t.prototype.notifyOtherCreator=function(){var e=this;if(!this.params.otherTemplateName)return $.Deferred().resolve();var t=new X(this.params.otherTemplateName,"Finding other page creator");t.lookupCreation().then((function(){var i=t.getCreator();if(t.getStatusElement().info("Found "+i),i!==e.params.initialContrib)return e.notifyTalkPage(i)}))},t.prototype.notifyDevs=function(){var e=this;if(!this.params.devpages)return $.Deferred().resolve();var t=mw.config.get("wgCategories");return $.when.apply($,k({"Templates used by Twinkle":"Wikipedia talk:Twinkle","Templates used by AutoWikiBrowser":"Wikipedia talk:AutoWikiBrowser","Templates used by RedWarn":"Wikipedia talk:RedWarn"}).filter((function(e){var i=e[0];e[1];return t.includes(i)})).map((function(t){t[0];var i=t[1];return e.notifyTalkPage(i,new Morebits.status("Notifying "+i+" of template nomination"))})))},t.prototype.watchModule=function(){var e=this.params;if(!e.scribunto)return $.Deferred().resolve();var t=B("xfdWatchPage");if(!("no"!==t&&("default"!==t||!!parseInt(mw.user.options.get("watchdefault"),10))))return $.Deferred().resolve();var i={action:"watch",titles:[mw.config.get("wgPageName")],token:mw.user.tokens.get("watchToken"),watchlistexpiry:"default"!==t&&"yes"!==t&&t};return"TfM"===e.xfdcat&&i.titles.push(e.otherTemplateName),new T("Adding Module to watchlist",i).post()},t.prototype.getDiscussionWikitext=function(){return w("subst:"+this.params.xfdcat+"2",{text:Morebits.string.formatReasonText(this.params.reason,!0),1:mw.config.get("wgTitle"),module:this.params.scribunto?"Module:":"",2:this.params.tfdtarget})},t.prototype.getNotifyText=function(){var e="{{subst:tfd notice";return"TfM"===this.params.xfdcat&&(e="\n{{subst:Tfm notice|2="+this.params.tfdtarget),e+="|1="+Morebits.pageNameNorm+"}} ~~~~"},t.prototype.getUserspaceLoggingExtraInfo=function(){var e=this.params,t="";if("TfM"===e.xfdcat&&(t+=" (merge)",e.tfdtarget)){var i="Scribunto"===mw.config.get("wgPageContentModel")?"Module:":"Template:";t+="; Other "+i.toLowerCase()+" [[",/^:?(?:template|module):/i.test(e.tfdtarget)||(t+=i),t+=e.tfdtarget+"]]"}return t},t.venueCode="TfD",t.venueLabel="TfD (Templates for discussion)",t}(Z),ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.isDefaultChoice=function(){return 6===mw.config.get("wgNamespaceNumber")},t.prototype.getFieldsetLabel=function(){return"Files for discussion"},t.prototype.getMenuTooltip=function(){return"Start a discussion for deleting this file"},t.prototype.getVenueWarning=function(){if(6!==mw.config.get("wgNamespaceNumber"))return"FFD is selected but this page doesn't look like a file!"},t.prototype.generateFieldset=function(){return this.fieldset=e.prototype.generateFieldset.call(this),this.appendReasonArea(),this.fieldset},t.prototype.preview=function(e){var t=this;this.params=Morebits.quickForm.getInputData(e),this.preprocessParams(),this.fetchCreatorInfo().then((function(){t.showPreview(e)}))},t.prototype.evaluate=function(){var t=this;e.prototype.evaluate.call(this),this.tm.add(this.fetchCreatorInfo,[]),this.tm.add(this.tagPage,[]),this.tm.add(this.addToList,[this.fetchCreatorInfo,this.tagPage],this.printReasonText),this.tm.add(this.notifyCreator,[this.fetchCreatorInfo]),this.tm.add(this.addToLog,[this.notifyCreator]),this.tm.execute().then((function(){return t.redirectToDiscussion()}))},t.prototype.tagPage=function(){var e=this,t=this.params,i=new X(mw.config.get("wgPageName"),"Adding deletion tag to file page");return i.setFollowRedirect(!0),i.load().then((function(){var a=i.getPageText(),n=new Morebits.date(i.getLoadTime()).format("YYYY MMMM D","utc");return t.logpage="Wikipedia:Files for discussion/"+n,t.discussionpage=t.logpage+"#"+Morebits.pageNameNorm,t.tagText="{{ffd|log="+n+"|help=off}}\n",i.canEdit()?(a=a.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi,""),i.setPageText(t.tagText+a),i.setEditSummary("Listed for discussion at [[:"+t.discussionpage+"]]."),i.setWatchlist(B("xfdWatchPage")),i.setCreateOption("recreate"),i.save()):e.autoEditRequest(i)}))},t.prototype.addToList=function(){var e=this,t=this.params,i=new X(t.logpage,"Adding discussion to today's list");return i.setFollowRedirect(!0),i.load().then((function(){var t=i.getPageText();return i.exists()||(t="{{subst:FfD log}}"),i.setPageText(t+"\n\n"+e.getDiscussionWikitext()),i.setEditSummary("Adding [[:"+Morebits.pageNameNorm+"]]."),i.setWatchlist(B("xfdWatchDiscussion")),i.setCreateOption("recreate"),i.save()}))},t.prototype.getDiscussionWikitext=function(){return w("subst:ffd2",{Reason:Morebits.string.formatReasonText(this.params.reason,!0),1:mw.config.get("wgTitle"),Uploader:this.params.initialContrib})},t.venueCode="FfD",t.venueLabel="FfD (Files for discussion)",t}(Z),ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.isDefaultChoice=function(){return 14===mw.config.get("wgNamespaceNumber")||10===mw.config.get("wgNamespaceNumber")&&/-stub$/.test(Morebits.pageNameNorm)},t.prototype.getFieldsetLabel=function(){return"Categories for discussion"},t.prototype.getMenuTooltip=function(){return"Nominate article for deletion or move"},t.prototype.getVenueWarning=function(){if(-1===[10,14].indexOf(mw.config.get("wgNamespaceNumber")))return"CfD is only for categories and stub templates."},t.prototype.generateFieldset=function(){this.fieldset=e.prototype.generateFieldset.call(this);var t=14===mw.config.get("wgNamespaceNumber");return this.fieldset.append({type:"select",label:"Choose type of action wanted: ",name:"xfdcat",list:t?[{type:"option",label:"Deletion",value:"CfD",selected:!0},{type:"option",label:"Merge",value:"CfM"},{type:"option",label:"Renaming",value:"CfR"},{type:"option",label:"Split",value:"CfS"},{type:"option",label:"Convert into article",value:"CfC"}]:[{type:"option",label:"Stub Deletion",value:"SfD-t",selected:!0},{type:"option",label:"Stub Renaming",value:"SfR-t"}],event:function(e){var i=e.target.value,a=e.target.form.cfdtarget,n=e.target.form.cfdtarget2;a.disabled="CfD"===i||"SfD-t"===i,t?("CfS"===i?Morebits.quickForm.setElementLabel(a,"Target categories: "):"CfC"===i?Morebits.quickForm.setElementLabel(a,"Target article: "):Morebits.quickForm.setElementLabel(a,"Target category: "),"CfS"===i?n?(n.disabled=!1,$(n).show()):((n=document.createElement("input")).setAttribute("name","cfdtarget2"),n.setAttribute("type","text"),n.setAttribute("required","true"),a.parentNode.appendChild(n)):($(n).prop("disabled",!0),$(n).hide())):Morebits.quickForm.setElementLabel(a,"Target stub template: ")}}),this.fieldset.append({type:"input",name:"cfdtarget",label:"Target category: ",disabled:!0,required:!0,value:""}),this.appendReasonArea(),this.fieldset},t.prototype.preprocessParams=function(){this.params.cfdtarget&&(this.params.cfdtarget=v(this.params.cfdtarget)),this.params.cfdtarget2&&(this.params.cfdtarget2=v(this.params.cfdtarget2));this.params.action={CfD:"deletion","SfD-t":"deletion",CfM:"merging",CfR:"renaming","SfR-t":"renaming",CfS:"splitting",CfC:"conversion"}[this.params.xfdcat],this.params.stub=14!==mw.config.get("wgNamespaceNumber")},t.prototype.evaluate=function(){var t=this;e.prototype.evaluate.call(this),this.tm.add(this.tagPage,[]),this.tm.add(this.addToList,[this.tagPage],this.printReasonText),this.tm.add(this.fetchCreatorInfo,[]),this.tm.add(this.notifyCreator,[this.fetchCreatorInfo,this.tagPage]),this.tm.add(this.addToLog,[this.notifyCreator]),this.tm.execute().then((function(){return t.redirectToDiscussion()}))},t.prototype.tagPage=function(){var e=this,t=this.params,i=new X(mw.config.get("wgPageName"),"Tagging category with "+t.action+" tag");return i.setFollowRedirect(!0),i.load().then((function(){var a=new Morebits.date(i.getLoadTime());t.logpage="Wikipedia:Categories for discussion/Log/"+a.format("YYYY MMMM D","utc"),t.discussionpage=t.logpage+"#"+Morebits.pageNameNorm;var n=i.getPageText();t.tagText=w("subst:"+t.xfdcat,{1:t.cfdtarget,2:t.cfdtarget2})+"\n";var r=(t.stub?"Stub template":"Category")+" being considered for "+t.action+("CfC"===t.xfdcat?" to an article":"")+"; see [[:"+t.discussionpage+"]].";return i.canEdit()?(i.setPageText(t.tagText+n),i.setEditSummary(r),i.setWatchlist(B("xfdWatchPage")),i.setCreateOption("recreate"),i.save()):e.autoEditRequest(i)}))},t.prototype.addToList=function(){var e=this,t=this.params,i=new X(t.logpage,"Adding discussion to today's list");return i.setFollowRedirect(!0),i.load().then((function(){var a,n=i.getStatusElement(),r=e.getDiscussionWikitext();if(i.exists()){var o=i.getPageText();if((a=o.replace("below this line --\x3e","below this line --\x3e\n"+r))===o)return n.error("failed to find target spot for the discussion"),$.Deferred().reject()}else a="{{subst:CfD log}}\n"+r;return i.setPageText(a),i.setEditSummary("Adding "+t.action+" nomination of [[:"+Morebits.pageNameNorm+"]]."),i.setWatchlist(B("xfdWatchDiscussion")),i.setCreateOption("recreate"),i.save()}))},t.prototype.getDiscussionWikitext=function(){return w("subst:"+this.params.xfdcat+"2",{text:Morebits.string.formatReasonText(this.params.reason,!0),1:mw.config.get("wgTitle"),2:this.params.cfdtarget,3:this.params.cfdtarget2})},t.prototype.getNotifyText=function(){return w("subst:cfd notice",{action:this.params.action,1:Morebits.pageNameNorm,stub:10===mw.config.get("wgNamespaceNumber")?"yes":null})+" ~~~~"},t.prototype.getUserspaceLoggingExtraInfo=function(){var e=this.params,t="";if(t+=" ("+e.xfdcat+")",e.cfdtarget){var i="s"===e.xfdcat.charAt(0)?"Template:":":Category:";t+="; "+e.action+" to [["+i+e.cfdtarget+"]]","CfS"===e.xfdcat&&e.cfdtarget2&&(t+=", [["+i+e.cfdtarget2+"]]")}return t},t.venueCode="CfD",t.venueLabel="CfD (Categories for discussion)",t}(Z),ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.getMenuTooltip=function(){return"Nominate article for deletion or move"},t.prototype.getFieldsetLabel=function(){return"Categories for speedy renaming"},t.prototype.getVenueWarning=function(){if(-1===[10,14].indexOf(mw.config.get("wgNamespaceNumber")))return"CfD is only for categories and stub templates."},t.prototype.generateFieldset=function(){return this.fieldset=e.prototype.generateFieldset.call(this),this.fieldset.append({type:"select",label:"C2 sub-criterion: ",name:"xfdcat",tooltip:"See WP:CFDS for full explanations.",list:[{type:"option",label:"C2A: Typographic and spelling fixes",value:"C2A",selected:!0},{type:"option",label:"C2B: Naming conventions and disambiguation",value:"C2B"},{type:"option",label:"C2C: Consistency with names of similar categories",value:"C2C"},{type:"option",label:"C2D: Rename to match article name",value:"C2D"},{type:"option",label:"C2E: Author request",value:"C2E"},{type:"option",label:"C2F: One eponymous article",value:"C2F"}]}),this.fieldset.append({type:"input",name:"cfdstarget",label:"New name: ",required:!0}),this.appendReasonArea(),this.fieldset},t.prototype.preprocessParams=function(){var e,t,i;this.params.cfdstarget&&(this.params.cfdstarget=(e=this.params.cfdstarget,t=14,(i=mw.Title.newFromUserInput(e,t))?i.toText():e))},t.prototype.evaluate=function(){var t=this;e.prototype.evaluate.call(this),this.tm.add(this.tagPage,[]),this.tm.add(this.addToList,[],this.printReasonText),this.tm.add(this.addToLog,[this.addToList]),this.tm.execute().then((function(){return t.redirectToDiscussion()}))},t.prototype.tagPage=function(){var e=this,t=this.params,i=new X(mw.config.get("wgPageName"),"Tagging category with rename tag");return i.setFollowRedirect(!0),i.load().then((function(){var a=i.getPageText();return t.tagText="{{subst:cfr-speedy|1="+t.cfdstarget.replace(/^:?Category:/,"")+"}}\n",i.canEdit()?(i.setPageText(t.tagText+a),i.setEditSummary("Listed for speedy renaming; see [[WP:CFDS|Categories for discussion/Speedy]]."),i.setWatchlist(B("xfdWatchPage")),i.setCreateOption("recreate"),i.save()):e.autoEditRequest(i)}))},t.prototype.addToList=function(){var e=this,t=new X("Wikipedia:Categories for discussion/Speedy","Adding discussion to the list");return t.setFollowRedirect(!0),t.load().then((function(){var i=t.getPageText(),a=t.getStatusElement(),n=i.replace("BELOW THIS LINE --\x3e","BELOW THIS LINE --\x3e\n"+e.getDiscussionWikitext());return n===i?(a.error("failed to find target spot for the discussion"),$.Deferred().reject()):(t.setPageText(n),t.setEditSummary("Adding [[:"+Morebits.pageNameNorm+"]]."),t.setWatchlist(B("xfdWatchDiscussion")),t.setCreateOption("recreate"),t.save())}))},t.prototype.getDiscussionWikitext=function(){var e=this.params;return"* [[:"+Morebits.pageNameNorm+"]] to [[:"+e.cfdstarget+"]] – "+e.xfdcat+(e.reason?": "+Morebits.string.formatReasonText(e.reason):".")+" ~~~~"},t.prototype.getUserspaceLoggingExtraInfo=function(){var e=this.params,t="";return t+=" ("+e.xfdcat+")",e.cfdstarget&&e.cfdstarget.length>9&&(t+="; New name: [[:"+e.cfdstarget+"]]"),t},t.venueCode="CfDS",t.venueLabel="CfDS (Categories for speedy renaming)",t}(Z),re=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.discussionPagePrefix="Wikipedia:Miscellany for deletion",t}return p(t,e),t.isDefaultChoice=function(){return-1===[0,6,10,14,828].indexOf(mw.config.get("wgNamespaceNumber"))||0===Morebits.pageNameNorm.indexOf("Template:User ",0)},t.prototype.getMenuTooltip=function(){return"Nominate article for deletion or move"},t.prototype.getFieldsetLabel=function(){return"Miscellany for deletion"},t.prototype.generateFieldset=function(){return this.fieldset=e.prototype.generateFieldset.call(this),this.fieldset.append({type:"checkbox",list:[{label:"Wrap deletion tag with <noinclude>",value:"noinclude",name:"noinclude",tooltip:"Will wrap the deletion tag in &lt;noinclude&gt; tags, so that it won't transclude. Select this option for userboxes."}]}),2!==mw.config.get("wgNamespaceNumber")&&3!==mw.config.get("wgNamespaceNumber")||!mw.config.exists("wgRelevantUserName")||this.fieldset.append({type:"checkbox",list:[{label:"Notify owner of userspace (if they are not the page creator)",value:"notifyuserspace",name:"notifyuserspace",tooltip:"If the user in whose userspace this page is located is not the page creator (for example, the page is a rescued article stored as a userspace draft), notify the userspace owner as well.",checked:!0}]}),this.appendReasonArea(),this.fieldset},t.prototype.preprocessParams=function(){this.params.userspaceOwner=mw.config.get("wgRelevantUserName")},t.prototype.evaluate=function(){var t=this;e.prototype.evaluate.call(this),this.tm.add(this.determineDiscussionPage,[]),this.tm.add(this.tagPage,[this.determineDiscussionPage]),this.tm.add(this.addToList,[this.determineDiscussionPage]),this.tm.add(this.createDiscussionPage,[this.determineDiscussionPage],this.printReasonText),this.tm.add(this.fetchCreatorInfo,[]),this.tm.add(this.notifyCreator,[this.fetchCreatorInfo]),this.tm.add(this.notifyUserspaceOwner,[this.fetchCreatorInfo]),this.tm.add(this.addToLog,[this.notifyCreator,this.notifyUserspaceOwner]),this.tm.execute().then((function(){return t.redirectToDiscussion()}))},t.prototype.tagPage=function(){var e=this,t=this.params,i=new X(mw.config.get("wgPageName"),"Tagging page with deletion tag");return i.setFollowRedirect(!0),i.load().then((function(){var a=i.getPageText();return t.tagText="{{"+(""===t.number?"mfd":"mfdx|"+t.number)+"|help=off}}",-1!==["javascript","css","sanitized-css"].indexOf(mw.config.get("wgPageContentModel"))?t.tagText="/* "+t.tagText+" */\n":(t.tagText+="\n",t.noinclude&&(t.tagText="<noinclude>"+t.tagText+"</noinclude>")),i.canEdit()&&-1!==["wikitext","javascript","css","sanitized-css"].indexOf(i.getContentModel())?(i.setPageText(t.tagText+a),i.setEditSummary("Nominated for deletion; see [[:"+t.discussionpage+"]]."),i.setWatchlist(B("xfdWatchPage")),i.setCreateOption("nocreate"),i.save()):e.autoEditRequest(i)}))},t.prototype.createDiscussionPage=function(){var e=this,t=this.params,i=new X(t.discussionpage,"Creating deletion discussion page");return i.load().then((function(){return i.setPageText(e.getDiscussionWikitext()),i.setEditSummary("Creating deletion discussion page for [[:"+Morebits.pageNameNorm+"]]."),i.setWatchlist(B("xfdWatchDiscussion")),i.setCreateOption("createonly"),i.save()}))},t.prototype.getDiscussionWikitext=function(){return w("subst:mfd2",{text:Morebits.string.formatReasonText(this.params.reason,!0),pg:Morebits.pageNameNorm})},t.prototype.addToList=function(){var e=this.params,t=new X("Wikipedia:Miscellany for deletion","Adding discussion to today's list");return t.setPageSection(2),t.setFollowRedirect(!0),t.load().then((function(){var i=t.getPageText(),a=t.getStatusElement(),n=new Morebits.date(t.getLoadTime()),r=n.format("===MMMM D, YYYY===\n","utc"),o=new RegExp(n.format("(===[\\s]*MMMM[\\s]+D,[\\s]+YYYY[\\s]*===)","utc")),s="{{subst:mfd3|pg="+Morebits.pageNameNorm+e.numbering+"}}";return o.test(i)?(a.info("Found today's section, proceeding to add new entry"),i=i.replace(o,"$1\n"+s)):(a.info("No section for today found, proceeding to create one"),i=i.replace("===",r+s+"\n\n===")),t.setPageText(i),t.setEditSummary("Adding [[:"+e.discussionpage+"]]."),t.setWatchlist(B("xfdWatchList")),t.setCreateOption("recreate"),t.save()}))},t.prototype.notifyUserspaceOwner=function(){var e=this.params;return e.notifyuserspace&&e.userspaceOwner!==e.initialContrib?this.notifyTalkPage(e.userspaceOwner,new Morebits.status("Notifying owner of userspace ("+e.userspaceOwner+")")):$.Deferred().resolve()},t.prototype.getNotifyText=function(){var e="{{subst:mfd notice";return this.params.numbering&&(e+="|order=&#32;"+this.params.numbering),e+="|1="+Morebits.pageNameNorm+"}} ~~~~"},t.prototype.getUserspaceLoggingExtraInfo=function(){var e=this.params,t="";return e.notifyuserspace&&e.userspaceOwner&&e.userspaceOwner!==e.initialContrib&&(t+="; notified {{user|1="+e.userspaceOwner+"}}"),t},t.venueCode="mfD",t.venueLabel="MfD (Miscellany for deletion)",t}(Z),oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.isDefaultChoice=function(){return!!mw.config.get("wgIsRedirect")||!!document.getElementById("softredirect")},t.prototype.getFieldsetLabel=function(){return"Redirects for discussion"},t.prototype.getMenuTooltip=function(){return"Nominate redirect to be deleted or retargeted"},t.prototype.getUserspaceLoggingExtraInfo=function(){var e=this.params,t="";return e.rfdtarget&&(t+="; Target: [[:"+e.rfdtarget+"]]",e.relatedpage&&(t+=" (notified)")),t},t.prototype.generateFieldset=function(){return this.fieldset=e.prototype.generateFieldset.call(this),this.fieldset.append({type:"checkbox",list:[{label:"Notify target page if possible",value:"relatedpage",name:"relatedpage",tooltip:"A notification template will be placed on the talk page of this redirect's target if this is true.",checked:!0}]}),this.appendReasonArea(),this.fieldset},t.prototype.preview=function(e){var t=this;this.params=Morebits.quickForm.getInputData(e),this.findTarget().then((function(){t.showPreview(e)}))},t.prototype.evaluate=function(){var t=this;e.prototype.evaluate.call(this),this.tm.add(this.findTarget,[]),this.tm.add(this.tagPage,[this.findTarget]),this.tm.add(this.addToList,[this.findTarget,this.tagPage],this.printReasonText),this.tm.add(this.fetchCreatorInfo,[]),this.tm.add(this.notifyCreator,[this.fetchCreatorInfo,this.tagPage]),this.tm.add(this.notifyTargetTalk,[this.fetchCreatorInfo,this.tagPage]),this.tm.add(this.addToLog,[this.notifyCreator]),this.tm.execute().then((function(){return t.redirectToDiscussion()}))},t.prototype.findTarget=function(){var e=this,t=!!document.getElementById("softredirect"),i={action:"query",curtimestamp:!0,format:"json",titles:!t&&mw.config.get("wgPageName"),redirects:!t};return t&&(this.params.rfdtarget=document.getElementById("softredirect").textContent.replace(/^:+/,"")),new T("Finding target of redirect",i).post().then((function(i){var a=i.getResponse();e.params.curtimestamp=a.curtimestamp;var n=new Morebits.date(e.params.curtimestamp);if(e.params.logpage="Wikipedia:Redirects for discussion/Log/"+n.format("YYYY MMMM D","utc"),e.params.discussionpage=e.params.logpage+"#"+Morebits.pageNameNorm,!t){var r=a.query.redirects&&a.query.redirects[0].to;if(!r){var o="No target found. this page does not appear to be a redirect, aborting";return"history"===mw.config.get("wgAction")&&(o+=". If this is a soft redirect, try again from the content page, not the page history."),i.getStatusElement().error(o),$.Deferred().reject()}e.params.rfdtarget=r,e.params.section=a.query.redirects[0].tofragment}}))},t.prototype.tagPage=function(){var e=this,t=this.params,i=new X(mw.config.get("wgPageName"),"Adding deletion tag to redirect");return i.setFollowRedirect(!1),i.load().then((function(){var a=i.getPageText();return t.tagText="{{subst:rfd|"+(10===mw.config.get("wgNamespaceNumber")?"showontransclusion=1|":"")+"content=\n",i.canEdit()?(i.setPageText(t.tagText+a+"\n}}"),i.setEditSummary("Listed for discussion at [[:"+t.discussionpage+"]]."),i.setWatchlist(B("xfdWatchPage")),i.setCreateOption("nocreate"),i.save()):e.autoEditRequest(i)}))},t.prototype.getDiscussionWikitext=function(){var e=this.params;return w("subst:rfd2",{text:(e.reason?Morebits.string.formatReasonText(e.reason):"")+" ~~~~",redirect:Morebits.pageNameNorm,target:e.rfdtarget&&e.rfdtarget+(e.section?"#"+e.section:"")})},t.prototype.addToList=function(){var e=this,t=this.params,i=new X(t.logpage,"Adding discussion to today's log");return i.setFollowRedirect(!0),i.load().then((function(){var t,a=i.getStatusElement(),n=e.getDiscussionWikitext();if(i.exists()){var r=i.getPageText();if((t=r.replace(/(<!-- Add new entries directly below this line\.? -->)/,"$1\n"+n))===r)return a.error("failed to find target spot for the discussion"),$.Deferred().reject()}else t="{{subst:RfD log}}"+n;return i.setPageText(t),i.setEditSummary("Adding [[:"+Morebits.pageNameNorm+"]]."),i.setWatchlist(B("xfdWatchDiscussion")),i.setCreateOption("recreate"),i.save()}))},t.prototype.notifyTargetTalk=function(){if(!this.params.relatedpage)return $.Deferred().resolve();var e=new mw.Title(this.params.rfdtarget).getTalkPage(),t=new Morebits.status("Notifying target talk page","doing");return this.params.rfdtarget===mw.config.get("wgPageName")?(t.warn("Circular redirect; skipping target page notification"),$.Deferred().resolve()):document.getElementById("softredirect")?(t.warn("Soft redirect; skipping target page notification"),$.Deferred().resolve()):3===e.getNamespaceId()&&e.getNameText()===this.params.initialContrib?(t.warn("Target is initial contributor; skipping target page notification"),$.Deferred().resolve()):3===e.getNamespaceId()&&e.getNameText()===mw.config.get("wgUserName")?(t.warn("You ("+mw.config.get("wgUserName")+") are the target; skipping target page notification"),$.Deferred().resolve()):this.notifyTalkPage(e.toText(),t)},t.venueCode="RfD",t.venueLabel="RfD (Redirects for discussion)",t}(Z),se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.getFieldsetLabel=function(){return"Requested moves"},t.prototype.getVenueWarning=function(){if(14===mw.config.get("wgNamespaceNumber"))return"Please use CfD or CfDS for category renames."},t.prototype.generateFieldset=function(){var t=this;return this.fieldset=e.prototype.generateFieldset.call(this),this.fieldset.append({type:"checkbox",list:[{label:"Uncontroversial technical request",value:"rmtr",name:"rmtr",tooltip:"Use this option when you are unable to perform this uncontroversial move yourself because of a technical reason (e.g. a page already exists at the new title, or the page is protected)",checked:!1,event:function(e){t.result.newname.required=e.target.checked}}]}),this.fieldset.append({type:"input",name:"newname",label:"New title: ",tooltip:"Required for technical requests. Otherwise, if unsure of the appropriate title, you may leave it blank."}),this.appendReasonArea(),this.fieldset},t.prototype.getDiscussionWikitext=function(){var e=new mw.Title(Morebits.pageNameNorm).getSubjectPage().toText(),t=this.params;return(t.rmtr?"{{subst:RMassist|1="+e+"|2="+t.newname:"{{subst:Requested move|current1="+e+"|new1="+t.newname)+"|reason="+t.reason+"}}"},t.prototype.preprocessParams=function(){this.params.discussionpage=this.params.rmtr?"Wikipedia:Requested moves/Technical requests":new mw.Title(Morebits.pageNameNorm).getTalkPage().toText()},t.prototype.showPreview=function(e){var t=this.getDiscussionWikitext();e.previewer.beginRender(t,this.params.discussionpage)},t.prototype.evaluate=function(){var t=this;e.prototype.evaluate.call(this),this.tm.add(this.addToList,[],this.printReasonText),this.tm.add(this.addToLog,[this.addToList]),this.tm.execute().then((function(){return t.redirectToDiscussion()}))},t.prototype.addToList=function(){return this.params.rmtr?this.listAtRMTR():this.listAtTalk()},t.prototype.listAtTalk=function(){var e=this.params,t=new X(e.discussionpage,"Adding entry on talk page");return t.setAppendText("\n\n"+this.getDiscussionWikitext()),t.setFollowRedirect(!0),t.setEditSummary("Proposing move"+(e.newname?" to [[:"+e.newname+"]]":"")),t.setCreateOption("recreate"),t.setWatchlist(B("xfdWatchDiscussion")),t.append()},t.prototype.listAtRMTR=function(){var e=this,t=new X(this.params.discussionpage,"Adding entry at WP:RM/TR");return t.setFollowRedirect(!0),t.setPageSection(2),t.load().then((function(){var i=t.getPageText(),a=t.getStatusElement(),n=i.replace(/---- and enter on a new line.* -->/,"$&\n"+e.getDiscussionWikitext());return i===n?(a.error("failed to find target spot for the entry"),$.Deferred().reject()):(t.setPageText(n),t.setEditSummary("Adding [[:"+Morebits.pageNameNorm+"]]."),t.save())}))},t.prototype.getUserspaceLoggingExtraInfo=function(){var e=this.params,t="";return e.rmtr&&(t+=" (technical)"),e.newname&&(t+="; New name: [[:"+e.newname+"]]"),t},t.venueCode="RM",t.venueLabel="RM (Requested moves)",t}(Z);J.modeList=[ee,oe,ae,ne,te,ie,re,se];var le=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.footerlinks={"About deletion discussions":"WP:XFD","XfD prefs":"WP:TW/PREF#xfd","Twinkle help":"WP:TW/DOC#xfd","Give feedback":"WT:TW"},t}return p(t,e),t.userPreferences=function(){var t=e.userPreferences.call(this);return t.preferences=t.preferences.concat([{name:"noLogOnXfdNomination",label:"Do not create a userspace log entry when nominating at this venue",type:"set",setValues:{afd:"AfD",tfd:"TfD",ffd:"FfD",cfd:"CfD",cfds:"CfD/S",mfd:"MfD",rfd:"RfD",rm:"RM"},default:[]},{name:"xfdWatchRelated",label:"Add the redirect's target page to watchlist (when notifying)",helptip:"This only applies for RfD, when leaving a notification on the talk page of the target of the redirect",type:"enum",enumValues:q.watchlistEnums,default:"default"},{name:"markXfdPagesAsPatrolled",label:"Mark page as patrolled/reviewed when nominating for AFD (if possible)",type:"boolean",default:!0}]),t},t}(J),de=function(e){function t(){var t=e.call(this)||this;return mw.config.get("wgNamespaceNumber")<0||!mw.config.get("wgArticleId")?t:(j(mw.util.getUrl(mw.config.get("wgPageName"),{diff:"cur",oldid:"prev"}),S("diff-last"),"twinkle-lastdiff",S("diff-last-tooltip")),mw.util.getParamValue("diff")?(j((function(){return t.evaluate(!1)}),S("diff-since"),"tw-since",S("diff-since-tooltip")),j((function(){return t.evaluate(!0)}),S("diff-sincemine"),"tw-sincemine",S("diff-sincemine-tooltip")),j(mw.util.getUrl(mw.config.get("wgPageName"),{diff:"cur",oldid:/oldid=(.+)/.exec($("#mw-diff-ntitle1").find("strong a").first().attr("href"))[1]}),S("diff-current"),"tw-curdiff",S("diff-current-tooltip")),t):t)}return p(t,e),t.prototype.evaluate=function(e){var t;if(e)t=mw.config.get("wgUserName");else{var i=document.getElementById("mw-diff-ntitle2");if(!i)return;t=$(i).find("a").first().text()}Morebits.status.init(document.getElementById("mw-content-text"));var a=new T("Grabbing data of initial contributor",{prop:"revisions",action:"query",titles:mw.config.get("wgPageName"),rvlimit:1,rvprop:["ids","user"],rvstartid:mw.config.get("wgCurRevisionId")-1,rvuser:t,format:"json"});a.post().then((function(e){var i=e.getResponse().query.pages[0].revisions,a=i&&i[0].revid;a?window.location.href=mw.util.getUrl(mw.config.get("wgPageName"),{diff:mw.config.get("wgCurRevisionId"),oldid:a}):e.getStatusElement().error(S("diff-error",t))})),a.post()},t.moduleName="Diff",t}(Y);if(window.Twinkle=n,$.extend(n,{registerModule:_,msg:S,Page:X,Api:T}),void 0!==a&&(jQuery.Deferred.exceptionHook=function(e){throw e}),!Morebits.userIsInGroup("autoconfirmed")&&!Morebits.userIsInGroup("confirmed"))throw new Error("Twinkle: forbidden!");n.userAgent="Twinkle ("+mw.config.get("wgWikiID")+")",n.summaryAd=" ([[Project:TW|TW]])",n.changeTags="",n.messageOverrides=H,n.extraMwMessages=[],n.registeredModules=[z,de,le],r.permalinkSpecialPageName="Special:PermanentLink",r.botUsernameRegex=/bot\b/i,r.flaggedRevsNamespaces=[],r.redirectTagAliases=["#REDIRECT"],(-1!==mw.config.get("wgNamespaceNumber")||n.activeSpecialPages.includes(mw.config.get("wgCanonicalSpecialPageName")))&&window.top===window.self&&(function(){switch(mw.config.get("skin")){case"vector":U([{name:"portletArea",value:"right-navigation"},{name:"portletId",value:"p-twinkle"},{name:"portletName",value:"TW"},{name:"portletType",value:"menu"},{name:"portletNext",value:"p-search"}]);break;case"timeless":U([{name:"portletArea",value:"#page-tools .sidebar-inner"},{name:"portletId",value:"p-twinkle"},{name:"portletName",value:"Twinkle"},{name:"portletType",value:null},{name:"portletNext",value:"p-userpagetools"}]);break;default:U([{name:"portletArea",value:null},{name:"portletId",value:"p-cactions"},{name:"portletName",value:null},{name:"portletType",value:null},{name:"portletNext",value:null}])}}(),Morebits.l10n.redirectTagAliases=r.redirectTagAliases,"function"==typeof r.signatureTimestampFormat&&(Morebits.l10n.signatureTimestampFormat=r.signatureTimestampFormat),x=new mw.Api({parameters:{action:"query",format:"json",formatversion:"2",uselang:E,errorlang:E,errorsuselocal:!0,tags:n.changeTags},ajax:{headers:{"Api-User-Agent":n.userAgent}}}),n.preModuleInitHooks.push((function(){!function(){if(C=new(h())(E),k(R).forEach((function(e){var t=e[0],i=e[1];C.registerParserPlugin(t,i)})),Morebits.i18n.setParser({get:S}),N="qqx"===E)return Promise.resolve();C.load(M,"en");var e=A.concat(n.extraMwMessages);Promise.all([L(e,E),F(E)]).catch((function(e){mw.notify("Failed to load messages needed for Twinkle",{type:"error"})})).finally((function(){D(n.messageOverrides)}))}()}),(function(){return(e=mw.util.wikiScript("index")+"?title=",$.ajax({url:e+"User:"+encodeURIComponent(mw.config.get("wgUserName"))+"/twinkleoptions.js&action=raw&ctype=text/javascript&happy=yes",dataType:"text"}).then((function(e){if(""!==e){0===(e=e.replace(/(?:^(?:\/\/[^\n]*\n)*\n*|(?:\/\/[^\n]*(?:\n|$))*$)/g,"")).lastIndexOf("window.Twinkle.prefs = ",0)&&(e=e.replace(/(?:^window.Twinkle.prefs = |;\n*$)/g,""));try{var t=JSON.parse(e);t&&((I=t.twinkle||t.friendly?$.extend(t.twinkle,t.friendly):t).optionsVersion=I.optionsVersion||1)}catch(e){mw.notify("Could not parse your Twinkle preferences",{type:"error"})}}})).catch((function(){mw.notify("Could not load your Twinkle preferences",{type:"error"})}))).then((function(){return B("dialogLargeFont")&&mw.util.addCSS(".morebits-dialog-content, .morebits-dialog-footerlinks { font-size: 100% !important; } .morebits-dialog input, .morebits-dialog select, .morebits-dialog-content button { font-size: inherit !important; }"),V=V.concat(B("disabledModules"),B("disabledSysopModules")),Promise.all(n.preModuleInitHooksWithConfig.map((function(e){return e()})))}));var e})),Promise.all(n.preModuleInitHooks.map((function(e){return e()}))).then((function(){mw.hook("twinkle.preModuleInit").fire();for(var e=0,t=n.registeredModules;e<t.length;e++)_(t[e]);"vector"===mw.config.get("skin")&&"menu"===B("portletType")&&0===$("#p-twinkle").length&&$("#p-cactions").css("margin-right","initial"),q.init()})))}},t={};function i(a){var n=t[a];if(void 0!==n)return n.exports;var r=t[a]={exports:{}};return e[a].call(r.exports,r,r.exports,i),r.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var a=i(871)}();
_core__WEBPACK_IMPORTED_MODULE_7__.SiteConfig.flaggedRevsNamespaces = [];
/* </nowiki> */
_core__WEBPACK_IMPORTED_MODULE_7__.SiteConfig.redirectTagAliases = ['#REDIRECT'];
// Go!
(0,_core__WEBPACK_IMPORTED_MODULE_8__.init)();
 
}();
/******/ })()
;
//# sourceMappingURL=twinkle.js.map
"https://te.wikipedia.org/wiki/వాడుకరి:Veeven/twinkle/twinkle.js" నుండి వెలికితీశారు