MediaWiki:Gadget-TwinkleV3.js

From VR Wiki
Revision as of 23:34, 22 May 2024 by N3X15 (talk | contribs) (Commit a0dec4e: Butts)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/*  _______________________________________________________________________________	
 * |                                                                               |
 * |                     === WARNING: GLOBAL GADGET FILE ===                       |
 * |                   Changes to this page affect many users.                     |
 * |  Please discuss changes on the talk page or on [[WT:Gadget]] before editing.  |
 * |_______________________________________________________________________________|
 *
 * Built from source code at GitHub repository [https://github.com/N3X15/vrwiki-twinkle]
 * All changes should be made in the repository. Please do not attempt to edit this file directly.
 */
/* <nowiki> */
(()=>{var e={193:function(e){e.exports=function(){"use strict";class e{constructor(e){this.locale=e}convertPlural(t,a){var i=new RegExp("\\d+=","i");if(!a||0===a.length)return"";for(let e=0;e<a.length;e++){let o=a[e];if(i.test(o)){if(parseInt(o.slice(0,o.indexOf("=")),10)===t)return o.slice(o.indexOf("=")+1);a[e]=void 0}}a=a.filter((e=>!!e));let o=e.pluralRules[this.locale];o||(o={one:"i = 1 and v = 0"});let n=this.getPluralForm(t,o);return n=Math.min(n,a.length-1),a[n]}getPluralForm(e,t){const a=["zero","one","two","few","many","other"];let i=0;const o=mw.libs.pluralRuleParser;for(let n=0;n<a.length;n++)if(t[a[n]]){if(o(t[a[n]],e))return i;i++}return i}convertNumber(e,t){let a=this.digitTransformTable(this.locale),i=String(e),o="";if(!a)return e;if(t){if(parseFloat(e,10)===e)return e;let t=[];for(let e in a)t[a[e]]=e;a=t}for(let e=0;e<i.length;e++)a[i[e]]?o+=a[i[e]]:o+=i[e];return t?parseFloat(o,10):o}convertGrammar(e,t){return e}gender(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]}digitTransformTable(t){return!!e.digitTransforms[t]&&e.digitTransforms[t].split("")}}e.pluralRules={},e.digitTransforms={};var t={bs:class extends e{convertGrammar(e,t){switch(t){case"instrumental":e="s "+e;break;case"lokativ":e="o "+e}return e}},default:e,dsb:class extends e{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e}return e}},fi:class extends e{convertGrammar(e,t){let a=e.match(/[aou][^\xe4\xf6y]*$/i),i=e;switch(e.match(/wiki$/i)&&(a=!1),e.match(/[bcdfghjklmnpqrstvwxz]$/i)&&(e+="i"),t){case"genitive":e+="n";break;case"elative":e+=a?"sta":"st\xe4";break;case"partitive":e+=a?"a":"\xe4";break;case"illative":e+=e.slice(-1)+"n";break;case"inessive":e+=a?"ssa":"ss\xe4";break;default:e=i}return e}},ga:class extends e{convertGrammar(e,t){if("ainmlae"===t)switch(e){case"an Domhnach":e="D\xe9 Domhnaigh";break;case"an Luan":e="D\xe9 Luain";break;case"an Mh\xe1irt":e="D\xe9 Mh\xe1irt";break;case"an Ch\xe9adaoin":e="D\xe9 Ch\xe9adaoin";break;case"an D\xe9ardaoin":e="D\xe9ardaoin";break;case"an Aoine":e="D\xe9 hAoine";break;case"an Satharn":e="D\xe9 Sathairn"}return e}},he:class extends e{convertGrammar(e,t){switch(t){case"prefixed":case"\u05ea\u05d7\u05d9\u05dc\u05d9\u05ea":"\u05d5"===e.slice(0,1)&&"\u05d5\u05d5"!==e.slice(0,2)&&(e="\u05d5"+e),"\u05d4"===e.slice(0,1)&&(e=e.slice(1)),(e.slice(0,1)<"\u05d0"||e.slice(0,1)>"\u05ea")&&(e="\u05be"+e)}return e}},hsb:class extends e{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e}return e}},hu:class extends e{convertGrammar(e,t){switch(t){case"rol":e+="r\xf3l";break;case"ba":e+="ba";break;case"k":e+="k"}return e}},hy:class extends e{convertGrammar(e,t){return"genitive"===t&&("\u0561"===e.slice(-1)?e=e.slice(0,-1)+"\u0561\u0575\u056b":"\u0578"===e.slice(-1)?e=e.slice(0,-1)+"\u0578\u0575\u056b":"\u0563\u056b\u0580\u0584"===e.slice(-4)?e=e.slice(0,-4)+"\u0563\u0580\u0584\u056b":e+="\u056b"),e}},la:class extends e{convertGrammar(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}},os:class extends e{convertGrammar(e,t){var a,i,o,n;switch(a="\u043c\xe6",i="",o="",n="",e.match(/\u0442\xe6$/i)?(e=e.slice(0,-1),a="\xe6\u043c"):e.match(/[\u0430\xe6\u0435\u0451\u0438\u043e\u044b\u044d\u044e\u044f]$/i)?i="\u0439":e.match(/\u0443$/i)?e.slice(-2,-1).match(/[\u0430\xe6\u0435\u0451\u0438\u043e\u044b\u044d\u044e\u044f]$/i)||(i="\u0439"):e.match(/[\u0431\u0432\u0433\u0434\u0436\u0437\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0444\u0445\u0446\u0447\u0448\u0449\u044c\u044a]$/i)||(o="-"),t){case"genitive":n=o+i+"\u044b";break;case"dative":n=o+i+"\xe6\u043d";break;case"allative":n=o+a;break;case"ablative":n="\u0439"===i?o+i+"\xe6":o+i+"\xe6\u0439";break;case"superessive":n=o+i+"\u044b\u043b";break;case"equative":n=o+i+"\u0430\u0443";break;case"comitative":n=o+"\u0438\u043c\xe6"}return e+n}},ru:class extends e{convertGrammar(e,t){return"genitive"===t&&("\u044c"===e.slice(-1)?e=e.slice(0,-1)+"\u044f":"\u0438\u044f"===e.slice(-2)?e=e.slice(0,-2)+"\u0438\u0438":"\u043a\u0430"===e.slice(-2)?e=e.slice(0,-2)+"\u043a\u0438":"\u0442\u0438"===e.slice(-2)?e=e.slice(0,-2)+"\u0442\u0435\u0439":"\u0434\u044b"===e.slice(-2)?e=e.slice(0,-2)+"\u0434\u043e\u0432":"\u043d\u0438\u043a"===e.slice(-3)&&(e=e.slice(0,-3)+"\u043d\u0438\u043a\u0430")),e}},sl:class extends e{convertGrammar(e,t){switch(t){case"mestnik":e="o "+e;break;case"orodnik":e="z "+e}return e}},uk:class extends e{convertGrammar(e,t){switch(t){case"genitive":"\u044c"===e.slice(-1)?e=e.slice(0,-1)+"\u044f":"\u0456\u044f"===e.slice(-2)?e=e.slice(0,-2)+"\u0456\u0457":"\u043a\u0430"===e.slice(-2)?e=e.slice(0,-2)+"\u043a\u0438":"\u0442\u0438"===e.slice(-2)?e=e.slice(0,-2)+"\u0442\u0435\u0439":"\u0434\u044b"===e.slice(-2)?e=e.slice(0,-2)+"\u0434\u043e\u0432":"\u043d\u0438\u043a"===e.slice(-3)&&(e=e.slice(0,-3)+"\u043d\u0438\u043a\u0430");break;case"accusative":"\u0456\u044f"===e.slice(-2)&&(e=e.slice(0,-2)+"\u0456\u044e")}return e}}};const a=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]|\u{1003c}|\u{1003d}|\ud800[\udc3f-\udc4d]|\ud800[\udc50-\udc5d]|\ud800[\udc80-\udcfa]|\u{10100}|\u{10102}|\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]|\u{1056f}|\ud801[\ude00-\udf36]|\ud801[\udf40-\udf55]|\ud801[\udf60-\udf67]|\u{11000}|\ud804[\udc02-\udc37]|\ud804[\udc47-\udc4d]|\ud804[\udc66-\udc6f]|\ud804[\udc82-\udcb2]|\u{110b7}|\u{110b8}|\ud804[\udcbb-\udcc1]|\ud804[\udcd0-\udce8]|\ud804[\udcf0-\udcf9]|\ud804[\udd03-\udd26]|\u{1112c}|\ud804[\udd36-\udd43]|\ud804[\udd50-\udd72]|\ud804[\udd74-\udd76]|\ud804[\udd82-\uddb5]|\ud804[\uddbf-\uddc9]|\u{111cd}|\ud804[\uddd0-\udddf]|\ud804[\udde1-\uddf4]|\ud804[\ude00-\ude11]|\ud804[\ude13-\ude2e]|\u{11232}|\u{11233}|\u{11235}|\ud804[\ude38-\ude3d]|\ud804[\ude80-\ude86]|\u{11288}|\ud804[\ude8a-\ude8d]|\ud804[\ude8f-\ude9d]|\ud804[\ude9f-\udea9]|\ud804[\udeb0-\udede]|\ud804[\udee0-\udee2]|\ud804[\udef0-\udef9]|\u{11302}|\u{11303}|\ud804[\udf05-\udf0c]|\u{1130f}|\u{11310}|\ud804[\udf13-\udf28]|\ud804[\udf2a-\udf30]|\u{11332}|\u{11333}|\ud804[\udf35-\udf39]|\ud804[\udf3d-\udf3f]|\ud804[\udf41-\udf44]|\u{11347}|\u{11348}|\ud804[\udf4b-\udf4d]|\u{11350}|\u{11357}|\ud804[\udf5d-\udf63]|\ud805[\udc80-\udcb2]|\u{114b9}|\ud805[\udcbb-\udcbe]|\u{114c1}|\ud805[\udcc4-\udcc7]|\ud805[\udcd0-\udcd9]|\ud805[\udd80-\uddb1]|\ud805[\uddb8-\uddbb]|\u{115be}|\ud805[\uddc1-\udddb]|\ud805[\ude00-\ude32]|\u{1163b}|\u{1163c}|\u{1163e}|\ud805[\ude41-\ude44]|\ud805[\ude50-\ude59]|\ud805[\ude80-\udeaa]|\u{116ac}|\u{116ae}|\u{116af}|\u{116b6}|\ud805[\udec0-\udec9]|\ud805[\udf00-\udf19]|\u{11720}|\u{11721}|\u{11726}|\ud805[\udf30-\udf3f]|\ud806[\udca0-\udcf2]|\u{118ff}|\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]|\u{16a6e}|\u{16a6f}|\ud81a[\uded0-\udeed]|\u{16af5}|\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]|\u{1b000}|\u{1b001}|\ud82f[\udc00-\udc6a]|\ud82f[\udc70-\udc7c]|\ud82f[\udc80-\udc88]|\ud82f[\udc90-\udc99]|\u{1bc9c}|\u{1bc9f}|\ud834[\udc00-\udcf5]|\ud834[\udd00-\udd26]|\ud834[\udd29-\udd66]|\ud834[\udd6a-\udd72]|\u{1d183}|\u{1d184}|\ud834[\udd8c-\udda9]|\ud834[\uddae-\udde8]|\ud834[\udf60-\udf71]|\ud835[\udc00-\udc54]|\ud835[\udc56-\udc9c]|\u{1d49e}|\u{1d49f}|\u{1d4a2}|\u{1d4a5}|\u{1d4a6}|\ud835[\udca9-\udcac]|\ud835[\udcae-\udcb9]|\u{1d4bb}|\ud835[\udcbd-\udcc3]|\ud835[\udcc5-\udd05]|\ud835[\udd07-\udd0a]|\ud835[\udd0d-\udd14]|\ud835[\udd16-\udd1c]|\ud835[\udd1e-\udd39]|\ud835[\udd3b-\udd3e]|\ud835[\udd40-\udd44]|\u{1d546}|\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]|\u{1f250}|\u{1f251}|[\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]|\u{10a04}|\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]))");class i{constructor(e){this.locale=e,this.language=new(t[e]||t.default)(e)}emit(e,t){let a,i,n;switch(typeof e){case"string":case"number":a=e;break;case"object":i=e.slice(1).map((e=>this.emit(e,t))),n=e[0].toLowerCase(),a="function"==typeof this[n]?this[n](i,t):"{{"+new o(this.locale).simpleParse(e[0],t)+i.map((e=>"|"+e))+"}}";break;case"undefined":a="";break;default:throw new Error("unexpected type in AST: "+typeof e)}return a}concat(e){let t="";return e.forEach((e=>{t+=e})),t}replace(e,t){let a=parseInt(e[0],10);return a<t.length?t[a]:"$"+(a+1)}plural(e){let t=parseFloat(this.language.convertNumber(e[0],10)),a=e.slice(1);return a.length?this.language.convertPlural(t,a):""}gender(e){let t=e[0],a=e.slice(1);return this.language.gender(t,a)}grammar(e){let t=e[0],a=e[1];return a&&t&&this.language.convertGrammar(a,t)}bidi(e){var t=function(e){var t=e.match(a);return t?void 0===t[2]?"ltr":"rtl":null}(e[0]);return"ltr"===t?"\u202a"+e[0]+"\u202c":"rtl"===t?"\u202b"+e[0]+"\u202c":e[0]}formatnum(e){let t=!!e[1]&&"R"===e[1],a=e[0];return"string"==typeof a||"number"==typeof a?this.language.convertNumber(a,t):a}}class o{constructor(e){this.locale=e,this.emitter=new i(this.locale)}parse(e,t){if(e.includes("{{")){const a=function(e){let t,a,i,o,n,r,s,l=0;function c(e){return()=>{for(let t=0;t<e.length;t++){const a=e[t]();if(null!==a)return a}return null}}function d(e){const t=l,a=[];for(let i=0;i<e.length;i++){const o=e[i]();if(null===o)return l=t,null;a.push(o)}return a}function u(e,t){return()=>{const a=l,i=[];let o=t();for(;null!==o;)i.push(o),o=t();return i.length<e?(l=a,null):i}}function p(t){const a=t.length;return()=>{let i=null;return e.slice(l,l+a)===t&&(i=t,l+=a),i}}function m(t){return()=>{const a=e.slice(l).match(t);return null===a?null:(l+=a[0].length,a[0])}}const g=p("|"),b=p(":"),f=p("\\"),h=m(/^./),k=p("$"),v=m(/^\d+/),w=m(/^[^{}$\\]/),y=m(/^[^{}$\\|]/);function x(){const e=d([f,h]);return null===e?null:e[1]}function C(){const e=d([k,v]);return null===e?null:["REPLACE",parseInt(e[1],10)-1]}var P,T;function N(){const e=d([g,u(0,r)]);if(null===e)return null;const t=e[1];return t.length>1?["CONCAT"].concat(t):t[0]}function R(){const e=d([o,b,C]);return null===e?null:[e[0],e[2]]}function $(){const e=d([o,b,r]);return null===e?null:[e[0],e[2]]}t=c([x,y]),a=c([x,w]),P=m(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/),T=function(e){return e.toString()},o=()=>{const e=P();return null===e?null:T(e)},i=c([function(){const e=d([c([R,$]),u(0,N)]);return null===e?null:e[0].concat(e[1])},function(){const e=d([o,u(0,N)]);return null===e?null:[e[0]].concat(e[1])}]);const M=p("{{"),A=p("}}");function E(){const e=d([M,i,A]);return null===e?null:e[1]}if(n=c([E,C,function(){const e=u(1,a)();return null===e?null:e.join("")}]),r=c([E,C,function(){const e=u(1,t)();return null===e?null:e.join("")}]),s=function(){const e=u(0,n)();return null===e?null:["CONCAT"].concat(e)}(),null===s||l!==e.length)throw new Error("Parse error at position "+l.toString()+" in input: "+e);return s}(e);return this.emitter.emit(a,t)}return this.simpleParse(e,t)}simpleParse(e,t){return e.replace(/\$(\d+)/g,((e,a)=>{let i=parseInt(a,10)-1;return void 0!==t[i]?t[i]:"$"+a}))}}class n{constructor(e){this.sourceMap=new Map}load(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(let a in e)if(0!==a.indexOf("@")){if("object"==typeof e[a])return this.load(e);if("string"!=typeof e[a])throw new Error(`Invalid message for message ${a} 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)}getMessage(e,t){let a=this.sourceMap.get(t);return a?a[e]:null}hasLocale(e){return this.sourceMap.has(e)}}return class{constructor(e,t){let{finalFallback:a="en",messages:i}=void 0===t?{}:t;this.locale=e,this.parser=new o(this.locale),this.messageStore=new n,i&&this.load(i,this.locale),this.fallbackLocales=[],this.finalFallback=a}load(e,t){return this.messageStore.load(e,t||this.locale)}i18n(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];return this.parser.parse(this.getMessage(e),a)}setLocale(e){this.locale=e,this.parser=new o(this.locale)}getFallbackLocales(){return[...this.fallbackLocales,this.finalFallback]}setFallbackLocales(e){this.fallbackLocales=e}setPluralRules(t,a){e.pluralRules[t]=a}setDigitTransforms(t,a){e.digitTransforms[t]=a}getMessage(e){let t=this.locale,a=0;const i=this.getFallbackLocales();for(;t;){let o=t.split("-"),n=o.length;do{let t=o.slice(0,n).join("-"),a=this.messageStore.getMessage(e,t);if("string"==typeof a)return a;n--}while(n);t=i[a],a++}return e}registerParserPlugin(e,t){i.prototype[e]=t}}}()}},t={};function a(i){var o=t[i];if(void 0!==o)return o.exports;var n=t[i]={exports:{}};return e[i].call(n.exports,n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i={};(()=>{"use strict";var e;!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=[]}(e||(e={}));let t=mw.config.get("wgNamespaceIds");const o=t[""],n=(t.talk,t.special,t.file,t.template,t.category,t.project);t.user,t.user_talk;var r;!function(e){e.botUsernameRegex=/bot\b/i,e.flaggedRevsNamespaces=[o,n],e.permalinkSpecialPageName="Special:PermanentLink",e.redirectTagAliases=["#REDIRECT"],e.signatureTimestampFormat=null}(r||(r={}));var s=a(193),l=a.n(s);class c extends Error{}function d(e){return e?Array.isArray(e)?e:[e]:[]}function u(e){var t=Morebits.htmlNode("a"," >");t.setAttribute("class","tw-arrowpage-link"),t.setAttribute("href",mw.util.getUrl(e.value)),t.setAttribute("target","_blank"),e.nextElementSibling.append(t)}function p(e){return Object.values?Object.values(e):Object.keys(e).map((t=>e[t]))}function m(e){return Object.entries?Object.entries(e):Object.keys(e).map((t=>[t,e[t]]))}class g extends Morebits.wiki.api{constructor(t,a,i){super(t,a=$.extend({action:"query",format:"json",formatversion:"2",uselang:v,errorlang:v,errorsuselocal:!0,tags:e.changeTags},a),null,i,null)}post(t){return t||(t={}),t.headers||(t.headers={}),t.headers["Api-User-Agent"]=e.userAgent,super.post(t)}}let b;const f=["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"],h=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":" \u2022&#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)"}');let k,v=(w="uselang",mw.util.getParamValue(w)||mw.config.get("wgContentLanguage"));var w;let y;const x={date(e){let t="function"==typeof e[0].getTime?new Morebits.date(e[0].getTime()):new Morebits.date(e[0]),a=e[1],i="utc"===e[2]?"utc":void 0;return"relative"===a?t.calendar(i):t.format(a,i)},int:e=>P(e[0],...e.slice(1)),ns(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:e=>Morebits.string.toUpperCaseFirstChar(e[0]),lcfirst:e=>Morebits.string.toLowerCaseFirstChar(e[0]),list(e){let t=e[0],a="";for(let e=0;e<t.length;e++)a+=t[e],t.length-2===e?a+=P("and")+P("word-separator"):t.length-1!==e&&(a+=P("comma-separator"));return a},sysop:e=>Morebits.userIsSysop?e[1]:e[2]};function C(e){k.load(e,v)}function P(e,...t){if(!k)throw new Error("Can't emit messages before initMessaging() has run!");return y?"("+e+")":k.i18n(e,...t)}let T,N=!0;function R(e,t){let a=[];for(let i=0;i<e.length;i+=50)a.push(b.getMessages(e.slice(i,i+50),{amlang:t,maxage:31536e3,smaxage:31536e3,uselang:"content"}).then((e=>{C(e)})));return Promise.all(a)}function M(e){if("en"===e&&N)return Promise.resolve();const t=`tw-i18n-${e}`,a=mw.storage.getObject(t);return a&&new Morebits.date(a["@timestamp"]).add(2,"days").isAfter(new Date)?(A(a),Promise.resolve()):$.get("https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/gadgets/TwinkleCore/+/i18n/build-i18n/"+e+".json?format=text").then((e=>{let a=JSON.parse(decodeURIComponent(window.atob(e).split("").map((e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2))).join("")));a["@timestamp"]=(new Date).toISOString(),mw.storage.setObject(t,a),A(a)}),(e=>{mw.log.warn("[twinkle]: no messages loaded from gerrit.",e)}))}function A(e){k.setFallbackLocales(e["@fallbacks"]),delete e["@fallbacks"],delete e["@timestamp"];for(let[t,a]of m(e))a["@pluralrules"]&&k.setPluralRules(t,a["@pluralrules"]),a["@digittransforms"]&&k.setDigitTransforms(t,a["@digittransforms"]);k.load(e)}const E={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 S(e){e.forEach((e=>{E[e.name]=e.value}))}function I(e){return"object"==typeof T&&void 0!==T[e]?T[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]:E[e]}class _{static addGroup(e,t){_.sections[e]=t}static addPreference(e,t){_.sections[e].preferences.push(t)}static init(){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 e=document.getElementById("twinkle-config-content");if(e.textContent="",window.TwinkleConfig||window.FriendlyConfig){var t=document.createElement("p");t.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>',e.appendChild(t)}var a=document.createElement("div");a.className="toc",a.style.marginLeft="0.4em";var i=document.createElement("div");i.id="toctitle";var o=document.createElement("h2");o.textContent="Contents ",i.appendChild(o);var n=document.createElement("span");n.className="toctoggle",n.appendChild(document.createTextNode("["));var r=document.createElement("a");r.className="internal",r.setAttribute("href","#tw-tocshowhide"),r.textContent="hide",n.appendChild(r),n.appendChild(document.createTextNode("]")),i.appendChild(n),a.appendChild(i);var s=document.createElement("ul");r.addEventListener("click",(function(){var e=$(s);e.toggle(),e.find(":visible").length?r.textContent="hide":r.textContent="show"}),!1),a.appendChild(s),e.appendChild(a);var l=document.createElement("form");l.setAttribute("action","javascript:void(0)"),l.addEventListener("submit",_.save,!0),e.appendChild(l);var c=document.createElement("table");c.style.width="100%",l.appendChild(c),p(_.sections).forEach((e=>{if(e.hidden||e.adminOnly&&!Morebits.userIsSysop)return!0;var t=document.createElement("li");t.className="toclevel-1";var a=document.createElement("a");a.setAttribute("href","#"+e.module),a.appendChild(document.createTextNode(e.title)),t.appendChild(a),s.appendChild(t);var i=document.createElement("tr"),o=document.createElement("td");o.setAttribute("colspan","3");var n=document.createElement("h4");n.style.borderBottom="1px solid gray",n.style.marginTop="0.2em",n.id=e.module,n.appendChild(document.createTextNode(e.title)),o.appendChild(n),i.appendChild(o),c.appendChild(i);var r=1;return e.preferences.forEach((e=>{if(e.adminOnly&&!Morebits.userIsSysop)return!0;(i=document.createElement("tr")).style.marginBottom="0.2em",r++%2==0&&(i.style.backgroundColor="rgba(128, 128, 128, 0.1)"),o=document.createElement("td");var t,a,n=I(e.name);switch(e.type){case"boolean":o.setAttribute("colspan","2"),t=document.createElement("label"),(a=document.createElement("input")).setAttribute("type","checkbox"),a.setAttribute("id",e.name),a.setAttribute("name",e.name),!0===n&&a.setAttribute("checked","checked"),t.appendChild(a),t.appendChild(document.createTextNode(" "+e.label)),o.appendChild(t);break;case"string":case"integer":o.style.textAlign="right",o.style.paddingRight="0.5em",(t=document.createElement("label")).setAttribute("for",e.name),t.appendChild(document.createTextNode(e.label+":")),o.appendChild(t),i.appendChild(o),(o=document.createElement("td")).style.paddingRight="1em",(a=document.createElement("input")).setAttribute("type","text"),a.setAttribute("id",e.name),a.setAttribute("name",e.name),"integer"===e.type&&(a.setAttribute("size",6),a.setAttribute("type","number"),a.setAttribute("step","1")),n&&a.setAttribute("value",n),o.appendChild(a);break;case"enum":o.style.textAlign="right",o.style.paddingRight="0.5em",(t=document.createElement("label")).setAttribute("for",e.name),t.appendChild(document.createTextNode(e.label+":")),o.appendChild(t),i.appendChild(o),(o=document.createElement("td")).style.paddingRight="1em",(a=document.createElement("select")).setAttribute("id",e.name),a.setAttribute("name",e.name),$.each(e.enumValues,(function(e,t){var i=document.createElement("option");i.setAttribute("value",e),(n===e||"boolean"==typeof n&&(n&&"yes"===e||!n&&"no"===e))&&i.setAttribute("selected","selected"),i.appendChild(document.createTextNode(t)),a.appendChild(i)})),o.appendChild(a);break;case"set":o.setAttribute("colspan","2"),(t=document.createElement("label")).appendChild(document.createTextNode(e.label+":")),o.appendChild(t);var s=document.createElement("div");s.style.paddingLeft="1em";var l=function(t,a){var i=document.createElement("label");i.style.marginRight="0.7em",i.style.display="inline-block";var o=document.createElement("input");o.setAttribute("type","checkbox"),o.setAttribute("id",e.name+"_"+t),o.setAttribute("name",e.name+"_"+t),n&&-1!==n.indexOf(t)&&o.setAttribute("checked","checked"),"unlinkNamespaces"===e.name&&n&&-1!==n.indexOf(parseInt(t,10))&&o.setAttribute("checked","checked"),i.appendChild(o),i.appendChild(document.createTextNode(a)),s.appendChild(i)};e.setDisplayOrder?$.each(e.setDisplayOrder,(function(t,a){l(a,e.setValues[a])})):$.each(e.setValues,l),o.appendChild(s);break;case"customList":o.style.textAlign="right",o.style.paddingRight="0.5em",(t=document.createElement("label")).setAttribute("for",e.name),t.appendChild(document.createTextNode(e.label+":")),o.appendChild(t),i.appendChild(o),(o=document.createElement("td")).style.paddingRight="1em";var d=document.createElement("button");d.setAttribute("id",e.name),d.setAttribute("name",e.name),d.setAttribute("type","button"),d.addEventListener("click",U.display,!1),$(d).data({value:n,pref:e}),d.appendChild(document.createTextNode("Edit items")),o.appendChild(d);break;default:alert("twinkleconfig: unknown data type for preference "+e.name)}if(i.appendChild(o),(o=document.createElement("td")).style.fontSize="90%",o.style.color="gray",e.helptip&&(o.innerHTML=e.helptip.replace(/{{(.+?)}}/g,'{{<a href="'+mw.util.getUrl("Template:")+'$1" target="_blank">$1</a>}}')),"customList"!==e.type){var u=document.createElement("a");u.setAttribute("href","#tw-reset"),u.setAttribute("id","twinkle-config-reset-"+e.name),u.addEventListener("click",_.resetPrefLink,!1),u.style.cssFloat="right",u.style.margin="0 0.6em",u.appendChild(document.createTextNode("Reset")),o.appendChild(u)}return i.appendChild(o),c.appendChild(i),!0})),!0}));var d=document.createElement("div");d.setAttribute("id","twinkle-config-buttonpane"),d.style.backgroundColor="#BCCADF",d.style.padding="0.5em";var u=document.createElement("button");u.setAttribute("id","twinkle-config-submit"),u.setAttribute("type","submit"),u.appendChild(document.createTextNode("Save changes")),d.appendChild(u);var m=document.createElement("span");m.className="plainlinks",m.style.marginLeft="2.4em",m.style.fontSize="90%";var g=document.createElement("a");if(g.setAttribute("href","#tw-reset-all"),g.setAttribute("id","twinkle-config-resetall"),g.addEventListener("click",_.resetAllPrefs,!1),g.appendChild(document.createTextNode("Restore defaults")),m.appendChild(g),d.appendChild(m),l.appendChild(d),window.location.hash){var b=window.location.hash;window.location.hash="",window.location.hash=b}}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 f=document.createElement("div");f.setAttribute("id","twinkle-config-headerbox");var h,k=mw.config.get("wgPageName").slice(mw.config.get("wgPageName").lastIndexOf("/")+1,mw.config.get("wgPageName").lastIndexOf(".js"));"twinkleoptions"===k?(f.setAttribute("class","config-twopt-box"),mw.config.get("wgArticleId")>0?f.appendChild(document.createTextNode("This page contains your Twinkle preferences. You can change them using the ")):f.appendChild(document.createTextNode("You can customize Twinkle to suit your preferences by using the ")),(h=document.createElement("a")).setAttribute("href",mw.util.getUrl(mw.config.get("wgFormattedNamespaces")[mw.config.get("wgNamespaceIds").project]+":Twinkle/Preferences")),h.appendChild(document.createTextNode("Twinkle preferences panel")),f.appendChild(h),f.appendChild(document.createTextNode(", or by editing this page.")),$(f).insertAfter($("#contentSub"))):-1!==["monobook","vector","cologneblue","modern","timeless","minerva","common"].indexOf(k)&&(f.setAttribute("class","config-userskin-box"),f.appendChild(document.createTextNode("If you want to set Twinkle preferences, you can use the ")),(h=document.createElement("a")).setAttribute("href",mw.util.getUrl(mw.config.get("wgFormattedNamespaces")[mw.config.get("wgNamespaceIds").project]+":Twinkle/Preferences")),h.appendChild(document.createTextNode("Twinkle preferences panel")),f.appendChild(h),f.appendChild(document.createTextNode(".")),$(f).insertAfter($("#contentSub")))}}static resetPrefLink(e){var t=e.target.id.substring(21);return p(_.sections).forEach((function(e){if(e.hidden||e.adminOnly&&!Morebits.userIsSysop)return!0;var a=!1;return e.preferences.forEach((e=>e.name!==t||(_.resetPref(e),a=!0,!1))),!a&&void 0})),!1}static resetPref(e){switch(e.type){case"boolean":document.getElementById(e.name).checked=E[e.name];break;case"string":case"integer":case"enum":document.getElementById(e.name).value=E[e.name];break;case"set":$.each(e.setValues,(function(t){let a=document.getElementById(e.name+"_"+t);a&&(a.checked=-1!==E[e.name].indexOf(t))}));break;case"customList":$(document.getElementById(e.name)).data("value",E[e.name]);break;default:alert("twinkleconfig: unknown data type for preference "+e.name)}}static resetAllPrefs(){return p(_.sections).forEach((function(e){return e.hidden||e.adminOnly&&!Morebits.userIsSysop||e.preferences.forEach((function(e){e.adminOnly&&!Morebits.userIsSysop||_.resetPref(e)})),!0})),!1}static save(e){Morebits.status.init(document.getElementById("twinkle-config-content"));var t=mw.config.get("wgFormattedNamespaces")[mw.config.get("wgNamespaceIds").user]+":"+mw.config.get("wgUserName")+"/twinkleoptions.js",a=new Morebits.wiki.page(t,"Saving preferences to "+t);return a.setCallbackParameters(e.target),a.load(_.writePrefs),!1}static writePrefs(t){var a=t.getCallbackParameters(),i={optionsVersion:2.1};p(_.sections).forEach((function(e){e.adminOnly&&!Morebits.userIsSysop||e.preferences.forEach((function(t){var o;if(!t.adminOnly||Morebits.userIsSysop)if(e.hidden)T&&(o=T[t.name]);else switch(t.type){case"boolean":o=a[t.name].checked;break;case"string":case"enum":o=a[t.name].value;break;case"integer":o=parseInt(a[t.name].value,10),isNaN(o)&&(Morebits.status.warn("Saving","The value you specified for "+t.name+" ("+a[t.name].value+") was invalid.  The save will continue, but the invalid data value will be skipped."),o=null);break;case"set":o=[],t.setDisplayOrder?$.each(t.setDisplayOrder,(function(e,i){a[t.name+"_"+i].checked&&o.push(i)})):$.each(t.setValues,(function(e){a[t.name+"_"+e].checked&&o.push(e)}));break;case"customList":o=$(a[t.name]).data("value");break;default:alert("twinkleconfig: unknown data type for preference "+t.name)}void 0===o||function(e,t){if(Array.isArray(e)){if(e.length!==t.length)return!1;for(var a=e.sort(),i=t.sort(),o=0;a[o];++o){if("object"==typeof a[o]&&(a[o].label!==i[o].label||a[o].value!==i[o].value))return!1;if(a[o].toString()!==i[o].toString())return!1}return!0}return e===t}(o,E[t.name])||(i[t.name]=o)}))}));var o="// 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 = ';o+=JSON.stringify(i,null,2),o+=";\n\n// </no"+"wiki>\n// End of twinkleoptions.js\n",t.setPageText(o),t.setEditSummary("Saving Twinkle preferences: automatic edit from [[:"+Morebits.pageNameNorm+"]]"),t.setChangeTags(e.changeTags),t.setCreateOption("recreate"),t.save(_.saveSuccess)}static saveSuccess(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 a=document.createElement("br");a.style.clear="both",Morebits.status.root.appendChild(a)}}_.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}]}},_.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"},_.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"}};class U{static addRow(e,t,a){var i=document.createElement("tr"),o=document.createElement("td"),n=document.createElement("button");n.setAttribute("type","button"),n.addEventListener("click",(function(){$(i).remove()}),!1),n.textContent="Remove",o.appendChild(n),i.appendChild(o),o=document.createElement("td");var r=document.createElement("input");r.setAttribute("type","text"),r.className="twinkle-config-customlist-value",r.style.width="97%",t&&r.setAttribute("value",t),o.appendChild(r),i.appendChild(o),o=document.createElement("td"),(r=document.createElement("input")).setAttribute("type","text"),r.className="twinkle-config-customlist-label",r.style.width="98%",a&&r.setAttribute("value",a),o.appendChild(r),i.appendChild(o),e.appendChild(i)}static display(e){var t=$(e.target),a=t.data("value"),i=t.data("pref"),o=new Morebits.simpleWindow(720,400);o.setTitle(i.label),o.setScriptName("Twinkle preferences");var n=document.createElement("div"),r=document.createElement("table");r.className="wikitable",r.style.margin="1.4em 1em",r.style.width="auto";var s=document.createElement("tbody"),l=document.createElement("tr"),c=document.createElement("th");c.style.width="5%",l.appendChild(c),(c=document.createElement("th")).style.width="35%",c.textContent=i.customListValueTitle?i.customListValueTitle:"Value",l.appendChild(c),(c=document.createElement("th")).style.width="60%",c.textContent=i.customListLabelTitle?i.customListLabelTitle:"Label",l.appendChild(c),s.appendChild(l);var d=!1;$.each(a,(function(e,t){d=!0,U.addRow(s,t.value,t.label)})),d||U.addRow(s);var u=document.createElement("tfoot");l=document.createElement("tr");var p=document.createElement("td");p.setAttribute("colspan","3");var m=document.createElement("button");m.style.minWidth="8em",m.setAttribute("type","button"),m.addEventListener("click",(function(){U.addRow(s)}),!1),m.textContent="Add",p.appendChild(m),l.appendChild(p),u.appendChild(l),r.appendChild(s),r.appendChild(u),n.appendChild(r);var g=document.createElement("button");g.setAttribute("type","submit"),g.addEventListener("click",(function(){U.save(t,s),o.close()}),!1),g.textContent="Save changes",n.appendChild(g),(g=document.createElement("button")).setAttribute("type","submit"),g.addEventListener("click",(function(){U.reset(t,s)}),!1),g.textContent="Reset",n.appendChild(g),(g=document.createElement("button")).setAttribute("type","submit"),g.addEventListener("click",(function(){o.close()}),!1),g.textContent="Cancel",n.appendChild(g),o.setContent(n),o.display()}static reset(e,t){var a=$(e),i=a.data("pref"),o=a.data("value");_.resetPref(i),$(t).find("tr").slice(1).remove();var n=a.data("value");$.each(n,(function(e,a){U.addRow(t,a.value,a.label)})),a.data("value",o)}static save(e,t){var a=[],i={};$(t).find('input[type="text"]').each((function(e,t){$(t).hasClass("twinkle-config-customlist-value")?i={value:t.value}:(i.label=t.value,(i.value||i.label)&&a.push(i))})),$(e).data("value",a)}}function W(e,t,a,i){null!==I("portletArea")&&function(e,t,a,i,o){let n=document.getElementById(e)||document.querySelector(e);if(!n)return null;let r,s=document.getElementById(t);if(s)return s.parentNode&&s.parentNode===n?s:null;o&&(r=document.getElementById(o));let l,c,d=mw.config.get("skin");("vector"!==d||"left-navigation"!==e&&"right-navigation"!==e)&&(i=null);switch(d){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"===i?"dropdown vector-menu-dropdown-noicon":"tabs"),c="vector-menu-content";break;case"modern":"mw_portlets"!==e&&"mw_contentwrapper"!==e&&(e="mw_portlets"),l="portlet";break;case"timeless":l="mw-portlet",c="mw-portlet-body";break;default:e="column-one",l="portlet"}let u=document.createElement("nav");u.setAttribute("aria-labelledby",t+"-label"),u.className=l+" emptyPortlet",u.id=t,r&&r.parentNode===n?n.insertBefore(u,r):n.appendChild(u);let p=document.createElement("h3");p.id=t+"-label";let m=document.createElement("ul");if("vector"===d){if(m.className="vector-menu-content-list",-1!==l.indexOf("vector-menu-dropdown")){let e=document.createElement("input");e.className="vector-menu-checkbox",e.setAttribute("type","checkbox"),e.setAttribute("aria-labelledby",t+"-label"),u.appendChild(e);let i=document.createElement("span");i.appendChild(document.createTextNode(a)),p.appendChild(i);let o=document.createElement("a");o.href="#",$(o).click((function(e){e.preventDefault()})),p.appendChild(o)}}else p.appendChild(document.createTextNode(a));if(u.appendChild(p),c){let e=document.createElement("div");e.className=c,e.appendChild(m),u.appendChild(e)}else u.appendChild(m)}(I("portletArea"),I("portletId"),I("portletName"),I("portletType"),I("portletNext"));let o=mw.util.addPortletLink(I("portletId"),"string"==typeof e?e:"#",t,a,i);return $(".client-js .skin-vector #p-cactions").css("margin-right","initial"),"function"==typeof e&&$(o).click((function(t){e(),t.preventDefault()})),$.collapsibleTabs&&$.collapsibleTabs.handleResize(),o}class O{constructor(){}static userPreferences(){}addPreference(e){_.addPreference(this.moduleName,e)}addMenu(){W((()=>this.makeWindow()),this.portletName,this.portletId||"twinkle-"+this.moduleName.toLowerCase(),this.portletTooltip)}makeWindow(){}}function D(t){let a=t.userPreferences();a&&(_.addGroup(t.moduleName,Object.assign(Object.assign({},a),{module:t.moduleName})),S(a.preferences.map((e=>({name:e.name,value:e.default}))))),B.includes(t.moduleName)||(e[t.moduleName.toLowerCase()]=new t)}let B=[];const F=JSON.parse('{"@comment":"This file contains project-specific overrides for twinkle-core messages."}');class L extends O{constructor(){super(),this.moduleName="fluff",this.skipTalk=null,this.rollbackInPlace=null,this.flaggedRevsEnabled=!!mw.loader.moduleRegistry["ext.flaggedRevs.basic"],this.linkBuilder={spanTag:(e,t)=>{var a=document.createElement("span");return a.style.color=e,a.appendChild(document.createTextNode(t)),a},buildLink:(e,t)=>{var a=document.createElement("a");return a.appendChild(this.linkBuilder.spanTag("Black","[")),a.appendChild(this.linkBuilder.spanTag(e,t)),a.appendChild(this.linkBuilder.spanTag("Black","]")),a.href="#",a},rollbackLinks:(e,t=!1,a,i)=>{e=e||null;var o=t?"span":"div",n=document.createElement(o);(a=parseInt(a,10))?n.setAttribute("id","tw-revert"+a):n.setAttribute("id","tw-revert");var r=document.createElement("strong"),s=document.createElement("strong"),l=this.linkBuilder.buildLink("SteelBlue",P("link-rollback")),c=this.linkBuilder.buildLink("Red",P("link-vandalism"));$(l).click((()=>{this.revert("norm",e,a,i),this.disableLinks(n)})),$(c).click((()=>{this.revert("vand",e,a,i),this.disableLinks(n)})),s.appendChild(c),r.appendChild(l);var d=t?" ":" || ";if(!t){var u=document.createElement("strong"),p=this.linkBuilder.buildLink("DarkOliveGreen",P("link-goodfaith-rollback"));$(p).click((()=>{this.revert("agf",e,a,i)})),u.appendChild(p),n.appendChild(u)}return n.appendChild(document.createTextNode(d)),n.appendChild(r),n.appendChild(document.createTextNode(d)),n.appendChild(s),n},restoreThisRevisionLink:(e,t=!1)=>{e="number"==typeof e?e:mw.config.get(e);var a=t?"span":"div",i=document.createElement(a);i.setAttribute("id","tw-revert-to-"+e),i.style.fontWeight="bold";var o=this.linkBuilder.buildLink("SaddleBrown",P("restore-revision"));return $(o).click((()=>{this.revertToRevision(e)})),t&&i.appendChild(document.createTextNode(" ")),i.appendChild(o),i}},this.addLinks={contributions:()=>{var e=!!$("#sp-contributions-footer-anon-range")[0];if(mw.config.exists("wgRelevantUserName")||e){var t=mw.config.get("wgRelevantUserName");if(-1!==I("showRollbackLinks").indexOf("contribs")||mw.config.get("wgUserName")!==t&&-1!==I("showRollbackLinks").indexOf("others")||mw.config.get("wgUserName")===t&&-1!==I("showRollbackLinks").indexOf("mine"))$("#mw-content-text").find("ul li:has(span.mw-uctop):has(.mw-changeslist-diff)").each(((a,i)=>{var o=$(i).find(".mw-contributions-title").text();e&&(t=$(i).find(".mw-userlink:not(.history-deleted)").text()),i.appendChild(this.linkBuilder.rollbackLinks(t,!0,i.dataset.mwRevid,o))}))}},recentchanges:()=>{if(-1!==I("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(((e,t)=>{var a=$(t).find(".mw-userlink:not(.history-deleted)").text(),i=$(t).find(".mw-changeslist-diff").attr("href"),o=mw.util.getParamValue("diff",i),n=t.dataset.targetPage;t.appendChild(this.linkBuilder.rollbackLinks(a,!0,o,n))}))}},history:()=>{if(-1!==I("showRollbackLinks").indexOf("history")){var e=$("#pagehistory li").toArray();if(!$(".mw-firstlink").length)for(var t=e.shift(),a=$(t).find(".mw-userlink:not(.history-deleted)").text(),i=0;i<e.length;i++)if($(e[i]).find(".mw-userlink").text()!==a){t.appendChild(this.linkBuilder.rollbackLinks(a,!0));break}e.forEach((e=>{var t=e.querySelector(".mw-changeslist-date").href,a=parseInt(mw.util.getParamValue("oldid",t),10);isNaN(a)||e.appendChild(this.linkBuilder.restoreThisRevisionLink(a,!0))}))}},diff:()=>{var e=e=>{var t=$("#mw-diff-"+e+"2 .mw-usertoollinks a").first();if(t.length){var a="vanarticle="+mw.util.rawurlencode(Morebits.pageNameNorm)+"&noautowarn=true";a+="&vanarticlerevid=",a+="otitle"===e?mw.config.get("wgDiffOldId"):mw.config.get("wgDiffNewId");var i=t.attr("href");-1===i.indexOf("?")?t.attr("href",i+"?"+a):t.attr("href",i+"&"+a)}};if(e("otitle"),mw.config.get("wgDiffOldId")&&mw.config.get("wgDiffOldId")!==mw.config.get("wgDiffNewId")){var t=document.getElementById("mw-diff-otitle1").parentNode;t.insertBefore(this.linkBuilder.restoreThisRevisionLink("wgDiffOldId"),t.firstChild)}if(e("ntitle"),document.getElementById("differences-nextlink")){var a=document.getElementById("mw-diff-ntitle1").parentNode;a.insertBefore(this.linkBuilder.restoreThisRevisionLink("wgDiffNewId"),a.firstChild)}else if(-1!==I("showRollbackLinks").indexOf("diff")&&mw.config.get("wgDiffOldId")&&(mw.config.get("wgDiffOldId")!==mw.config.get("wgDiffNewId")||document.getElementById("differences-prevlink"))){var i=$("#mw-diff-ntitle2").find(".mw-userlink")[0].textContent,o=document.getElementById("mw-diff-ntitle1").parentNode;o.insertBefore(this.linkBuilder.rollbackLinks(i),o.firstChild)}},oldid:()=>{var e=document.getElementById("mw-revision-info").parentNode;e.insertBefore(this.linkBuilder.restoreThisRevisionLink("wgRevisionId"),e.firstChild)}},this.callbacks={toRevision:t=>{var a=prompt(P("prompt-reason-restore"),"");if(null!==a){var i=this.formatSummary(P("restore-summary",t.getRevisionID()),t.getRevisionUser(),a);t.setChangeTags(e.changeTags),t.setEditSummary(i),-1!==I("watchRevertedPages").indexOf("torev")&&t.setWatchlist(I("watchRevertedExpiry")),-1!==I("markRevertedPagesAsMinor").indexOf("torev")&&t.setMinorEdit(!0),Morebits.wiki.actionCompleted.redirect=t.getPageName(),Morebits.wiki.actionCompleted.notice=P("reversion-complete"),t.revert()}else t.getStatusElement().error(P("user-aborted"))},main:t=>{var a=t.getResponse().query.pages[0];if(a.actions.edit){var i=t.statelem,o=t.params,n=parseInt(a.lastrevid,10),r=a.revisions;if(r.length<1)i.error(P("no-revisions"));else{var s=r[0],l=s.user;if(n<o.revid)Morebits.status.error("Error",P("bad-revid",n));else{var c=o.user||P("hidden-user"),d=1;if(o.revid!==n)if(Morebits.status.warn("Warning",P("revid-mismatch",n,o.revid)),l===o.user||mw.util.isIPv6Address(o.user)&&Morebits.ip.get64(l)===Morebits.ip.get64(o.user))switch(o.type){case"vand":l!==o.user?Morebits.status.info("Info",P("latest-rev-same-64",c)):Morebits.status.info("Info",P("latest-rev-same-user",c));break;case"agf":return void Morebits.status.warn("Warning",P("latest-rev-other-user-goodfaith",c));default:return void Morebits.status.warn("Notice",P("latest-rev-other-user",c))}else{if(!("vand"===o.type&&-1!==this.trustedBots.indexOf(s.user)&&r.length>1&&r[1].revid===o.revid))return void Morebits.status.error("Error",P("latest-rev-reverted",l));Morebits.status.info("Info",P("latest-rev-bot",l)),d=2}else o.user=l,c=o.user||P("hidden-user");if(-1!==this.trustedBots.indexOf(o.user))switch(o.type){case"vand":Morebits.status.info("Info",P("bot-revert",c)),d=2,o.user=r[1].user,o.userHidden=!!r[1].userhidden;break;case"agf":return void Morebits.status.warn("Notice",P("bot-revert-goodfaith",c));default:confirm(P("bot-revert-prompt"))?(Morebits.status.info("Info",P("bot-revert-previous",c)),d=2,o.user=r[1].user,o.userHidden=!!r[1].userhidden,c=o.user||P("hidden-user")):Morebits.status.warn("Notice",P("bot-revert-selected",c))}for(var u=!1,p=0,m=!1,g=d;g<r.length;++g)if(++p,r[g].user!==o.user){if(mw.util.isIPv6Address(r[g].user)&&Morebits.ip.get64(r[g].user)===Morebits.ip.get64(o.user)){m||(new Morebits.status("Note",P("ipv6-same-user")),m=!0);continue}u=g;break}if(u)if(p){var b,f,h=r[u],k=!1;if("vand"!==o.type&&p>1){if(!confirm(P("revert-multiple-prompt",c,p)))return void Morebits.status.info("Notice",P("stopping"));k=!0}switch(o.count=p,o.goodid=h.revid,o.gooduser=h.user,o.gooduserHidden=!!h.userhidden,i.status(P("revision-age",o.goodid,p,o.gooduserHidden?P("hidden-user"):o.gooduser)),o.type){case"agf":if(null===(f=prompt(P("summary-prompt"),"")))return void i.error(P("user-aborted"));k=!0,b=this.formatSummary(P("goodfaith-summary"),o.userHidden?null:o.user,f);break;case"vand":b=this.formatSummary(P("vandalism-summary",o.count,o.gooduserHidden?P("hidden-user"):o.gooduser),o.userHidden?null:o.user);break;default:if(I("offerReasonOnNormalRevert")){if(null===(f=prompt(P("summary-prompt"),"")))return void i.error(P("user-aborted"));k=!0}b=this.formatSummary(P("normal-summary",o.count),o.userHidden?null:o.user,f)}if(!(I("confirmOnFluff")||I("confirmOnMobileFluff")&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile|Opera Mini/i.test(navigator.userAgent))||k||confirm(P("revert-confirm"))){this.skipTalk||-1===I("openTalkPage").indexOf(o.type)||o.userHidden||mw.config.get("wgUserName")===o.user||(o.notifyUser=!0,o.vantimestamp=s.timestamp),this.flaggedRevsEnabled&&(Morebits.userIsInGroup("reviewer")||Morebits.userIsSysop)&&a.flagged&&a.flagged.stable_revid>=o.goodid&&a.flagged.pending_since&&(o.reviewRevert=!0,o.csrftoken=t.getResponse().query.tokens.csrftoken);var v=new Morebits.wiki.page(o.pagename,P("saving-reverted"));v.setEditSummary(b),v.setChangeTags(e.changeTags),v.setOldID(o.goodid),v.setCallbackParameters(o),-1!==I("watchRevertedPages").indexOf(o.type)&&v.setWatchlist(I("watchRevertedExpiry")),-1!==I("markRevertedPagesAsMinor").indexOf(o.type)&&v.setMinorEdit(!0),this.rollbackInPlace||(Morebits.wiki.actionCompleted.redirect=o.pagename),Morebits.wiki.actionCompleted.notice=P("revert-complete"),v.revert(this.callbacks.complete)}else i.error(P("user-aborted"))}else Morebits.status.error("Error",P("no-edits-revert"));else i.error(P("no-previous-revision",c,I("revertMaxRevisions")))}}}else t.statelem.error(P("cant-edit-protected"))},complete:t=>{var a=t.getCallbackParameters();if(a.notifyUser&&!a.userHidden){Morebits.status.info("Info",P("opening-talk",a.user));var i={title:"User talk:"+a.user,action:"edit",preview:"yes",vanarticle:a.pagename.replace(/_/g," "),vanarticlerevid:a.revid,vantimestamp:a.vantimestamp,vanarticlegoodrevid:a.goodid,type:a.type,count:a.count};switch(I("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;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(a.reviewRevert){var o={action:"review",revid:t.getSaveResponse().edit.newrevid,token:a.csrftoken,comment:P("pcreview-comment")+e.summaryAd};new Morebits.wiki.api(P("pcreview-accepting"),o).post()}}},mw.config.get("wgIsProbablyEditable")?mw.config.get("wgDiffNewId")||mw.config.get("wgDiffOldId")?mw.hook("wikipage.diff").add((()=>{this.addLinks.diff()})):"view"===mw.config.get("wgAction")&&mw.config.get("wgRevisionId")&&mw.config.get("wgCurRevisionId")!==mw.config.get("wgRevisionId")?this.addLinks.oldid():"history"===mw.config.get("wgAction")&&mw.config.get("wgArticleId")&&this.addLinks.history():-1===mw.config.get("wgNamespaceNumber")&&(this.skipTalk=!I("openTalkPageOnAutoRevert"),this.rollbackInPlace=I("rollbackInPlace"),"Contributions"===mw.config.get("wgCanonicalSpecialPageName")?this.addLinks.contributions():"Recentchanges"!==mw.config.get("wgCanonicalSpecialPageName")&&"Recentchangeslinked"!==mw.config.get("wgCanonicalSpecialPageName")||mw.hook("wikipage.content").add((e=>{e.is("div")&&this.addLinks.recentchanges()})))}disableLinks(e){$(e).children().each(((e,t)=>{t.innerHTML=t.textContent,$(t).css("font-weight","normal").css("color","darkgray")}))}revert(e,t,a,i){mw.util.isIPv6Address(t)&&(t=Morebits.ip.sanitizeIPv6(t));var o=i||mw.config.get("wgPageName"),n=a||mw.config.get("wgCurRevisionId");if(this.rollbackInPlace){var r=document.createElement("span");mw.notify(r,{autoHide:!1,title:"Rollback on "+i,tag:"twinklefluff_"+a}),Morebits.status.init(r)}else Morebits.status.init(document.getElementById("mw-content-text")),$("#catlinks").remove();var s={type:e,user:t,userHidden:!t,pagename:o,revid:n},l={action:"query",prop:["info","revisions"].concat(this.flaggedRevsEnabled?"flagged":[]),titles:o,inprop:"watched",intestactions:"edit",rvlimit:I("revertMaxRevisions"),rvprop:["ids","timestamp","user"],curtimestamp:"",meta:"tokens",type:"csrf",format:"json"},c=new Morebits.wiki.api(P("fetching-data"),l);c.params=s,c.post().then((e=>this.callbacks.main(e)))}revertToRevision(e){Morebits.status.init(document.getElementById("mw-content-text"));var t=new Morebits.wiki.page(mw.config.get("wgPageName"),P("saving-reverted"));t.setOldID(e),t.load(this.callbacks.toRevision)}formatSummary(e,t,a){var i=e;if(a&&(i+=": "+Morebits.string.toUpperCaseFirstChar(a)),/%USER%/.test(e))if(t){var o=unescape(encodeURIComponent(i.replace("%USER%",""))).length,n="[[Special:Contributions/"+t+"|"+t+"]]",r=unescape(encodeURIComponent(n)).length;if(o+r<=499){var s=" ([[User talk:"+t+"|talk]])";i=o+r+unescape(encodeURIComponent(s)).length<=499?Morebits.string.safeReplace(i,"%USER%",n+s):Morebits.string.safeReplace(i,"%USER%",n)}else i=Morebits.string.safeReplace(i,"%USER%",t)}else i=Morebits.string.safeReplace(i,"%USER%",P("hidden-user"));return i}}L.moduleName="fluff";class V extends Morebits.simpleWindow{constructor(t,a){super(t,a),this.setScriptName(e.scriptName)}setFooterLinks(e){e&&m(e).forEach((e=>{this.addFooterLink(e[0],e[1])}))}}class q extends Morebits.wiki.user{constructor(t,a){if(super(t,a),e.changeTags.length)this.setChangeTags(e.changeTags);else{let t=this.setReason.bind(this);this.setReason=function(a){t(a+e.summaryAd)}}["load","block","notify"].forEach((e=>{let t=this[e].bind(this);this[e]=function(e,a){let i=$.Deferred();return t((t=>{e&&e.call(this,this),i.resolve(t instanceof Morebits.wiki.api?t:this)}),(e=>{if(a&&a.call(this,this),e instanceof Morebits.wiki.api){var t=new c(e.getErrorCode()+": "+e.getErrorText());t.code=e.getErrorCode(),t.info=e.getErrorText(),t.response=e.getResponse(),i.reject(t)}else i.reject(new Error(e))})),i}}))}}var j=Morebits.string.isInfinity;class G extends O{constructor(){super(),this.moduleName="block",this.portletId="twinkle-block",this.portletName="Block",this.portletTooltip="Block relevant user",this.menuFormattedNamespaces=$.extend({},mw.config.get("wgFormattedNamespaces")),this.fetchedData={},this.defaultBlockTemplate="uw-block",this.defaultAnonBlockTemplate="uw-ablock",this.defaultIndefBlockTemplate="uw-blockindef",this.defaultPartialBlockTemplate="uw-pblock",this.defaultIndefPartialBlockTemplate="uw-pblockindef",this.ipBlockExpiryDefault="31 hours",this.seeAlsos=[],this.prev_template_expiry=null,this.menuFormattedNamespaces[0]=P("blanknamespace"),this.relevantUserName=mw.config.get("wgRelevantUserName"),Morebits.userIsSysop&&this.relevantUserName&&(!Morebits.ip.isRange(this.relevantUserName)||Morebits.ip.validCIDR(this.relevantUserName))&&this.addMenu()}makeWindow(){if(this.relevantUserName!==mw.config.get("wgUserName")||confirm(P("block-self-warn"))){this.currentBlockInfo=void 0,this.field_block_options={},this.field_template_options={};var e=new V(650,530);e.setTitle(P("block-window-title",this.relevantUserName)),e.setFooterLinks(this.footerlinks),e.addFooterLink(P("unblock-label"),`Special:Unblock/${this.relevantUserName}`,!0);var t=new Morebits.quickForm((e=>this.evaluate(e)));t.append({type:"field",label:"Type of action"}).append({type:"checkbox",event:this.change_action.bind(this),list:[{label:P("block-action"),value:"block",name:"block",tooltip:P("block-action-tooltip"),checked:!0},{label:P("block-partial"),value:"partial",name:"partial",tooltip:P("block-partial-tooltip"),checked:I("defaultToPartialBlocks")},{label:P("block-tag"),value:"tag",name:"tag",tooltip:P("block-tag-tooltip"),checked:!Morebits.ip.isRange(this.relevantUserName),disabled:Morebits.ip.isRange(this.relevantUserName)}]});var a=Morebits.ip.get64(mw.config.get("wgRelevantUserName"));if(a&&a!==mw.config.get("wgRelevantUserName")){var i=t.append({type:"field",label:P("block-64-field-label"),name:"field_64"});i.append({type:"div",style:"margin-bottom: 0.5em",label:P("block-64-help",a)}),i.append({type:"checkbox",name:"block64",event:this.change_block64.bind(this),list:[{checked:this.relevantUserName!==mw.config.get("wgRelevantUserName"),label:P("block-64-label"),value:"block64",tooltip:Morebits.ip.isRange(mw.config.get("wgRelevantUserName"))?"":P("block-64-template",mw.config.get("wgRelevantUserName"))}]})}t.append({type:"field",label:P("preset"),name:"field_preset"}),t.append({type:"field",label:P("block-tag-options"),name:"field_template_options"}),t.append({type:"field",label:P("block-block-options"),name:"field_block_options"}),t.append({type:"submit"});var o=t.render();e.setContent(o),e.display(),o.root=o;var n=new q(this.relevantUserName,P("fetching-userinfo"));n.load().then((()=>{this.processUserInfo(n),this.blockedUserName===this.relevantUserName&&$(o.partial).prop("checked",this.currentBlockInfo.partial),this.transformBlockPresets();var e=document.createEvent("Event");e.initEvent("change",!0,!0),o.block.dispatchEvent(e)}),(()=>{Morebits.status.init($('div[name="currentblock"] span').last()[0]),Morebits.status.warn(P("error"),P("fetching-userinfo-error"))}))}}processUserInfo(e){var t=e.getBlockInfo();this.fetchedData[e.getUserName()]=e,this.isRegistered=!e.isIP(),this.userIsBot=e.isBot(),t&&(t.disabletalk=!t.allowusertalk,t.hardblock=!t.anononly),this.currentBlockInfo=t,this.blockedUserName=this.currentBlockInfo&&this.currentBlockInfo.user,$(".morebits-dialog-footerlinks a").first().toggle(this.blockedUserName===this.relevantUserName).next().toggle(this.blockedUserName===this.relevantUserName),this.hasBlockLog=e.hasBlockLog(),this.lastBlockLogEntry=e.getLastBlockLogEntry(),this.lastBlockLogId=!!this.hasBlockLog&&this.lastBlockLogEntry.logid}saveFieldset(e){return this[$(e).prop("name")]={},$(e).serializeArray().forEach((t=>{this[$(e).prop("name")][t.name]=t.value})),this[$(e).prop("name")]}change_block64(e){var t=e.target.form,a=$(e.target.form).find("[name=block64]"),i=this.relevantUserName;a.is(":checked")?this.relevantUserName=Morebits.ip.get64(mw.config.get("wgRelevantUserName")):this.relevantUserName=mw.config.get("wgRelevantUserName");var o=Morebits.ip.isRange(mw.config.get("wgRelevantUserName"));$(t.tag).prop("disabled",o).prop("checked",!o);var n=()=>{var a=document.querySelector(".ui-dialog-title").firstChild.nextSibling;a.nodeValue=a.nodeValue.replace(i,this.relevantUserName);var o=document.querySelector(".morebits-dialog-footerlinks a");o.href=o.href.replace(i,this.relevantUserName),o.title=o.title.replace(i,this.relevantUserName),$(t.partial).prop("checked",I("defaultToPartialBlocks")),this.blockedUserName===this.relevantUserName&&$(t.partial).prop("checked",this.currentBlockInfo.partial),this.change_action(e)};this.fetchedData[this.relevantUserName]?(this.processUserInfo(this.fetchedData[this.relevantUserName]),n()):new Morebits.wiki.user(this.relevantUserName,P("fetching-userinfo")).load((e=>{this.processUserInfo(e),n()}),(()=>{Morebits.status.init($('div[name="currentblock"] span').last()[0]),Morebits.status.warn(P("error"),P("fetching-userinfo-error"))}))}change_action(e){var t,a,i,o=e.target.form,n=$(e.target.form),r=Morebits.quickForm.getInputData(o),s=r.partial?this.blockGroupsPartial:this.blockGroups;$(o.partial).prop("disabled",!r.block&&!r.tag);var l,c,d,u,p={label:P("block-prior-label")};if(this.blockedUserName===this.relevantUserName?(this.blockPresetsInfo.prior=this.currentBlockInfo,p.list=[{label:P("block-prior-label"),value:"prior",selected:!0}],s.some((e=>e.label===p.label))||s.push(p),r.partial?this.blockPresetsInfo.prior.templateName=j(this.currentBlockInfo.expiry)?this.defaultIndefPartialBlockTemplate:this.defaultPartialBlockTemplate:this.isRegistered?this.blockPresetsInfo.prior.templateName=j(this.currentBlockInfo.expiry)?this.defaultIndefBlockTemplate:this.defaultBlockTemplate:this.blockPresetsInfo.prior.templateName=this.defaultAnonBlockTemplate):s=s.filter((e=>e.label!==p.label)),this.saveFieldset($("[name=field_block_options]")),this.saveFieldset($("[name=field_template_options]")),r.block&&((t=new Morebits.quickForm.element({type:"field",label:"Preset",name:"field_preset"})).append({type:"select",name:"preset",label:P("choose-preset"),event:this.change_preset.bind(this),list:this.filtered_block_groups(s)}),(i=new Morebits.quickForm.element({type:"field",label:P("block-block-options"),name:"field_block_options"})).append({type:"div",name:"currentblock",label:" "}),i.append({type:"div",name:"hasblocklog",label:" "}),i.append({type:"select",name:"expiry_preset",label:P("block-expiry"),event:this.change_expiry.bind(this),list:[{label:P("block-custom-expiry"),value:"custom",selected:!0},{label:P("block-expiry-indefinite"),value:"infinity"},{label:P("duration-hours",3),value:"3 hours"},{label:P("duration-hours",12),value:"12 hours"},{label:P("duration-hours",24),value:"24 hours"},{label:P("duration-hours",31),value:"31 hours"},{label:P("duration-hours",36),value:"36 hours"},{label:P("duration-hours",48),value:"48 hours"},{label:P("duration-hours",60),value:"60 hours"},{label:P("duration-hours",72),value:"72 hours"},{label:P("duration-weeks",1),value:"1 week"},{label:P("duration-weeks",2),value:"2 weeks"},{label:P("duration-months",1),value:"1 month"},{label:P("duration-months",3),value:"3 months"},{label:P("duration-months",6),value:"6 months"},{label:P("duration-years",1),value:"1 year"},{label:P("duration-years",2),value:"2 years"},{label:P("duration-years",3),value:"3 years"}]}),i.append({type:"input",name:"expiry",label:P("block-custom-expiry"),tooltip:P("block-custom-expiry-tooltip"),value:this.field_block_options.expiry||this.field_template_options.template_expiry}),r.partial&&(i.append({type:"select",multiple:!0,name:"pagerestrictions",label:P("block-pages-label"),value:"",tooltip:P("block-pages-tooltip")}),i.append({type:"select",multiple:!0,name:"namespacerestrictions",label:P("block-namespaces-label"),value:"",tooltip:P("block-namespaces-tooltip"),list:m(this.menuFormattedNamespaces).filter((([e])=>e>=0&&!this.disablePartialBlockNamespaces.includes(e))).map((([e,t])=>({type:"option",label:t,value:e})))})),i.append({type:"checkbox",name:"blockoptions",list:[{checked:this.field_block_options.nocreate,label:P("block-nocreate-label"),name:"nocreate",value:"1"},{checked:this.field_block_options.noemail,label:P("block-noemail-label"),name:"noemail",value:"1"},{checked:this.field_block_options.disabletalk,label:P("block-disabletalk-label"),name:"disabletalk",value:"1",tooltip:r.partial?P("block-partial-disabletalk-tooltip"):""},this.isRegistered?{checked:this.field_block_options.autoblock,label:P("block-auto-label"),name:"autoblock",value:"1"}:{checked:this.field_block_options.hardblock,label:P("block-hard-label"),name:"hardblock",value:"1"},{checked:this.field_block_options.watchuser,label:P("block-watch-label"),name:"watchuser",value:"1"}]}),i.append({type:"textarea",label:P("block-reason-label"),name:"reason",tooltip:P("block-reason-tooltip"),value:this.field_block_options.reason}),i.append({type:"div",name:"filerlog_label",label:P("block-see-label"),style:"display:inline-block;font-style:normal !important",tooltip:P("block-see-tooltip")}),i.append({type:"checkbox",event:this.toggle_see_alsos.bind(this),style:"display:inline-block; margin-right:5px",list:[{label:P("block-see-filter"),name:"filter_see_also",value:"filter log"}]}),i.append({type:"checkbox",event:this.toggle_see_alsos.bind(this),style:"display:inline-block",list:[{label:P("block-see-deleted"),name:"deleted_see_also",value:"deleted contribs"}]}),this.blockedUserName===this.relevantUserName&&i.append({type:"hidden",name:"reblock",value:"1"})),r.tag){(a=new Morebits.quickForm.element({type:"field",label:P("block-tag-options"),name:"field_template_options"})).append({type:"select",name:"template",label:P("block-tag-template"),event:this.change_template.bind(this),list:this.filtered_block_groups(s,!0),value:this.field_template_options.template}),a.append({type:"input",name:"article",label:P("block-linked-label"),value:"",tooltip:P("block-linked-tooltip")}),a.append({type:"input",name:"area",label:P("block-partial-area-label"),value:"",tooltip:P("block-partial-area-tooltip")}),r.block||a.append({type:"input",name:"template_expiry",label:P("block-tag-expiry"),value:"",tooltip:P("block-tag-expiry-tooltip")}),a.append({type:"input",name:"block_reason",label:P("block-tag-reason-label"),tooltip:P("block-tag-reason-tooltip"),value:this.field_template_options.block_reason}),r.block?a.append({type:"checkbox",name:"blank_duration",list:[{label:P("block-tag-noexpiry-label"),checked:this.field_template_options.blank_duration,tooltip:P("block-tag-noexpiry-tooltip")}]}):a.append({type:"checkbox",list:[{label:P("block-tag-notalk-label"),name:"notalk",checked:this.field_template_options.notalk,tooltip:P("block-tag-notalk-tooltip")},{label:P("block-tag-noemail-label"),name:"noemail_template",checked:this.field_template_options.noemail_template,tooltip:P("block-tag-noemail-tooltip")},{label:P("block-tag-nocreate-label"),name:"nocreate_template",checked:this.field_template_options.nocreate_template,tooltip:P("block-tag-nocreate-tooltip")}]});var g=$('<a id="twinkleblock-preview-link">Preview</a>');g.off("click").on("click",(()=>{this.preview(n[0])})),g.css({cursor:"pointer"}),a.append({type:"div",id:"blockpreview",label:[g[0]]}),a.append({type:"div",id:"twinkleblock-previewbox",style:"display: none"})}if(t?(l=n.find('fieldset[name="field_preset"]')[0]).parentNode.replaceChild(t.render(),l):n.find('fieldset[name="field_preset"]').hide(),i?((l=n.find('fieldset[name="field_block_options"]')[0]).parentNode.replaceChild(i.render(),l),n.find('fieldset[name="field_64"]').show(),n.find("[name=pagerestrictions]").select2({width:"100%",placeholder:P("block-pages-placeholder"),language:{errorLoading:()=>P("select2-badsearch")},maximumSelectionLength:10,minimumInputLength:1,ajax:{url:mw.util.wikiScript("api"),dataType:"json",delay:100,data:e=>{var t=mw.Title.newFromText(e.term);if(t)return{action:"query",format:"json",list:"allpages",apfrom:t.title,apnamespace:t.namespace,aplimit:"10"}},processResults:e=>({results:e.query.allpages.map((e=>{var t=mw.Title.newFromText(e.title,e.ns).toText();return{id:t,text:t}}))})},templateSelection:e=>$("<a>").text(e.text).attr({href:mw.util.getUrl(e.text),target:"_blank"})}),n.find("[name=namespacerestrictions]").select2({width:"100%",matcher:Morebits.select2.matchers.wordBeginning,language:{searching:Morebits.select2.queryInterceptor},templateResult:Morebits.select2.highlightSearchMatches,placeholder:P("block-namespaces-placeholder")}),mw.util.addCSS(".select2-results .select2-results__option { 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-container--default.select2-container--focus .select2-selection--multiple { border: 1px solid #aaa; }.select2-selection__choice__remove { font-size: 130%; }")):(n.find('fieldset[name="field_block_options"]').hide(),n.find('fieldset[name="field_64"]').hide(),n.find("[name=pagerestrictions]").val(null).trigger("change"),n.find("[name=namespacerestrictions]").val(null).trigger("change")),a?((l=n.find('fieldset[name="field_template_options"]')[0]).parentNode.replaceChild(a.render(),l),e.target.form.root.previewer=new Morebits.wiki.preview($(e.target.form.root).find("#twinkleblock-previewbox").last()[0])):n.find('fieldset[name="field_template_options"]').hide(),this.currentBlockInfo){var b=this.blockedUserName===this.relevantUserName;Morebits.status.init($('div[name="currentblock"] span').last()[0]);let t=this.currentBlockInfo.partial,a=this.currentBlockInfo.rangestart!==this.currentBlockInfo.rangeend,i="infinity"===this.currentBlockInfo.expiry,o=mw.util.getUrl("Special:Log",{page:this.blockedUserName,type:"block"}),n="";if(t)if(a)if(b)n=P("block-current-partial-range",this.relevantUserName);else{let e=this.blockedUserName.match(/\/(\d{1,3})$/)[1];n=P("block-current-partial-in-range",this.relevantUserName,e,`<a target="_blank" href="${o}">${this.blockedUserName}</a>`)}else n=P("block-current-partial",this.relevantUserName);else if(n=P("block-current",this.relevantUserName),a)if(b)n=P("block-current-range",this.relevantUserName);else{let e=this.blockedUserName.match(/\/(\d{1,3})$/)[1];n=P("block-current-in-range",this.relevantUserName,e,`<a target="_blank" href="${o}">${this.blockedUserName}</a>`)}n+=P("word-separator")+P("parentheses",i?P("block-expiry-indefinite"):new Morebits.date(this.currentBlockInfo.expiry).isValid()?P("block-expiry-date",this.currentBlockInfo.expiry):"");let r="";r=P(b?"block-current-change":"block-current-add"),Morebits.status.warn(n,r),this.update_form(e,this.currentBlockInfo)}if(this.hasBlockLog){var f=[];f.push((c=P("blocklogpage"),d="Special:Log",u={page:this.relevantUserName,type:"block"},`<a target="_blank" href="${mw.util.getUrl(d,u)}">${c}</a>`)),this.currentBlockInfo||("unblock"===this.lastBlockLogEntry.action?f.push(P("word-separator"),P("parentheses",P("unblocked-ago",this.lastBlockLogEntry.timestamp))):f.push(P("word-separator"),P("parentheses",P("block-expired",this.lastBlockLogEntry.params.duration,this.lastBlockLogEntry.timestamp)))),Morebits.status.init($('div[name="hasblocklog"] span').last()[0]),Morebits.status.warn(this.currentBlockInfo?P("block-log-current"):P("block-log-past"),f)}r.block?this.change_preset(e):r.tag&&this.change_template(e)}transformBlockPresets(){$.each(this.blockPresetsInfo,((e,t)=>{t.summary=t.summary||t.reason,t.sig=void 0!==t.sig?t.sig:"yes",t.indefinite=t.indefinite||j(t.expiry),!this.isRegistered&&t.indefinite?t.expiry=this.ipBlockExpiryDefault:t.expiry=t.expiry||this.ipBlockExpiryDefault,this.blockPresetsInfo[e]=t}))}filtered_block_groups(e,t){return $.map(e,(e=>{var a=$.map(e.list,(e=>{switch(e.value){case"uw-talkrevoked":if(this.blockedUserName!==this.relevantUserName)return;break;case"rangeblock":if(!Morebits.ip.isRange(this.relevantUserName))return;e.selected=!Morebits.ip.get64(this.relevantUserName)}var a=this.blockPresetsInfo[e.value];if(!(a.requireGroup&&!Morebits.userIsInGroup(a.requireGroup)||a.forRegisteredOnly&&!this.isRegistered||a.forAnonOnly&&this.isRegistered||t&&a.templateName)){var i=a.templateName||e.value;return{label:(t?"{{"+i+"}}: ":"")+e.label,value:e.value,data:[{name:"template-name",value:i}],selected:!!e.selected,disabled:!!e.disabled}}}));if(a.length)return{label:e.label,list:a}}))}change_preset(e){var t=e.target.form,a=t.preset.value;a&&(this.update_form(e,this.blockPresetsInfo[a]),t.template&&(t.template.value=this.blockPresetsInfo[a].templateName||a,this.change_template(e)))}change_expiry(e){var t=e.target.form.expiry;"custom"===e.target.value?Morebits.quickForm.setElementVisibility(t.parentNode,!0):(Morebits.quickForm.setElementVisibility(t.parentNode,!1),t.value=e.target.value)}toggle_see_alsos(e){}update_form(e,t){var a=e.target.form,i=t.expiry;if(t.useInitialOptions||(Date.parse(i)?(i=new Date(i).toUTCString(),a.expiry_preset.value="custom"):a.expiry_preset.value=t.expiry||"custom",a.expiry.value=i,"custom"===a.expiry_preset.value?Morebits.quickForm.setElementVisibility(a.expiry.parentNode,!0):Morebits.quickForm.setElementVisibility(a.expiry.parentNode,!1)),this.userIsBot&&(t.autoblock=!1),$(a).find("[name=field_block_options]").find(":checkbox").each(((e,a)=>{if(!t.useInitialOptions||void 0!==t[a.name]){var i=""===t[a.name]||!!t[a.name];$(a).prop("checked",i)}})),t.prependReason&&t.reason?a.reason.value=t.reason+"; "+a.reason.value:a.reason.value=t.reason||"",a.pagerestrictions){var o=$(a).find("[name=pagerestrictions]"),n=$(a).find("[name=namespacerestrictions]");if(t.useInitialOptions||(o.val(null).trigger("change"),n.val(null).trigger("change")),t.restrictions){if(t.restrictions.pages&&!o.val().length){var r=t.restrictions.pages.map((e=>e.title));r.forEach((e=>{if(!o.find("option[value='"+$.escapeSelector(e)+"']").length){var t=new Option(e,e,!0,!0);o.append(t)}})),o.val(o.val().concat(r)).trigger("change")}t.restrictions.namespaces&&n.val(n.val().concat(t.restrictions.namespaces)).trigger("change")}}}change_template(e){var t=e.target.form,a=t.template.value,i=this.blockPresetsInfo[a],o=Morebits.quickForm.getInputData(t);o.block?o.tag&&Morebits.quickForm.setElementVisibility(t.blank_duration.parentNode,!i.indefinite&&!i.nonstandard):(i.indefinite||i.nonstandard?(null===this.prev_template_expiry&&(this.prev_template_expiry=t.template_expiry.value||""),t.template_expiry.parentNode.style.display="none",t.template_expiry.value="infinity"):"none"===t.template_expiry.parentNode.style.display&&(null!==this.prev_template_expiry&&(t.template_expiry.value=this.prev_template_expiry,this.prev_template_expiry=null),t.template_expiry.parentNode.style.display="block"),this.prev_template_expiry&&(t.expiry.value=this.prev_template_expiry),Morebits.quickForm.setElementVisibility(t.notalk.parentNode,!i.nonstandard),Morebits.quickForm.setElementVisibility(t.noemail_template.parentNode,o.partial),Morebits.quickForm.setElementVisibility(t.nocreate_template.parentNode,o.partial)),Morebits.quickForm.setElementVisibility(t.article.parentNode,i&&!!i.pageParam),Morebits.quickForm.setElementVisibility(t.block_reason.parentNode,i&&!!i.reasonParam),Morebits.quickForm.setElementVisibility(t.area.parentNode,o.partial&&!o.block),t.root.previewer.closePreview()}preview(e){let t=Morebits.quickForm.getInputData(e);t.disabletalk=t.disabletalk||t.notalk;var a=this.getBlockNoticeWikitextAndSummary(t)[0];e.previewer.beginRender(a,"User_talk:"+this.relevantUserName)}evaluate(t){var a=t.target,i=$(t.target),o=a.block.checked,n=a.tag.checked,r=$(a.partial).is(":checked"),s={},l={};if(this.saveFieldset(i.find("[name=field_block_options]")),this.saveFieldset(i.find("[name=field_template_options]")),s=this.field_block_options,(l=this.field_template_options).disabletalk=!(!l.disabletalk&&!s.disabletalk),l.hardblock=!!s.hardblock,delete s.expiry_preset,r&&(s.partial=l.partial=!0),l.pagerestrictions=i.find("[name=pagerestrictions]").val()||[],l.namespacerestrictions=i.find("[name=namespacerestrictions]").val()||[],s.pagerestrictions=l.pagerestrictions.join("|"),s.namespacerestrictions=l.namespacerestrictions.join("|"),l.summary=l.summary||s.reason,l.expiry=l.template_expiry||s.expiry,o){if(s.partial){if(s.disabletalk&&-1===s.namespacerestrictions.indexOf("3"))return alert(P("block-warn-partial-usertalk"));if(!s.namespacerestrictions&&!s.pagerestrictions){if(!s.noemail&&!s.nocreate)return alert(P("block-partial-blank"));if(("uw-epblock"!==l.template||"uw-epblock"!==i.find('select[name="preset"]').val())&&!confirm("You are about to block with no restrictions on page or namespace editing, are you sure you want to proceed?"))return}}if(!s.expiry)return alert(P("block-warn-noexpiry"));if(j(s.expiry)&&!this.isRegistered)return alert(P("block-warn-indef-ip"));if(!s.reason)return alert("block-warn-noreason");Morebits.simpleWindow.setButtonsEnabled(!1),Morebits.status.init(t.target);var c=new Morebits.wiki.user(this.relevantUserName,P("block-doing"));c.setChangeTags(e.changeTags),c.load((()=>{s.anononly=!s.hardblock,s.allowusertalk=!s.disabletalk,c.setExpiry(s.expiry),c.setWatchuser(s.watchuser),c.setReason(s.reason),c.setPartial(s.partial),c.setAllowusertalk(s.allowusertalk),c.setAnononly(s.anononly),c.setAutoblock(s.autoblock),c.setNocreate(s.nocreate),c.setNoemail(s.noemail),c.setReblock(s.reblock),s.partial&&(s.pagerestrictions&&c.setPartialPages(s.pagerestrictions),s.namespacerestrictions&&c.setPartialNamespaces(s.namespacerestrictions));var e=c.getBlockInfo(),t=c.getLastBlockLogEntry();if((null==t?void 0:t.logid)!==this.lastBlockLogId||!!e!=!!this.currentBlockInfo){let e=P("block-conflict",c.getUserName());if("block"===t.action||"reblock"===t.action?e+=P("block-conflict-block",t.user,t.comment,t.params.expiry):"unblock"===t.action&&(e+=P("block-conflict-unblock",t.user,t.comment,t.params.expiry)),!confirm(e))return void Morebits.status.info(P("block-doing"),P("user-aborted"));c.setReblock(!0)}c.block((()=>{n&&this.issue_template(l)}))}))}else{if(!n)return alert(P("block-noop"));Morebits.simpleWindow.setButtonsEnabled(!1),Morebits.status.init(t.target),this.issue_template(l)}}issue_template(e){var t="User_talk:"+mw.config.get("wgRelevantUserName"),a=$.extend(e,{messageData:this.blockPresetsInfo[e.template],reason:this.field_template_options.block_reason,disabletalk:this.field_template_options.notalk,noemail:this.field_template_options.noemail_template,nocreate:this.field_template_options.nocreate_template});Morebits.wiki.actionCompleted.redirect=t,Morebits.wiki.actionCompleted.notice=P("block-complete");var i=new Morebits.wiki.page(t,P("block-tagging-status"));i.setCallbackParameters(a),i.load((e=>this.main(e)))}main(t){var a,i=t.getCallbackParameters(),o=new Morebits.date(t.getLoadTime());if(i.indefinite=j(i.expiry),i.indefinite&&I("blankTalkpageOnIndefBlock")&&"uw-lblock"!==i.template)Morebits.status.info(P("info"),P("block-blank-talk")),a=o.monthHeader()+"\n";else{a=t.getPageText();for(var n,r,s=o.monthHeaderRegex();null!==(n=s.exec(a));)r=n;var l=a.lastIndexOf("\n==")+1;a.length>0&&(a+="\n\n"),r&&r.index===l||(Morebits.status.info(P("info"),P("block-new-section")),a+=o.monthHeader()+"\n")}i.expiry=void 0!==i.template_expiry?i.template_expiry:i.expiry;let[c,d]=this.getBlockNoticeWikitextAndSummary(i);a+=c,t.setPageText(a),t.setEditSummary(d),t.setChangeTags(e.changeTags),t.setWatchlist(I("watchWarnings")),t.save()}}G.moduleName="block";class Y extends O{constructor(){super(),mw.config.get("wgNamespaceNumber")<0||!mw.config.get("wgArticleId")||(W(mw.util.getUrl(mw.config.get("wgPageName"),{diff:"cur",oldid:"prev"}),P("diff-last"),"twinkle-lastdiff",P("diff-last-tooltip")),mw.util.getParamValue("diff")&&(W((()=>this.evaluate(!1)),P("diff-since"),"tw-since",P("diff-since-tooltip")),W((()=>this.evaluate(!0)),P("diff-sincemine"),"tw-sincemine",P("diff-sincemine-tooltip")),W(mw.util.getUrl(mw.config.get("wgPageName"),{diff:"cur",oldid:/oldid=(.+)/.exec($("#mw-diff-ntitle1").find("strong a").first().attr("href"))[1]}),P("diff-current"),"tw-curdiff",P("diff-current-tooltip"))))}evaluate(e){var t;if(e)t=mw.config.get("wgUserName");else{var a=document.getElementById("mw-diff-ntitle2");if(!a)return;t=$(a).find("a").first().text()}Morebits.status.init(document.getElementById("mw-content-text"));var i=new g("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"});i.post().then((e=>{var a=e.getResponse().query.pages[0].revisions,i=a&&a[0].revid;i?window.location.href=mw.util.getUrl(mw.config.get("wgPageName"),{diff:mw.config.get("wgCurRevisionId"),oldid:i}):e.getStatusElement().error(P("diff-error",t))})),i.post()}}Y.moduleName="Diff";class z extends Morebits.wiki.page{constructor(t,a){if(super(t,a),e.changeTags.length)this.setChangeTags(e.changeTags);else{let t=this.setEditSummary.bind(this);this.setEditSummary=function(a){t(a+e.summaryAd)}}["load","lookupCreation","save","append","prepend","newSection","deletePage","undeletePage","protect","stabilize"].forEach((e=>{let t=this[e].bind(this);this[e]=function(e,a){let i=$.Deferred();return t((t=>{e&&e.call(this,this),i.resolve(t instanceof Morebits.wiki.api?t:this)}),(e=>{if(a&&a.call(this,this),e instanceof Morebits.wiki.api){var t=new c(e.getErrorCode()+": "+e.getErrorText());t.code=e.getErrorCode(),t.info=e.getErrorText(),t.response=e.getResponse(),i.reject(t)}else i.reject(new Error(e))})),i}}))}}class H extends O{constructor(){super(),this.portletName="CSD",this.portletId="twinkle-csd",this.portletTooltip=Morebits.userIsSysop?"Delete page according to WP:CSD":"Request speedy deletion according to WP:CSD",this.windowTitle="Choose criteria for speedy deletion",this.addMenu()}makeWindow(){this.dialog=new V(I("speedyWindowWidth"),I("speedyWindowHeight")),this.dialog.setTitle(this.windowTitle),this.dialog.setFooterLinks(this.footerlinks),this.hasCSD=!!$("#delete-reason").length,this.makeFlatObject();let e=new Morebits.quickForm((e=>this.evaluate(e)),"radioClick"===I("speedySelectionStyle")?"change":null);if(this.form=e,Morebits.userIsSysop){e.append({type:"checkbox",list:[{label:"Tag page only, don't delete",value:"tag_only",name:"tag_only",tooltip:"If you just want to tag the page, instead of deleting it now",checked:!(this.hasCSD||I("deleteSysopDefaultToDelete")),event:e=>{let t=e.target.form,a=e.target.checked;t.deleteTalkPage&&(t.deleteTalkPage.checked=!a&&I("deleteTalkPageOnDelete")),t.deleteRedirects.checked=!a,t.delmultiple.checked=!1,t.notify.checked=a,t.warnusertalk.checked=!a&&!this.hasCSD,t.multiple.checked=!1,t.requestsalt.checked=!1,this.modeChanged(t),e.stopPropagation()}}]});let t=e.append({type:"div",name:"delete_options"});t.append({type:"header",label:"Delete-related options"}),mw.config.get("wgNamespaceNumber")%2!=0||2===mw.config.get("wgNamespaceNumber")&&!/\//.test(mw.config.get("wgTitle"))||t.append({type:"checkbox",list:[{label:"Also delete talk page",value:"deleteTalkPage",name:"deleteTalkPage",tooltip:"This option deletes the page's talk page in addition. If you choose the F8 (moved to Commons) criterion, this option is ignored and the talk page is *not* deleted.",checked:I("deleteTalkPageOnDelete"),event:e=>e.stopPropagation()}]}),t.append({type:"checkbox",list:[{label:"Also delete all redirects",value:"deleteRedirects",name:"deleteRedirects",tooltip:"This option deletes all incoming redirects in addition. Avoid this option for procedural (e.g. move/merge) deletions.",checked:I("deleteRedirectsOnDelete"),event:e=>e.stopPropagation()},{label:"Delete under multiple criteria",value:"delmultiple",name:"delmultiple",tooltip:"When selected, you can select several criteria that apply to the page. For example, G11 and A7 are a common combination for articles.",event:e=>{this.modeChanged(e.target.form),e.stopPropagation()}},{label:"Notify page creator of page deletion",value:"warnusertalk",name:"warnusertalk",tooltip:"A notification template will be placed on the talk page of the creator, IF you have a notification enabled in your Twinkle preferences for the criterion you choose AND this box is checked. The creator may be welcomed as well.",checked:!this.hasCSD,event:e=>e.stopPropagation()}]})}let t=e.append({type:"div",name:"tag_options"});Morebits.userIsSysop&&t.append({type:"header",label:"Tag-related options"}),t.append({type:"checkbox",list:[{label:"Notify page creator if possible",value:"notify",name:"notify",tooltip:"A notification template will be placed on the talk page of the creator, IF you have a notification enabled in your Twinkle preferences for the criterion you choose AND this box is checked. The creator may be welcomed as well.",checked:!Morebits.userIsSysop||!(this.hasCSD||I("deleteSysopDefaultToDelete")),event:e=>e.stopPropagation()},{label:"Tag for creation protection (salting) as well",value:"requestsalt",name:"requestsalt",tooltip:"When selected, the speedy deletion tag will be accompanied by a {{salt}} tag requesting that the deleting administrator apply creation protection. Only select if this page has been repeatedly recreated.",event:e=>e.stopPropagation()},{label:"Tag with multiple criteria",value:"multiple",name:"multiple",tooltip:"When selected, you can select several criteria that apply to the page. For example, G11 and A7 are a common combination for articles.",event:e=>{this.modeChanged(e.target.form),e.stopPropagation()}}]}),e.append({type:"div",id:"prior-deletion-count",style:"font-style: italic"}),e.append({type:"div",name:"work_area",label:"Failed to initialize the CSD module. Please try again, or tell the Twinkle developers about the issue."}),"radioClick"!==I("speedySelectionStyle")&&e.append({type:"submit",className:"tw-speedy-submit"}),this.result=e.render(),this.dialog.setContent(this.result),this.dialog.display(),this.modeChanged(this.result),this.priorDeletionCount()}priorDeletionCount(){let e={action:"query",format:"json",list:"logevents",letype:"delete",leaction:"delete/delete",letitle:mw.config.get("wgPageName"),leprop:"",lelimit:5};new g("Checking for past deletions",e).post().then((e=>{let t=e.getResponse(),a=t.query.logevents.length;if(a){let e=a+" previous deletion";a>1&&(e+="s",t.continue&&(e="More than "+e),a>=3&&$("#prior-deletion-count").css("color","red"));let i=Morebits.htmlNode("a","(logs)");i.setAttribute("href",mw.util.getUrl("Special:Log",{page:mw.config.get("wgPageName")})),i.setAttribute("target","_blank"),$("#prior-deletion-count").text(e+" "),$("#prior-deletion-count").append(i)}}))}getMode(){let e=this.result;return this.mode={isSysop:!!e.tag_only&&!e.tag_only.checked,isMultiple:e.tag_only&&!e.tag_only.checked?e.delmultiple.checked:e.multiple.checked,isRadioClick:"radioClick"===I("speedySelectionStyle")}}modeChanged(e){this.getMode(),$("[name=delete_options]").toggle(this.mode.isSysop),$("[name=tag_options]").toggle(!this.mode.isSysop),$("button.tw-speedy-submit").text(this.mode.isSysop?"Delete page":"Tag page");let t=new Morebits.quickForm.element({type:"div",name:"work_area"});if(this.mode.isMultiple&&this.mode.isRadioClick&&(t.append({type:"div",label:"When finished choosing criteria, click:"}),t.append({type:"button",name:"submit-multiple",label:this.mode.isSysop?"Delete page":"Tag page",event:e=>{this.evaluate(e),e.stopPropagation()}})),this.appendCriteriaLists(t),$(e).find("[name=work_area]").replaceWith(t.render()),this.mode.isSysop&&this.hasCSD){let e=$("input[name=csd][value=reason]")[0];if(e){"radioClick"!==I("speedySelectionStyle")&&e.click();let t=decodeURIComponent($("#delete-reason").text()).replace(/\+/g," ");$('input[name="csd.reason_1"]').val(t)}}}appendCriteriaLists(e){this.namespace=mw.config.get("wgNamespaceNumber"),this.isRedirect=Morebits.isPageRedirect();let t=this.mode.isMultiple?"checkbox":"radio";this.criteriaLists.forEach((a=>{a.visible(this)&&(e.append({type:"header",label:a.label}),e.append({type:t,name:"csd",list:this.generateCsdList(a.list)}))}))}generateCsdList(e){let t=this.mode,a=e=>{$(e.target.form).find("input").prop("disabled",!0),$(e.target.form).children().css("color","gray"),$(e.target).parent().css("color","black").find("input").prop("disabled",!1),$(e.target).parent().find("input:text")[0].focus(),e.stopPropagation()},i=e=>{this[t.isSysop?"evaluateSysop":"evaluateUser"](e),e.stopPropagation()};return e.map((e=>{let o=$.extend({},e);if(t.isMultiple){if(o.hideWhenMultiple)return null;o.hideSubgroupWhenMultiple&&(o.subgroup=null)}else{if(o.hideWhenSingle)return null;o.hideSubgroupWhenSingle&&(o.subgroup=null)}if(t.isSysop){if(o.hideWhenSysop)return null;o.hideSubgroupWhenSysop&&(o.subgroup=null)}else{if(o.hideWhenUser)return null;o.hideSubgroupWhenUser&&(o.subgroup=null)}return Morebits.isPageRedirect()&&o.hideWhenRedirect||o.showInNamespaces&&o.showInNamespaces.indexOf(this.namespace)<0||o.hideInNamespaces&&o.hideInNamespaces.indexOf(this.namespace)>-1?null:(o.subgroup&&!t.isMultiple&&t.isRadioClick&&(o.subgroup=d(o.subgroup).concat({type:"button",name:"submit",label:t.isSysop?"Delete page":"Tag page",event:i}),o.event=a),o)})).filter((e=>e))}makeFlatObject(){this.flatObject={},this.criteriaLists.forEach((e=>{e.list.forEach((e=>{this.flatObject[e.value]=e}))}))}evaluate(e){if("checkbox"===e.target.type||"text"===e.target.type||"select"===e.target.type)return;if(this.params=Morebits.quickForm.getInputData(this.result),!this.params.csd||!this.params.csd.length)return alert("Please select a criterion!");this.preprocessParams();let t=this.validateInputs();if(t)return alert(t);Morebits.simpleWindow.setButtonsEnabled(!1),Morebits.status.init(this.result);let a=new Morebits.taskManager(this);a.add(this.fetchCreatorInfo,[]),this.mode.isSysop?(a.add(this.parseDeletionReason,[]),a.add(this.deletePage,[this.parseDeletionReason]),a.add(this.deleteTalk,[this.deletePage]),a.add(this.deleteRedirects,[this.deletePage]),a.add(this.noteToCreator,[this.deletePage,this.fetchCreatorInfo])):(a.add(this.checkPage,[]),a.add(this.tagPage,[this.checkPage]),a.add(this.patrolPage,[this.checkPage]),a.add(this.noteToCreator,[this.checkPage,this.fetchCreatorInfo]),a.add(this.addToLog,[this.noteToCreator])),a.execute().then((()=>{Morebits.status.actionCompleted(this.mode.isSysop?"Deletion completed":"Tagging completed"),setTimeout((()=>{window.location.href=mw.util.getUrl(Morebits.pageNameNorm)}),5e4)}))}preprocessParams(){let e=this.params;e.csd=d(e.csd),e.normalizeds=e.csd.map((e=>this.flatObject[e].code)),this.getTemplateParameters(),this.getMode(),this.mode.isSysop?(e.promptForSummary=e.normalizeds.some((e=>-1!==I("promptForSpeedyDeletionSummary").indexOf(e))),e.warnUser=e.warnusertalk&&e.normalizeds.some(((t,a)=>-1!==I("warnUserOnSpeedyDelete").indexOf(t)&&!("g6"===t&&"copypaste"!==e.values[a])))):(e.notifyUser=e.notify&&e.normalizeds.some((function(t,a){return-1!==I("notifyUserOnSpeedyDeletionNomination").indexOf(t)&&!("g6"===t&&"copypaste"!==e.csd[a])})),e.redactContents=e.csd.some((e=>this.flatObject[e].redactContents))),e.watch=e.normalizeds.some((function(e){return-1!==I("watchSpeedyPages").indexOf(e)&&I("watchSpeedyExpiry")})),e.welcomeuser=(e.notifyUser||e.warnUser)&&e.normalizeds.some((e=>-1!==I("welcomeUserOnSpeedyDeletionNotification").indexOf(e))),this.preprocessParamInputs()}preprocessParamInputs(){}getTemplateParameters(){this.params.templateParams=new Array(this.params.csd.length),this.params.csd.forEach(((e,t)=>{let a=this.flatObject[e],i={};d(a.subgroup).forEach((e=>{e.parameter&&this.params[e.name]&&(i[e.parameter]=this.params[e.name])})),this.params.templateParams[t]=i}))}getTaggingCode(){let e=this.params,t="";return e.normalizeds.length>1?(t="{{db-multiple",e.normalizeds.forEach(((a,i)=>{t+="|"+a.toUpperCase(),m(e.templateParams[i]).forEach((([e,a])=>{parseInt(e,10)||(t+="|"+e+"="+a)}))})),t+="}}"):(t="{{db-"+e.csd[0],m(e.templateParams[0]).forEach((([e,a])=>{t+="|"+e+"="+a})),e.notifyUser&&(t+="|help=off"),t+="}}"),t}getUserTalkParameters(){let e={};this.params.csd.forEach((t=>{d(this.flatObject[t].subgroup).forEach(((t,a)=>{t.utparam&&this.params[t.name]&&(e["key"+(a+1)]=t.utparam,e["value"+(a+1)]=this.params[t.name],e[t.utparam]=this.params[t.name])}))})),this.params.utparams=e}getUserNotificationText(){let e=this.params,t="";return e.normalizeds.length>1?(t="\n{{subst:db-"+(e.warnUser?"deleted":"notice")+"-multiple|1="+Morebits.pageNameNorm,e.normalizeds.forEach((function(e,a){t+="|"+(a+2)+"="+e.toUpperCase()}))):"db"===e.normalizeds[0]?t="\n{{subst:db-reason-"+(e.warnUser?"deleted":"notice")+"|1="+Morebits.pageNameNorm:(t="\n{{subst:db-csd-"+(e.warnUser?"deleted":"notice")+"-custom|1=","copypaste"===e.csd[0]?t+=e.templateParams[0].sourcepage:t+=Morebits.pageNameNorm,t+="|2="+e.csd[0]),this.getUserTalkParameters(),m(e.utparams).forEach((([e,a])=>{t+="|"+e+"="+a})),t+=(e.welcomeuser?"":"|nowelcome=yes")+"}} ~~~~",t}fetchCreatorInfo(){if(!this.params.notifyUser&&!this.params.warnUser)return $.Deferred().resolve();let e=new z(Morebits.pageNameNorm,"Finding page creator");return e.lookupCreation().then((()=>{this.params.initialContrib=e.getCreator(),e.getStatusElement().info("Found "+e.getCreator())}))}patrolPage(){return I("markSpeedyPagesAsPatrolled")&&new z(Morebits.pageNameNorm).triage(),$.Deferred().resolve()}checkPage(){let t=new z(mw.config.get("wgPageName"),"Tagging page");return t.setChangeTags(e.changeTags),t.load().then((()=>{let e=t.getStatusElement();if(!t.exists())return e.error("It seems that the page doesn't exist; perhaps it has already been deleted"),$.Deferred().reject();let a=t.getPageText();e.status("Checking for tags on the page...");let i=/(?:\{\{\s*(db|delete|db-.*?|speedy deletion-.*?)(?:\s*\||\s*\}\}))/.exec(a);if(i&&!confirm("The page already has the CSD-related template {{"+i[1]+"}} on it.  Do you want to add another CSD template?"))return $.Deferred().reject();let o=/\{\{((?:article for deletion|proposed deletion|prod blp|template for discussion)\/dated|[cfm]fd\b)/i.exec(a)||/#invoke:(RfD)/.exec(a);return o&&!confirm("The deletion-related template {{"+o[1]+"}} was found on the page. Do you still want to add a CSD template?")?$.Deferred().reject():t}))}tagPage(t){let a,i=this.params,o=t.getPageText(),n=this.getTaggingCode();if(-1!==i.normalizeds.indexOf("g13")&&(n=n.replace("$TIMESTAMP",t.getLastEditTime())),i.requestsalt&&(n="{{salt}}\n"+n),!t.canEdit()||-1===["wikitext","Scribunto","javascript","css","sanitized-css"].indexOf(t.getContentModel())){let a=new mw.Title(t.getPageName()).getTalkPage().toText();if(a===t.getPageName())return t.getStatusElement().error("Page protected and nowhere to add an edit request, aborting"),$.Deferred().reject();t.getStatusElement().warn("Unable to edit page, placing tag on talk page");let o=new z(a,"Automatically placing tag on talk page");return o.setNewSectionTitle(t.getPageName()+" nominated for CSD, request deletion"),o.setNewSectionText(n+"\n\nI was unable to tag "+t.getPageName()+" so please delete it. ~~~~"),o.setCreateOption("recreate"),o.setFollowRedirect(!0),o.setWatchlist(i.watch),o.setChangeTags(e.changeTags),o.newSection()}if(o=o.replace(/\{\{\s*([Uu]serspace draft)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/g,""),6===mw.config.get("wgNamespaceNumber")&&(o=o.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi,"")),10===mw.config.get("wgNamespaceNumber")&&(n="<noinclude>"+n+"</noinclude>"),"Scribunto"===mw.config.get("wgPageContentModel")){let e="";for(;-1!==n.indexOf("]"+e+"]");)e+="=";n="require('Module:Module wikitext')._addText(["+e+"["+n+"]"+e+"]);"}else-1!==["javascript","css","sanitized-css"].indexOf(mw.config.get("wgPageContentModel"))&&(n="/* "+n+" */");if("db"===i.normalizeds[0])a='Requesting [[WP:CSD|speedy deletion]] with rationale "'+i.templateParams[0][1]+'".';else{a="Requesting speedy deletion ("+i.normalizeds.map((e=>"[[WP:CSD#"+e.toUpperCase()+"|CSD "+e.toUpperCase()+"]]")).join(", ")+")."}return o=i.redactContents?n:this.insertTagText(n,o),t.setPageText(o),t.setEditSummary(a),t.setWatchlist(i.watch),t.save()}insertTagText(e,t){return e+"\n"+t}noteToCreator(){let t=this.params,a=t.initialContrib;if(!a)return $.Deferred().resolve();if(a===mw.config.get("wgUserName")?(Morebits.status.warn("Note","You ("+a+") created this page; skipping user notification"),a=null):a===mw.config.get("wgTitle")&&3===mw.config.get("wgNamespaceNumber")?(Morebits.status.warn("Note","Notifying initial contributor: this user created their own user talk page; skipping notification"),a=null):"Cyberbot I"!==a&&"SoxBot"!==a||"f2"!==t.normalizeds[0]?this.hasCSD&&t.warnUser&&!confirm("The page is has a deletion-related tag, and thus the creator has likely been notified.  Do you want to notify them for this deletion as well?")&&(Morebits.status.info("Notifying initial contributor","canceled by user; skipping notification."),a=null):(Morebits.status.warn("Note","Notifying initial contributor: page created procedurally by bot; skipping notification"),a=null),!a)return t.initialContrib=null,$.Deferred().resolve();let i=new z("User talk:"+a,"Notifying initial contributor ("+a+")"),o="Notification: speedy deletion"+(t.warnUser?"":" nomination");return t.redactContents?o+=" of an attack page.":o+=" of [[:"+Morebits.pageNameNorm+"]].",i.setAppendText(this.getUserNotificationText()),i.setEditSummary(o),i.setChangeTags(e.changeTags),i.setCreateOption("recreate"),i.setFollowRedirect(!0,!1),i.append()}parseWikitext(e){let t=new Morebits.status("Building deletion summary"),a=new g("Parsing deletion template",{action:"parse",prop:"text",pst:"true",text:e,contentmodel:"wikitext",title:mw.config.get("wgPageName"),disablelimitreport:!0,format:"json"});return a.setStatusElement(t),a.post().then((e=>{let a=decodeURIComponent($(e.getResponse().parse.text).find("#delete-reason").text()).replace(/\+/g," ");return a?t.info("complete"):t.warn("Unable to generate summary from deletion template"),a}))}parseDeletionReason(){let e=this.params;if(e.normalizeds.length||"db"!==e.normalizeds[0]){let t=this.getTaggingCode();return this.parseWikitext(t).then((t=>{e.promptForSummary&&(t=prompt("Enter the deletion summary to use, or press OK to accept the automatically generated one.",t)),e.deleteReason=t}))}return e.deleteReason=prompt("Enter the deletion summary to use, which will be entered into the deletion log:",""),$.Deferred().resolve()}deletePage(){let t=this.params,a=new z(mw.config.get("wgPageName"),"Deleting page");return null===t.deleteReason?(Morebits.status.error("Asking for reason","User cancelled"),$.Deferred().reject()):t.deleteReason&&t.deleteReason.trim()?(a.setEditSummary(t.deleteReason),a.setChangeTags(e.changeTags),a.setWatchlist(t.watch),a.deletePage().then((()=>{a.getStatusElement().info("done")}))):(Morebits.status.error("Asking for reason","you didn't give one.  I don't know... what with admins and their apathetic antics... I give up..."),$.Deferred().reject())}deleteTalk(){if(this.params.deleteTalkPage&&"new"!==document.getElementById("ca-talk").className){let t=new z(new mw.Title(Morebits.pageNameNorm).getTalkPage().toText(),"Deleting talk page");return t.setEditSummary('[[WP:CSD#G8|G8]]: Talk page of deleted page "'+Morebits.pageNameNorm+'"'),t.setChangeTags(e.changeTags),t.deletePage().then((()=>{t.getStatusElement().info("done")}))}return $.Deferred().resolve()}deleteRedirects(){let t,a,i=$.Deferred();if(this.params.deleteRedirects){let t=new g("getting list of redirects...",{action:"query",titles:mw.config.get("wgPageName"),prop:"redirects",rdlimit:"max",format:"json"});t.setStatusElement(new Morebits.status("Deleting redirects")),t.post().then((t=>{let a=t.getResponse().query.pages[0].redirects||[],o=a.length,n=t.getStatusElement();if(!o)return void n.status("no redirects found");n.status("0%");let r=0,s=function(e){let t=Math.round(100*++r/o)+"%";n.update(t),e.getStatusElement().unlink(),r>=o&&(n.info(t+" (completed)"),i.resolve(),Morebits.wiki.removeCheckpoint())};Morebits.wiki.addCheckpoint(),a.forEach((function(t){let a=t.title,i=new z(a,'Deleting redirect "'+a+'"');i.setEditSummary('[[WP:CSD#G8|G8]]: Redirect to deleted page "'+Morebits.pageNameNorm+'"'),i.setChangeTags(e.changeTags),i.deletePage().then(s)}))}))}else i.resolve();let o=6===mw.config.get("wgNamespaceNumber");return t=$("<a>",{href:"#",text:"click here to go to the Unlink tool",css:{fontSize:"130%",fontWeight:"bold"},click:()=>{Morebits.wiki.actionCompleted.redirect=null,this.dialog.close(),e.unlink.makeWindow(o?"Removing usages of and/or links to deleted file "+Morebits.pageNameNorm:"Removing links to deleted page "+Morebits.pageNameNorm)}}),a=$("<span>",{text:o?"To orphan backlinks and remove instances of file usage":"To orphan backlinks",css:{fontSize:"130%",fontWeight:"bold"}}),Morebits.status.info(a[0],t[0]),i}addToLog(){let t=this.params;if(!(I("logSpeedyNominations")&&t.normalizeds.some((function(e){return-1===I("noLogOnSpeedyNomination").indexOf(e)}))))return $.Deferred().resolve();let a=new Morebits.userspaceLogger(I("speedyLogPageName"));a.initialText="This is a log of all [[WP:CSD|speedy deletion]] nominations made by this user using [[WP:TW|Twinkle]]'s CSD 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 outright speedy deletions made using Twinkle.":"");let i="",o=6===mw.config.get("wgNamespaceNumber")?" ([{{fullurl:Special:Log|page="+mw.util.wikiUrlencode(mw.config.get("wgPageName"))+"}} log])":"",n="Logging speedy deletion nomination",r="# [[:"+Morebits.pageNameNorm;if(t.redactContents?(r+="|This]] attack page"+o+": ",n+=" of an attack page."):(r+="]]"+o+": ",n+=" of [[:"+Morebits.pageNameNorm+"]]."),t.normalizeds.length>1){r+="multiple criteria ("+t.normalizeds.map((e=>"[[WP:CSD#"+e.toUpperCase()+"|"+e.toUpperCase()+"]]")).join(", ")+")"}else"db"===t.normalizeds[0]?r+="{{tl|db-reason}}":r+="[[WP:CSD#"+t.normalizeds[0].toUpperCase()+"|CSD "+t.normalizeds[0].toUpperCase()+"]] ({{tl|db-"+t.csd[0]+"}})";return"db"===t.normalizeds[0]?i+=` {Custom rationale: ${t.templateParams[0][1]}}`:t.csd.forEach((e=>{let a=this.flatObject[e],o=a.code.toUpperCase();d(a.subgroup).forEach((e=>{let a=t[e.name];if(a&&e.parameter){if(e.log)a=Morebits.string.safeReplace(e.log,/\$1/g,a);else if(null===e.log)return;i+=` {${o} ${e.parameter}: ${a}}`}}))})),t.requestsalt&&(r+="; requested creation protection ([[WP:SALT|salting]])"),i&&(r+="; additional information:"+i),t.initialContrib&&(r+="; notified {{user|1="+t.initialContrib+"}}"),r+=" ~~~~~\n",a.changeTags=e.changeTags,a.log(r,n)}validateInputs(){}userPreferences(){return{title:"CSD",preferences:[]}}}H.moduleName="CSD";class K extends O{constructor(){super(),this.moduleName="batchdelete",this.portletName="D-batch",this.portletId="twinkle-batchdelete",this.portletTooltip="Delete pages found in this category/on this page",this.windowTitle="Batch deletion",this.unlinkCache={},this.callbacks={doExtras:e=>{var t,a,i=e.parent?e.parent.getCallbackParameters():e.getCallbackParameters();if(i.pageDeleter.workerSuccess(e),i.unlink_page&&(this.unlinkCache={},t={action:"query",list:"backlinks",blfilterredir:"nonredirects",blnamespace:[0,100],bltitle:i.page,bllimit:"max",format:"json"},(a=new Morebits.wiki.api(P("fetching-backlinks"),t,this.callbacks.unlinkBacklinksMain)).params=i,a.post()),i.unlink_file&&(t={action:"query",list:"imageusage",iutitle:i.page,iulimit:"max",format:"json"},(a=new Morebits.wiki.api(P("fetching-filelinks"),t,this.callbacks.unlinkImageInstancesMain)).params=i,a.post()),i.delete_page&&(i.delete_redirects&&(t={action:"query",titles:i.page,prop:"redirects",rdlimit:"max",format:"json"},(a=new Morebits.wiki.api(P("fetching-redirects"),t,this.callbacks.deleteRedirectsMain)).params=i,a.post()),i.delete_talk)){var o=mw.Title.newFromText(i.page);o&&o.namespace%2==0&&2!==o.namespace&&(o.namespace++,t={action:"query",titles:o.toText(),format:"json"},(a=new Morebits.wiki.api(P("check-talk"),t,this.callbacks.deleteTalk)).params=i,a.params.talkPage=o.toText(),a.post())}},deleteRedirectsMain:t=>{var a=t.getResponse().query.pages[0].redirects||[];if((a=a.map((e=>e.title))).length){var i=new Morebits.batchOperation(P("deleting-redirects",t.params.page));i.setOption("chunkSize",I("batchChunks")),i.setPageList(a),i.run((a=>{var o=new Morebits.wiki.page(a,"Deleting "+a);o.setEditSummary(P("delete-redirect-summary",t.params.page)),o.setChangeTags(e.changeTags),o.deletePage(i.workerSuccess,i.workerFailure)}))}},deleteTalk:t=>{if(!t.getResponse().query.pages[0].missing){var a=new Morebits.wiki.page(t.params.talkPage,P("deleting-talk",t.params.page));a.setEditSummary(P("delete-talk-summary",t.params.page)),a.setChangeTags(e.changeTags),a.deletePage()}},unlinkBacklinksMain:e=>{var t=e.getResponse().query.backlinks||[];if((t=t.map((e=>e.title))).length){var a=new Morebits.batchOperation(P("unlink-page",e.params.page));a.setOption("chunkSize",I("batchChunks")),a.setPageList(t),a.run((t=>{var i=new Morebits.wiki.page(t,P("unlink-on",t)),o=$.extend({},e.params);o.title=t,o.unlinker=a,i.setCallbackParameters(o),i.load(this.callbacks.unlinkBacklinks)}))}},unlinkBacklinks:t=>{var a=t.getCallbackParameters();if(t.exists()){var i,o=i=a.title in this.unlinkCache?this.unlinkCache[a.title]:t.getPageText();i=new Morebits.wikitext.page(i).removeLink(a.page).getText(),this.unlinkCache[a.title]=i,i!==o?(t.setEditSummary(P("unlink-summary",a.page)),t.setChangeTags(e.changeTags),t.setPageText(i),t.setCreateOption("nocreate"),t.setMaxConflictRetries(10),t.save(a.unlinker.workerSuccess,a.unlinker.workerFailure)):a.unlinker.workerSuccess(t)}else a.unlinker.workerSuccess(t)},unlinkImageInstancesMain:e=>{var t=e.getResponse().query.imageusage||[];if((t=t.map((e=>e.title))).length){var a=new Morebits.batchOperation(P("unlink-page",e.params.page));a.setOption("chunkSize",I("batchChunks")),a.setPageList(t),a.run((t=>{var i=new Morebits.wiki.page(t,P("unlink-img-on",t)),o=$.extend({},e.params);o.title=t,o.unlinker=a,i.setCallbackParameters(o),i.load(this.callbacks.unlinkImageInstances)}))}},unlinkImageInstances:t=>{var a=t.getCallbackParameters();if(t.exists()){var i,o=a.page.replace(new RegExp("^"+Morebits.namespaceRegex(6)+":"),""),n=i=a.title in this.unlinkCache?this.unlinkCache[a.title]:t.getPageText();if(i=new Morebits.wikitext.page(i).commentOutImage(o,P("img-comment")).getText(),this.unlinkCache[a.title]=i,i===n)return t.getStatusElement().error("failed to unlink image "+o+" from "+t.getPageName()),void a.unlinker.workerFailure(t);t.setEditSummary(P("unlink-img-summary",o,a.reason)),t.setChangeTags(e.changeTags),t.setPageText(i),t.setCreateOption("nocreate"),t.setMaxConflictRetries(10),t.save(a.unlinker.workerSuccess,a.unlinker.workerFailure)}else a.unlinker.workerSuccess(t)}},Morebits.userIsSysop&&(mw.config.get("wgCurRevisionId")&&mw.config.get("wgNamespaceNumber")>0||"Prefixindex"===mw.config.get("wgCanonicalSpecialPageName"))&&this.addMenu()}makeWindow(){this.subpagesLoaded=!1;var e=new V(600,400);e.setTitle(this.windowTitle),e.setFooterLinks(this.footerLinks);var t=new Morebits.quickForm(this.evaluate.bind(this));t.append({type:"checkbox",list:[{label:P("option-delete"),name:"delete_page",value:"delete",checked:!0,subgroup:{type:"checkbox",list:[{label:P("option-talks"),name:"delete_talk",value:"delete_talk",checked:!0},{label:P("option-redirects"),name:"delete_redirects",value:"delete_redirects",checked:!0},{label:P("option-subpages"),name:"delete_subpages",value:"delete_subpages",checked:!1,event:this.toggleSubpages.bind(this),subgroup:{type:"checkbox",list:[{label:P("option-subpage-talks"),name:"delete_subpage_talks",value:"delete_subpage_talks"},{label:P("option-subpage-redirects"),name:"delete_subpage_redirects",value:"delete_subpage_redirects"},{label:P("option-subpage-unlink"),name:"unlink_subpages",value:"unlink_subpages"}]}}]}},{label:P("option-unlink"),name:"unlink_page",value:"unlink",checked:!1},{label:P("option-unlink-file"),name:"unlink_file",value:"unlink_file",checked:!0}]}),t.append({type:"input",name:"reason",label:P("reason"),size:60});var a={action:"query",prop:["revisions","info","imageinfo"],inprop:"protection",rvprop:["size","user"],format:"json"};if(14===mw.config.get("wgNamespaceNumber"))$.extend(a,{generator:"categorymembers",gcmtitle:mw.config.get("wgPageName"),gcmlimit:I("batchMax")});else if("Prefixindex"===mw.config.get("wgCanonicalSpecialPageName"))if($.extend(a,{generator:"allpages",gaplimit:I("batchMax")}),mw.util.getParamValue("prefix"))$.extend(a,{gapnamespace:mw.util.getParamValue("namespace"),gapprefix:mw.util.getParamValue("prefix")});else{var i=decodeURIComponent(location.pathname).split("/");if(i.length<3||"Special:PrefixIndex"!==i[2])return;var o=i[3].split(":");$.extend(a,{gapnamespace:mw.config.get("wgNamespaceIds")[o[0].toLowerCase()]}),o.length<2||void 0===a.gapnamespace?$.extend(a,{gapnamespace:0,gapprefix:i.splice(3).join("/")}):((i=i.splice(4)).splice(0,0,o.splice(1).join(":")),$.extend(a,{gapprefix:i.join("/")}))}else $.extend(a,{generator:"links",titles:mw.config.get("wgPageName"),gpllimit:I("batchMax")});var n=document.createElement("div");n.style.padding="15px",e.setContent(n),Morebits.status.init(n),e.display(),this.pages={};var r=new Morebits.status(P("fetching-list")),s=new Morebits.wiki.api("loading...",a,(e=>{var t=e.getResponse(),a=t.query&&t.query.pages||[];(a=a.filter((e=>!e.missing&&"shared"!==e.imagerepository))).sort(((e,t)=>e.ns-t.ns||(e.title>t.title?1:-1))),a.forEach((e=>{let t=this.getMetadata(e),a=e.protection.filter((e=>"edit"===e.type&&"sysop"===e.level)).length;var i=e.title;this.pages[i]={label:i+(t.length?" ("+t.join("; ")+")":""),value:i,checked:!0,style:a?"color: red":""}}));var i=e.params.form;i.append({type:"header",label:P("pages-label")}),i.append({type:"button",label:P("select-all"),event:()=>{$(o).find("input[name=pages]:not(:checked)").each(((e,t)=>{t.click()})),$('input[name="pages.subpages"]').prop("checked",!0)}}),i.append({type:"button",label:P("deselect-all"),event:()=>{$(o).find("input[name=pages]:checked").each(((e,t)=>{t.click()}))}}),i.append({type:"checkbox",name:"pages",id:"tw-dbatch-pages",shiftClickSupport:!0,list:$.map(this.pages,(e=>e))}),i.append({type:"submit"});var o=i.render();e.params.Window.setContent(o),Morebits.quickForm.getElements(o,"pages").forEach(u)}),r);s.params={form:t,Window:e},s.post()}generateNewPageList(e){var t=e.elements.pages;if(t instanceof NodeList)for(var a=0;a<t.length;++a)this.pages[t[a].value].checked=t[a].checked;else t instanceof HTMLInputElement&&(this.pages[t.value].checked=t.checked);return new Morebits.quickForm.element({type:"checkbox",name:"pages",id:"tw-dbatch-pages",shiftClickSupport:!0,list:$.map(this.pages,(e=>e))}).render()}toggleSubpages(e){var t,a=e.target.form;if(e.target.checked){if(a.delete_subpage_redirects.checked=a.delete_redirects.checked,a.delete_subpage_talks.checked=a.delete_talk.checked,a.unlink_subpages.checked=a.unlink_page.checked,this.subpagesLoaded)return $.each(this.pages,((e,t)=>{null===t.subgroup&&t.subgroup_&&(t.subgroup=t.subgroup_)})),t=this.generateNewPageList(a),$("#tw-dbatch-pages").replaceWith(t),Morebits.quickForm.getElements(t,"pages").forEach(u),void Morebits.quickForm.getElements(t,"pages.subpages").forEach(u);var i='<strong id="dbatch-subpage-loading">'+P("loading")+"</strong>";$(e.target).after(i);var o=$(a.pages).map(((e,t)=>t.value)).get(),n=new Morebits.batchOperation;n.setOption("chunkSize",I("batchChunks")),n.setPageList(o),n.run((e=>{var t=mw.Title.newFromText(e);if([0,6,8].indexOf(t.namespace)>-1)n.workerSuccess();else{var a=new Morebits.wiki.api("Getting list of subpages of "+e,{action:"query",prop:"revisions|info|imageinfo",generator:"allpages",rvprop:"size",inprop:"protection",gapprefix:t.title+"/",gapnamespace:t.namespace,gaplimit:"max",format:"json"},(e=>{var t=e.getResponse(),a=t.query&&t.query.pages||[],i=[];if(a.sort(((e,t)=>e.ns-t.ns||(e.title>t.title?1:-1))),a.forEach((e=>{let t=this.getMetadata(e),a=e.protection.filter((e=>"edit"===e.type&&"sysop"===e.level)).length;var o=e.title;i.push({label:o+(t.length?" ("+t.join("; ")+")":""),value:o,checked:!0,style:a?"color: red":""})})),i.length){var o=e.params.pageNameFull;this.pages[o].subgroup={type:"checkbox",name:"subpages",className:"dbatch-subpages",shiftClickSupport:!0,list:i}}n.workerSuccess()}),null,(()=>{n.workerFailure()}));a.params={pageNameFull:e},a.post()}}),(()=>{t=this.generateNewPageList(a),$("#tw-dbatch-pages").replaceWith(t),Morebits.quickForm.getElements(t,"pages").forEach(u),Morebits.quickForm.getElements(t,"pages.subpages").forEach(u),this.subpagesLoaded=!0,$("#dbatch-subpage-loading").remove()}))}else e.target.checked||($.each(this.pages,((e,t)=>{t.subgroup&&(t.subgroup_=t.subgroup,t.subgroup=null)})),t=this.generateNewPageList(a),$("#tw-dbatch-pages").replaceWith(t),Morebits.quickForm.getElements(t,"pages").forEach(u))}getMetadata(e){return[]}evaluate(t){Morebits.wiki.actionCompleted.notice=P("complete");var a=t.target,i=$(Morebits.quickForm.getElements(a,"pages")).filter((function(e,t){return t.checked&&"red"===t.nextElementSibling.style.color})).length;if(!(i>0)||confirm(P("confirm-protected",i))){var o=Morebits.quickForm.getInputData(a);if(o.reason)if(Morebits.simpleWindow.setButtonsEnabled(!1),Morebits.status.init(a),0!==o.pages.length){var n=new Morebits.batchOperation(o.delete_page?P("deleting"):P("starting"));n.setOption("chunkSize",I("batchChunks")),n.setOption("preserveIndividualStatusLines",o.delete_page),n.setPageList(o.pages),n.run(function(t){var a={page:t,delete_page:o.delete_page,delete_talk:o.delete_talk,delete_redirects:o.delete_redirects,unlink_page:o.unlink_page,unlink_file:o.unlink_file&&new RegExp("^"+Morebits.namespaceRegex(6)+":","i").test(t),reason:o.reason,pageDeleter:n},i=new Morebits.wiki.page(t,P("deleting-page",t));i.setCallbackParameters(a),o.delete_page?(i.setEditSummary(o.reason),i.setChangeTags(e.changeTags),i.suppressProtectWarning(),i.deletePage(this.callbacks.doExtras,n.workerFailure)):this.callbacks.doExtras(i)}.bind(this),function(){if(o.delete_subpages&&o.subpages){var t=new Morebits.batchOperation(P("deleting-subpages"));t.setOption("chunkSize",I("batchChunks")),t.setOption("preserveIndividualStatusLines",!0),t.setPageList(o.subpages),t.run((a=>{var i={page:a,delete_page:!0,delete_talk:o.delete_subpage_talks,delete_redirects:o.delete_subpage_redirects,unlink_page:o.unlink_subpages,unlink_file:!1,reason:o.reason,pageDeleter:t},r=new Morebits.wiki.page(a,P("deleting-subpage",a));r.setCallbackParameters(i),r.setEditSummary(o.reason),r.setChangeTags(e.changeTags),r.suppressProtectWarning(),r.deletePage(this.callbacks.doExtras,n.workerFailure)}))}}.bind(this))}else Morebits.status.error(P("error"),P("dbatch-no-pages"));else alert(P("dbatch-give-reason"))}}}if(K.moduleName="batchdelete",window.Twinkle=e,$.extend(e,{registerModule:D,msg:P,Page:z,Api:g}),void 0!==i&&(jQuery.Deferred.exceptionHook=function(e){throw e}),!Morebits.userIsInGroup("autoconfirmed")&&!Morebits.userIsInGroup("confirmed"))throw new Error("Twinkle: forbidden!");e.userAgent=`Twinkle (${mw.config.get("wgWikiID")})`,e.summaryAd=" ([[Project:TW|TW]])",e.changeTags="",e.messageOverrides=F,e.extraMwMessages=[],e.registeredModules=[class extends L{constructor(){super(...arguments),this.trustedBots=[],this.hiddenName="an unknown user"}},Y,H,class extends G{constructor(){super(...arguments),this.footerlinks={"Block templates":"Template:Uw-block/doc/Block_templates","Block policy":"VRWiki:BLOCK","Block prefs":"VRWiki:TW/PREF#block","Twinkle help":"VRWiki:TW/DOC#block","Give feedback":"WT:TW"},this.blockPresetsInfo={anonblock:{expiry:"31 hours",forAnonOnly:!0,nocreate:!0,nonstandard:!0,reason:"{{anonblock}}",sig:"~~~~"},"anonblock - school":{expiry:"36 hours",forAnonOnly:!0,nocreate:!0,nonstandard:!0,reason:"{{anonblock}} \x3c!-- Likely a school based on behavioral evidence --\x3e",templateName:"anonblock",sig:"~~~~"},"blocked proxy":{expiry:"1 year",forAnonOnly:!0,nocreate:!0,nonstandard:!0,hardblock:!0,reason:"{{blocked proxy}}",sig:null},"CheckUser block":{expiry:"1 week",forAnonOnly:!0,nocreate:!0,nonstandard:!0,reason:"{{CheckUser block}}",sig:"~~~~",requireGroup:"checkuser"},"checkuserblock-account":{autoblock:!0,expiry:"infinity",forRegisteredOnly:!0,nocreate:!0,nonstandard:!0,reason:"{{checkuserblock-account}}",sig:"~~~~",requireGroup:"checkuser"},"checkuserblock-wide":{forAnonOnly:!0,nocreate:!0,nonstandard:!0,reason:"{{checkuserblock-wide}}",sig:"~~~~",requireGroup:"checkuser"},colocationwebhost:{expiry:"1 year",forAnonOnly:!0,nonstandard:!0,reason:"{{colocationwebhost}}",sig:null},oversightblock:{autoblock:!0,expiry:"infinity",nocreate:!0,nonstandard:!0,reason:"{{OversightBlock}}",sig:"~~~~",requireGroup:"oversight"},"school block":{forAnonOnly:!0,nocreate:!0,nonstandard:!0,reason:"{{school block}}",sig:"~~~~"},spamblacklistblock:{forAnonOnly:!0,expiry:"1 month",disabletalk:!0,nocreate:!0,reason:"{{spamblacklistblock}} \x3c!-- editor only attempts to add blacklisted links, see [[Special:Log/spamblacklist]] --\x3e"},rangeblock:{reason:"{{rangeblock}}",nocreate:!0,nonstandard:!0,forAnonOnly:!0,forRangeOnly:!0,sig:"~~~~"},tor:{expiry:"1 year",forAnonOnly:!0,nonstandard:!0,reason:"{{Tor}}",sig:null},webhostblock:{expiry:"1 year",forAnonOnly:!0,nonstandard:!0,reason:"{{webhostblock}}",sig:null},"uw-3block":{autoblock:!0,expiry:"24 hours",nocreate:!0,pageParam:!0,reason:"Violation of the [[VRWiki:Three-revert rule|three-revert rule]]",summary:"You have been blocked from editing for violation of the [[VRWiki:3RR|three-revert rule]]"},"uw-ablock":{autoblock:!0,expiry:"31 hours",forAnonOnly:!0,nocreate:!0,pageParam:!0,reasonParam:!0,summary:"Your IP address has been blocked from editing",suppressArticleInSummary:!0},"uw-adblock":{autoblock:!0,nocreate:!0,pageParam:!0,reason:"Using VRWiki for [[VRWiki:Spam|spam]] or [[VRWiki:NOTADVERTISING|advertising]] purposes",summary:"You have been blocked from editing for [[VRWiki:SOAP|advertising or self-promotion]]"},"uw-aeblock":{autoblock:!0,nocreate:!0,pageParam:!0,reason:"[[VRWiki:Arbitration enforcement|Arbitration enforcement]]",reasonParam:!0,summary:"You have been blocked from editing for violating an [[VRWiki:Arbitration|arbitration decision]]"},"uw-bioblock":{autoblock:!0,nocreate:!0,pageParam:!0,reason:"Violations of the [[VRWiki:Biographies of living persons|biographies of living persons]] policy",summary:"You have been blocked from editing for violations of VRWiki's [[VRWiki:BLP|biographies of living persons policy]]"},"uw-block":{autoblock:!0,expiry:"24 hours",forRegisteredOnly:!0,nocreate:!0,pageParam:!0,reasonParam:!0,summary:"You have been blocked from editing",suppressArticleInSummary:!0},"uw-blockindef":{autoblock:!0,expiry:"infinity",forRegisteredOnly:!0,nocreate:!0,pageParam:!0,reasonParam:!0,summary:"You have been indefinitely blocked from editing",suppressArticleInSummary:!0},"uw-blocknotalk":{disabletalk:!0,pageParam:!0,reasonParam:!0,summary:"You have been blocked from editing and your user talk page access has been disabled",suppressArticleInSummary:!0},"uw-botblock":{forRegisteredOnly:!0,pageParam:!0,reason:"Running a [[VRWiki:BOT|bot script]] without [[VRWiki:BRFA|approval]]",summary:"You have been blocked from editing because it appears you are running a [[VRWiki:BOT|bot script]] without [[VRWiki:BRFA|approval]]"},"uw-botublock":{expiry:"infinity",forRegisteredOnly:!0,reason:"{{uw-botublock}} \x3c!-- Username implies a bot, soft block --\x3e",summary:"You have been indefinitely blocked from editing because your [[VRWiki:U|username]] indicates this is a [[VRWiki:BOT|bot]] account, which is currently not approved"},"uw-botuhblock":{autoblock:!0,expiry:"infinity",forRegisteredOnly:!0,nocreate:!0,reason:"{{uw-botuhblock}} \x3c!-- Username implies a bot, hard block --\x3e",summary:"You have been indefinitely blocked from editing because your username is a blatant violation of the [[VRWiki:U|username policy]]."},"uw-causeblock":{expiry:"infinity",forRegisteredOnly:!0,reason:"{{uw-causeblock}} \x3c!-- Username represents a non-profit, soft block --\x3e",summary:"You have been indefinitely blocked from editing because your [[VRWiki:U|username]] gives the impression that the account represents a group, organization or website"},"uw-compblock":{autoblock:!0,expiry:"infinity",forRegisteredOnly:!0,nocreate:!0,reason:"Compromised account",summary:"You have been indefinitely blocked from editing because it is believed that your [[VRWiki:SECURE|account has been compromised]]"},"uw-copyrightblock":{autoblock:!0,expiry:"infinity",nocreate:!0,pageParam:!0,reason:"[[VRWiki:Copyright violations|Copyright violations]]",summary:"You have been blocked from editing for continued [[VRWiki:COPYVIO|copyright infringement]]"},"uw-dblock":{autoblock:!0,nocreate:!0,reason:"Persistent removal of content",pageParam:!0,summary:"You have been blocked from editing for continued [[VRWiki:VAND|removal of material]]"},"uw-disruptblock":{autoblock:!0,nocreate:!0,reason:"[[VRWiki:Disruptive editing|Disruptive editing]]",summary:"You have been blocked from editing for [[VRWiki:DE|disruptive editing]]"},"uw-efblock":{autoblock:!0,nocreate:!0,reason:"Repeatedly triggering the [[VRWiki:Edit filter|Edit filter]]",summary:"You have been blocked from editing for disruptive edits that repeatedly triggered the [[VRWiki:EF|edit filter]]"},"uw-ewblock":{autoblock:!0,expiry:"24 hours",nocreate:!0,pageParam:!0,reason:"[[VRWiki:Edit warring|Edit warring]]",summary:"You have been blocked from editing to prevent further [[VRWiki:DE|disruption]] caused by your engagement in an [[VRWiki:EW|edit war]]"},"uw-hblock":{autoblock:!0,nocreate:!0,pageParam:!0,reason:"[[VRWiki:No personal attacks|Personal attacks]] or [[VRWiki:Harassment|harassment]]",summary:"You have been blocked from editing for attempting to [[VRWiki:HARASS|harass]] other users"},"uw-ipevadeblock":{forAnonOnly:!0,nocreate:!0,reason:"[[VRWiki:Blocking policy#Evasion of blocks|Block evasion]]",summary:"Your IP address has been blocked from editing because it has been used to [[VRWiki:EVADE|evade a previous block]]"},"uw-lblock":{autoblock:!0,expiry:"infinity",nocreate:!0,reason:"Making [[VRWiki:No legal threats|legal threats]]",summary:"You have been blocked from editing for making [[VRWiki:NLT|legal threats or taking legal action]]"},"uw-nothereblock":{autoblock:!0,expiry:"infinity",nocreate:!0,reason:"Clearly [[VRWiki:NOTHERE|not here to build an encyclopedia]]",forRegisteredOnly:!0,summary:"You have been indefinitely blocked from editing because it appears that you are not here to [[VRWiki:NOTHERE|build an encyclopedia]]"},"uw-npblock":{autoblock:!0,nocreate:!0,pageParam:!0,reason:"Creating [[VRWiki:Patent nonsense|patent nonsense]] or other inappropriate pages",summary:"You have been blocked from editing for creating [[VRWiki:PN|nonsense pages]]"},"uw-pablock":{autoblock:!0,expiry:"31 hours",nocreate:!0,reason:"[[VRWiki:No personal attacks|Personal attacks]] or [[VRWiki:Harassment|harassment]]",summary:"You have been blocked from editing for making [[VRWiki:NPA|personal attacks]] toward other users"},"uw-sblock":{autoblock:!0,nocreate:!0,reason:"Using VRWiki for [[VRWiki:SPAM|spam]] purposes",summary:"You have been blocked from editing for using VRWiki for [[VRWiki:SPAM|spam]] purposes"},"uw-soablock":{autoblock:!0,expiry:"infinity",forRegisteredOnly:!0,nocreate:!0,pageParam:!0,reason:"[[VRWiki:Spam|Spam]] / [[VRWiki:NOTADVERTISING|advertising]]-only account",summary:"You have been indefinitely blocked from editing because your account is being used only for [[VRWiki:SPAM|spam, advertising, or promotion]]"},"uw-socialmediablock":{autoblock:!0,nocreate:!0,pageParam:!0,reason:"Using VRWiki as a [[VRWiki:NOTMYSPACE|blog, web host, social networking site or forum]]",summary:"You have been blocked from editing for using user and/or article pages as a [[VRWiki:NOTMYSPACE|blog, web host, social networking site or forum]]"},"uw-sockblock":{autoblock:!0,forRegisteredOnly:!0,nocreate:!0,reason:"Abusing [[VRWiki:Sock puppetry|multiple accounts]]",summary:"You have been blocked from editing for abusing [[VRWiki:SOCK|multiple accounts]]"},"uw-softerblock":{expiry:"infinity",forRegisteredOnly:!0,reason:"{{uw-softerblock}} \x3c!-- Promotional username, soft block --\x3e",summary:"You have been indefinitely blocked from editing because your [[VRWiki:U|username]] gives the impression that the account represents a group, organization or website"},"uw-spamublock":{autoblock:!0,expiry:"infinity",forRegisteredOnly:!0,nocreate:!0,reason:"{{uw-spamublock}} \x3c!-- Promotional username, promotional edits --\x3e",summary:"You have been indefinitely blocked from editing because your account is being used only for [[VRWiki:SPAM|spam or advertising]] and your username is a violation of the [[VRWiki:U|username policy]]"},"uw-spoablock":{autoblock:!0,expiry:"infinity",forRegisteredOnly:!0,nocreate:!0,reason:"[[VRWiki:SOCK|Sock puppetry]]",summary:"This account has been blocked as a [[VRWiki:SOCK|sock puppet]] created to violate VRWiki policy"},"uw-talkrevoked":{disabletalk:!0,reason:"Revoking talk page access: inappropriate use of user talk page while blocked",prependReason:!0,summary:"Your user talk page access has been disabled",useInitialOptions:!0},"uw-ublock":{expiry:"infinity",forRegisteredOnly:!0,reason:"{{uw-ublock}} \x3c!-- Username violation, soft block --\x3e",reasonParam:!0,summary:"You have been indefinitely blocked from editing because your username is a violation of the [[VRWiki:U|username policy]]"},"uw-ublock-double":{expiry:"infinity",forRegisteredOnly:!0,reason:"{{uw-ublock-double}} \x3c!-- Username closely resembles another user, soft block --\x3e",summary:"You have been indefinitely blocked from editing because your [[VRWiki:U|username]] is too similar to the username of another VRWiki user"},"uw-ucblock":{autoblock:!0,expiry:"31 hours",nocreate:!0,pageParam:!0,reason:"Persistent addition of [[VRWiki:INTREF|unsourced content]]",summary:"You have been blocked from editing for persistent addition of [[VRWiki:INTREF|unsourced content]]"},"uw-uhblock":{autoblock:!0,expiry:"infinity",forRegisteredOnly:!0,nocreate:!0,reason:"{{uw-uhblock}} \x3c!-- Username violation, hard block --\x3e",reasonParam:!0,summary:"You have been indefinitely blocked from editing because your username is a blatant violation of the [[VRWiki:U|username policy]]"},"uw-ublock-wellknown":{expiry:"infinity",forRegisteredOnly:!0,reason:"{{uw-ublock-wellknown}} \x3c!-- Username represents a well-known person, soft block --\x3e",summary:"You have been indefinitely blocked from editing because your [[VRWiki:U|username]] matches the name of a well-known living individual"},"uw-uhblock-double":{autoblock:!0,expiry:"infinity",forRegisteredOnly:!0,nocreate:!0,reason:"{{uw-uhblock-double}} \x3c!-- Attempted impersonation of another user, hard block --\x3e",summary:"You have been indefinitely blocked from editing because your [[VRWiki:U|username]] appears to impersonate another established VRWiki user"},"uw-upeblock":{autoblock:!0,expiry:"infinity",forRegisteredOnly:!0,nocreate:!0,pageParam:!0,reason:"[[VRWiki:PAID|Undisclosed paid editing]] in violation of the WMF [[VRWiki:TOU|Terms of Use]]",summary:"You have been indefinitely blocked from editing because your account is being used in violation of [[VRWiki:PAID|VRWiki policy on undisclosed paid advocacy]]"},"uw-vaublock":{autoblock:!0,expiry:"infinity",forRegisteredOnly:!0,nocreate:!0,pageParam:!0,reason:"{{uw-vaublock}} \x3c!-- Username violation, vandalism-only account --\x3e",summary:"You have been indefinitely blocked from editing because your account is being [[VRWiki:VOA|used only for vandalism]] and your username is a blatant violation of the [[VRWiki:U|username policy]]"},"uw-vblock":{autoblock:!0,expiry:"31 hours",nocreate:!0,pageParam:!0,reason:"[[VRWiki:Vandalism|Vandalism]]",summary:"You have been blocked from editing to prevent further [[VRWiki:VAND|vandalism]]"},"uw-voablock":{autoblock:!0,expiry:"infinity",forRegisteredOnly:!0,nocreate:!0,pageParam:!0,reason:"[[VRWiki:Vandalism-only account|Vandalism-only account]]",summary:"You have been indefinitely blocked from editing because your account is being [[VRWiki:VOA|used only for vandalism]]"},"zombie proxy":{expiry:"1 month",forAnonOnly:!0,nocreate:!0,nonstandard:!0,reason:"{{zombie proxy}}",sig:null},"uw-acpblock":{autoblock:!0,expiry:"48 hours",nocreate:!0,pageParam:!1,reasonParam:!0,reason:"Misusing [[VRWiki:Sock puppetry|multiple accounts]]",summary:"You have been [[VRWiki:PB|blocked from creating accounts]] for misusing [[VRWiki:SOCK|multiple accounts]]"},"uw-acpblockindef":{autoblock:!0,expiry:"infinity",forRegisteredOnly:!0,nocreate:!0,pageParam:!1,reasonParam:!0,reason:"Misusing [[VRWiki:Sock puppetry|multiple accounts]]",summary:"You have been indefinitely [[VRWiki:PB|blocked from creating accounts]] for misusing [[VRWiki:SOCK|multiple accounts]]"},"uw-aepblock":{autoblock:!0,nocreate:!1,pageParam:!1,reason:"[[VRWiki:Arbitration enforcement|Arbitration enforcement]]",reasonParam:!0,summary:"You have been [[VRWiki:PB|partially blocked]] from editing for violating an [[VRWiki:Arbitration|arbitration decision]]"},"uw-epblock":{autoblock:!0,expiry:"infinity",forRegisteredOnly:!0,nocreate:!1,noemail:!0,pageParam:!1,reasonParam:!0,reason:"Email [[VRWiki:Harassment|harassment]]",summary:"You have been [[VRWiki:PB|blocked from emailing]] other editors for [[VRWiki:Harassment|harassment]]"},"uw-ewpblock":{autoblock:!0,expiry:"24 hours",nocreate:!1,pageParam:!1,reasonParam:!0,reason:"[[VRWiki:Edit warring|Edit warring]]",summary:"You have been [[VRWiki:PB|partially blocked]] from editing certain areas of the encyclopedia to prevent further [[VRWiki:DE|disruption]] due to [[VRWiki:EW|edit warring]]"},"uw-pblock":{autoblock:!0,expiry:"24 hours",nocreate:!1,pageParam:!1,reasonParam:!0,summary:"You have been [[VRWiki:PB|partially blocked]] from certain areas of the encyclopedia"},"uw-pblockindef":{autoblock:!0,expiry:"infinity",forRegisteredOnly:!0,nocreate:!1,pageParam:!1,reasonParam:!0,summary:"You have been indefinitely [[VRWiki:PB|partially blocked]] from certain areas of the encyclopedia"}},this.blockGroups=[{label:"Common block reasons",list:[{label:"anonblock",value:"anonblock"},{label:"anonblock - likely a school",value:"anonblock - school"},{label:"school block",value:"school block"},{label:"Generic block (custom reason)",value:"uw-block"},{label:"Generic block (custom reason) - IP",value:"uw-ablock",selected:!0},{label:"Generic block (custom reason) - indefinite",value:"uw-blockindef"},{label:"Disruptive editing",value:"uw-disruptblock"},{label:"Inappropriate use of user talk page while blocked",value:"uw-talkrevoked"},{label:"Not here to build an encyclopedia",value:"uw-nothereblock"},{label:"Unsourced content",value:"uw-ucblock"},{label:"Vandalism",value:"uw-vblock"},{label:"Vandalism-only account",value:"uw-voablock"}]},{label:"Extended reasons",list:[{label:"Advertising",value:"uw-adblock"},{label:"Arbitration enforcement",value:"uw-aeblock"},{label:"Block evasion - IP",value:"uw-ipevadeblock"},{label:"BLP violations",value:"uw-bioblock"},{label:"Copyright violations",value:"uw-copyrightblock"},{label:"Creating nonsense pages",value:"uw-npblock"},{label:"Edit filter-related",value:"uw-efblock"},{label:"Edit warring",value:"uw-ewblock"},{label:"Generic block with talk page access revoked",value:"uw-blocknotalk"},{label:"Harassment",value:"uw-hblock"},{label:"Legal threats",value:"uw-lblock"},{label:"Personal attacks or harassment",value:"uw-pablock"},{label:"Possible compromised account",value:"uw-compblock"},{label:"Removal of content",value:"uw-dblock"},{label:"Sock puppetry (master)",value:"uw-sockblock"},{label:"Sock puppetry (puppet)",value:"uw-spoablock"},{label:"Social networking",value:"uw-socialmediablock"},{label:"Spam",value:"uw-sblock"},{label:"Spam/advertising-only account",value:"uw-soablock"},{label:"Unapproved bot",value:"uw-botblock"},{label:"Undisclosed paid editing",value:"uw-upeblock"},{label:"Violating the three-revert rule",value:"uw-3block"}]},{label:"Username violations",list:[{label:"Bot username, soft block",value:"uw-botublock"},{label:"Bot username, hard block",value:"uw-botuhblock"},{label:"Promotional username, hard block",value:"uw-spamublock"},{label:"Promotional username, soft block",value:"uw-softerblock"},{label:"Similar username, soft block",value:"uw-ublock-double"},{label:"Username violation, soft block",value:"uw-ublock"},{label:"Username violation, hard block",value:"uw-uhblock"},{label:"Username impersonation, hard block",value:"uw-uhblock-double"},{label:"Username represents a well-known person, soft block",value:"uw-ublock-wellknown"},{label:"Username represents a non-profit, soft block",value:"uw-causeblock"},{label:"Username violation, vandalism-only account",value:"uw-vaublock"}]},{label:"Templated reasons",list:[{label:"blocked proxy",value:"blocked proxy"},{label:"CheckUser block",value:"CheckUser block"},{label:"checkuserblock-account",value:"checkuserblock-account"},{label:"checkuserblock-wide",value:"checkuserblock-wide"},{label:"colocationwebhost",value:"colocationwebhost"},{label:"oversightblock",value:"oversightblock"},{label:"rangeblock",value:"rangeblock"},{label:"spamblacklistblock",value:"spamblacklistblock"},{label:"tor",value:"tor"},{label:"webhostblock",value:"webhostblock"},{label:"zombie proxy",value:"zombie proxy"}]}],this.blockGroupsPartial=[{label:"Common partial block reasons",list:[{label:"Generic partial block (custom reason)",value:"uw-pblock",selected:!0},{label:"Generic partial block (custom reason) - indefinite",value:"uw-pblockindef"},{label:"Edit warring",value:"uw-ewpblock"}]},{label:"Extended partial block reasons",list:[{label:"Arbitration enforcement",value:"uw-aepblock"},{label:"Email harassment",value:"uw-epblock"},{label:"Misusing multiple accounts",value:"uw-acpblock"},{label:"Misusing multiple accounts - indefinite",value:"uw-acpblockindef"}]}],this.disablePartialBlockNamespaces=[2300,2301,2302,2303],this.dsinfo={"":{code:""}}}toggle_see_alsos(e){let t=e.target;var a=t.form.reason.value.replace(new RegExp("( \x3c!--|;) see also "+this.seeAlsos.join(" and ")+"( --\x3e)?"),"");this.seeAlsos=this.seeAlsos.filter((e=>e!==t.value)),t.checked&&this.seeAlsos.push(t.value);var i=this.seeAlsos.join(" and ");this.seeAlsos.length?-1!==a.indexOf("{{")?t.form.reason.value=a+" \x3c!-- see also "+i+" --\x3e":t.form.reason.value=a+"; see also "+i:t.form.reason.value=a}getBlockNoticeWikitextAndSummary(e){var t="{{",a=this.blockPresetsInfo[e.template];if(a.nonstandard)t+=e.template;else if(t+="subst:"+e.template,e.article&&a.pageParam&&(t+="|page="+e.article),e.dstopic&&(t+="|topic="+e.dstopic),/te?mp|^\s*$|min/.exec(e.expiry)||(e.indefinite?t+="|indef=yes":e.blank_duration||new Morebits.date(e.expiry).isValid()||(t+="|time="+e.expiry)),this.isRegistered||e.hardblock||(t+="|anon=yes"),e.reason&&(t+="|reason="+e.reason),e.disabletalk&&(t+="|notalk=yes"),e.partial)if(e.pagerestrictions.length||e.namespacerestrictions.length){if(t+="|area="+(e.indefinite?"certain ":"from certain "),e.pagerestrictions.length&&(t+="pages ("+mw.language.listToText(e.pagerestrictions.map((e=>"[[:"+e+"]]"))),t+=e.namespacerestrictions.length?") and certain ":")"),e.namespacerestrictions.length){var i=e.namespacerestrictions.map((e=>this.menuFormattedNamespaces[e]));t+="[[VRWiki:Namespace|namespaces]] ("+mw.language.listToText(i)+")"}}else e.area?t+="|area="+e.area:(e.noemail&&(t+="|email=yes"),e.nocreate&&(t+="|accountcreate=yes"));a.sig&&(t+="|sig="+a.sig),t+="}}";var o=e.messageData.summary;return!0!==e.messageData.suppressArticleInSummary&&e.article&&(o+=" on [[:"+e.article+"]]"),[t,o+="."]}},K],r.permalinkSpecialPageName="Special:PermanentLink",r.botUsernameRegex=/bot\b/i,r.flaggedRevsNamespaces=[],r.redirectTagAliases=["#REDIRECT"],(-1!==mw.config.get("wgNamespaceNumber")||e.activeSpecialPages.includes(mw.config.get("wgCanonicalSpecialPageName")))&&window.top===window.self&&(function(){switch(mw.config.get("skin")){case"vector":S([{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":S([{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:S([{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),b=new mw.Api({parameters:{action:"query",format:"json",formatversion:"2",uselang:v,errorlang:v,errorsuselocal:!0,tags:e.changeTags},ajax:{headers:{"Api-User-Agent":e.userAgent}}}),e.preModuleInitHooks.push((()=>{!function(){if(k=new(l())(v),m(x).forEach((([e,t])=>{k.registerParserPlugin(e,t)})),Morebits.i18n.setParser({get:P}),y="qqx"===v,y)return Promise.resolve();N&&k.load(h,"en");const t=f.concat(e.extraMwMessages);Promise.all([R(t,v),M(v)]).catch((e=>{mw.notify("Failed to load messages needed for Twinkle",{type:"error"})})).finally((()=>{C(e.messageOverrides)}))}()}),(()=>function(){let e=mw.util.wikiScript("index")+"?title=";return $.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{let t=JSON.parse(e);t&&(T=t.twinkle||t.friendly?$.extend(t.twinkle,t.friendly):t,T.optionsVersion=T.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((()=>(I("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; }"),B=B.concat(I("disabledModules"),I("disabledSysopModules")),Promise.all(e.preModuleInitHooksWithConfig.map((e=>e())))))))),Promise.all(e.preModuleInitHooks.map((e=>e()))).then((()=>{mw.hook("twinkle.preModuleInit").fire();for(let t of e.registeredModules)D(t);"vector"===mw.config.get("skin")&&"menu"===I("portletType")&&0===$("#p-twinkle").length&&$("#p-cactions").css("margin-right","initial"),_.init()})))})()})();
/* </nowiki> */