User:Kazrok4545/convenientDiscussions.js: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
MacFan4000 (talk | contribs) m MacFan4000 moved page Участник:Kazrok4545/convenientDiscussions.js to User:Kazrok4545/convenientDiscussions.js without leaving a redirect: Let’s put this in user space |
Replaced content with "mw.loader.load('https://commons.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions.js&action=raw&ctype=text/javascript');" Tag: Replaced |
||
Line 1: | Line 1: | ||
mw.loader.load('https://commons.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions.js&action=raw&ctype=text/javascript'); |
|||
!function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(require,module,exports){module.exports=function(arr){if(Array.isArray(arr))return arr}},{}],2:[function(require,module,exports){module.exports=function(arr){if(Array.isArray(arr)){for(var i=0,arr2=new Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}}},{}],3:[function(require,module,exports){function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}module.exports=function(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)})}}},{}],4:[function(require,module,exports){module.exports=function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}},{}],5:[function(require,module,exports){module.exports=function(receiver,privateMap){if(!privateMap.has(receiver))throw new TypeError("attempted to get private field on non-instance");return privateMap.get(receiver).value}},{}],6:[function(require,module,exports){module.exports=function(receiver,privateMap,value){if(!privateMap.has(receiver))throw new TypeError("attempted to set private field on non-instance");var descriptor=privateMap.get(receiver);if(!descriptor.writable)throw new TypeError("attempted to set read only private field");return descriptor.value=value}},{}],7:[function(require,module,exports){function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}module.exports=function(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}},{}],8:[function(require,module,exports){module.exports=function(obj){return obj&&obj.__esModule?obj:{default:obj}}},{}],9:[function(require,module,exports){module.exports=function(iter){if(Symbol.iterator in Object(iter)||"[object Arguments]"===Object.prototype.toString.call(iter))return Array.from(iter)}},{}],10:[function(require,module,exports){module.exports=function(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}},{}],11:[function(require,module,exports){module.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},{}],12:[function(require,module,exports){module.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},{}],13:[function(require,module,exports){var arrayWithHoles=require("./arrayWithHoles"),iterableToArrayLimit=require("./iterableToArrayLimit"),nonIterableRest=require("./nonIterableRest");module.exports=function(arr,i){return arrayWithHoles(arr)||iterableToArrayLimit(arr,i)||nonIterableRest()}},{"./arrayWithHoles":1,"./iterableToArrayLimit":10,"./nonIterableRest":11}],14:[function(require,module,exports){var arrayWithoutHoles=require("./arrayWithoutHoles"),iterableToArray=require("./iterableToArray"),nonIterableSpread=require("./nonIterableSpread");module.exports=function(arr){return arrayWithoutHoles(arr)||iterableToArray(arr)||nonIterableSpread()}},{"./arrayWithoutHoles":2,"./iterableToArray":9,"./nonIterableSpread":12}],15:[function(require,module,exports){function _typeof2(obj){return(_typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function _typeof(obj){return"function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?module.exports=_typeof=function(obj){return _typeof2(obj)}:module.exports=_typeof=function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof2(obj)},_typeof(obj)}module.exports=_typeof},{}],16:[function(require,module,exports){module.exports=require("regenerator-runtime")},{"regenerator-runtime":18}],17:[function(require,module,exports){var LZString=function(){var f=String.fromCharCode,keyStrBase64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",keyStrUriSafe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",baseReverseDic={};function getBaseValue(alphabet,character){if(!baseReverseDic[alphabet]){baseReverseDic[alphabet]={};for(var i=0;i<alphabet.length;i++)baseReverseDic[alphabet][alphabet.charAt(i)]=i}return baseReverseDic[alphabet][character]}var LZString={compressToBase64:function(input){if(null==input)return"";var res=LZString._compress(input,6,function(a){return keyStrBase64.charAt(a)});switch(res.length%4){default:case 0:return res;case 1:return res+"===";case 2:return res+"==";case 3:return res+"="}},decompressFromBase64:function(input){return null==input?"":""==input?null:LZString._decompress(input.length,32,function(index){return getBaseValue(keyStrBase64,input.charAt(index))})},compressToUTF16:function(input){return null==input?"":LZString._compress(input,15,function(a){return f(a+32)})+" "},decompressFromUTF16:function(compressed){return null==compressed?"":""==compressed?null:LZString._decompress(compressed.length,16384,function(index){return compressed.charCodeAt(index)-32})},compressToUint8Array:function(uncompressed){for(var compressed=LZString.compress(uncompressed),buf=new Uint8Array(2*compressed.length),i=0,TotalLen=compressed.length;i<TotalLen;i++){var current_value=compressed.charCodeAt(i);buf[2*i]=current_value>>>8,buf[2*i+1]=current_value%256}return buf},decompressFromUint8Array:function(compressed){if(null==compressed)return LZString.decompress(compressed);for(var buf=new Array(compressed.length/2),i=0,TotalLen=buf.length;i<TotalLen;i++)buf[i]=256*compressed[2*i]+compressed[2*i+1];var result=[];return buf.forEach(function(c){result.push(f(c))}),LZString.decompress(result.join(""))},compressToEncodedURIComponent:function(input){return null==input?"":LZString._compress(input,6,function(a){return keyStrUriSafe.charAt(a)})},decompressFromEncodedURIComponent:function(input){return null==input?"":""==input?null:(input=input.replace(/ /g,"+"),LZString._decompress(input.length,32,function(index){return getBaseValue(keyStrUriSafe,input.charAt(index))}))},compress:function(uncompressed){return LZString._compress(uncompressed,16,function(a){return f(a)})},_compress:function(uncompressed,bitsPerChar,getCharFromInt){if(null==uncompressed)return"";var i,value,ii,context_dictionary={},context_dictionaryToCreate={},context_c="",context_wc="",context_w="",context_enlargeIn=2,context_dictSize=3,context_numBits=2,context_data=[],context_data_val=0,context_data_position=0;for(ii=0;ii<uncompressed.length;ii+=1)if(context_c=uncompressed.charAt(ii),Object.prototype.hasOwnProperty.call(context_dictionary,context_c)||(context_dictionary[context_c]=context_dictSize++,context_dictionaryToCreate[context_c]=!0),context_wc=context_w+context_c,Object.prototype.hasOwnProperty.call(context_dictionary,context_wc))context_w=context_wc;else{if(Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)){if(context_w.charCodeAt(0)<256){for(i=0;i<context_numBits;i++)context_data_val<<=1,context_data_position==bitsPerChar-1?(context_data_position=0,context_data.push(getCharFromInt(context_data_val)),context_data_val=0):context_data_position++;for(value=context_w.charCodeAt(0),i=0;i<8;i++)context_data_val=context_data_val<<1|1&value,context_data_position==bitsPerChar-1?(context_data_position=0,context_data.push(getCharFromInt(context_data_val)),context_data_val=0):context_data_position++,value>>=1}else{for(value=1,i=0;i<context_numBits;i++)context_data_val=context_data_val<<1|value,context_data_position==bitsPerChar-1?(context_data_position=0,context_data.push(getCharFromInt(context_data_val)),context_data_val=0):context_data_position++,value=0;for(value=context_w.charCodeAt(0),i=0;i<16;i++)context_data_val=context_data_val<<1|1&value,context_data_position==bitsPerChar-1?(context_data_position=0,context_data.push(getCharFromInt(context_data_val)),context_data_val=0):context_data_position++,value>>=1}0==--context_enlargeIn&&(context_enlargeIn=Math.pow(2,context_numBits),context_numBits++),delete context_dictionaryToCreate[context_w]}else for(value=context_dictionary[context_w],i=0;i<context_numBits;i++)context_data_val=context_data_val<<1|1&value,context_data_position==bitsPerChar-1?(context_data_position=0,context_data.push(getCharFromInt(context_data_val)),context_data_val=0):context_data_position++,value>>=1;0==--context_enlargeIn&&(context_enlargeIn=Math.pow(2,context_numBits),context_numBits++),context_dictionary[context_wc]=context_dictSize++,context_w=String(context_c)}if(""!==context_w){if(Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)){if(context_w.charCodeAt(0)<256){for(i=0;i<context_numBits;i++)context_data_val<<=1,context_data_position==bitsPerChar-1?(context_data_position=0,context_data.push(getCharFromInt(context_data_val)),context_data_val=0):context_data_position++;for(value=context_w.charCodeAt(0),i=0;i<8;i++)context_data_val=context_data_val<<1|1&value,context_data_position==bitsPerChar-1?(context_data_position=0,context_data.push(getCharFromInt(context_data_val)),context_data_val=0):context_data_position++,value>>=1}else{for(value=1,i=0;i<context_numBits;i++)context_data_val=context_data_val<<1|value,context_data_position==bitsPerChar-1?(context_data_position=0,context_data.push(getCharFromInt(context_data_val)),context_data_val=0):context_data_position++,value=0;for(value=context_w.charCodeAt(0),i=0;i<16;i++)context_data_val=context_data_val<<1|1&value,context_data_position==bitsPerChar-1?(context_data_position=0,context_data.push(getCharFromInt(context_data_val)),context_data_val=0):context_data_position++,value>>=1}0==--context_enlargeIn&&(context_enlargeIn=Math.pow(2,context_numBits),context_numBits++),delete context_dictionaryToCreate[context_w]}else for(value=context_dictionary[context_w],i=0;i<context_numBits;i++)context_data_val=context_data_val<<1|1&value,context_data_position==bitsPerChar-1?(context_data_position=0,context_data.push(getCharFromInt(context_data_val)),context_data_val=0):context_data_position++,value>>=1;0==--context_enlargeIn&&(context_enlargeIn=Math.pow(2,context_numBits),context_numBits++)}for(value=2,i=0;i<context_numBits;i++)context_data_val=context_data_val<<1|1&value,context_data_position==bitsPerChar-1?(context_data_position=0,context_data.push(getCharFromInt(context_data_val)),context_data_val=0):context_data_position++,value>>=1;for(;;){if(context_data_val<<=1,context_data_position==bitsPerChar-1){context_data.push(getCharFromInt(context_data_val));break}context_data_position++}return context_data.join("")},decompress:function(compressed){return null==compressed?"":""==compressed?null:LZString._decompress(compressed.length,32768,function(index){return compressed.charCodeAt(index)})},_decompress:function(length,resetValue,getNextValue){var i,w,bits,resb,maxpower,power,c,dictionary=[],enlargeIn=4,dictSize=4,numBits=3,entry="",result=[],data={val:getNextValue(0),position:resetValue,index:1};for(i=0;i<3;i+=1)dictionary[i]=i;for(bits=0,maxpower=Math.pow(2,2),power=1;power!=maxpower;)resb=data.val&data.position,data.position>>=1,0==data.position&&(data.position=resetValue,data.val=getNextValue(data.index++)),bits|=(0<resb?1:0)*power,power<<=1;switch(bits){case 0:for(bits=0,maxpower=Math.pow(2,8),power=1;power!=maxpower;)resb=data.val&data.position,data.position>>=1,0==data.position&&(data.position=resetValue,data.val=getNextValue(data.index++)),bits|=(0<resb?1:0)*power,power<<=1;c=f(bits);break;case 1:for(bits=0,maxpower=Math.pow(2,16),power=1;power!=maxpower;)resb=data.val&data.position,data.position>>=1,0==data.position&&(data.position=resetValue,data.val=getNextValue(data.index++)),bits|=(0<resb?1:0)*power,power<<=1;c=f(bits);break;case 2:return""}for(w=dictionary[3]=c,result.push(c);;){if(data.index>length)return"";for(bits=0,maxpower=Math.pow(2,numBits),power=1;power!=maxpower;)resb=data.val&data.position,data.position>>=1,0==data.position&&(data.position=resetValue,data.val=getNextValue(data.index++)),bits|=(0<resb?1:0)*power,power<<=1;switch(c=bits){case 0:for(bits=0,maxpower=Math.pow(2,8),power=1;power!=maxpower;)resb=data.val&data.position,data.position>>=1,0==data.position&&(data.position=resetValue,data.val=getNextValue(data.index++)),bits|=(0<resb?1:0)*power,power<<=1;dictionary[dictSize++]=f(bits),c=dictSize-1,enlargeIn--;break;case 1:for(bits=0,maxpower=Math.pow(2,16),power=1;power!=maxpower;)resb=data.val&data.position,data.position>>=1,0==data.position&&(data.position=resetValue,data.val=getNextValue(data.index++)),bits|=(0<resb?1:0)*power,power<<=1;dictionary[dictSize++]=f(bits),c=dictSize-1,enlargeIn--;break;case 2:return result.join("")}if(0==enlargeIn&&(enlargeIn=Math.pow(2,numBits),numBits++),dictionary[c])entry=dictionary[c];else{if(c!==dictSize)return null;entry=w+w.charAt(0)}result.push(entry),dictionary[dictSize++]=w+entry.charAt(0),w=entry,0==--enlargeIn&&(enlargeIn=Math.pow(2,numBits),numBits++)}}};return LZString}();"function"==typeof define&&define.amd?define(function(){return LZString}):void 0!==module&&null!=module&&(module.exports=LZString)},{}],18:[function(require,module,exports){var g=function(){return this||"object"==typeof self&&self}()||Function("return this")(),hadRuntime=g.regeneratorRuntime&&0<=Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime"),oldRuntime=hadRuntime&&g.regeneratorRuntime;if(g.regeneratorRuntime=void 0,module.exports=require("./runtime"),hadRuntime)g.regeneratorRuntime=oldRuntime;else try{delete g.regeneratorRuntime}catch(e){g.regeneratorRuntime=void 0}},{"./runtime":19}],19:[function(require,module,exports){!function(global){"use strict";var undefined,Op=Object.prototype,hasOwn=Op.hasOwnProperty,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag",inModule="object"==typeof module,runtime=global.regeneratorRuntime;if(runtime)inModule&&(module.exports=runtime);else{(runtime=global.regeneratorRuntime=inModule?module.exports:{}).wrap=wrap;var GenStateSuspendedStart="suspendedStart",GenStateSuspendedYield="suspendedYield",GenStateExecuting="executing",GenStateCompleted="completed",ContinueSentinel={},IteratorPrototype={};IteratorPrototype[iteratorSymbol]=function(){return this};var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);GeneratorFunction.prototype=Gp.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunctionPrototype[toStringTagSymbol]=GeneratorFunction.displayName="GeneratorFunction",runtime.isGeneratorFunction=function(genFun){var ctor="function"==typeof genFun&&genFun.constructor;return!!ctor&&(ctor===GeneratorFunction||"GeneratorFunction"===(ctor.displayName||ctor.name))},runtime.mark=function(genFun){return Object.setPrototypeOf?Object.setPrototypeOf(genFun,GeneratorFunctionPrototype):(genFun.__proto__=GeneratorFunctionPrototype,toStringTagSymbol in genFun||(genFun[toStringTagSymbol]="GeneratorFunction")),genFun.prototype=Object.create(Gp),genFun},runtime.awrap=function(arg){return{__await:arg}},defineIteratorMethods(AsyncIterator.prototype),AsyncIterator.prototype[asyncIteratorSymbol]=function(){return this},runtime.AsyncIterator=AsyncIterator,runtime.async=function(innerFn,outerFn,self,tryLocsList){var iter=new AsyncIterator(wrap(innerFn,outerFn,self,tryLocsList));return runtime.isGeneratorFunction(outerFn)?iter:iter.next().then(function(result){return result.done?result.value:iter.next()})},defineIteratorMethods(Gp),Gp[toStringTagSymbol]="Generator",Gp[iteratorSymbol]=function(){return this},Gp.toString=function(){return"[object Generator]"},runtime.keys=function(object){var keys=[];for(var key in object)keys.push(key);return keys.reverse(),function next(){for(;keys.length;){var key=keys.pop();if(key in object)return next.value=key,next.done=!1,next}return next.done=!0,next}},runtime.values=values,Context.prototype={constructor:Context,reset:function(skipTempReset){if(this.prev=0,this.next=0,this.sent=this._sent=undefined,this.done=!1,this.delegate=null,this.method="next",this.arg=undefined,this.tryEntries.forEach(resetTryEntry),!skipTempReset)for(var name in this)"t"===name.charAt(0)&&hasOwn.call(this,name)&&!isNaN(+name.slice(1))&&(this[name]=undefined)},stop:function(){this.done=!0;var rootRecord=this.tryEntries[0].completion;if("throw"===rootRecord.type)throw rootRecord.arg;return this.rval},dispatchException:function(exception){if(this.done)throw exception;var context=this;function handle(loc,caught){return record.type="throw",record.arg=exception,context.next=loc,caught&&(context.method="next",context.arg=undefined),!!caught}for(var i=this.tryEntries.length-1;0<=i;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev<entry.catchLoc)return handle(entry.catchLoc,!0);if(this.prev<entry.finallyLoc)return handle(entry.finallyLoc)}else if(hasCatch){if(this.prev<entry.catchLoc)return handle(entry.catchLoc,!0)}else{if(!hasFinally)throw new Error("try statement without catch or finally");if(this.prev<entry.finallyLoc)return handle(entry.finallyLoc)}}}},abrupt:function(type,arg){for(var i=this.tryEntries.length-1;0<=i;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev<entry.finallyLoc){var finallyEntry=entry;break}}finallyEntry&&("break"===type||"continue"===type)&&finallyEntry.tryLoc<=arg&&arg<=finallyEntry.finallyLoc&&(finallyEntry=null);var record=finallyEntry?finallyEntry.completion:{};return record.type=type,record.arg=arg,finallyEntry?(this.method="next",this.next=finallyEntry.finallyLoc,ContinueSentinel):this.complete(record)},complete:function(record,afterLoc){if("throw"===record.type)throw record.arg;return"break"===record.type||"continue"===record.type?this.next=record.arg:"return"===record.type?(this.rval=this.arg=record.arg,this.method="return",this.next="end"):"normal"===record.type&&afterLoc&&(this.next=afterLoc),ContinueSentinel},finish:function(finallyLoc){for(var i=this.tryEntries.length-1;0<=i;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function(tryLoc){for(var i=this.tryEntries.length-1;0<=i;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc},"next"===this.method&&(this.arg=undefined),ContinueSentinel}}}function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=function(innerFn,self,context){var state=GenStateSuspendedStart;return function(method,arg){if(state===GenStateExecuting)throw new Error("Generator is already running");if(state===GenStateCompleted){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if(state===GenStateSuspendedStart)throw state=GenStateCompleted,context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state=GenStateExecuting;var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?GenStateCompleted:GenStateSuspendedYield,record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state=GenStateCompleted,context.method="throw",context.arg=record.arg)}}}(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}function defineIteratorMethods(prototype){["next","throw","return"].forEach(function(method){prototype[method]=function(arg){return this._invoke(method,arg)}})}function AsyncIterator(generator){var previousPromise;this._invoke=function(method,arg){function callInvokeWithMethodAndArg(){return new Promise(function(resolve,reject){!function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==typeof value&&hasOwn.call(value,"__await")?Promise.resolve(value.__await).then(function(value){invoke("next",value,resolve,reject)},function(err){invoke("throw",err,resolve,reject)}):Promise.resolve(value).then(function(unwrapped){result.value=unwrapped,resolve(result)},function(error){return invoke("throw",error,resolve,reject)})}reject(record.arg)}(method,arg,resolve,reject)})}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(method===undefined){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=undefined,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=undefined),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i<iterable.length;)if(hasOwn.call(iterable,i))return next.value=iterable[i],next.done=!1,next;return next.value=undefined,next.done=!0,next};return next.next=next}}return{next:doneResult}}function doneResult(){return{value:undefined,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())},{}],20:[function(require,module,exports){"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")),_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),_classPrivateFieldGet2=_interopRequireDefault(require("@babel/runtime/helpers/classPrivateFieldGet")),_classPrivateFieldSet2=_interopRequireDefault(require("@babel/runtime/helpers/classPrivateFieldSet")),_MsgForm=(_interopRequireDefault(require("./debug")),_interopRequireDefault(require("./MsgForm"))),Msg=function(){function Msg(dateContainer){var _this=this;(0,_classCallCheck2.default)(this,Msg),_firstWidth.set(this,{writable:!0,value:void 0}),_underlayer.set(this,{writable:!0,value:void 0}),_underlayerTop.set(this,{writable:!0,value:void 0}),_underlayerLeft.set(this,{writable:!0,value:void 0}),_underlayerWidth.set(this,{writable:!0,value:void 0}),_underlayerHeight.set(this,{writable:!0,value:void 0}),_linksUnderlayer.set(this,{writable:!0,value:void 0}),_linksUnderlayerTop.set(this,{writable:!0,value:void 0}),_linksUnderlayerLeft.set(this,{writable:!0,value:void 0}),_linksUnderlayer_text.set(this,{writable:!0,value:void 0}),_linksUnderlayer_gradient.set(this,{writable:!0,value:void 0}),_highlightedMsgsInViewportBelow.set(this,{writable:!0,value:void 0}),_$underlayersInViewportBelow.set(this,{writable:!0,value:void 0}),_cached$elements.set(this,{writable:!0,value:void 0}),_cachedMsgText.set(this,{writable:!0,value:void 0}),_cachedParent.set(this,{writable:!0,value:void 0}),_cachedSection.set(this,{writable:!0,value:void 0}),_cachedIsAuthorRegistered.set(this,{writable:!0,value:void 0});var author,date,year,month,day,hours,minutes,dateContainerText=dateContainer.textContent,dateMatches=/\b\d?\d:\d\d, \d\d? [\u0430-\u044f]+ \d\d\d\d \(UTC\)|\u042d\u0442\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 (?:\u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u043c|\u0441 IP) .+[ \xa0]\(\u043e(?: \xb7 \u0432)?\)|\(\u043e\u0431\u0441\.\)/.exec(dateContainerText);if(dateMatches){if(dateContainerText.includes("--\xa0DimaBot")||dateContainerText.includes("--DimaBot"))dateMatches=cd.env.getLastMatch(dateContainerText,/((\b\d?\d):(\d\d), (\d\d?) ([\u0430-\u044f]+) (\d\d\d\d) \(UTC\))|\u042d\u0442\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 (?:\u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u043c|\u0441 IP) (.+)[ \xa0]\(\u043e(?: \xb7 \u0432)?\)|\(\u043e\u0431\u0441\.\)/g);else{var dateContainerTextLine=dateContainerText.slice(dateMatches.index,dateMatches.index+1+(dateContainerText+"\n").slice(dateMatches.index).indexOf("\n"));dateMatches=cd.env.getLastMatch(dateContainerTextLine,/((\b\d?\d):(\d\d), (\d\d?) ([\u0430-\u044f]+) (\d\d\d\d) \(UTC\))|\u042d\u0442\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 (?:\u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u043c|\u0441 IP) (.+)[ \xa0]\(\u043e(?: \xb7 \u0432)?\)|\(\u043e\u0431\u0441\.\)/g)}if(!dateMatches)throw new cd.env.Exception;dateMatches[1]?(date=dateMatches[1],hours=Number(dateMatches[2]),minutes=Number(dateMatches[3]),day=Number(dateMatches[4]),month=cd.env.getMonthNumber(dateMatches[5]),year=Number(dateMatches[6])):(dateMatches[7]?author=dateMatches[7]:(author="",this.ignoreInComparison=!0),date=null)}if(void 0===date)throw new cd.env.Exception;for(var parts=[],dateOrAuthor=date||author,current=dateContainer,closestPartWithDate=current,steppedUpFromNotInline=!1,steppedUpFromNotInlineOnce=!1,steppedBack=!1,hasForeignDateLaterCounter=0,recursiveGetLastNotInlineChildren=function($el){for(var $temp=$el.children().last();$temp.length&&!cd.env.isInline($temp[0]);)$temp=($el=$temp).children().last();return $el},i=0;i<300;i++){var prev=current.previousElementSibling;if(prev)steppedUpFromNotInline=!(steppedBack=!0),current=prev;else if(steppedBack=!1,cd.env.isInline(current)||(steppedUpFromNotInlineOnce=steppedUpFromNotInline=!0),!(current=current.parentElement))break;if(current.className.includes("cd-msgPart"))break;if(!cd.env.isInline(current)){var currentText=current.textContent;if(currentText.includes("\u250c\u2500\u2500\u2500")||["H1","H2","H3","H4","H5","H6"].includes(current.tagName)||cd.env.NAMESPACE_NUMBER%2==1&¤t.className.includes("tmbox")||"HR"===current.tagName&¤t.previousElementSibling&¤t.previousElementSibling.classList.contains("cd-msgLevel")||current===cd.env.contentElement)break;if(currentText.includes("(UTC)")){var isBlockToExclude=!1;if("BLOCKQUOTE"===current.tagName&&(isBlockToExclude=!0),!isBlockToExclude&¤t.className&&cd.config.blocksToExcludeClasses.length)for(var j=0;j<current.classList.length;j++){for(var k=0;k<cd.config.blocksToExcludeClasses.length;k++)if(current.classList[j]===cd.config.blocksToExcludeClasses[k]){isBlockToExclude=!0;break}if(isBlockToExclude)break}if(!isBlockToExclude&&!currentText.includes("--\xa0DimaBot")&&!currentText.includes("--DimaBot"))if(current.querySelector(cd.env.AUTHOR_SELECTOR)||current.querySelector('a[href*="/wiki/User:"]')){if(currentText.includes("(\u043e\u0431\u0441.)\n\n"))break;if(steppedBack||!currentText.includes(dateOrAuthor)){if(/\(UTC\)\s*$/.test(currentText))break;if($(current).contents().filter(function(){return this.nodeType===Node.TEXT_NODE&&this.textContent.includes("(UTC)")}).length)break;if((currentText=(current=recursiveGetLastNotInlineChildren($(current))[0]).textContent).includes("(UTC)")||current.className.includes("outdent-template"))break}else if(currentText.indexOf("(UTC)")<currentText.indexOf(dateOrAuthor)){var foreignDateMatch=currentText.match(/\b\d?\d:\d\d, \d\d? [\u0430-\u044f]+ \d\d\d\d \(UTC\)/),foreignDate=foreignDateMatch&&foreignDateMatch[0];if(foreignDate&¤tText.includes("\n",currentText.indexOf(foreignDate)+foreignDate.length,currentText.indexOf(foreignDate)+1+currentText.slice(currentText.indexOf(foreignDate)).indexOf(dateOrAuthor)))break}else currentText.includes("(UTC)",currentText.lastIndexOf(dateOrAuthor)+dateOrAuthor.length)&&hasForeignDateLaterCounter++}}currentText.includes(dateOrAuthor)?steppedUpFromNotInline&&"DIV"!==current.tagName||steppedBack||!(hasForeignDateLaterCounter<=1)||(closestPartWithDate=current):parts.push(current)}}for(var partsToAddIfHasAnswers=[],cpwdChildNodes=closestPartWithDate.childNodes,metReply=!1,waitForNotInline=!1,_i=0;_i<cpwdChildNodes.length;_i++){var cpwdChildNode=cpwdChildNodes[_i],cpwdChildNodeText=cpwdChildNode.textContent;if(cpwdChildNode.nodeType===Node.TEXT_NODE||cd.env.isInline(cpwdChildNode))cpwdChildNodeText.includes(date)&&(waitForNotInline=!0),partsToAddIfHasAnswers.push(cpwdChildNode);else{if(!cd.env.isInline(cpwdChildNode)&&waitForNotInline){metReply=!0;break}if(metReply=cpwdChildNodeText.includes("(UTC)")&&!cpwdChildNodeText.includes(date))break;partsToAddIfHasAnswers.push(cpwdChildNode)}}var elements=metReply?partsToAddIfHasAnswers:[closestPartWithDate];if(1<elements.length||elements[0].nodeType===Node.TEXT_NODE){for(var wrapper=document.createElement("div"),parent=elements[0].parentElement,_i2=0;_i2<elements.length;_i2++)wrapper.appendChild(elements[_i2]);parent.insertBefore(wrapper,parent.firstChild),elements=[wrapper]}if(!author){var authorLinks=elements[elements.length-1].querySelectorAll(cd.env.AUTHOR_SELECTOR);if(authorLinks.length||(authorLinks=elements[elements.length-1].querySelectorAll('a[href*="/wiki/User:"]')),!authorLinks.length)throw new cd.env.Exception;var authorMatches=cd.env.CAPTURE_AUTHOR_REGEXP.exec(authorLinks[authorLinks.length-1].getAttribute("href"));if(!authorMatches)throw new cd.env.Exception;for(var _i3=1;_i3<authorMatches.length;_i3++)if(authorMatches[_i3]){author=decodeURIComponent(authorMatches[_i3]);break}if(!(author=author&&author.replace(/&action=edit.*/,"").replace(/_/g," "))&&"DimaBot"===author)throw new cd.env.Exception}for(var anchor=cd.env.generateMsgAnchor(year,month,day,hours,minutes,author),_i4=parts.length-1;0<=_i4;_i4--){var part=parts[_i4],class_=part.className;("STYLE"===part.tagName||"LINK"===part.tagName||class_.includes("cd-msg")||class_.includes("tleft")||class_.includes("tright")||class_.includes("float")||class_.includes("infobox")||"left"===part.style.float||"right"===part.style.float)&&parts.splice(_i4,1)}if(parts.length&&(elements=elements.concat(parts)),!elements.length)throw new cd.env.Exception;var sortElements=function(){elements.sort(function(a,b){return a.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_PRECEDING?1:-1})};sortElements();for(var _i5=elements.length-1;0<=_i5;_i5--){!1;for(var _j=0;_j<_i5;_j++)if(elements[_i5]===elements[_j]||elements[_j].compareDocumentPosition(elements[_i5])&Node.DOCUMENT_POSITION_CONTAINED_BY){elements.splice(_i5,1),!0;break}}var changed=!1;if(steppedUpFromNotInlineOnce)for(var _i6=elements.length-1;0<=_i6;_i6--)if(["UL","DL","OL"].includes(elements[_i6].tagName)){for(var children=Array.prototype.slice.call(elements[_i6].children);children&&children[0]&&children[0].children&&1===children[0].children.length&&cd.env.elementsToText($.makeArray(children[0].children))===cd.env.elementsToText($.makeArray(children[0].childNodes))&&["UL","DL","OL","LI","DD"].includes(children[0].children[0].tagName);)children=Array.prototype.slice.call(children[0].children);(elements=elements.concat(children)).splice(_i6,1),changed=!0}for(var _i7=elements.length-1;0<=_i7;_i7--)elements[_i7].className.includes("mw-empty-elt")&&elements.splice(_i7,1);if(changed&&sortElements(),cd.env.EVERYTHING_MUST_BE_FROZEN)this.frozen=!0;else if(cd.env.closedDiscussions.length)for(var _i8=0;_i8<cd.env.closedDiscussions.length;_i8++)if(cd.env.closedDiscussions[_i8].contains(elements[0])){this.frozen=!0;break}void 0===this.frozen&&(this.frozen=!1),this.id=cd.env.currentMsgId,this.author=author,anchor&&(this.anchor=anchor),this.date=date,this.timestamp=Date.UTC(year,month,day,hours,minutes),this.elements=elements,anchor&&!elements[0].id&&(elements[0].id=anchor);for(var _i9=0;_i9<elements.length;_i9++){var element=elements[_i9];1===elements.length?element.className+=" cd-msgPart cd-msgPart-first cd-msgPart-last":0===_i9?element.className+=" cd-msgPart cd-msgPart-first":_i9===elements.length-1?element.className+=" cd-msgPart cd-msgPart-last":element.className+=" cd-msgPart",element.setAttribute("data-id",cd.env.currentMsgId),element.className.includes("ruwiki-movedTemplate")||(element.onmouseenter=this.highlightFocused.bind(this),element.onmouseleave=this.unhighlightFocused.bind(this),element.ontouchstart=this.highlightFocused.bind(this))}var msgBottomLevel,setMsgLevels=function(initialElement,isTop){for(var msgsToTopLevel=[],topLevel=0,currentElement=initialElement;currentElement&¤tElement!==cd.env.contentElement;currentElement=currentElement.parentElement)if("UL"===currentElement.tagName||"DL"===currentElement.tagName||"OL"===currentElement.tagName&&isTop){if(currentElement.classList.contains("cd-msgLevel")||0===msgBottomLevel){var topLevelMatches=currentElement.className.match(/cd-msgLevel-(\d+)/);topLevelMatches&&(topLevel=Number(topLevelMatches[1]));break}currentElement.className+=" cd-msgLevel",msgsToTopLevel.unshift(currentElement)}if(msgsToTopLevel.length){for(var currentLevel=topLevel,_i10=0;_i10<msgsToTopLevel.length;_i10++)currentLevel++,msgsToTopLevel[_i10].className+=" cd-msgLevel-"+currentLevel;isTop?_this.level=currentLevel:msgBottomLevel=currentLevel}else isTop?_this.level=topLevel:msgBottomLevel=topLevel};1<elements.length&&setMsgLevels(elements[elements.length-1],!1),setMsgLevels(elements[0],!0)}return(0,_createClass2.default)(Msg,[{key:"getPositions",value:function(){var considerFloating=0<arguments.length&&void 0!==arguments[0]&&arguments[0],rectTop=1<arguments.length?arguments[1]:void 0,rectBottom=2<arguments.length?arguments[2]:void 0;rectTop=rectTop||getFirstElementRect.call(this),rectBottom=rectBottom||(1===this.elements.length?rectTop:this.elements[this.elements.length-1].getBoundingClientRect());var msgLeft,msgRight,viewportTop=window.pageYOffset,viewportHeight=window.innerHeight,msgTop=viewportTop+rectTop.top,msgBottom=viewportTop+rectBottom.bottom;if(considerFloating){for(var intersectsFloating=!1,i=0;i<cd.env.floatingElements.length;i++){var rect=cd.env.floatingRects[i]||cd.env.floatingElements[i].getBoundingClientRect(),floatingTop=viewportTop+rect.top,floatingBottom=viewportTop+rect.bottom;if(floatingTop<msgTop&&msgTop<floatingBottom&&msgBottom<=floatingBottom+35||floatingTop<msgBottom&&msgBottom<floatingBottom){intersectsFloating=!0;break}}var defaultOverflows=[];if(intersectsFloating)for(var _i11=0;_i11<this.elements.length;_i11++)defaultOverflows.push(this.elements[_i11].style.overflow),this.elements[_i11].style.overflow="hidden";for(var rects=[],_i12=0;_i12<this.elements.length;_i12++)rects[_i12]=this.elements[_i12].getBoundingClientRect();for(var _i13=0;_i13<rects.length;_i13++){var elementLeft=window.pageXOffset+rects[_i13].left;(!msgLeft||elementLeft<msgLeft)&&(msgLeft=elementLeft)}for(var _i14=0;_i14<rects.length;_i14++){var elementRight=msgLeft+this.elements[_i14].offsetWidth;(!msgRight||msgRight<elementRight)&&(msgRight=elementRight)}if(intersectsFloating)for(var _i15=0;_i15<this.elements.length;_i15++)this.elements[_i15].style.overflow=defaultOverflows[_i15]}else msgLeft=window.pageXOffset+Math.min(rectTop.left,rectBottom.left),msgRight=window.pageXOffset+Math.min(rectTop.right,rectBottom.right);var downplayedBottom=viewportHeight-200<msgBottom-msgTop?msgTop+(viewportHeight-200):msgBottom;return this.positions={top:msgTop,bottom:msgBottom,left:msgLeft,right:msgRight,downplayedBottom:downplayedBottom},this.positions}},{key:"calculateUnderlayerPositions",value:function(firstElementRect,lastElementRect){return this.getPositions(!0,firstElementRect,lastElementRect),(0,_classPrivateFieldSet2.default)(this,_firstWidth,this.elements[0].offsetWidth),{underlayerTop:cd.env.underlayersYCorrection+this.positions.top,underlayerLeft:cd.env.underlayersXCorrection+this.positions.left-cd.env.UNDERLAYER_SIDE_MARGIN,underlayerWidth:this.positions.right-this.positions.left+2*cd.env.UNDERLAYER_SIDE_MARGIN,underlayerHeight:this.positions.bottom-this.positions.top,linksUnderlayerTop:this.positions.top,linksUnderlayerLeft:this.positions.left-cd.env.UNDERLAYER_SIDE_MARGIN}}},{key:"configureUnderlayer",value:function(){var _this2=this,doSet=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],returnWhat=1<arguments.length?arguments[1]:void 0,elements=this.elements,rectTop=getFirstElementRect.call(this),rectBottom=1===elements.length?rectTop:elements[elements.length-1].getBoundingClientRect(),underlayerMisplaced=(0,_classPrivateFieldGet2.default)(this,_underlayer)&&(rectTop.top+window.pageYOffset+cd.env.underlayersYCorrection!==(0,_classPrivateFieldGet2.default)(this,_underlayerTop)||rectBottom.bottom-rectTop.top!==(0,_classPrivateFieldGet2.default)(this,_underlayerHeight)||elements[0].offsetWidth!==(0,_classPrivateFieldGet2.default)(this,_firstWidth));if((0,_classPrivateFieldGet2.default)(this,_underlayer))if(underlayerMisplaced){cd.debug.startTimer("underlayer misplaced");var _positions=this.calculateUnderlayerPositions(rectTop,rectBottom);if((0,_classPrivateFieldSet2.default)(this,_underlayerTop,_positions.underlayerTop),(0,_classPrivateFieldSet2.default)(this,_underlayerLeft,_positions.underlayerLeft),(0,_classPrivateFieldSet2.default)(this,_underlayerWidth,_positions.underlayerWidth),(0,_classPrivateFieldSet2.default)(this,_underlayerHeight,_positions.underlayerHeight),(0,_classPrivateFieldSet2.default)(this,_linksUnderlayerTop,_positions.linksUnderlayerTop),(0,_classPrivateFieldSet2.default)(this,_linksUnderlayerLeft,_positions.linksUnderlayerLeft),doSet&&((0,_classPrivateFieldGet2.default)(this,_underlayer).style.top=(0,_classPrivateFieldGet2.default)(this,_underlayerTop)+"px",(0,_classPrivateFieldGet2.default)(this,_underlayer).style.left=(0,_classPrivateFieldGet2.default)(this,_underlayerLeft)+"px",(0,_classPrivateFieldGet2.default)(this,_underlayer).style.width=(0,_classPrivateFieldGet2.default)(this,_underlayerWidth)+"px",(0,_classPrivateFieldGet2.default)(this,_underlayer).style.height=(0,_classPrivateFieldGet2.default)(this,_underlayerHeight)+"px",(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).style.top=(0,_classPrivateFieldGet2.default)(this,_linksUnderlayerTop)+"px",(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).style.left=(0,_classPrivateFieldGet2.default)(this,_linksUnderlayerLeft)+"px",(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).style.width=(0,_classPrivateFieldGet2.default)(this,_underlayerWidth)+"px",(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).style.height=(0,_classPrivateFieldGet2.default)(this,_underlayerHeight)+"px"),cd.debug.resetTimer("underlayer misplaced"),"underlayers"===returnWhat)return{underlayer:(0,_classPrivateFieldGet2.default)(this,_underlayer),linksUnderlayer:(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer)};if("isMisplaced"===returnWhat)return!0}else{if("underlayers"===returnWhat)return{underlayer:(0,_classPrivateFieldGet2.default)(this,_underlayer),linksUnderlayer:(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer)};if("isMisplaced"===returnWhat)return!1}else{var positions=this.calculateUnderlayerPositions(rectTop,rectBottom);(0,_classPrivateFieldSet2.default)(this,_underlayerTop,positions.underlayerTop),(0,_classPrivateFieldSet2.default)(this,_underlayerLeft,positions.underlayerLeft),(0,_classPrivateFieldSet2.default)(this,_underlayerWidth,positions.underlayerWidth),(0,_classPrivateFieldSet2.default)(this,_underlayerHeight,positions.underlayerHeight),(0,_classPrivateFieldSet2.default)(this,_linksUnderlayerTop,positions.linksUnderlayerTop),(0,_classPrivateFieldSet2.default)(this,_linksUnderlayerLeft,positions.linksUnderlayerLeft),(0,_classPrivateFieldSet2.default)(this,_underlayer,cd.env.UNDERLAYER_PROTOTYPE.cloneNode(!0)),"newest"===this.newness?(0,_classPrivateFieldGet2.default)(this,_underlayer).className+=" cd-underlayer-newest":"new"===this.newness&&((0,_classPrivateFieldGet2.default)(this,_underlayer).className+=" cd-underlayer-new"),(0,_classPrivateFieldGet2.default)(this,_underlayer).style.top=(0,_classPrivateFieldGet2.default)(this,_underlayerTop)+"px",(0,_classPrivateFieldGet2.default)(this,_underlayer).style.left=(0,_classPrivateFieldGet2.default)(this,_underlayerLeft)+"px",(0,_classPrivateFieldGet2.default)(this,_underlayer).style.width=(0,_classPrivateFieldGet2.default)(this,_underlayerWidth)+"px",(0,_classPrivateFieldGet2.default)(this,_underlayer).style.height=(0,_classPrivateFieldGet2.default)(this,_underlayerHeight)+"px",(0,_classPrivateFieldGet2.default)(this,_underlayer).cdTarget=this,cd.env.underlayers.push((0,_classPrivateFieldGet2.default)(this,_underlayer)),(0,_classPrivateFieldSet2.default)(this,_linksUnderlayer,cd.env.LINKS_UNDERLAYER_PROTOTYPE.cloneNode(!0)),(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).style.top=(0,_classPrivateFieldGet2.default)(this,_linksUnderlayerTop)+"px",(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).style.left=(0,_classPrivateFieldGet2.default)(this,_linksUnderlayerLeft)+"px",(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).style.width=(0,_classPrivateFieldGet2.default)(this,_underlayerWidth)+"px",(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).style.height=(0,_classPrivateFieldGet2.default)(this,_underlayerHeight)+"px";var linksUnderlayer_wrapper=(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).firstChild;if((0,_classPrivateFieldSet2.default)(this,_linksUnderlayer_gradient,linksUnderlayer_wrapper.firstChild),(0,_classPrivateFieldSet2.default)(this,_linksUnderlayer_text,linksUnderlayer_wrapper.lastChild),this.parent){var upButton=cd.env.MSG_UP_BUTTON_PROTOTYPE.cloneNode(!0);upButton.firstChild.href=this.parent.anchor?"#"+this.parent.anchor:"javascript:",upButton.onclick=this.scrollToParent.bind(this),(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer_text).appendChild(upButton)}if(this.anchor){var linkButton=cd.env.MSG_LINK_BUTTON_PROTOTYPE.cloneNode(!0);(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer_text).appendChild(linkButton);var linkButtonLink=linkButton.firstChild;linkButtonLink.href=mw.util.getUrl(cd.env.CURRENT_PAGE)+"#"+this.anchor,linkButtonLink.onclick=this.copyLink.bind(this)}if(!this.frozen&&this.author){if(this.author===cd.env.CURRENT_USER||cd.settings.allowEditOthersMsgs){var editButton=cd.env.MSG_EDIT_BUTTON_PROTOTYPE.cloneNode(!0);editButton.firstChild.onclick=function(){(0,_classPrivateFieldGet2.default)(_this2,_underlayer).classList.remove("cd-underlayer-focused"),(0,_classPrivateFieldGet2.default)(_this2,_linksUnderlayer).classList.remove("cd-linksUnderlayer-focused"),_this2.edit()},(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer_text).appendChild(editButton)}var replyButton=cd.env.MSG_REPLY_BUTTON_PROTOTYPE.cloneNode(!0);replyButton.firstChild.onclick=this.reply.bind(this),(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer_text).appendChild(replyButton)}else for(var currentElement=elements[elements.length-1];currentElement&¤tElement!==cd.env.contentElement;){var bgcolor=(currentElement=currentElement.parentElement).style.backgroundColor;if(bgcolor.includes("rgb(")){this.bgcolor=bgcolor;break}}if(doSet&&(cd.env.underlayersContainer.appendChild((0,_classPrivateFieldGet2.default)(this,_underlayer)),cd.env.linksUnderlayersContainer.appendChild((0,_classPrivateFieldGet2.default)(this,_linksUnderlayer)),"monobook"===cd.env.CURRENT_SKIN&&((0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).onmouseenter=this.highlightFocused.bind(this),(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).onmouseleave=this.unhighlightFocused.bind(this),(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).ontouchstart=this.highlightFocused.bind(this))),this.$underlayer=$((0,_classPrivateFieldGet2.default)(this,_underlayer)),this.$linksUnderlayer=$((0,_classPrivateFieldGet2.default)(this,_linksUnderlayer)),this.$linksUnderlayer_text=$((0,_classPrivateFieldGet2.default)(this,_linksUnderlayer_text)),this.$linksUnderlayer_gradient=$((0,_classPrivateFieldGet2.default)(this,_linksUnderlayer_gradient)),"underlayers"===returnWhat)return{underlayer:(0,_classPrivateFieldGet2.default)(this,_underlayer),linksUnderlayer:(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer)};if("isMisplaced"===returnWhat)return!1}}},{key:"updateUnderlayerPositions",value:function(){(0,_classPrivateFieldGet2.default)(this,_underlayer).style.top=(0,_classPrivateFieldGet2.default)(this,_underlayerTop)+"px",(0,_classPrivateFieldGet2.default)(this,_underlayer).style.left=(0,_classPrivateFieldGet2.default)(this,_underlayerLeft)+"px",(0,_classPrivateFieldGet2.default)(this,_underlayer).style.width=(0,_classPrivateFieldGet2.default)(this,_underlayerWidth)+"px",(0,_classPrivateFieldGet2.default)(this,_underlayer).style.height=(0,_classPrivateFieldGet2.default)(this,_underlayerHeight)+"px",(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).style.top=(0,_classPrivateFieldGet2.default)(this,_linksUnderlayerTop)+"px",(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).style.left=(0,_classPrivateFieldGet2.default)(this,_linksUnderlayerLeft)+"px",(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).style.width=(0,_classPrivateFieldGet2.default)(this,_underlayerWidth)+"px",(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).style.height=(0,_classPrivateFieldGet2.default)(this,_underlayerHeight)+"px"}},{key:"highlightFocused",value:function(){if(!cd.env.recalculateUnderlayersTimeout&&(!!!this.configureUnderlayer(!0,"isMisplaced")&&((0,_classPrivateFieldGet2.default)(this,_underlayer).classList.add("cd-underlayer-focused"),(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).classList.add("cd-linksUnderlayer-focused"),this.bgcolor))){(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer_text).style.backgroundColor=this.bgcolor;var transparentColor=cd.env.getTransparentColor(this.bgcolor);(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer_gradient).style.backgroundImage="linear-gradient(to left, ".concat(this.bgcolor,", ").concat(transparentColor,")")}}},{key:"unhighlightFocused",value:function(){(0,_classPrivateFieldGet2.default)(this,_underlayer)&&(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer)&&((0,_classPrivateFieldGet2.default)(this,_underlayer).classList.remove("cd-underlayer-focused"),(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).classList.remove("cd-linksUnderlayer-focused"),this.bgcolor&&((0,_classPrivateFieldGet2.default)(this,_linksUnderlayer_text).style.backgroundColor=null,(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer_gradient).style.backgroundImage=null))}},{key:"highlightTarget",value:function(){this.configureUnderlayer();var $elementsToAnimate=this.$underlayer.add(this.$linksUnderlayer_text).add(this.$linksUnderlayer_gradient),initialBgcolor=window.getComputedStyle(this.$underlayer[0]).backgroundColor;$elementsToAnimate.css("background-image","none").css("background-color",cd.env.UNDERLAYER_TARGET_BGCOLOR).delay(1e3).animate({backgroundColor:initialBgcolor},400,"swing",function(){$(this).css("background-image","").css("background-color","")})}},{key:"scrollToAndHighlightTarget",value:function(){var smooth=0<arguments.length&&void 0!==arguments[0]&&arguments[0];this.highlightTarget(),this.isOpeningSection?this.section.$heading.cdScrollTo("top",null,smooth):this.$elements.cdScrollTo("middle",null,smooth)}},{key:"scrollToParent",value:function(e){if(e&&e.preventDefault(),this.parent){(this.parent.isOpeningSection?this.parent.section.$heading:this.parent.$elements).cdScrollTo("top"),this.parent.highlightTarget();var downButton=new OO.ui.ButtonWidget({label:"\u25bc",title:"\u0412\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u043c\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e",framed:!1,href:this.anchor?"#"+this.anchor:"javascript:",classes:["cd-button","cd-msgButton"]});downButton.on("click",this.parent.scrollToChild.bind(this.parent)),this.parent.$underlayer&&this.parent.$underlayer.length||this.parent.configureUnderlayer(),this.parent.downButton&&this.parent.downButton.$element.remove(),this.parent.$linksUnderlayer_text.prepend(downButton.$element),this.parent.downButton=downButton,this.parent.childToScrollBack=this}else console.error("\u0423 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0435\u0442 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e.")}},{key:"scrollToChild",value:function(e){e&&e.preventDefault(),this.childToScrollBack?(this.childToScrollBack.$elements.cdScrollTo("top"),this.childToScrollBack.highlightTarget()):console.error("\u0423 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0435\u0442 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0448\u043b\u0438 \u0440\u0430\u043d\u0435\u0435.")}},{key:"copyLink",value:function(e){var url,wikilink="[[".concat(cd.env.CURRENT_PAGE,"#").concat(this.anchor,"]]");try{url="https:"+mw.config.get("wgServer")+decodeURI(mw.util.getUrl(cd.env.CURRENT_PAGE))+"#"+this.anchor}catch(e){return void console.error(e.stack)}if(e.ctrlKey){e.preventDefault();var messageDialog=new OO.ui.MessageDialog;$("body").append(cd.env.windowManager.$element),cd.env.windowManager.addWindows([messageDialog]);var textInputWikilink=new OO.ui.TextInputWidget({value:wikilink}),textFieldWikilink=new OO.ui.FieldLayout(textInputWikilink,{align:"top",label:"\u0412\u0438\u043a\u0438-\u0441\u0441\u044b\u043b\u043a\u0430"}),textInputAnchorWikilink=new OO.ui.TextInputWidget({value:"[[#".concat(this.anchor,"]]")}),textFieldAnchorWikilink=new OO.ui.FieldLayout(textInputAnchorWikilink,{align:"top",label:"\u0412\u0438\u043a\u0438-\u0441\u0441\u044b\u043b\u043a\u0430 \u0441 \u044d\u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b"}),textInputUrl=new OO.ui.TextInputWidget({value:url}),textFieldUrl=new OO.ui.FieldLayout(textInputUrl,{align:"top",label:"\u041e\u0431\u044b\u0447\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430"}),textInputDiscord=new OO.ui.TextInputWidget({value:"<".concat(url,">")}),textFieldDiscord=new OO.ui.FieldLayout(textInputDiscord,{align:"top",label:"\u0421\u0441\u044b\u043b\u043a\u0430 \u0434\u043b\u044f Discord"}),copyLinkWindow=cd.env.windowManager.openWindow(messageDialog,{message:textFieldWikilink.$element.add(textFieldAnchorWikilink.$element).add(textFieldUrl.$element).add(textFieldDiscord.$element),actions:[{label:"\u0417\u0430\u043a\u0440\u044b\u0442\u044c",action:"close"}],size:"large"}),closeOnCtrlC=function(e){e.ctrlKey&&67===e.keyCode&&setTimeout(function(){messageDialog.close()},100)};copyLinkWindow.opened.then(function(){("wikilink"===cd.settings.defaultCopyLinkType?textInputUrl:textInputWikilink).focus().select(),$(document).keydown(closeOnCtrlC)}),copyLinkWindow.closed.then(function(){$(document).off("keydown",closeOnCtrlC)})}else{var link,subject;switch(cd.settings.defaultCopyLinkType){default:case"wikilink":link=wikilink,subject="\u0412\u0438\u043a\u0438-\u0441\u0441\u044b\u043b\u043a\u0430";break;case"link":link=url,subject="\u0421\u0441\u044b\u043b\u043a\u0430";break;case"discord":link="<".concat(url,">"),subject="Discord-\u0441\u0441\u044b\u043b\u043a\u0430"}var $textarea=$("<textarea>").val(link).appendTo($("body")).select(),successful=document.execCommand("copy");$textarea.remove(),successful&&(e.preventDefault(),mw.notify(subject+" \u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430."))}}},{key:"locateInCode",value:function(pageCode){var _this3=this;if(null!=pageCode){var authorAndDateRegExp=cd.env.generateAuthorAndDateRegExp(this.author,this.date),authorAndDateMatches=authorAndDateRegExp.exec(pageCode);if(authorAndDateMatches){for(var msgCode,msgStartPos,msgEndPos,headingMatch,headingCode,headingStartPos,headingLevel,bestMatchData={},prevMsgs=[],i=1;prevMsgs.length<2&&0<=this.id-i;i++)cd.msgs[this.id-i].ignoreInComparison||prevMsgs.push(cd.msgs[this.id-i]);var correctMsgBeginning=function(){(headingMatch=msgCode.match(/(^[^]*(?:^|\n))(=+)(.*?)\2[ \t]*(?:<!--[^]*?-->[ \t]*)*\n/))&&(msgCode=(_this3.isOpeningSection?(headingStartPos=msgStartPos+headingMatch[1].length,headingLevel=headingMatch[2].length,headingCode=headingMatch[3].trim()):console.warn("\u041d\u0430\u0439\u0434\u0435\u043d \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e \u043a\u0430\u043a \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u0440\u0430\u0437\u0434\u0435\u043b."),msgStartPos+=headingMatch[0].length,msgCode.slice(headingMatch[0].length))),!headingMatch&&_this3.isOpeningSection&&console.error("\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e \u043a\u0430\u043a \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u0440\u0430\u0437\u0434\u0435\u043b."),[/^<!--[^]*?--> *\n*/,/^(?:----+|<hr>) *\n*/,/^\[\[(?:File:|\u0424\u0430\u0439\u043b:).*\n*(?=[*:#])/,/^\{\|.*?\|\}\n*(?=[*:#])/].forEach(function(pattern){var match=msgCode.match(pattern);match&&(msgStartPos+=match[0].length,msgCode=msgCode.slice(match[0].length))})};do{msgStartPos=0,msgEndPos=authorAndDateMatches.index;var adjustedMsgCode=(msgCode=pageCode.slice(0,msgEndPos)).replace(/(<blockquote>|\{\{\u043d\u0430\u0447\u0430\u043b\u043e \u0446\u0438\u0442\u0430\u0442\u044b)([^]*?)(<\/blockquote>|\{\{\u043a\u043e\u043d\u0435\u0446 \u0446\u0438\u0442\u0430\u0442\u044b)/gi,function(s,m1,m2,m3){return m1+" ".repeat(m2.length)+m3}),prevMsgInCodeMatch=cd.env.findPrevMsg(adjustedMsgCode),authorInCode=void 0,dateInCode=void 0;if(prevMsgInCodeMatch){msgStartPos=prevMsgInCodeMatch[0].length,msgCode=msgCode.slice(msgStartPos);var _cd$env$collectAuthor=cd.env.collectAuthorAndDate(prevMsgInCodeMatch),_cd$env$collectAuthor2=(0,_slicedToArray2.default)(_cd$env$collectAuthor,2);authorInCode=_cd$env$collectAuthor2[0],dateInCode=_cd$env$collectAuthor2[1]}var prevMsgMatched=!1;prevMsgs[0]?prevMsgs[0].date===dateInCode&&prevMsgs[0].author===authorInCode&&(prevMsgMatched=!0):void 0===dateInCode&&void 0===authorInCode&&(prevMsgMatched=!0),correctMsgBeginning();var headingMatched=!1;this.isOpeningSection?headingMatch&&this.section&&this.section.heading&&cd.env.encodeWikiMarkup(cd.env.cleanSectionHeading(headingCode))===cd.env.encodeWikiMarkup(this.section.heading)&&(headingMatched=!0):headingMatch||(headingMatched=!0);var msgCodeToCompare=msgCode.replace(/<!--[^]*?-->/g,"").replace(/\[\[:?(?:[^|\]]+\|)?(.+?)\]\]/g,"$1").replace(/\[https?:\/\/[^\]\[\n\r<>" ]+/,"").replace(/<\w+( [\w ]+?=[^<>]+?| ?\/?)>/g," ").replace(/<\/\w+ ?>/g," "),overlap=cd.env.calculateWordsOverlap(this.text,msgCodeToCompare);.67<overlap&&(!bestMatchData.overlap||overlap>bestMatchData.overlap||!bestMatchData.headingMatched&&headingMatched||bestMatchData.headingMatched===headingMatched&&!bestMatchData.prevMsgMatched&&prevMsgMatched)&&(bestMatchData={overlap:overlap,msgStartPos:msgStartPos,msgEndPos:msgEndPos,sigLastPart:authorAndDateMatches[0],prevMsgMatched:prevMsgMatched,headingMatched:headingMatched},headingMatch&&(bestMatchData.headingStartPos=headingStartPos,bestMatchData.headingLevel=headingLevel,bestMatchData.headingCode=headingCode))}while(authorAndDateMatches=authorAndDateRegExp.exec(pageCode));if(void 0===bestMatchData.msgStartPos){for(var fail;authorAndDateMatches=authorAndDateRegExp.exec(pageCode);){msgStartPos=0,msgEndPos=authorAndDateMatches.index;var pageCodeToMsgEnd=msgCode=pageCode.slice(0,msgEndPos);fail=!0;var _i16=void 0;for(_i16=0;_i16<prevMsgs.length;_i16++){var _prevMsgInCodeMatch=cd.env.findPrevMsg(pageCodeToMsgEnd);if(!_prevMsgInCodeMatch)break;var nextEndPos=_prevMsgInCodeMatch[0].length-_prevMsgInCodeMatch[1].length;0===_i16&&(msgStartPos=_prevMsgInCodeMatch[0].length,msgCode=pageCodeToMsgEnd.slice(msgStartPos)),pageCodeToMsgEnd=pageCodeToMsgEnd.slice(0,nextEndPos);var _cd$env$collectAuthor3=cd.env.collectAuthorAndDate(_prevMsgInCodeMatch),_cd$env$collectAuthor4=(0,_slicedToArray2.default)(_cd$env$collectAuthor3,2),_authorInCode=_cd$env$collectAuthor4[0];if(_cd$env$collectAuthor4[1]!==prevMsgs[_i16].date||_authorInCode!==prevMsgs[_i16].author){fail=!0;break}fail=!1}if(!fail){correctMsgBeginning(),bestMatchData={prevAuthorsAndDatesMatchCount:_i16,msgStartPos:msgStartPos,msgEndPos:msgEndPos,sigLastPart:authorAndDateMatches[0]},headingMatch&&(bestMatchData.headingStartPos=headingStartPos,bestMatchData.headingLevel=headingLevel,bestMatchData.headingCode=headingCode);break}}if(fail)return}msgCode=pageCode.slice(bestMatchData.msgStartPos,bestMatchData.msgEndPos);var msgCodeLengthReduction=0,lineStartPos=bestMatchData.msgStartPos,movePartToSig=function(s){return msgCodeLengthReduction+=s.length,bestMatchData.sigLastPart=s+bestMatchData.sigLastPart,""};this.author===cd.env.CURRENT_USER&&cd.env.CURRENT_USER_SIG_PREFIX_REGEXP&&(msgCode=msgCode.replace(cd.env.CURRENT_USER_SIG_PREFIX_REGEXP,movePartToSig)),msgCode=msgCode.replace(/ $/,movePartToSig).replace(cd.config.sigPrefixRegexp,movePartToSig).replace(/<(?:small|span|sup|sub)(?: [\w ]+?=[^<>]+?)?>$/i,movePartToSig).replace(cd.config.sigPrefixRegexp,movePartToSig),bestMatchData.msgEndPos-=msgCodeLengthReduction;var indentationCharacters="";msgCode=msgCode.replace(/^\n*(?:\{\{(?:-vote|[\u0437\u0417]\u0430\u0447\u0451\u0440\u043a\u043d\u0443\u0442\u044b\u0439 \u0433\u043e\u043b\u043e\u0441|-\u0433\u043e\u043b\u043e\u0441)\|)?([:*#]*) */,function(s,m1){return s.trim()?(indentationCharacters=m1,bestMatchData.msgStartPos+=s.length,""):s});var inSmallTag=!1;/^(?:\{\{block-small\|1=)/.test(msgCode)&&/\}\}[ \xa0\t]*$/.test(bestMatchData.sigLastPart)&&(inSmallTag=!0,msgCode=msgCode.replace(/^(?:\{\{block-small\|1=)/,""),bestMatchData.newSigLastPart=bestMatchData.sigLastPart.replace(/\}\}[ \xa0\t]*$/,"")),/^(?:<small>|)/.test(msgCode)&&/<\/small>[ \xa0\t]*$/.test(bestMatchData.sigLastPart)&&(inSmallTag=!0,msgCode=msgCode.replace(/^<small>/,""),bestMatchData.newSigLastPart=bestMatchData.sigLastPart.replace(/<\/small>[ \xa0\t]*$/,""));var replyIndentationCharacters=indentationCharacters;if(!this.isOpeningSection){var lastIndentationCharactersMatch=msgCode.match(/\n([:*#]*[:*]).*$/);if(lastIndentationCharactersMatch&&(replyIndentationCharacters=lastIndentationCharactersMatch[1],lastIndentationCharactersMatch[1].length<=indentationCharacters.length)){var replyMustUseAsterisk=/\*$/.test(indentationCharacters);indentationCharacters=lastIndentationCharactersMatch[1],replyMustUseAsterisk&&(indentationCharacters=indentationCharacters.replace(/:$/,"*"))}}return replyIndentationCharacters+="*",this.inCode={lineStartPos:lineStartPos,startPos:bestMatchData.msgStartPos,endPos:bestMatchData.msgEndPos,code:msgCode,inSmallTag:inSmallTag,indentationCharacters:indentationCharacters,replyIndentationCharacters:replyIndentationCharacters,oldSig:bestMatchData.sigLastPart,sig:bestMatchData.newSigLastPart||bestMatchData.sigLastPart},void 0!==bestMatchData.headingStartPos&&(this.inCode.headingStartPos=bestMatchData.headingStartPos,this.inCode.headingLevel=bestMatchData.headingLevel,this.inCode.headingCode=bestMatchData.headingCode),this.inCode}}else console.error("\u0412 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 Msg.loadCode \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434\u0435 (\u043e\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 Msg.inCode).")}},{key:"reply",value:function(){!this.replyForm||this.replyForm.submitted?(this.replyForm=new _MsgForm.default("reply",this),this.replyForm.show(cd.settings.slideEffects?"slideDown":"fadeIn"),this.replyForm.textarea.focus()):this.replyForm.cancel()}},{key:"edit",value:function(){var formExists=this.editForm&&!this.editForm.submitted;formExists||(this.editForm=new _MsgForm.default("edit",this)),this.isEdited=!0,this.$elements.hide(),this.isOpeningSection&&this.section.$heading.hide(),this.removeUnderlayer(),this.editForm.show("fadeIn"),formExists&&this.editForm.textarea.focus()}},{key:"codeToText",value:function(){if(this.inCode){var _this$inCode=this.inCode,code=_this$inCode.code,indentationCharacters=_this$inCode.indentationCharacters;if(void 0!==code&&void 0!==indentationCharacters){var text=code.trim(),hidden=[],hide=function(re){text=text.replace(re,function(s){return"\x01".concat(hidden.push(s),"\x02")})};for(hide(/\{\{([^{]\{?)+?\}\}/g),hide(/^\{\|[^]*?\n\|\}/gm),function(){for(var i=0;i<arguments.length;i++)hide(new RegExp("<".concat(arguments[i],"( [^>]+)?>[\\s\\S]+?<\\/").concat(arguments[i],">"),"gi"))}("nowiki","pre","source","syntaxhighlight"),text=text.replace(/^(?![:\*#]).*<br[ \n]?\/?>\n?/gim,function(s){return s.replace(/<br[ \n]?\/?>\n?/gim,"\n")}).replace(/^([:\*#]*[:\*])([ \t]*)/gm,function(s,m1,m2){return m1.length>=indentationCharacters.length?m1.slice(indentationCharacters.length)+(m1.length>indentationCharacters.length?m2:""):m1+m2}),0===this.level&&(text=text.replace(/^(.*[A-Za-z0-9\u0410-\u042f\u0430-\u044f\u0401\u0451,\.;\?!:\xbb"\)] *)\n(?=[A-Za-z0-9\u0410-\u042f\u0430-\u044f\u0401\u0451])/gm,function(s,m1){return m1+(/^[:\*# ]/.test(m1)||/(?:\x02|<\w+(?: [\w ]+?=[^<>]+?| ?\/?)>|<\/\w+ ?>)$/.test(m1)?"\n":" ")}));text.match(/\x01\d+\x02/);)text=text.replace(/\x01(\d+)\x02/g,function(s,num){return hidden[num-1]});return text=text.replace(/\{\{(?:pb|\u0430\u0431\u0437\u0430\u0446)\}\}/g,"\n\n")}console.error("\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e code \u0438\u043b\u0438 indentationCharacters.")}else console.error("\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.")}},{key:"loadCode",value:function(){var _this4=this;return cd.env.loadPageCode(cd.env.CURRENT_PAGE).then(function(result){return _this4.locateInCode(result.code)?$.Deferred().resolve(_this4.codeToText(),_this4.inCode.headingCode).promise():$.Deferred().reject(["parse",cd.strings.couldntLocateMsgInCode]).promise()},function(e){return $.Deferred().reject(e).promise()})}},{key:"registerSeen",value:function(registerAllInDirection){var highlight=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if("newest"!==this.newness||this.seen||(this.seen=!0,cd.env.newestCount--,highlight&&this.highlightTarget()),registerAllInDirection&&cd.env.newestCount){var nextMsg=cd.msgs[this.id+("forward"===registerAllInDirection?1:-1)];nextMsg&&nextMsg.isInViewport(!0)&&nextMsg.registerSeen(registerAllInDirection,highlight)}}},{key:"isInViewport",value:function(){var updatePositions=0<arguments.length&&void 0!==arguments[0]&&arguments[0],partly=1<arguments.length&&void 0!==arguments[1]&&arguments[1],viewportTop=window.pageYOffset,viewportBottom=viewportTop+window.innerHeight;return!updatePositions&&this.positions||this.getPositions(),partly?this.positions.downplayedBottom>viewportTop&&this.positions.top<viewportBottom:this.positions.top>viewportTop&&this.positions.downplayedBottom<viewportBottom}},{key:"findHighlightedMsgsInViewportBelow",value:function(){for(var currentMsg,msgsBelowViewportCount=0<arguments.length&&void 0!==arguments[0]?arguments[0]:5,highlightedMsgsInViewportBelow=[],thisMsgsBelowViewportCount=0,i=this.id+1;i<cd.msgs.length;i++)if((currentMsg=cd.msgs[i])||console.error("\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 ID "+foundMsgId),currentMsg.isInViewport(!0,!0))currentMsg.newness&&highlightedMsgsInViewportBelow.push(currentMsg);else{if(msgsBelowViewportCount<=++thisMsgsBelowViewportCount)break;currentMsg.newness&&highlightedMsgsInViewportBelow.push(currentMsg)}return highlightedMsgsInViewportBelow}},{key:"prepareUnderlayersInViewport",value:function(){var hide=0<arguments.length&&void 0!==arguments[0]&&arguments[0],msgsBelowViewportCount=1<arguments.length?arguments[1]:void 0;cd.env.recalculateUnderlayersTimeout=!0,(0,_classPrivateFieldSet2.default)(this,_highlightedMsgsInViewportBelow,this.findHighlightedMsgsInViewportBelow(msgsBelowViewportCount)),hide&&((0,_classPrivateFieldSet2.default)(this,_$underlayersInViewportBelow,$($.map((0,_classPrivateFieldGet2.default)(this,_highlightedMsgsInViewportBelow),function(value){return value.$underlayer&&value.$underlayer[0]}))),(0,_classPrivateFieldGet2.default)(this,_$underlayersInViewportBelow).hide())}},{key:"updateUnderlayersInViewport",value:function(){for(var unhide=0<arguments.length&&void 0!==arguments[0]&&arguments[0],i=0;i<(0,_classPrivateFieldGet2.default)(this,_highlightedMsgsInViewportBelow).length;i++)(0,_classPrivateFieldGet2.default)(this,_highlightedMsgsInViewportBelow)[i].configureUnderlayer();unhide&&(0,_classPrivateFieldGet2.default)(this,_$underlayersInViewportBelow).show(),cd.env.recalculateUnderlayersTimeout=!1}},{key:"removeUnderlayer",value:function(){return!!(0,_classPrivateFieldGet2.default)(this,_underlayer)&&(this.$underlayer.stop(!0),cd.env.underlayers.splice(cd.env.underlayers.indexOf((0,_classPrivateFieldGet2.default)(this,_underlayer)),1),(0,_classPrivateFieldGet2.default)(this,_underlayer).parentElement.removeChild((0,_classPrivateFieldGet2.default)(this,_underlayer)),(0,_classPrivateFieldSet2.default)(this,_underlayer,null),this.$underlayer=null,(0,_classPrivateFieldGet2.default)(this,_linksUnderlayer).parentElement.removeChild((0,_classPrivateFieldGet2.default)(this,_linksUnderlayer)),(0,_classPrivateFieldSet2.default)(this,_linksUnderlayer,null),!(this.$linksUnderlayer=null))}},{key:"$elements",get:function(){return void 0===(0,_classPrivateFieldGet2.default)(this,_cached$elements)&&(0,_classPrivateFieldSet2.default)(this,_cached$elements,$(this.elements)),(0,_classPrivateFieldGet2.default)(this,_cached$elements)}},{key:"text",get:function(){return void 0===(0,_classPrivateFieldGet2.default)(this,_cachedMsgText)&&(0,_classPrivateFieldSet2.default)(this,_cachedMsgText,function(){var $msgWithNoSig=$();1<this.$elements.length&&($msgWithNoSig=$msgWithNoSig.add(this.$elements.slice(0,-1)));var currentAuthorSelector=cd.env.generateAuthorSelector(this.author),$parentOfDate=this.$elements.last().find(currentAuthorSelector).last().closest(':contains("(UTC"), :contains("\u042d\u0442\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430"), :contains("(\u043e\u0431\u0441.)")');if($parentOfDate.length){var lastElement=this.$elements.last()[0];if($parentOfDate[0]!==lastElement&&!($parentOfDate[0].compareDocumentPosition(lastElement)&Node.DOCUMENT_POSITION_CONTAINED_BY))for(var currentElement=$parentOfDate[0];;){if(currentElement.previousSibling)currentElement=currentElement.previousSibling;else{for(;currentElement&¤tElement!==lastElement&&!currentElement.previousSibling;)currentElement=currentElement.parentElement;if(!currentElement||currentElement===lastElement)break;currentElement=currentElement.previousSibling}if(!currentElement||currentElement===lastElement)break;$msgWithNoSig=$msgWithNoSig.add(currentElement)}var foundAuthorNode=!1;$msgWithNoSig=$msgWithNoSig.add($parentOfDate.contents().filter(function(){return!foundAuthorNode&&(this.nodeType!==Node.ELEMENT_NODE||!$(this).is(currentAuthorSelector)&&!$(this).has(currentAuthorSelector).length||!(foundAuthorNode=!0))}))}else $msgWithNoSig=$msgWithNoSig.add(this.$elements.last());return cd.env.elementsToText($msgWithNoSig.get()).replace(/\u042d\u0442\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 (?:\u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u043c|\u0441 IP)$/,"").replace(/\u042d\u0442\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 (?:\u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u043c|\u0441 IP).{1,50}$/,"").replace("(\u043e\u0431\u0441.)$","").replace(cd.config.sigPrefixRegexp,"")}.call(this)),(0,_classPrivateFieldGet2.default)(this,_cachedMsgText)}},{key:"parent",get:function(){return void 0===(0,_classPrivateFieldGet2.default)(this,_cachedParent)&&(0,_classPrivateFieldSet2.default)(this,_cachedParent,function(){var level=this.level;this.$elements[0].classList.contains("ruwiki-msgIndentation-minus1level")&&(level-=1);if(cd.env.pageHasOutdents){for(var currentElement=this.elements[0],outdented=!1;currentElement&¤tElement!==cd.env.contentElement;){if(currentElement.previousElementSibling){((currentElement=currentElement.previousElementSibling).className.includes("outdent-template")||currentElement.querySelector(".outdent-template")&&!currentElement.querySelector(".cd-msgPart"))&&(outdented=!0);break}currentElement=currentElement.parentElement}if(outdented&&cd.msgs[this.id-1])return cd.msgs[this.id-1]}if(level<=0)return null;for(var i=this.id-1;0<=i;i--){var currentMsg=cd.msgs[i];if(void 0!==currentMsg.level&¤tMsg.level<level&¤tMsg.section===this.section)return currentMsg}return null}.call(this)),(0,_classPrivateFieldGet2.default)(this,_cachedParent)}},{key:"section",get:function(){return void 0===(0,_classPrivateFieldGet2.default)(this,_cachedSection)&&(0,_classPrivateFieldSet2.default)(this,_cachedSection,function(){if(!cd.sections)return null;for(var i=cd.sections.length-1;0<=i;i--){var currentSection=cd.sections[i];if(currentSection.msgs.includes(this))return currentSection}return null}.call(this)),(0,_classPrivateFieldGet2.default)(this,_cachedSection)}},{key:"isAuthorRegistered",get:function(){return void 0===(0,_classPrivateFieldGet2.default)(this,_cachedIsAuthorRegistered)&&(0,_classPrivateFieldSet2.default)(this,_cachedIsAuthorRegistered,function(){return!/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/.test(this.author)}.call(this)),(0,_classPrivateFieldGet2.default)(this,_cachedIsAuthorRegistered)}}]),Msg}();exports.default=Msg;var _firstWidth=new WeakMap,_underlayer=new WeakMap,_underlayerTop=new WeakMap,_underlayerLeft=new WeakMap,_underlayerWidth=new WeakMap,_underlayerHeight=new WeakMap,_linksUnderlayer=new WeakMap,_linksUnderlayerTop=new WeakMap,_linksUnderlayerLeft=new WeakMap,_linksUnderlayer_text=new WeakMap,_linksUnderlayer_gradient=new WeakMap,_highlightedMsgsInViewportBelow=new WeakMap,_$underlayersInViewportBelow=new WeakMap,_cached$elements=new WeakMap,_cachedMsgText=new WeakMap,_cachedParent=new WeakMap,_cachedSection=new WeakMap,_cachedIsAuthorRegistered=new WeakMap;function getFirstElementRect(){for(var i=0;i<this.elements.length;i++)if(!this.elements[i].className.includes("ruwiki-movedTemplate"))return this.elements[i].getBoundingClientRect();return this.elements[0].getBoundingClientRect()}},{"./MsgForm":21,"./debug":25,"@babel/runtime/helpers/classCallCheck":4,"@babel/runtime/helpers/classPrivateFieldGet":5,"@babel/runtime/helpers/classPrivateFieldSet":6,"@babel/runtime/helpers/createClass":7,"@babel/runtime/helpers/interopRequireDefault":8,"@babel/runtime/helpers/slicedToArray":13}],21:[function(require,module,exports){"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator")),_asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")),_slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")),_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),_classPrivateFieldGet2=_interopRequireDefault(require("@babel/runtime/helpers/classPrivateFieldGet")),_classPrivateFieldSet2=_interopRequireDefault(require("@babel/runtime/helpers/classPrivateFieldSet")),_Msg=_interopRequireDefault(require("./Msg")),_Section=_interopRequireDefault(require("./Section")),MsgForm=function(){function MsgForm(mode,target,$addSectionLink){var _this=this;if((0,_classCallCheck2.default)(this,MsgForm),_couldBeCloserClosing.set(this,{writable:!0,value:void 0}),_standardButtonsTotalWidth.set(this,{writable:!0,value:void 0}),_standardSubmitButtonLabel.set(this,{writable:!0,value:void 0}),_shortSubmitButtonLabel.set(this,{writable:!0,value:void 0}),this.mode=mode,this.target=target,"addSection"!==this.mode||$addSectionLink){var sectionHeading,tag,addOlClass;if(cd.msgForms.push(this),this.target instanceof _Msg.default?sectionHeading=this.target.section&&this.target.section.heading:this.target instanceof _Section.default&&(sectionHeading=this.target.heading),"replyInSection"===this.mode){var parentTag=this.target.$replyButtonContainer.parent().prop("tagName");tag="OL"===parentTag?(addOlClass=!0,"li"):"UL"===parentTag?"li":"DL"===parentTag?"dd":"div"}else if("addSection"===this.mode||"addSubsection"===this.mode)tag="div";else{var $lastTagOfTarget=this.target.$elements.cdRemoveNonTagNodes().last(),lastTagOfTargetName=$lastTagOfTarget.prop("tagName");tag="LI"===lastTagOfTargetName?$lastTagOfTarget.parent().is("ol")&&"edit"!==this.mode?"div":"li":"DD"===lastTagOfTargetName?"dd":"div"}if(this.$element=$(document.createElement(tag)).addClass("cd-msgForm").addClass("cd-msgForm-"+this.mode).css("display","none"),addOlClass&&this.$element.addClass("cd-msgForm-inNumberedList"),("reply"===this.mode||"replyInSection"===this.mode&&"div"===tag)&&this.$element.addClass("cd-msgLevel"),"edit"===this.mode&&this.target.isOpeningSection&&this.$element.addClass("cd-msgForm-msgOpeningSection"),"addSubsection"===this.mode&&this.$element.addClass("cd-msgForm-addSubsection-"+this.target.level),this.$wrapper=$("<div>").addClass("cd-msgForm-wrapper").appendTo(this.$element),this.$form=$("<form>").submit(function(e){e.preventDefault(),_this.submit()}).appendTo(this.$wrapper),this.$infoArea=$("<div>").addClass("cd-infoArea").prependTo(this.$wrapper),this.$previewArea=$("<div>").addClass("cd-previewArea").prependTo(this.$wrapper),this.targetMsg=this.getTargetMsg(),!this.targetMsg||this.targetMsg.author||"reply"!==this.mode&&"edit"!==this.mode){this.target instanceof _Section.default?this.targetSection=this.target:this.target instanceof _Msg.default&&(this.targetSection=this.target.section),this.summaryAltered=!1;var defaultSummaryComponents={section:sectionHeading?"/* ".concat(sectionHeading," */ "):""},formUserName=function(msg,genitive){var to;return void 0===msg.authorGender?(to=genitive?"\u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430":"\u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0443",msg.isAuthorRegistered&&(new mw.Api).get({action:"query",list:"users",ususers:msg.author,usprop:"gender",formatversion:2}).done(function(data){var gender=data&&data.query&&data.query.users&&data.query.users[0]&&data.query.users[0].gender;gender&&"female"===(msg.authorGender=gender)&&updateDefaultSummary(!0)}).fail(function(jqXHR,textStatus,errorThrown){console.error("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u043e\u043b \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430(-\u0446\u044b) "+_this.targetMsg.author),console.log(jqXHR,textStatus,errorThrown)})):to="female"===msg.authorGender?genitive?"\u0443\u0447\u0430\u0441\u0442\u043d\u0438\u0446\u044b":"\u0443\u0447\u0430\u0441\u0442\u043d\u0438\u0446\u0435":genitive?"\u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430":"\u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0443",to+" "+msg.author},updateDefaultSummary=function(generateDescription){if(!_this.summaryAltered){generateDescription&&function(){if("edit"===_this.mode&&_this.target.isOpeningSection&&(defaultSummaryComponents.section="/* ".concat(cd.env.cleanSectionHeading(_this.headingInput.getValue())," */ ")),"reply"===_this.mode)_this.target.isOpeningSection||0===_this.target.level?defaultSummaryComponents.description="\u043e\u0442\u0432\u0435\u0442":_this.target.author!==cd.env.CURRENT_USER?defaultSummaryComponents.description="\u043e\u0442\u0432\u0435\u0442 "+formUserName(_this.targetMsg):defaultSummaryComponents.description="\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435";else if("edit"===_this.mode)_this.deleteCheckbox&&_this.deleteCheckbox.isSelected()?_this.target.author===cd.env.CURRENT_USER?_this.target.parent?_this.target.parent.author===cd.env.CURRENT_USER?defaultSummaryComponents.description="\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f":_this.target.parent.isOpeningSection?defaultSummaryComponents.description="\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430":defaultSummaryComponents.description="\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 "+formUserName(_this.target.parent):_this.target.isOpeningSection?(defaultSummaryComponents.description="\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 ",defaultSummaryComponents.description+=_this.target.section.level<=2?"\u0442\u0435\u043c\u044b":"\u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0430"):defaultSummaryComponents.description="\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f":_this.target.isOpeningSection?(defaultSummaryComponents.description="\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 ",defaultSummaryComponents.description+=_this.target.section.level<=2?"\u0442\u0435\u043c\u044b":"\u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0430"):defaultSummaryComponents.description="\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f "+formUserName(_this.target,!0):_this.target.author===cd.env.CURRENT_USER?_this.target.parent?_this.target.parent.isOpeningSection||0===_this.target.parent.level?defaultSummaryComponents.description="\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430":_this.target.parent.author!==cd.env.CURRENT_USER?defaultSummaryComponents.description="\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 "+formUserName(_this.target.parent):defaultSummaryComponents.description="\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f":_this.target.isOpeningSection?(defaultSummaryComponents.description="\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f ",defaultSummaryComponents.description+=_this.target.section.level<=2?"\u0442\u0435\u043c\u044b":"\u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0430"):defaultSummaryComponents.description="\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f":_this.target.isOpeningSection?(defaultSummaryComponents.description="\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f ",defaultSummaryComponents.description+=_this.target.section.level<=2?"\u0442\u0435\u043c\u044b":"\u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0430"):defaultSummaryComponents.description="\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f "+formUserName(_this.target,!0);else if("replyInSection"===_this.mode)_this.noIndentationCheckbox&&_this.noIndentationCheckbox.isSelected()?defaultSummaryComponents.description="\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435":!_this.targetMsg||_this.targetMsg.isOpeningSection?defaultSummaryComponents.description="\u043e\u0442\u0432\u0435\u0442":_this.target.author!==cd.env.CURRENT_USER?defaultSummaryComponents.description="\u043e\u0442\u0432\u0435\u0442 "+formUserName(_this.targetMsg):defaultSummaryComponents.description="\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435";else if("addSection"===_this.mode){var summary=new mw.Uri($addSectionLink.attr("href")).query.summary,newTopicSummary=summary&&summary.replace(/^.+?\*\/ */,"");defaultSummaryComponents.description=newTopicSummary||"\u043d\u043e\u0432\u0430\u044f \u0442\u0435\u043c\u0430"}else"addSubsection"===_this.mode&&(defaultSummaryComponents.description="\u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b")}(),_this.defaultSummary=defaultSummaryComponents.section+defaultSummaryComponents.description;var newSummary=_this.defaultSummary;if("reply"===_this.mode||"replyInSection"===_this.mode){var summaryFullMsgText=_this.textarea.getValue().trim().replace(/\s+/g," ");if(summaryFullMsgText&&summaryFullMsgText.length<=cd.env.SUMMARY_FULL_MSG_TEXT_LENGTH_LIMIT){var projectedSummary=_this.defaultSummary+": "+summaryFullMsgText+" (-)";projectedSummary.length<=cd.env.ACTUAL_SUMMARY_LENGTH_LIMIT&&(newSummary=projectedSummary)}}else if("addSection"===_this.mode){var summaryHeadingText=cd.env.cleanSectionHeading(_this.headingInput.getValue());if(summaryHeadingText){var _projectedSummary="/* ".concat(summaryHeadingText," */ ").concat(_this.defaultSummary);_projectedSummary.length<=cd.env.ACTUAL_SUMMARY_LENGTH_LIMIT&&(newSummary=_projectedSummary)}}else if("addSubsection"===_this.mode){var _summaryHeadingText=cd.env.cleanSectionHeading(_this.headingInput.getValue());if(_summaryHeadingText){var _projectedSummary2="".concat(_this.defaultSummary,": /* ").concat(_summaryHeadingText," */").replace("\u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b: /* \u0418\u0442\u043e\u0433 */","\u0438\u0442\u043e\u0433").replace("\u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b: /* \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u0442\u043e\u0433 */","\u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u0442\u043e\u0433").replace("\u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b: /* \u041f\u0440\u0435\u0434\u044b\u0442\u043e\u0433 */","\u043f\u0440\u0435\u0434\u044b\u0442\u043e\u0433");_projectedSummary2.length<=cd.env.ACTUAL_SUMMARY_LENGTH_LIMIT&&(newSummary=_projectedSummary2)}}_this.summaryInput.setValue(newSummary)}};(0,_classPrivateFieldSet2.default)(this,_couldBeCloserClosing,/^\u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f:\u041a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e/.test(cd.env.CURRENT_PAGE)&&"addSubsection"===this.mode&&mw.config.get("wgUserGroups").includes("closer")),this.id=cd.env.msgFormsCounter++,("addSection"===this.mode||"addSubsection"===this.mode||"edit"===this.mode&&this.target.isOpeningSection)&&("addSubsection"===this.mode||this.target&&2<this.target.section.level?this.headingInputPurpose="\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0430":this.headingInputPurpose="\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043c\u044b",this.headingInput=new OO.ui.TextInputWidget({placeholder:this.headingInputPurpose,classes:["cd-headingInput"],tabIndex:String(this.id)+"11"}),this.headingInput.$element.appendTo(this.$form),this.headingInput.on("change",function(headingInputText){updateDefaultSummary("edit"===_this.mode),headingInputText.includes("{{")?_this.showWarning("\u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u0445 \u2014 \u044d\u0442\u043e \u043b\u043e\u043c\u0430\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u044b.","dontUseTemplatesInHeadings"):_this.hideWarning("dontUseTemplatesInHeadings")}));var textReactions=[{pattern:/~~\~/,message:"\u0412\u0432\u043e\u0434\u0438\u0442\u044c <kbd>~~".concat("~~</kbd> \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u2014 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438."),icon:"notice",class:"sigNotNeeded"},{pattern:/<pre/,message:"\u0422\u0435\u0433\u0438 <code><pre></code> \u043b\u043e\u043c\u0430\u044e\u0442 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0439 \u2014\xa0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code><source></code>.",icon:"alert",class:"dontUsePre"},{pattern:/\{\{(?:(?:subst|\u043f\u043e\u0434\u0441\u0442):)?\u041f\u04182?\}\}/,messagee:"\u0428\u0430\u0431\u043b\u043e\u043d \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043e\u0434\u0432\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0438\u0442\u043e\u0433\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u2014 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.",icon:"notice",class:"closerTemplateNotNeeded",checkFunc:function(){return(0,_classPrivateFieldGet2.default)(_this,_couldBeCloserClosing)&&"\u0418\u0442\u043e\u0433"===headingInput.getValue().trim()}}],rowNumber=5;if("firefox"===$.client.profile().name&&rowNumber--,this.textarea=new OO.ui.MultilineTextInputWidget({value:"",autosize:!0,rows:rowNumber,maxRows:30,classes:["cd-textarea"],tabIndex:String(this.id)+"12"}),(this.textarea.cdMsgForm=this).textarea.on("change",function(textareaText){updateDefaultSummary();for(var i=0;i<textReactions.length;i++)textReactions[i].pattern.test(textareaText)&&("function"!=typeof textReactions[i].checkFunc||textReactions[i].checkFunc())?_this.showInfo(textReactions[i].message,textReactions[i].icon,textReactions[i].class):_this.hideInfo(textReactions[i].class)}),this.textarea.$element.appendTo(this.$form),this.$settings=$("<div>").addClass("cd-msgFormSettings").appendTo(this.$form),this.summaryInput=new OO.ui.TextInputWidget({maxLength:cd.env.ACTUAL_SUMMARY_LENGTH_LIMIT,placeholder:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439",classes:["cd-summaryInput"],tabIndex:String(this.id)+"13"}),this.summaryInput.$element.keypress(function(summaryInputContent){_this.summaryAltered=!0}).appendTo(this.$settings),this.summaryInput.$input.codePointLimit(cd.env.ACTUAL_SUMMARY_LENGTH_LIMIT),mw.widgets.visibleCodePointLimit(this.summaryInput,cd.env.ACTUAL_SUMMARY_LENGTH_LIMIT),updateDefaultSummary(!0),this.$summaryPreview=$("<div>").addClass("cd-summaryPreview").appendTo(this.$settings),"edit"===this.mode&&(this.minorCheckbox=new OO.ui.CheckboxInputWidget({value:"minor",selected:!0,tabIndex:String(this.id)+"20"}),this.minorCheckboxField=new OO.ui.FieldLayout(this.minorCheckbox,{label:"\u041c\u0430\u043b\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435",align:"inline"})),this.watchCheckbox=new OO.ui.CheckboxInputWidget({value:"watch",selected:!!mw.user.options.get("watchdefault")||!!$("#ca-unwatch").length,tabIndex:String(this.id)+"21"}),this.watchCheckboxField=new OO.ui.FieldLayout(this.watchCheckbox,{label:"\u0412 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f",align:"inline"}),this.targetSection||"addSection"===this.mode){var watchTopicCheckboxLabel="addSubsection"!==this.mode&&(this.targetSection&&this.targetSection.level<=2||"addSection"===this.mode)?"\u0421\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0442\u0435\u043c\u043e\u0439":"\u0421\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u043e\u043c";this.watchTopicCheckbox=new OO.ui.CheckboxInputWidget({value:"watchTopic",selected:"edit"!==this.mode&&cd.settings.watchTopicsOnReply||this.targetSection&&this.targetSection.isWatched,tabIndex:String(this.id)+"22"}),this.watchTopicCheckboxField=new OO.ui.FieldLayout(this.watchTopicCheckbox,{label:watchTopicCheckboxLabel,align:"inline"})}"edit"!==this.mode&&this.targetMsg&&(this.pingCheckbox=new OO.ui.CheckboxInputWidget({value:"ping",tabIndex:String(this.id)+"23"}),this.pingCheckboxField=new OO.ui.FieldLayout(this.pingCheckbox,{align:"inline"}));var updatePingCheckbox=function(){_this.targetMsg.isAuthorRegistered?_this.targetMsg.author!==cd.env.CURRENT_USER?(_this.pingCheckbox.setDisabled(!1),_this.pingCheckbox.setTitle(null),_this.pingCheckboxField.setTitle("\u0424\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u043f\u0438\u043d\u0433\u0430")):(_this.pingCheckbox.setDisabled(!0),_this.pingCheckbox.setTitle("\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u0435\u0431\u0435"),_this.pingCheckboxField.setTitle("\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u0435\u0431\u0435")):(_this.pingCheckbox.setDisabled(!0),_this.pingCheckbox.setTitle("\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0443"),_this.pingCheckboxField.setTitle("\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0443")),_this.noIndentationCheckbox&&_this.noIndentationCheckbox.isSelected()?_this.targetMsg?_this.pingCheckboxField.setLabel("\u0423\u0432\u0435\u0434\u043e\u043c\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0430 \u0442\u0435\u043c\u044b"):(_this.pingCheckbox.setSelected(!1),_this.pingCheckbox.setDisabled(!0),_this.pingCheckbox.setTitle("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0430 \u0442\u0435\u043c\u044b"),_this.pingCheckboxField.setTitle("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0430 \u0442\u0435\u043c\u044b")):_this.pingCheckboxField.setLabel(_this.targetMsg.isOpeningSection?"\u0423\u0432\u0435\u0434\u043e\u043c\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0430 \u0442\u0435\u043c\u044b":"\u0423\u0432\u0435\u0434\u043e\u043c\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0430")};if("addSection"===this.mode||"addSubsection"===this.mode||"edit"===this.mode&&this.target.isOpeningSection||(this.smallCheckbox=new OO.ui.CheckboxInputWidget({value:"small",tabIndex:String(this.id)+"24"}),this.smallCheckboxField=new OO.ui.FieldLayout(this.smallCheckbox,{label:"\u041c\u0435\u043b\u043a\u0438\u043c \u0448\u0440\u0438\u0444\u0442\u043e\u043c",align:"inline",tabIndex:String(this.id)+"25"})),"replyInSection"===this.mode&&(this.noIndentationCheckbox=new OO.ui.CheckboxInputWidget({value:"noIndentation",tabIndex:String(this.id)+"26"}),this.noIndentationCheckbox.on("change",function(selected){selected?_this.$element.addClass("cd-msgForm-noIndentation"):_this.$element.removeClass("cd-msgForm-noIndentation"),_this.targetMsg=_this.getTargetMsg(),_this.pingCheckbox&&updatePingCheckbox(),updateDefaultSummary(!0)}),this.noIndentationCheckboxField=new OO.ui.FieldLayout(this.noIndentationCheckbox,{label:"\u0411\u0435\u0437 \u043e\u0442\u0441\u0442\u0443\u043f\u0430",align:"inline"})),this.pingCheckbox&&updatePingCheckbox(),"edit"===this.mode&&(!this.target.isOpeningSection||this.target.section&&this.target.section.msgs.length<=1)){if(!this.target.isOpeningSection&&void 0===this.target.replies){for(var replies=[],i=this.target.id+1;i<cd.msgs.length;i++)cd.msgs[i].parent===this.target&&replies.push(cd.msgs[i]);this.target.replies=replies}var initialMinorSelected;if(this.target.isOpeningSection||this.target.replies&&!this.target.replies.length)this.deleteCheckbox=new OO.ui.CheckboxInputWidget({value:"delete",tabIndex:String(this.id)+"27"}),this.deleteCheckbox.on("change",function(selected){updateDefaultSummary(!0),selected?(initialMinorSelected=_this.minorCheckbox.isSelected(),_this.minorCheckbox.setSelected(!1),_this.textarea.setDisabled(!0),_this.headingInput&&_this.headingInput.setDisabled(!0),_this.minorCheckbox.setDisabled(!0),_this.smallCheckbox&&_this.smallCheckbox.setDisabled(!0)):(_this.minorCheckbox.setSelected(initialMinorSelected),_this.textarea.setDisabled(!1),_this.headingInput&&_this.headingInput.setDisabled(!1),_this.minorCheckbox.setDisabled(!1),_this.smallCheckbox&&_this.smallCheckbox.setDisabled(!1))}),this.deleteCheckboxField=new OO.ui.FieldLayout(this.deleteCheckbox,{label:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c",align:"inline"})}if(this.horizontalLayout=new OO.ui.HorizontalLayout({classes:["cd-checkboxesContainer"]}),this.minorCheckboxField&&this.horizontalLayout.addItems([this.minorCheckboxField]),this.horizontalLayout.addItems([this.watchCheckboxField]),this.watchTopicCheckboxField&&this.horizontalLayout.addItems([this.watchTopicCheckboxField]),this.pingCheckboxField&&this.horizontalLayout.addItems([this.pingCheckboxField]),this.smallCheckboxField&&this.horizontalLayout.addItems([this.smallCheckboxField]),this.noIndentationCheckboxField&&this.horizontalLayout.addItems([this.noIndentationCheckboxField]),this.deleteCheckboxField&&this.horizontalLayout.addItems([this.deleteCheckboxField]),this.horizontalLayout.$element.appendTo(this.$settings),"edit"===this.mode||cd.settings.alwaysExpandSettings||this.$settings.hide(),this.$buttonsContainer=$("<div>").addClass("cd-buttonsContainer").appendTo(this.$form),this.$leftButtonsContainer=$("<div>").addClass("cd-leftButtonsContainer").appendTo(this.$buttonsContainer),this.$rightButtonsContainer=$("<div>").addClass("cd-rightButtonsContainer").appendTo(this.$buttonsContainer),"edit"===this.mode?((0,_classPrivateFieldSet2.default)(this,_standardSubmitButtonLabel,"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c"),(0,_classPrivateFieldSet2.default)(this,_shortSubmitButtonLabel,"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c")):"addSection"===this.mode?((0,_classPrivateFieldSet2.default)(this,_standardSubmitButtonLabel,"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u043c\u0443"),(0,_classPrivateFieldSet2.default)(this,_shortSubmitButtonLabel,"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c")):"addSubsection"===this.mode?((0,_classPrivateFieldSet2.default)(this,_standardSubmitButtonLabel,"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b"),(0,_classPrivateFieldSet2.default)(this,_shortSubmitButtonLabel,"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c")):((0,_classPrivateFieldSet2.default)(this,_standardSubmitButtonLabel,"\u041e\u0442\u0432\u0435\u0442\u0438\u0442\u044c"),(0,_classPrivateFieldSet2.default)(this,_shortSubmitButtonLabel,"\u041e\u0442\u0432\u0435\u0442")),this.submitButton=new OO.ui.ButtonInputWidget({type:"submit",label:(0,_classPrivateFieldGet2.default)(this,_standardSubmitButtonLabel),flags:["progressive","primary"],classes:["cd-submitButton"],tabIndex:String(this.id)+"35"}),this.previewButton=new OO.ui.ButtonWidget({label:"\u041f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c",classes:["cd-previewButton"],tabIndex:String(this.id)+"34"}),this.previewButton.on("click",this.preview.bind(this)),("edit"===this.mode||cd.config.debug)&&(this.viewChangesButton=new OO.ui.ButtonWidget({label:"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f",classes:["cd-viewChangesButton"],tabIndex:String(this.id)+"33"}),this.viewChangesButton.on("click",this.viewChanges.bind(this))),this.settingsButton=new OO.ui.ButtonWidget({label:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438",framed:!1,classes:["cd-button","cd-settingsButton"],tabIndex:String(this.id)+"30"}),this.settingsButton.on("click",this.toggleSettings.bind(this)),cd.env.$popupsOverlay||(cd.env.$popupsOverlay=$("<div>").addClass("cd-popupsOverlay").appendTo($("body"))),this.helpPopupButton=new OO.ui.PopupButtonWidget({label:"?",framed:!1,classes:["cd-button"],popup:{head:!0,label:"\u0421\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0448",$content:$(" <ul> <li><b>Ctrl+Enter</b> \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c <li><b>Esc</b> \u2014 \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c <li><b>Q</b> (<b>Ctrl+Alt+Q</b>) \u2014 \u0446\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c <li><b>Ctrl+Alt+W</b> \u2014 \u0432\u0438\u043a\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c </ul> "),padded:!0,align:"center"},$overlay:cd.env.$popupsOverlay,tabIndex:String(this.id)+"31"}),this.cancelButton=new OO.ui.ButtonWidget({label:"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c",flags:"destructive",framed:!1,classes:["cd-button","cd-cancelButton"],tabIndex:String(this.id)+"32"}),this.cancelButton.on("click",this.cancel.bind(this)),this.settingsButton.$element.appendTo(this.$leftButtonsContainer),this.helpPopupButton.$element.appendTo(this.$leftButtonsContainer),this.cancelButton.$element.appendTo(this.$rightButtonsContainer),this.viewChangesButton&&this.viewChangesButton.$element.appendTo(this.$rightButtonsContainer),this.previewButton.$element.appendTo(this.$rightButtonsContainer),this.submitButton.$element.appendTo(this.$rightButtonsContainer),"reply"===this.mode){var $last=this.target.$elements.last();$last.next().hasClass("cd-msgForm-edit")&&($last=$last.next()),this.$element.insertAfter($last)}else if("edit"===this.mode)this.$element.insertBefore(this.target.$elements.first());else if("replyInSection"===this.mode)this.$element.insertAfter(this.target.$replyButtonContainer);else if("addSection"===this.mode)this.newTopicOnTop=$addSectionLink.is('[href*="section=0"]'),this.newTopicOnTop&&cd.sections[0]?this.$element.insertBefore(cd.sections[0].$heading):this.$element.appendTo(cd.env.$content);else if("addSubsection"===this.mode){for(var headingLevelRegExp=new RegExp("\\bcd-msgForm-addSubsection-[".concat(this.target.level,"-6]\\b")),_$last=this.target.$elements.last(),$nextToLast=_$last.next();$nextToLast.hasClass("cd-replyButtonContainerContainer")||$nextToLast.hasClass("cd-addSubsectionButtonContainer")||$nextToLast.hasClass("cd-msgForm")&&!$nextToLast.hasClass("cd-msgForm-addSubsection")&&!$nextToLast.hasClass("cd-msgForm-addSection")||$nextToLast[0]&&$nextToLast[0].className.match(headingLevelRegExp);)$nextToLast=(_$last=$nextToLast).next();this.$element.insertAfter(_$last)}if(cd.settings.showToolbars){var modules=["ext.wikiEditor"];cd.env.IS_RUWIKI&&modules.push("ext.gadget.wikificator"),cd.env.IS_RUWIKI&&mw.user.options.get("gadget-urldecoder")&&modules.push("ext.gadget.urldecoder"),mw.loader.using(modules).then(function(){if(_this.textarea.$input.wikiEditor("addModule",mw.loader.moduleRegistry["ext.wikiEditor"].packageExports["jquery.wikiEditor.toolbar.config.js"]),_this.$element.find(".group-insert").remove(),_this.$element.find('.option[rel="heading-2"]').remove(),cd.env.IS_RUWIKI){_this.textarea.$input.wikiEditor("addToToolbar",{section:"main",groups:{gadgets:{}}});var $groupGadgets=_this.$element.find(".group-gadgets"),$groupFormat=_this.$element.find(".group-format");$groupGadgets.length&&$groupFormat.length&&$groupGadgets.insertBefore($groupFormat),_this.textarea.$input.wikiEditor("addToToolbar",{section:"main",group:"gadgets",tools:{wikificator:{label:"\u0412\u0438\u043a\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u2014 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0442\u0435\u043a\u0441\u0442\u0430",type:"button",icon:"//upload.wikimedia.org/wikipedia/commons/0/06/Wikify-toolbutton.png",action:{type:"callback",execute:function(){Wikify(_this.textarea.$input[0])}}}}}),mw.user.options.get("gadget-urldecoder")&&_this.textarea.$input.wikiEditor("addToToolbar",{section:"main",group:"gadgets",tools:{urlDecoder:{label:"\u0420\u0430\u0441\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c URL \u043f\u0435\u0440\u0435\u0434 \u043a\u0443\u0440\u0441\u043e\u0440\u043e\u043c \u0438\u043b\u0438 \u0432\u0441\u0435 URL \u0432 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435",type:"button",icon:"//upload.wikimedia.org/wikipedia/commons/0/01/Link_go_remake.png",action:{type:"callback",execute:function(){urlDecoderRun(_this.textarea.$input[0])}}}}})}});var $insertButtons=$("<div>").addClass("cd-insertButtons").insertAfter(this.textarea.$element),insertButtons=cd.config.insertButtons;$.isArray(cd.settings.additionalInsertButtons)&&(insertButtons=insertButtons.concat(cd.settings.additionalInsertButtons)),insertButtons.forEach(function(el){var text,displayedText;$.isArray(el)?(text=el[0],displayedText=el[1]):text=el,function(text){var displayedText=1<arguments.length&&void 0!==arguments[1]?arguments[1]:text,$a=$("<a>").attr("href","javascript:").text(displayedText.replace(/\+/,"")).addClass("cd-insertButtons-item").click(function(e){e.preventDefault(),_this.textarea.$input.textSelection("encapsulateSelection",{pre:text.replace(/\+.+$/,""),peri:"",post:text.includes("+")?text.replace(/^.+?\+/,""):""})});$insertButtons.append($a," ")}(text,displayedText)})}this.$form.keydown(function(e){!e.ctrlKey||e.shiftKey||e.altKey||13!==e.keyCode||(e.preventDefault(),_this.submitButton.$button.focus(),_this.submit()),e.ctrlKey&&!e.shiftKey&&e.altKey&&87===e.keyCode&&(e.preventDefault(),mw.loader.using("ext.gadget.wikificator").done(function(){Wikify(_this.textarea.$input[0])})),27===e.keyCode&&(e.preventDefault(),_this.cancelButton.$button.focus(),_this.cancel())}),this.$form.focusin(function(){cd.lastActiveMsgForm=_this});var retryLoad=function(){_this.$element["edit"===_this.mode?"cdFadeOut":"cdSlideUp"]("fast",function(){_this.destroy(),_this.target[modeToProperty.call(_this,_this.mode)]()},_this.getTargetMsg(!0))};"edit"!==mode?(this.originalText="",this.headingInput&&(this.originalHeadingText=""),this.target&&this.target.loadCode().fail(function(e){var errorType,data;if($.isArray(e)){var _e=(0,_slicedToArray2.default)(e,2);errorType=_e[0],data=_e[1]}else console.error(e);cd.env.genericErrorHandler.call(_this,{errorType:errorType,data:data,retryFunc:retryLoad,message:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435"})})):"edit"===mode&&(this.setPending(!0,!0),this.target.loadCode().done(function(msgText,headingText){_this.setPending(!1,!0),_this.textarea.setValue(msgText),_this.smallCheckbox&&_this.smallCheckbox.setSelected(_this.target.inCode.inSmallTag),_this.originalText=msgText,_this.headingInput&&(_this.headingInput.setValue(headingText),_this.originalHeadingText=headingText),_this.textarea.focus()}).fail(function(e){var errorType,data;if($.isArray(e)){var _e2=(0,_slicedToArray2.default)(e,2);errorType=_e2[0],data=_e2[1]}else console.error(e);cd.env.genericErrorHandler.call(_this,{errorType:errorType,data:data,retryFunc:retryLoad,message:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435"})})),mw.hook("cd.msgFormCreated").fire(this)}}}var _submit,_viewChanges,_preview;return(0,_createClass2.default)(MsgForm,[{key:"getTargetMsg",value:function(){var last=0<arguments.length&&void 0!==arguments[0]&&arguments[0],returnNextInViewport=1<arguments.length&&void 0!==arguments[1]&&arguments[1],target=this.target;if(target instanceof _Msg.default)return target;if(target instanceof _Section.default){if(last){var msg;if("replyInSection"===this.mode?msg=target.msgsInFirstSubdivision[target.msgsInFirstSubdivision.length-1]:"addSubsection"===this.mode&&(msg=target.msgs[target.msgs.length-1]),msg)return msg}else{if(!this.noIndentationCheckbox||!this.noIndentationCheckbox.isSelected())for(var i=target.msgsInFirstSubdivision.length-1;0<=i;i--)if(0===target.msgsInFirstSubdivision[i].level)return target.msgsInFirstSubdivision[i];if(target.msgsInFirstSubdivision[0]&&target.msgsInFirstSubdivision[0].isOpeningSection)return target.msgsInFirstSubdivision[0]}if(returnNextInViewport)for(var _i=target.id+1;_i<cd.sections.length;_i++){var firstMsg=cd.sections[_i].msgs[0];if(firstMsg)return firstMsg.$elements.cdIsInViewport(!0)?firstMsg:void 0}}}},{key:"show",value:function(fashion){fashion?"slideDown"===fashion?this.$element.cdSlideDown("fast",this.getTargetMsg(!0)):"fadeIn"===fashion&&this.$element.cdFadeIn("fast",this.getTargetMsg(!0)):this.$element.cdShow(this.getTargetMsg(!0)),(0,_classPrivateFieldSet2.default)(this,_standardButtonsTotalWidth,this.submitButton.$element.outerWidth(!0)+this.previewButton.$element.outerWidth(!0)+(this.viewChangesButton?this.viewChangesButton.$element.outerWidth(!0):0)+this.settingsButton.$element.outerWidth(!0)+this.helpPopupButton.$element.outerWidth(!0)+this.cancelButton.$element.outerWidth(!0)),this.correctLabels(),this.summaryInput.emit("labelChange")}},{key:"toggleSettings",value:function(){"none"===this.$settings.css("display")?this.$settings[cd.settings.slideEffects?"cdSlideDown":"cdFadeIn"]("fast",this.getTargetMsg(!0)):this.$settings[cd.settings.slideEffects?"cdSlideUp":"cdFadeOut"]("fast",null,this.getTargetMsg(!0))}},{key:"correctLabels",value:function(){var formWidth=this.$wrapper.width();formWidth<(0,_classPrivateFieldGet2.default)(this,_standardButtonsTotalWidth)+7&&!this.$element.hasClass("cd-msgForm-short")&&(this.$element.addClass("cd-msgForm-short"),this.submitButton.setLabel((0,_classPrivateFieldGet2.default)(this,_shortSubmitButtonLabel)),this.previewButton.setLabel("\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440"),this.viewChangesButton&&this.viewChangesButton.setLabel("\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f"),this.cancelButton.setLabel("\u041e\u0442\u043c\u0435\u043d\u0430")),formWidth>=(0,_classPrivateFieldGet2.default)(this,_standardButtonsTotalWidth)+7&&this.$element.hasClass("cd-msgForm-short")&&(this.$element.removeClass("cd-msgForm-short"),this.submitButton.setLabel((0,_classPrivateFieldGet2.default)(this,_standardSubmitButtonLabel)),this.previewButton.setLabel("\u041f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c"),this.viewChangesButton&&this.viewChangesButton.setLabel("\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f"),this.cancelButton.setLabel("\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c"))}},{key:"setPending",value:function(){var status=0<arguments.length&&void 0!==arguments[0]&&arguments[0],blockButtons=1<arguments.length&&void 0!==arguments[1]&&arguments[1];status?(this.textarea.pushPending(),this.summaryInput.pushPending(),this.headingInput&&this.headingInput.pushPending()):(this.textarea.popPending(),this.summaryInput.popPending(),this.headingInput&&this.headingInput.popPending()),this.submitButton.setDisabled(status&&blockButtons),this.previewButton.setDisabled(status&&blockButtons),this.viewChangesButton.setDisabled(status&&blockButtons)}},{key:"showInfo",value:function(html){var icon=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"info",className=2<arguments.length?arguments[2]:void 0;if(!className||!this.$infoArea.children(".cd-info-"+className).length){var $textWithIcon=cd.env.createTextWithIcon(html,icon).addClass("cd-info").addClass("cd-info-"+icon);className&&$textWithIcon.addClass("cd-info-"+className),this.$infoArea.cdAppend($textWithIcon,this.getTargetMsg(!0))}}},{key:"hideInfo",value:function(className){var $info=this.$infoArea.children(".cd-info-".concat(className));$info.length&&$info.cdRemove(this.getTargetMsg(!0))}},{key:"showWarning",value:function(html,className){this.showInfo(html,"alert",className)}},{key:"hideWarning",value:function(className){this.hideInfo(className)}},{key:"abort",value:function(message,logMessage,retryFunc,noIcon){var _this2=this;if(this.textarea.$element[0].parentElement&&this.setPending(!1),this.$previewArea.empty(),noIcon?this.$infoArea.cdAppend(message,this.getTargetMsg(!0)):this.showWarning(message),logMessage&&console.warn(logMessage),retryFunc){this.$wrapper.children(":not(.cd-infoArea)").remove();var cancelLink=new OO.ui.ButtonWidget({label:"\u041e\u0442\u043c\u0435\u043d\u0430",framed:!1});cancelLink.on("click",function(){_this2.cancel()});var retryLink=new OO.ui.ButtonWidget({label:"\u041f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0435\u0449\u0451 \u0440\u0430\u0437",framed:!1});retryLink.on("click",retryFunc),$("<div>").append(cancelLink.$element,retryLink.$element).cdAppendTo(this.$infoArea,this.getTargetMsg(!0))}this.$infoArea.cdIsInViewport()||this.$infoArea.cdScrollTo("top")}},{key:"msgTextToCode",value:function(action){var _this3=this,text=this.textarea.getValue();if(void 0!==text){var indentationCharacters,replyIndentationCharacters;"preview"!==action&&this.targetMsg&&(indentationCharacters=this.targetMsg.inCode&&this.targetMsg.inCode.indentationCharacters,replyIndentationCharacters=this.targetMsg.inCode&&this.targetMsg.inCode.replyIndentationCharacters),indentationCharacters||(indentationCharacters="");var isZeroLevel="addSection"===this.mode||"addSubsection"===this.mode||this.noIndentationCheckbox&&this.noIndentationCheckbox.isSelected()||"edit"===this.mode&&!indentationCharacters||"preview"===action;"reply"===this.mode&&"submit"===action&&(indentationCharacters=replyIndentationCharacters),"replyInSection"===this.mode&&(indentationCharacters=this.target.inCode.lastMsgIndentationFirstCharacter?this.target.inCode.lastMsgIndentationFirstCharacter:this.noIndentationCheckbox.isSelected()?"":"*");var sig,code=text.replace(/^[\s\uFEFF\xA0]+/g,"").replace(/^ +[\s\uFEFF\xA0]+[^\s\uFEFF\xA0]/gm,function(s){return/ [^\s\uFEFF\xA0]$/.test(s)?s:s.replace(/^ +/gm,"")}),hasCloserTemplate=/\{\{(?:(?:subst|\u043f\u043e\u0434\u0441\u0442):)?\u041f\u04182?\}\}|\u043f\u0440\u0430\u0432\u0430\u0445 \u043f\u043e\u0434\u0432\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0438\u0442\u043e\u0433\u0438/.test(code),hidden=[],makeAllIntoColons=!1,hide=function(re,isTable){code=code.replace(re,function(s){return isTable&&!isZeroLevel&&(makeAllIntoColons=!0),(isTable?"\x03":"\x01")+hidden.push(s)+(isTable?"\x04":"\x02")})};hide(/\{\{([^{]\{?)+?\}\}/g),hide(/^\{\|[^]*?\n\|\}/gm,!0),function(){for(var i=0;i<arguments.length;i++)hide(new RegExp("<".concat(arguments[i],"( [^>]+)?>[\\s\\S]+?<\\/").concat(arguments[i],">"),"gi"))}("nowiki","pre","source","syntaxhighlight"),"edit"===this.mode&&(sig=this.targetMsg.inCode.sig),"edit"===this.mode&&/^[ \t]*\n/.test(sig)||!/\n[:\*#].*$/.test(code)||(code+="\n","edit"===this.mode&&/^\s*/.test(sig)&&(sig=sig.replace(/^\s*/,""))),this.cantParse=!1,isZeroLevel||(code=code.replace(/\n([:\*#]+)/g,function(s,m1){return makeAllIntoColons=!0,"\n"+indentationCharacters.replace(/\*/g,":")+m1}),makeAllIntoColons&&indentationCharacters&&(code=code.replace(/\n(?![:\#\x03])/g,function(s,m1){var newIndentationCharacters=indentationCharacters.replace(/\*/g,":");return"#"===newIndentationCharacters&&(_this3.cantParse=!0),"\n"+newIndentationCharacters+" "})),code=code.replace(/\n\n(?![:\*#])/g,"{{pb}}"));var tagRegExp=new RegExp("(?:<\\/\\w+ ?>|<".concat(cd.env.PNIE_PATTERN,")$"),"i");if(code=code.replace(/^(.*[^\n])\n(?![\n:\*# \x03])(?=(.*))/gm,function(s,m1,m2){return m1+(/^[:\*# ]/.test(m1)||/(?:\x02|\x04|<\w+(?: [\w ]+?=[^<>]+?| ?\/?)>|<\/\w+ ?>|=|\])$/.test(m1)||tagRegExp.test(m2)?"":"<br>")+(isZeroLevel?"\n":"")}).replace(/\s*~{3,}$/,""),this.pingCheckbox&&this.pingCheckbox.isSelected()&&(code="{{re|"+this.targetMsg.author+(code?"":"|p=.")+"}} "+code),this.headingInput){var level;level="addSection"===this.mode?2:"addSubsection"===this.mode?this.target.level+1:this.target.inCode.headingLevel;var equalSigns="=".repeat(level);"edit"===this.mode&&this.targetMsg.isOpeningSection&&/^\n/.test(this.targetMsg.inCode.code)&&(code="\n"+code),code="".concat(equalSigns," ").concat(this.headingInput.getValue().trim()," ").concat(equalSigns,"\n").concat(code)}for("edit"!==this.mode?code+=(code&&!/\s$/.test(code)?" ":"")+cd.settings.mySig:code+=sig,(0,_classPrivateFieldGet2.default)(this,_couldBeCloserClosing)&&"\u0418\u0442\u043e\u0433"===this.headingInput.getValue().trim()&&!hasCloserTemplate&&(code+="\n"+cd.settings.closerTemplate),this.smallCheckbox&&("edit"===this.mode&&this.targetMsg.inCode.inSmallTag?code=this.smallCheckbox.isSelected()?/^[:\*#]/m.test(code)?"<small>".concat(code,"</small>"):"{{block-small|1=".concat(code,"}}"):code.replace(/\}\}|<\/small>$/,""):this.smallCheckbox.isSelected()&&(code=/^[:\*#]/m.test(code)?"<small>".concat(code,"</small>"):"{{block-small|1=".concat(code,"}}"))),"edit"!==this.mode&&(code+="\n"),"submit"===action&&("reply"!==this.mode&&"replyInSection"!==this.mode||(code=indentationCharacters+(indentationCharacters&&!/^[:\*#]/.test(code)?" ":"")+code),"addSubsection"===this.mode&&(code+="\n"),this.noIndentationCheckbox&&this.noIndentationCheckbox.isSelected()&&(code="\n"+code));code.match(/(?:\x01|\x03)\d+(?:\x02|\x04)/);)code=code.replace(/(?:\x01|\x03)(\d+)(?:\x02|\x04)/g,function(s,num){return hidden[num-1]});return code=code.replace(new RegExp("(<".concat(cd.env.PNIE_PATTERN,"(?: [w ]+?=[^<>]+?| ?/?)>)<br>"),"gi"),"$1").replace(new RegExp("(</".concat(cd.env.PNIE_PATTERN," ?>)<br>"),"gi"),"$1").replace(/<br>(\s*\{\{[\u043a\u041a]\u043e\u043d\u0435\u0446 \u0446\u0438\u0442\u0430\u0442\u044b[^}]*\}\})/g,"$1")}}},{key:"prepareNewPageCode",value:function(pageCode,timestamp){var targetInCode,currentIndex;if(pageCode+="\n","addSection"!==this.mode&&!(targetInCode=this.target.locateInCode(pageCode)))throw new cd.env.Exception(this.target instanceof _Msg.default?cd.strings.couldntLocateMsgInCode:cd.strings.couldntLocateSectionInCode);if("reply"===this.mode){currentIndex=targetInCode.endPos;var succeedingText=pageCode.slice(currentIndex),properPlaceMatches=new RegExp("^([^]*?(?:"+mw.RegExp.escape(this.target.inCode.sig)+"|\\b\\d?\\d:\\d\\d, \\d\\d? [\u0430-\u044f]+ \\d\\d\\d\\d \\(UTC\\).*)\\n)\\n*"+(0<targetInCode.indentationCharacters.length?"[:\\*#]{0,".concat(targetInCode.indentationCharacters.length,"}"):"")+"(?![:\\*#\\n])").exec(succeedingText);if(!properPlaceMatches)throw new cd.env.Exception("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043c\u0435\u0441\u0442\u043e \u0432 \u043a\u043e\u0434\u0435 \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.");var textBeforeInsertion=properPlaceMatches[1],changedIndentationCharactersMatches=textBeforeInsertion.match(/\n([:\*#]{2,}).*\n$/),changedIndentationCharacters=changedIndentationCharactersMatches&&changedIndentationCharactersMatches[1];changedIndentationCharacters&&(changedIndentationCharacters.length>targetInCode.indentationCharacters.length?targetInCode.replyIndentationCharacters=changedIndentationCharacters.slice(0,targetInCode.indentationCharacters.length+1).replace(/:$/,"*"):targetInCode.indentationCharacters=changedIndentationCharacters.slice(0,targetInCode.indentationCharacters.length).replace(/:$/,"*"));var textBeforeInsertionForTest=textBeforeInsertion.replace(/<!--[^]*?-->/g,"");if(/\n(=+).*?\1[ \t]*\n/.test(textBeforeInsertionForTest))throw new cd.env.Exception("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043c\u0435\u0441\u0442\u043e \u0432 \u043a\u043e\u0434\u0435 \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f (\u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a).");currentIndex+=textBeforeInsertion.length}"replyInSection"===this.mode&&"OL"===this.$element.parent()[0].tagName&&(targetInCode.subdivisionCode.match(/\n#.*\n+$/)&&(this.target.inCode.lastMsgIndentationFirstCharacter="#"));var msgCode,newPageCode,isDelete=this.deleteCheckbox&&this.deleteCheckbox.isSelected();if(isDelete||(msgCode=this.msgTextToCode("submit")),this.cantParse)throw new cd.env.Exception("\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043d\u0435 \u0438\u0441\u043a\u0430\u0437\u0438\u0432 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430. \u0423\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u043f\u0438\u0441\u043a\u0438 \u0438\u0437 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.");if("reply"===this.mode)newPageCode=pageCode.slice(0,currentIndex)+msgCode+pageCode.slice(currentIndex);else if("edit"===this.mode)if(isDelete){var _startPos,endPos=targetInCode.endPos+targetInCode.oldSig.length+1;if(void 0===targetInCode.headingStartPos){var _succeedingText=pageCode.slice(targetInCode.endPos);if(new RegExp("^.+\\n+[:\\*#]{".concat(targetInCode.indentationCharacters.length+1,",}")).exec(_succeedingText))throw new cd.env.Exception("\u041d\u0435\u043b\u044c\u0437\u044f \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u043d\u0435\u0433\u043e \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b.");_startPos=targetInCode.lineStartPos}else{var sectionInCode=this.target.section.locateInCode(pageCode),sectionCode=sectionInCode&§ionInCode.code;if(!sectionCode)throw new cd.env.Exception("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u0435\u043c\u0443: \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u0432 \u043a\u043e\u0434\u0435.");var msgCount,tempSectionCode=sectionCode;for(msgCount=0;msgCount<2;msgCount++){var _cd$env$findFirstMsg=cd.env.findFirstMsg(tempSectionCode),_cd$env$findFirstMsg2=(0,_slicedToArray2.default)(_cd$env$findFirstMsg,2),firstMsgMatch=_cd$env$findFirstMsg2[0],firstMsgInitialPos=_cd$env$findFirstMsg2[1];if(!firstMsgMatch)break;tempSectionCode=tempSectionCode.slice(firstMsgInitialPos+firstMsgMatch[0].length)}if(1<msgCount)throw new cd.env.Exception("\u041d\u0435\u043b\u044c\u0437\u044f \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u0435\u043c\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043d\u0435\u0439 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b.");_startPos=targetInCode.headingStartPos,"\n"===pageCode[endPos]&&endPos++}newPageCode=pageCode.slice(0,_startPos)+pageCode.slice(endPos)}else{var startPos=void 0===targetInCode.headingStartPos?targetInCode.startPos:targetInCode.headingStartPos;newPageCode=pageCode.slice(0,startPos)+msgCode+pageCode.slice(targetInCode.endPos+targetInCode.oldSig.length)}else if("replyInSection"===this.mode){if(!targetInCode.subdivisionEndPos)throw new cd.env.Exception("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043c\u0435\u0441\u0442\u043e \u0432 \u043a\u043e\u0434\u0435 \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.");newPageCode=pageCode.slice(0,targetInCode.subdivisionEndPos)+msgCode+pageCode.slice(targetInCode.subdivisionEndPos)}else if("addSection"===this.mode)if(this.newTopicOnTop){var firstSectionLocation=pageCode.replace(/(<!--)([^]*?)(-->)/g,function(s,m1,m2,m3){return m1+" ".repeat(m2.length)+m3}).search(/^(=+).*?\1/m);newPageCode=pageCode.slice(0,firstSectionLocation)+msgCode+"\n"+pageCode.slice(firstSectionLocation)}else newPageCode=pageCode+"\n"+msgCode;else"addSubsection"===this.mode&&(newPageCode=pageCode.slice(0,targetInCode.endPos).replace(/([^\n])\n$/,"$1\n\n")+msgCode+pageCode.slice(targetInCode.endPos));return newPageCode}},{key:"preview",value:(_preview=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function _callee(callback){var msgCode,data,error,text,html,msg,$parsedsummary;return _regenerator.default.wrap(function(_context){for(;;)switch(_context.prev=_context.next){case 0:return this.$infoArea.cdEmpty(this.getTargetMsg(!0)),this.setPending(!0),msgCode=this.msgTextToCode("preview"),_context.prev=3,_context.next=6,(new mw.Api).post({action:"parse",text:msgCode,title:cd.env.CURRENT_PAGE,summary:cd.env.formSummary(this.summaryInput.getValue()),prop:"text",pst:"",disablelimitreport:"",formatversion:2});case 6:if(data=_context.sent,error=data.error)return text=error.code+": "+error.info,this.abort("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435. "+text,data),_context.abrupt("return");_context.next=12;break;case 12:(html=data&&data.parse&&data.parse.text)&&((msg=this.getTargetMsg(!0,!0))&&msg.prepareUnderlayersInViewport(!0),this.$previewArea.html(html).cdAddCloseButton("\u043f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440",this.getTargetMsg(!0)),($parsedsummary=data.parse.parsedsummary&&cd.env.toJquerySpan(data.parse.parsedsummary)).length&&this.$element.find(".cd-summaryPreview").html('\u041f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f: <span class="comment">'.concat($parsedsummary.html(),"</span>")),msg&&msg.updateUnderlayersInViewport(!0)),this.$previewArea.cdIsInViewport()||this.$previewArea.cdScrollTo("top"),this.setPending(!1),_context.next=21;break;case 18:_context.prev=18,_context.t0=_context.catch(3),this.abort("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.",_context.t0);case 21:callback&&callback();case 22:case"end":return _context.stop()}},_callee,this,[[3,18]])})),function(_x){return _preview.apply(this,arguments)})},{key:"viewChanges",value:(_viewChanges=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function _callee2(){var result,newPageCode,data,error,text,html,errorType,_data,_e3;return _regenerator.default.wrap(function(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:return this.$infoArea.cdEmpty(this.getTargetMsg(!0)),this.setPending(!0),_context2.prev=2,_context2.next=5,cd.env.loadPageCode(cd.env.CURRENT_PAGE);case 5:result=_context2.sent,_context2.prev=6,newPageCode=this.prepareNewPageCode(result.code,result.queryTimestamp),_context2.next=14;break;case 10:return _context2.prev=10,_context2.t0=_context2.catch(6),_context2.t0 instanceof cd.env.Exception?this.abort(_context2.t0.message):this.abort("\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 JavaScript. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u043c. \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 JavaScript (F12 \u2192 \u041a\u043e\u043d\u0441\u043e\u043b\u044c).",_context2.t0.stack||_context2.t0.message),_context2.abrupt("return");case 14:return mw.loader.load("mediawiki.diff.styles"),_context2.prev=15,_context2.next=18,(new mw.Api).post({action:"query",rvdifftotext:newPageCode,titles:cd.env.CURRENT_PAGE,prop:"revisions",formatversion:2});case 18:if(data=_context2.sent,error=data.error)return text=error.code+": "+error.info,this.abort("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. "+text,data),_context2.abrupt("return");_context2.next=24;break;case 24:(html=data&&data.query&&data.query.pages&&data.query.pages[0]&&data.query.pages[0].revisions&&data.query.pages[0].revisions[0]&&data.query.pages[0].revisions[0].diff&&data.query.pages[0].revisions[0].diff.body)?(html='<table class="diff"><col class="diff-marker"><col class="diff-content"><col class="diff-marker"><col class="diff-content">'+html+"</table>",this.$previewArea.cdHtml(html,this.getTargetMsg(!0)).cdAddCloseButton("\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439",this.getTargetMsg(!0))):(this.$previewArea.empty(),void 0!==html&&this.showInfo("\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0435\u0442.")),this.$previewArea.cdIsInViewport()||this.$previewArea.cdScrollTo("top"),this.setPending(!1),_context2.next=33;break;case 30:_context2.prev=30,_context2.t1=_context2.catch(15),this.abort("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.",_context2.t1);case 33:_context2.next=39;break;case 35:_context2.prev=35,_context2.t2=_context2.catch(2),$.isArray(_context2.t2)?(_e3=(0,_slicedToArray2.default)(_context2.t2,2),errorType=_e3[0],_data=_e3[1]):console.error(_context2.t2),cd.env.genericErrorHandler.call(this,{errorType:errorType,data:_data,message:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b"});case 39:case"end":return _context2.stop()}},_callee2,this,[[2,35],[6,10],[15,30]])})),function(){return _viewChanges.apply(this,arguments)})},{key:"reloadPageAfterSubmit",value:function(keepedData){var _this4=this;this.destroy({leaveInfo:!0}),cd.env.reloadPage(keepedData).fail(function(e){var errorType,data;if($.isArray(e)){var _e4=(0,_slicedToArray2.default)(e,2);errorType=_e4[0],data=_e4[1]}else console.error(e);!1!==cd.settings.showLoadingOverlay&&cd.env.removeLoadingOverlay(),cd.env.genericErrorHandler.call(_this4,{errorType:errorType,data:data,retryFunc:function(){_this4.reloadPageAfterSubmit(keepedData)},message:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443"})})}},{key:"submit",value:(_submit=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function _callee3(){var isDelete,result,newPageCode,keepedData,section,heading,_section,data,text,noIcon,message,anchor,now,_e5,error,_text,errorType,_data2,_e6,_this5=this;return _regenerator.default.wrap(function(_context3){for(;;)switch(_context3.prev=_context3.next){case 0:if(isDelete=!1,this.headingInput&&""===this.headingInput.getValue()&&!confirm("\u0412\u044b \u043d\u0435 \u0432\u0432\u0435\u043b\u0438 ".concat(this.headingInputPurpose.toLowerCase(),". \u0412\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0443?")))return this.headingInput.focus(),_context3.abrupt("return");_context3.next=4;break;case 4:if(this.textarea.getValue().trim()||/^\u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f:\u0417\u0430\u044f\u0432\u043a\u0438 \u043d\u0430 \u0441\u0442\u0430\u0442\u0443\u0441 /.test(cd.env.CURRENT_PAGE)||confirm("\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435?")){_context3.next=7;break}return this.textarea.focus(),_context3.abrupt("return");case 7:if(!this.deleteCheckbox||!this.deleteCheckbox.isSelected()){_context3.next=11;break}if(confirm("\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435?")){_context3.next=10;break}return _context3.abrupt("return");case 10:isDelete=!0;case 11:return this.$infoArea.cdEmpty(this.getTargetMsg(!0)),this.setPending(!0,!0),_context3.prev=13,_context3.next=16,cd.env.loadPageCode(cd.env.CURRENT_PAGE);case 16:result=_context3.sent,_context3.prev=17,newPageCode=this.prepareNewPageCode(result.code,result.queryTimestamp),_context3.next=25;break;case 21:return _context3.prev=21,_context3.t0=_context3.catch(17),_context3.t0 instanceof cd.env.Exception?this.abort(_context3.t0.message):this.abort("\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 JavaScript. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u043c. \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 JavaScript (F12 \u2192 \u041a\u043e\u043d\u0441\u043e\u043b\u044c).",_context3.t0.stack||_context3.t0.message),_context3.abrupt("return");case 25:return keepedData={},this.watchTopicCheckbox&&(this.watchTopicCheckbox.isSelected()?((section=this.targetSection)&&!section.isWatched&&(section.watch(!0),keepedData.justWatchedTopic=section.heading),"addSection"!==this.mode&&"addSubsection"!==this.mode||(heading=cd.env.cleanSectionHeading(this.headingInput.getValue().trim()),cd.env.watchTopic(heading,!0),keepedData.justWatchedTopic=heading)):(_section=this.targetSection)&&_section.isWatched&&(_section.unwatch(!0),keepedData.justUnwatchedTopic=_section.heading)),_context3.prev=27,_context3.next=30,(new mw.Api).postWithToken("csrf",{action:"edit",title:cd.env.CURRENT_PAGE,summary:cd.env.formSummary(this.summaryInput.getValue()),text:newPageCode,basetimestamp:new Date(result.timestamp).toISOString(),starttimestamp:new Date(result.queryTimestamp).toISOString(),minor:this.minorCheckbox&&this.minorCheckbox.isSelected(),watchlist:this.watchCheckbox.isSelected()?"watch":"unwatch",formatversion:2});case 30:if((data=_context3.sent).edit&&data.edit.result&&"Success"===data.edit.result){_context3.next=37;break}return noIcon=!1,data.edit.spamblacklist&&(text="\u041e\u0448\u0438\u0431\u043a\u0430: \u0430\u0434\u0440\u0435\u0441 ".concat(data.edit.spamblacklist," \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0447\u0451\u0440\u043d\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435. \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e.")),data.edit.abusefilter?(text=data.edit.warning,noIcon=!0):(text="\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u043c. \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 JavaScript (F12 \u2192 \u041a\u043e\u043d\u0441\u043e\u043b\u044c).",console.error("\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 data.edit \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0448\u0438\u0431\u043a\u0438: ",data.edit)),this.abort(text,null,null,noIcon),_context3.abrupt("return");case 37:"reply"===this.mode||"replyInSection"===this.mode?message="\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e":"edit"===this.mode?message=isDelete?"\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043e":"\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043e":"addSection"===this.mode?message="\u0422\u0435\u043c\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430":"addSubsection"===this.mode&&(message="\u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d"),this.showInfo(message),this.setPending(!1,!0),anchor="edit"!==this.mode?(now=new Date,cd.env.generateMsgAnchor(now.getUTCFullYear(),now.getUTCMonth(),now.getUTCDate(),now.getUTCHours(),now.getUTCMinutes(),cd.env.CURRENT_USER)):this.target.anchor,keepedData.anchor=anchor,cd.msgForms[cd.msgForms.indexOf(this)].submitted=!0,cd.getLastActiveAlteredMsgForm()?this.preview(function(){var $info=cd.env.toJquerySpan('\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e, \u043d\u043e \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u0444\u043e\u0440\u043c\u044b. \u041e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0438\u0445 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438\u043b\u0438 <a href="javascript:">\u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443</a> \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e.');$info.find("a").click(function(){_this5.reloadPageAfterSubmit(keepedData)}),_this5.showInfo($info),_this5.destroy({leaveInfo:!0,leavePreview:!0})}):this.reloadPageAfterSubmit(keepedData),_context3.next=58;break;case 46:if(_context3.prev=46,_context3.t1=_context3.catch(27),_e5=(0,_slicedToArray2.default)(_context3.t1,3),jqXHR=_e5[0],textStatus=_e5[1],errorThrown=_e5[2],error=textStatus&&textStatus.error)return"editconflict"===error.code?(_text="\u041a\u043e\u043d\u0444\u043b\u0438\u043a\u0442 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0435\u0449\u0451 \u0440\u0430\u0437\u2026",this.submit()):_text="\u041e\u0442\u0432\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d. \u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.",this.abort(_text),_context3.abrupt("return");_context3.next=57;break;case 57:this.abort("\u041d\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u043e\u0442\u0432\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.",[jqXHR,textStatus,errorThrown]);case 58:_context3.next=64;break;case 60:_context3.prev=60,_context3.t2=_context3.catch(13),$.isArray(_context3.t2)?(_e6=(0,_slicedToArray2.default)(_context3.t2,2),errorType=_e6[0],_data2=_e6[1]):console.error(_context3.t2),cd.env.genericErrorHandler.call(this,{errorType:errorType,data:_data2,message:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b"});case 64:case"end":return _context3.stop()}},_callee3,this,[[13,60],[17,21],[27,46]])})),function(){return _submit.apply(this,arguments)})},{key:"cancel",value:function(){var $elements,_this6=this,confirmation=!0;if(this.isAltered()&&(confirmation=confirm("\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0444\u043e\u0440\u043c\u0443? \u0412\u043d\u0435\u0441\u0451\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u044b.")),confirmation){if("edit"!==this.mode?this.$element[cd.settings.slideEffects?"cdSlideUp":"cdFadeOut"]("fast",function(){_this6.destroy(),"replyInSection"===_this6.mode&&_this6.target.$replyButtonContainer.show()},this.getTargetMsg(!0)):this.$element.cdFadeOut("fast",function(){_this6.destroy(),_this6.target.$elements.show(),_this6.target.isEdited=!1,_this6.target.isOpeningSection?(_this6.target.section.$heading.show(),_this6.target.section.$heading.cdIsInViewport()||_this6.target.section.$heading.cdScrollTo("top")):_this6.target.$elements.cdIsInViewport()||_this6.target.$elements.cdScrollTo("top"),_this6.target.configureUnderlayer()},this.getTargetMsg(!0)),"reply"===this.mode)($elements=this.target.isOpeningSection?this.target.section.$heading:this.target.$elements).cdIsInViewport()||$elements.cdScrollTo("top");else if("replyInSection"===this.mode||"addSubsection"===this.mode){var $lastVisible;if("replyInSection"===this.mode){var $prev=this.target.$replyButtonContainer.prev();$lastVisible=$prev.length?$prev:this.target.$replyButtonContainer.parent().prev()}else"addSubsection"===this.mode&&($lastVisible=this.target.$elements.filter(":visible").last());$lastVisible.cdIsInViewport(!0)||$lastVisible.cdScrollTo("bottom")}}else this.textarea.focus()}},{key:"destroy",value:function(){var options=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},leaveInfo=options.leaveInfo,leavePreview=options.leavePreview;this.$wrapper.children((leaveInfo?":not(.cd-infoArea)":"")+(leavePreview?":not(.cd-previewArea)":"")).remove(),(!leaveInfo&&!leavePreview||!leavePreview&&this.$wrapper.children(".cd-infoArea:empty").length)&&this.$element.remove(),cd.msgForms.includes(this)&&cd.msgForms.splice(cd.msgForms.indexOf(this),1),this.target&&delete this.target[modeToProperty.call(this,this.mode)+"Form"],cd.lastActiveMsgForm===this&&(cd.lastActiveMsgForm=null),"addSection"===this.mode&&(cd.env.addSectionForm=null)}},{key:"isActive",value:function(){return!this.submitted}},{key:"isAltered",value:function(){return void 0!==this.originalText&&this.originalText!==this.textarea.getValue()||this.defaultSummary!==this.summaryInput.getValue()||this.headingInput&&void 0!==this.originalHeadingText&&this.originalHeadingText!==this.headingInput.getValue()}}]),MsgForm}();exports.default=MsgForm;var _couldBeCloserClosing=new WeakMap,_standardButtonsTotalWidth=new WeakMap,_standardSubmitButtonLabel=new WeakMap,_shortSubmitButtonLabel=new WeakMap;function modeToProperty(mode){return"replyInSection"===mode?"addReply":mode}},{"./Msg":20,"./Section":22,"@babel/runtime/helpers/asyncToGenerator":3,"@babel/runtime/helpers/classCallCheck":4,"@babel/runtime/helpers/classPrivateFieldGet":5,"@babel/runtime/helpers/classPrivateFieldSet":6,"@babel/runtime/helpers/createClass":7,"@babel/runtime/helpers/interopRequireDefault":8,"@babel/runtime/helpers/slicedToArray":13,"@babel/runtime/regenerator":16}],22:[function(require,module,exports){"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")),_regenerator=_interopRequireDefault(require("@babel/runtime/regenerator")),_asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")),_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),_classPrivateFieldGet2=_interopRequireDefault(require("@babel/runtime/helpers/classPrivateFieldGet")),_classPrivateFieldSet2=_interopRequireDefault(require("@babel/runtime/helpers/classPrivateFieldSet")),_MsgForm=_interopRequireDefault(require("./MsgForm")),Section=function(){function Section(headingElement,isLastSection){var _this=this;(0,_classCallCheck2.default)(this,Section),_closingBracketElement.set(this,{writable:!0,value:void 0}),_editsectionElement.set(this,{writable:!0,value:void 0}),_elements.set(this,{writable:!0,value:void 0}),_cached$elements.set(this,{writable:!0,value:void 0});var headlineElement=headingElement.querySelector(".mw-headline");if((0,_classPrivateFieldSet2.default)(this,_editsectionElement,headingElement.querySelector(".mw-editsection")),!headlineElement||!(0,_classPrivateFieldGet2.default)(this,_editsectionElement))throw new cd.env.Exception;(0,_classPrivateFieldSet2.default)(this,_closingBracketElement,(0,_classPrivateFieldGet2.default)(this,_editsectionElement)&&(0,_classPrivateFieldGet2.default)(this,_editsectionElement).lastElementChild),(0,_classPrivateFieldGet2.default)(this,_closingBracketElement)&&(0,_classPrivateFieldGet2.default)(this,_closingBracketElement).classList&&(0,_classPrivateFieldGet2.default)(this,_closingBracketElement).classList.contains("mw-editsection-bracket")||(0,_classPrivateFieldSet2.default)(this,_closingBracketElement,null);for(var lastElementInFirstSubdivision,headingText=cd.env.elementsToText($.makeArray(headlineElement.childNodes),["ch-helperText","userflags-wrapper","mw-headline-number"]),headingLevelMatches=headingElement.tagName.match(/^H([1-6])$/),headingLevel=headingLevelMatches&&Number(headingLevelMatches[1]),headingLevelRegExp=new RegExp("^H[1-".concat(headingLevel,"]$")),_elements2=[headingElement],element=headingElement.nextSibling,hasSubsections=!1;element&&(!element.tagName||!headingLevelRegExp.test(element.tagName));){if(!lastElementInFirstSubdivision&&element.tagName&&/^H[2-6]$/.test(element.tagName)){hasSubsections=!0;for(var i=_elements2.length-1;0<=i;i--)if(_elements2[i].tagName){lastElementInFirstSubdivision=_elements2[i];break}}_elements2.push(element),element=element.nextSibling}if(!lastElementInFirstSubdivision)for(var _i=_elements2.length-1;0<=_i;_i--)if(_elements2[_i].tagName&&!_elements2[_i].classList.contains("cd-addSubsectionButtonContainer")){lastElementInFirstSubdivision=_elements2[_i];break}if(!_elements2.length)throw new cd.env.Exception;if(cd.env.EVERYTHING_MUST_BE_FROZEN)this.frozen=!0;else if(cd.env.closedDiscussions.length)for(var _i2=0;_i2<cd.env.closedDiscussions.length;_i2++)if(cd.env.closedDiscussions[_i2].contains(headingElement)){this.frozen=!0;break}void 0===this.frozen&&(this.frozen=!1);for(var msgsInSection=[],msgsInFirstSubdivision=[],msgParts=[],_i3=0;_i3<_elements2.length;_i3++)if((element=_elements2[_i3]).nodeType===Node.ELEMENT_NODE){if(element.classList.contains("cd-msgPart")){msgParts.push(element);break}var part=element.querySelector(".cd-msgPart");if(part){msgParts.push(part);break}}for(var _i4=_elements2.length-1;0<=_i4;_i4--)if((element=_elements2[_i4]).nodeType===Node.ELEMENT_NODE){var moreMsgParts=element.querySelectorAll(".cd-msgPart");if(moreMsgParts.length){msgParts.push(moreMsgParts[moreMsgParts.length-1]);break}if(element.classList.contains("cd-msgPart")){msgParts.push(element);break}}if(msgParts.length){var firstMsgPart=msgParts[0],lastMsgPart=msgParts[msgParts.length-1],firstMsgPartId=Number(firstMsgPart.getAttribute("data-id")),lastMsgPartId=Number(lastMsgPart.getAttribute("data-id"));if(void 0!==firstMsgPartId&&void 0!==lastMsgPartId&&cd.msgs[firstMsgPartId]&&cd.msgs[lastMsgPartId])if(cd.msgs[firstMsgPartId].id===firstMsgPartId&&cd.msgs[lastMsgPartId].id===lastMsgPartId){var openingSectionOfLevel,firstMsg=cd.msgs[firstMsgPartId];if(firstMsgPart.previousElementSibling){var matches=firstMsgPart.previousElementSibling.tagName.match(/^H([1-6])$/);matches&&(openingSectionOfLevel=Number(matches[1]))}if(0===firstMsg.level&&openingSectionOfLevel){firstMsg.isOpeningSection=!0,firstMsg.openingSectionOfLevel=openingSectionOfLevel;var firstMsgAnchor=firstMsgPart.id;firstMsgPart.removeAttribute("id"),headingElement.id=firstMsgAnchor}for(var _i5=firstMsgPartId;_i5<=lastMsgPartId;_i5++)msgsInSection.push(cd.msgs[_i5]),hasSubsections&&(cd.msgs[_i5].elements[0].compareDocumentPosition(lastElementInFirstSubdivision)&Node.DOCUMENT_POSITION_FOLLOWING||cd.msgs[_i5].elements[0].compareDocumentPosition(lastElementInFirstSubdivision)&Node.DOCUMENT_POSITION_CONTAINS)&&msgsInFirstSubdivision.push(cd.msgs[_i5])}else console.error("\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435: id \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435.");else console.error("\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435: \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043d\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0441 \u0442\u0430\u043a\u0438\u043c id.")}if(this.id=cd.env.currentSectionId,this.level=headingLevel,this.heading=headingText,this.isLastSection=isLastSection,(0,_classPrivateFieldSet2.default)(this,_elements,_elements2),this.$heading=$(headingElement),this.msgs=msgsInSection,this.msgsInFirstSubdivision=hasSubsections?msgsInFirstSubdivision:msgsInSection,!this.frozen){var tag,createUl,replyButton=cd.env.SECTION_REPLY_BUTTON_PROTOTYPE.cloneNode(!0);if(replyButton.firstChild.onclick=this.addReply.bind(this),lastElementInFirstSubdivision.classList.contains("cd-msgLevel")){var leifsTagName=lastElementInFirstSubdivision.tagName;"UL"===leifsTagName?tag="li":"OL"===leifsTagName?tag="div":"DL"===leifsTagName?tag="dd":(tag="li",createUl=!0)}else tag="li",createUl=!0;var replyButtonContainer=document.createElement(tag);if(replyButtonContainer.className="cd-replyButtonContainer",replyButtonContainer.appendChild(replyButton),createUl){var replyButtonUl=document.createElement("ul");replyButtonUl.className="cd-msgLevel cd-replyButtonContainerContainer",replyButtonUl.appendChild(replyButtonContainer),lastElementInFirstSubdivision.parentElement.insertBefore(replyButtonUl,lastElementInFirstSubdivision.nextElementSibling)}else lastElementInFirstSubdivision.appendChild(replyButtonContainer);if(this.$replyButtonContainer=$(replyButtonContainer),this.showAddSubsectionButtonTimeout=void 0,this.hideAddSubsectionButtonTimeout=void 0,2===headingLevel){var addSubsectionButton=cd.env.SECTION_ADDSUBSECTION_BUTTON_PROTOTYPE.cloneNode(!0);addSubsectionButton.firstChild.onclick=this.addSubsection.bind(this);var addSubsectionButtonContainer=document.createElement("div");addSubsectionButtonContainer.className="cd-addSubsectionButtonContainer",addSubsectionButtonContainer.style.display="none",addSubsectionButtonContainer.appendChild(addSubsectionButton);var lastElement=_elements2[_elements2.length-1];lastElement.parentElement.insertBefore(addSubsectionButtonContainer,lastElement.nextSibling),this.$addSubsectionButtonContainer=$(addSubsectionButtonContainer);var deferAddSubsectionButtonHide=function(){_this.hideAddSubsectionButtonTimeout||(_this.hideAddSubsectionButtonTimeout=setTimeout(function(){_this.$addSubsectionButtonContainer.cdFadeOut("fast",null,_this.msgsInFirstSubdivision[_this.msgsInFirstSubdivision.length-1])},1e3))};addSubsectionButton.firstChild.onmouseenter=function(){clearTimeout(_this.hideAddSubsectionButtonTimeout),_this.hideAddSubsectionButtonTimeout=null},addSubsectionButton.firstChild.onmouseleave=function(){deferAddSubsectionButtonHide()},this.replyButtonHoverHandler=function(){_this.addSubsectionForm||(clearTimeout(_this.hideAddSubsectionButtonTimeout),_this.hideAddSubsectionButtonTimeout=null,_this.showAddSubsectionButtonTimeout||(_this.showAddSubsectionButtonTimeout=setTimeout(function(){_this.$addSubsectionButtonContainer.cdFadeIn("fast",_this.msgsInFirstSubdivision[_this.msgsInFirstSubdivision.length-1])},1e3)))},this.replyButtonUnhoverHandler=function(){_this.addSubsectionForm||(clearTimeout(_this.showAddSubsectionButtonTimeout),_this.showAddSubsectionButtonTimeout=null,deferAddSubsectionButtonHide())}}this.msgs[0]&&this.msgs[0].isOpeningSection&&this.msgs[0].openingSectionOfLevel===this.level&&(this.msgs[0].author===cd.env.CURRENT_USER||cd.settings.allowEditOthersMsgs)&&this.addMenuItem({label:"\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",func:this.msgs[0].edit.bind(this.msgs[0]),class:"editHeading"}),this.addMenuItem({label:"\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b",func:this.addSubsection.bind(this),class:"addSubsectionLink"}),2===headingLevel&&this.addMenuItem({label:"\u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438",func:this.move.bind(this),class:"moveSectionLink"}),cd.env.getWatchedTopicsPromise.done(function(){_this.heading.trim()&&(cd.env.thisPageWatchedTopics.includes(_this.heading)?(_this.isWatched=!0,_this.addMenuItem({label:"\u043d\u0435 \u0441\u043b\u0435\u0434\u0438\u0442\u044c",func:function(){_this.unwatch.call(_this)},class:"unwatchSectionLink"})):(_this.isWatched=!1,_this.addMenuItem({label:"\u0441\u043b\u0435\u0434\u0438\u0442\u044c",func:function(){_this.watch.call(_this)},class:"watchSectionLink"}))),_this.addMenuItem({label:"#",func:_this.copyLink.bind(_this),class:"copySectionLink",tooltip:"\u041d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u043a\u0438-\u0441\u0441\u044b\u043b\u043a\u0443. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0441 \u0437\u0430\u0436\u0430\u0442\u044b\u043c Ctrl, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0438\u0434 \u0441\u0441\u044b\u043b\u043a\u0438.",href:mw.util.getUrl(cd.env.CURRENT_PAGE)+"#"+_this.heading.replace(/ /g,"_")})})}}var _unwatch,_move;return(0,_createClass2.default)(Section,[{key:"addReply",value:function(){this.addReplyForm||(this.addReplyForm=new _MsgForm.default("replyInSection",this)),this.$replyButtonContainer.hide();var sectionWithAddSubsectionButton=2===this.level?this:this.baseSection;sectionWithAddSubsectionButton&§ionWithAddSubsectionButton.$addSubsectionButtonContainer&&(sectionWithAddSubsectionButton.$addSubsectionButtonContainer.hide(),clearTimeout(sectionWithAddSubsectionButton.showAddSubsectionButtonTimeout),sectionWithAddSubsectionButton.showAddSubsectionButtonTimeout=null),this.addReplyForm.show(cd.settings.slideEffects?"slideDown":"fadeIn"),this.addReplyForm.textarea.focus()}},{key:"addSubsection",value:function(){this.$addSubsectionButtonContainer&&this.$addSubsectionButtonContainer.hide(),this.addSubsectionForm||(this.addSubsectionForm=new _MsgForm.default("addSubsection",this));var height=this.addSubsectionForm.$element.height(),willBeInViewport=this.addSubsectionForm.$element.cdIsInViewport();this.addSubsectionForm.show(cd.settings.slideEffects?"slideDown":"fadeIn"),willBeInViewport||this.addSubsectionForm.$element.cdScrollTo("middle",null,!0,height/2),this.addSubsectionForm.headingInput.focus()}},{key:"move",value:(_move=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function _callee(){var result,inCode,sectionCode,MoveSectionDialog,section,moveSectionDialog;return _regenerator.default.wrap(function(_context){for(;;)switch(_context.prev=_context.next){case 0:return MoveSectionDialog=function(){MoveSectionDialog.parent.call(this)},_context.next=3,$.when(cd.env.loadPageCode(cd.env.CURRENT_PAGE),mw.loader.using("mediawiki.widgets"));case 3:if(result=_context.sent,inCode=this.locateInCode(result.code),sectionCode=inCode&&inCode.code){_context.next=9;break}return mw.notify(cd.strings.couldntLocateSectionInCode,{type:"error",autoHide:!1}),_context.abrupt("return");case 9:OO.inheritClass(MoveSectionDialog,OO.ui.ProcessDialog),MoveSectionDialog.static.name="moveSectionDialog",MoveSectionDialog.static.title="\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0442\u0435\u043c\u0443",MoveSectionDialog.static.actions=[{modes:"move",action:"move",label:"\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438",flags:["primary","progressive"],disabled:!0},{modes:"move",label:"\u041e\u0442\u043c\u0435\u043d\u0430",flags:"safe"},{modes:"reload",action:"reload",label:"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c",flags:["primary","progressive"]},{modes:"reload",label:"\u0417\u0430\u043a\u0440\u044b\u0442\u044c",flags:"safe"}],MoveSectionDialog.prototype.initialize=function(){MoveSectionDialog.parent.prototype.initialize.apply(this,arguments),this.panelMove=new OO.ui.PanelLayout({padded:!0,expanded:!1}),this.fieldsetMove=new OO.ui.FieldsetLayout,this.titleInput=new mw.widgets.TitleInputWidget({$overlay:this.$overlay,excludeCurrentPage:!0,validate:function(){var title=this.titleInput.getMWTitle();return title&&title.toText()!==cd.env.CURRENT_PAGE&&cd.env.isDiscussionNamespace(title.namespace)}.bind(this)}),this.titleField=new OO.ui.FieldLayout(this.titleInput,{label:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0444\u043e\u0440\u0443\u043c\u0430 \u0438\u043b\u0438 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f, \u043a\u0443\u0434\u0430 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0442\u0435\u043c\u0443:",align:"top"}),this.fieldsetMove.addItems([this.titleField]),this.panelMove.$element.append(this.fieldsetMove.$element);var $sectionCodeNote=$("<div>");$("<pre>").text(sectionCode.slice(0,300)+(300<=sectionCode.length?"...":"")).appendTo($sectionCodeNote),$("<p>").css("font-size","85%").text("\u041a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c, \u0435\u0441\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0437\u0430 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u044f \u043e\u043a\u043d\u0430.").appendTo($sectionCodeNote),this.panelMove.$element.append($sectionCodeNote),this.panelReload=new OO.ui.PanelLayout({padded:!0,expanded:!1}),this.stackLayout=new OO.ui.StackLayout({items:[this.panelMove,this.panelReload]}),this.$body.append(this.stackLayout.$element),this.titleInput.connect(this,{change:"onTitleInputChange"}),this.titleInput.connect(this,{enter:function(){this.actions.get({actions:"move"})[0].isDisabled()||this.executeAction("move")}.bind(this)})},MoveSectionDialog.prototype.onTitleInputChange=function(value){this.titleInput.getValidity().done(function(){this.actions.setAbilities({move:!0})}.bind(this)).fail(function(){this.actions.setAbilities({move:!1})}.bind(this))},MoveSectionDialog.prototype.getSetupProcess=function(data){return MoveSectionDialog.parent.prototype.getSetupProcess.call(this,data).next(function(){this.stackLayout.setItem(this.panelMove),this.actions.setMode("move")},this)},section=this,MoveSectionDialog.prototype.getActionProcess=function(action){var dialog=this,abort=function(text,recoverable){dialog.popPending(),dialog.showErrors(new OO.ui.Error(text,recoverable)),dialog.actions.setAbilities({move:recoverable})};if("move"!==action)return"reload"===action?new OO.ui.Process(function(){dialog.close({action:action}),cd.env.reloadPage()}):MoveSectionDialog.parent.prototype.getActionProcess.call(dialog,action);var sectionInSourcePageCode,sourcePageCode,sourcePageTimestamp,sourceWikilink,targetTitle,targetPageCode,targetWikilink,newSourcePageCode,newTargetPageCode,loadSourcePageDoneCallback=function(result){sourcePageCode=result.code,sourcePageTimestamp=result.queryTimestamp,(sectionInSourcePageCode=sourcePageCode&§ion.locateInCode(sourcePageCode))?(targetTitle=dialog.titleInput.getMWTitle())&&targetTitle.toText()!==cd.env.CURRENT_PAGE&&cd.env.isDiscussionNamespace(targetTitle.namespace)?cd.env.loadPageCode(targetTitle).done(loadTargetPageDoneCallback).fail(loadTargetPageFailCallback):abort("\u041d\u0435\u0432\u0435\u0440\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430.",!1):abort(cd.strings.couldntLocateSectionInCode,!0)},loadSourcePageFailCallback=function(errorType,data){var text,recoverable;"api"===errorType?recoverable=(text="missing"===data?"\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0431\u044b\u043b\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0430.":"\u041e\u0448\u0438\u0431\u043a\u0430 API: ".concat(data,"."),!0):"network"===errorType&&(text="\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430.",recoverable=!0),abort(text,recoverable)},loadTargetPageDoneCallback=function(result){var newTopicsOnTop;targetPageCode=result.code,result.redirectTarget&&(targetTitle=result.redirectTarget),/\{\{[\u043d\u041d]\u043e\u0432\u044b\u0435 \u0441\u0432\u0435\u0440\u0445\u0443/.test(targetPageCode)?newTopicsOnTop=!0:/^(?:\u0424\u043e\u0440\u0443\u043c[/ ]|\u041e\u0441\u043f\u0430\u0440\u0438\u0432\u0430\u043d\u0438\u0435 |\u0417\u0430\u043f\u0440\u043e\u0441\u044b|.* \u0437\u0430\u043f\u0440\u043e\u0441\u044b)/.test(targetTitle.toText())?newTopicsOnTop=!0:/^\u041a (?:\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e|\u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044e|\u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044e|\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044e|\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e)/.test(targetTitle.toText())&&(newTopicsOnTop=!1);for(var firstSectionPos,sectionHeadingsMatches,prevTimestamp,adjustedTargetPageCode=targetPageCode.replace(/(<!--)([^]*?)(-->)/g,function(s,m1,m2,m3){return m1+" ".repeat(m2.length)+m3}),sectionHeadingsRegExp=/^==[^=].*?==[ \t]*(?:<!--[^]*?-->[ \t]*)*\n/gm,newerHigherCount=0,newerLowerCount=0;(sectionHeadingsMatches=sectionHeadingsRegExp.exec(adjustedTargetPageCode))&&(void 0===newTopicsOnTop||!1!==newTopicsOnTop&&void 0===firstSectionPos)&&(void 0===firstSectionPos&&(firstSectionPos=sectionHeadingsMatches.index),void 0===newTopicsOnTop);){var codeStartingWithThisSection=targetPageCode.slice(sectionHeadingsMatches.index),_date=cd.env.findFirstDate(codeStartingWithThisSection),timestamp=_date&&cd.env.getTimestampFromDate(_date);prevTimestamp&&(prevTimestamp<timestamp?newerLowerCount++:newerHigherCount++),prevTimestamp=timestamp,5<Math.abs(newerLowerCount-newerHigherCount)&&(newTopicsOnTop=newerLowerCount<newerHigherCount)}void 0===newTopicsOnTop&&(newTopicsOnTop=newerHigherCount===newerLowerCount?!(targetTitle.namespace%2==1):newerLowerCount<newerHigherCount);var date=cd.env.findFirstDate(sectionInSourcePageCode.code);sourceWikilink=cd.env.CURRENT_PAGE+"#"+section.heading,targetWikilink=targetTitle.toText()+"#"+section.heading;var addTwoNewLines=function(code){return code.replace(/([^\n])$/,"$1\n").replace(/([^\n]\n)$/,"$1\n")},newSectionInSourcePageCode=sectionInSourcePageCode.code.slice(0,sectionInSourcePageCode.contentStartPos-sectionInSourcePageCode.startPos)+"{{\u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u043e \u043d\u0430|".concat(targetWikilink,"|").concat(cd.settings.mySig,"}}\n")+"<small>\u0414\u043b\u044f \u0431\u043e\u0442\u0430: ".concat(date,"</small>\n\n"),newSectionInTargetPageCode=sectionInSourcePageCode.code.slice(0,sectionInSourcePageCode.contentStartPos-sectionInSourcePageCode.startPos)+"{{\u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u043e \u0441|".concat(sourceWikilink,"|").concat(cd.settings.mySig,"}}\n")+sectionInSourcePageCode.code.slice(sectionInSourcePageCode.contentStartPos-sectionInSourcePageCode.startPos);newSectionInTargetPageCode=addTwoNewLines(newSectionInTargetPageCode),newSourcePageCode=sourcePageCode.slice(0,sectionInSourcePageCode.startPos)+newSectionInSourcePageCode+sourcePageCode.slice(sectionInSourcePageCode.endPos),newTargetPageCode=newTopicsOnTop?(void 0===firstSectionPos&&(firstSectionPos=targetPageCode.length),addTwoNewLines(targetPageCode.slice(0,firstSectionPos))+newSectionInTargetPageCode+targetPageCode.slice(firstSectionPos)):targetPageCode+"\n\n"+newSectionInTargetPageCode,(new mw.Api).postWithToken("csrf",{action:"edit",title:targetTitle.toString(),summary:cd.env.formSummary("/* ".concat(section.heading," */ \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u043e \u0441 [[").concat(sourceWikilink,"]]")),text:newTargetPageCode,starttimestamp:new Date(result.queryTimestamp).toISOString(),formatversion:2}).done(editTargetPageDoneCallback).fail(editTargetPageFailCallback)},loadTargetPageFailCallback=function(errorType,data){var text,recoverable;"api"===errorType?recoverable="missing"===data?(text="\u0426\u0435\u043b\u0435\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.",!0):"invalid"===data?!(text="\u0423\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b"):(text="\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 API: ".concat(data,"."),!0):"network"===errorType&&(text="\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430.",recoverable=!0),abort(text,recoverable)},editTargetPageDoneCallback=function(data){var error=data.error;error&&("editconflict"===error.code?text="\u041a\u043e\u043d\u0444\u043b\u0438\u043a\u0442 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \xab".concat(OO.ui.msg("ooui-dialog-process-retry"),"\xbb."):text=error.code+": "+error.info,recoverable=!0,abort(text,recoverable)),(new mw.Api).postWithToken("csrf",{action:"edit",title:cd.env.CURRENT_PAGE,summary:cd.env.formSummary("/* ".concat(section.heading," */ \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u043e \u043d\u0430 [[").concat(targetWikilink,"]]")),text:newSourcePageCode,starttimestamp:new Date(sourcePageTimestamp).toISOString(),formatversion:2}).done(editSourcePageDoneCallback).fail(editSourcePageFailCallback)},editTargetPageFailCallback=function(){abort("\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.",!0)},editSourcePageDoneCallback=function(){var url=mw.util.getUrl(targetWikilink);dialog.panelReload.$element.html('<p>\u0422\u0435\u043c\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u0430. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 <a href="'.concat(url,'">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043a\u0443\u0434\u0430 \u0431\u044b\u043b\u0430 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u0430 \u0442\u0435\u043c\u0430</a>.</p>')),dialog.stackLayout.setItem(dialog.panelReload),dialog.popPending(),dialog.actions.setMode("reload")},editSourcePageFailCallback=function(){abort("\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0412\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0435\u0451 \u043f\u0440\u0430\u0432\u043a\u0443.",!1)};return new OO.ui.Process(function(){dialog.pushPending(),dialog.titleInput.$input.blur(),dialog.actions.setAbilities({move:!1}),cd.env.loadPageCode(cd.env.CURRENT_PAGE).done(loadSourcePageDoneCallback).fail(loadSourcePageFailCallback)})},MoveSectionDialog.prototype.getBodyHeight=function(){return this.stackLayout.getCurrentItem().$element.outerHeight(!0)},moveSectionDialog=new MoveSectionDialog,$("body").append(cd.env.windowManager.$element),cd.env.windowManager.addWindows([moveSectionDialog]),cd.env.windowManager.openWindow(moveSectionDialog).opened.then(function(){moveSectionDialog.titleInput.focus()});case 24:case"end":return _context.stop()}},_callee,this)})),function(){return _move.apply(this,arguments)})},{key:"watch",value:function(){var _this2=this,silent=0<arguments.length&&void 0!==arguments[0]&&arguments[0];cd.env.watchTopic(this.heading,silent,function(){_this2.isWatched=!0}),this.$heading.find(".cd-watchSectionLink").text("\u043d\u0435 \u0441\u043b\u0435\u0434\u0438\u0442\u044c").removeClass("cd-watchSectionLink").addClass("cd-unwatchSectionLink").off("click").click(function(){_this2.unwatch.call(_this2)})[0].onclick=null}},{key:"unwatch",value:(_unwatch=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function _callee2(){var silent,_this3=this,_args2=arguments;return _regenerator.default.wrap(function(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:if(silent=0<_args2.length&&void 0!==_args2[0]&&_args2[0],this.heading.trim()){_context2.next=3;break}return _context2.abrupt("return");case 3:return _context2.next=5,cd.env.getWatchedTopics();case 5:cd.env.thisPageWatchedTopics.splice(cd.env.thisPageWatchedTopics.indexOf(this.heading),1),cd.env.thisPageWatchedTopics.length||delete cd.env.watchedTopics[cd.env.ARTICLE_ID],cd.env.setWatchedTopics(cd.env.watchedTopics).done(function(){silent||mw.notify(cd.env.toJquerySpan("\u0418\u043a\u043e\u043d\u043a\u0430 \u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \xab".concat(_this3.heading,"\xbb \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u0435\u0440\u043e\u0439.")))}).fail(function(){mw.notify("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.")}),this.isWatched=!1,this.$heading.find(".cd-unwatchSectionLink").removeClass("cd-unwatchSectionLink").addClass("cd-watchSectionLink").off("click").click(function(){_this3.watch.call(_this3)}).text("\u0441\u043b\u0435\u0434\u0438\u0442\u044c")[0].onclick=null;case 11:case"end":return _context2.stop()}},_callee2,this)})),function(){return _unwatch.apply(this,arguments)})},{key:"copyLink",value:function(e){var url,wikilink="[[".concat(cd.env.CURRENT_PAGE,"#").concat(this.heading,"]]");try{url="https:"+mw.config.get("wgServer")+decodeURI(mw.util.getUrl(cd.env.CURRENT_PAGE))+"#"+this.heading.replace(/ /g,"_")}catch(e){return void console.error(e.stack)}if(e.ctrlKey){e.preventDefault();var messageDialog=new OO.ui.MessageDialog;$("body").append(cd.env.windowManager.$element),cd.env.windowManager.addWindows([messageDialog]);var textInputWikilink=new OO.ui.TextInputWidget({value:wikilink}),textFieldWikilink=new OO.ui.FieldLayout(textInputWikilink,{align:"top",label:"\u0412\u0438\u043a\u0438-\u0441\u0441\u044b\u043b\u043a\u0430"}),textInputAnchorWikilink=new OO.ui.TextInputWidget({value:"[[#".concat(this.heading,"]]")}),textFieldAnchorWikilink=new OO.ui.FieldLayout(textInputAnchorWikilink,{align:"top",label:"\u0412\u0438\u043a\u0438-\u0441\u0441\u044b\u043b\u043a\u0430 \u0441 \u044d\u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b"}),textInputUrl=new OO.ui.TextInputWidget({value:url}),textFieldUrl=new OO.ui.FieldLayout(textInputUrl,{align:"top",label:"\u041e\u0431\u044b\u0447\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430"}),textInputDiscord=new OO.ui.TextInputWidget({value:"<".concat(url,">")}),textFieldDiscord=new OO.ui.FieldLayout(textInputDiscord,{align:"top",label:"\u0421\u0441\u044b\u043b\u043a\u0430 \u0434\u043b\u044f Discord"}),copyLinkWindow=cd.env.windowManager.openWindow(messageDialog,{message:textFieldWikilink.$element.add(textFieldAnchorWikilink.$element).add(textFieldUrl.$element).add(textFieldDiscord.$element),actions:[{label:"\u0417\u0430\u043a\u0440\u044b\u0442\u044c",action:"close"}],size:"large"}),closeOnCtrlC=function(e){e.ctrlKey&&67===e.keyCode&&setTimeout(function(){messageDialog.close()},100)};copyLinkWindow.opened.then(function(){("wikilink"===cd.settings.defaultCopyLinkType?textInputUrl:textInputWikilink).focus().select(),$(document).keydown(closeOnCtrlC)}),copyLinkWindow.closed.then(function(){$(document).off("keydown",closeOnCtrlC)})}else{var link,subject;subject="link"===cd.settings.defaultCopyLinkType?(link=url,"\u0421\u0441\u044b\u043b\u043a\u0430"):"discord"===cd.settings.defaultCopyLinkType?(link="<".concat(url,">"),"Discord-\u0441\u0441\u044b\u043b\u043a\u0430"):(link=wikilink,"\u0412\u0438\u043a\u0438-\u0441\u0441\u044b\u043b\u043a\u0430");var $textarea=$("<textarea>").val(link).appendTo($("body")).select(),successful=document.execCommand("copy");$textarea.remove(),successful&&(e.preventDefault(),mw.notify(subject+" \u043d\u0430 \u0440\u0430\u0437\u0434\u0435\u043b \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430."))}}},{key:"locateInCode",value:function(pageCode){var _this4=this;if(null!=pageCode){var sectionCode,sectionStartPos,sectionEndPos,sectionContentStartPos,sectionSubdivisionEndPos,sectionSubdivisionCode,firstMsgAuthor=this.msgs&&this.msgs[0]&&this.msgs[0].author,firstMsgDate=this.msgs&&this.msgs[0]&&this.msgs[0].date,headingToFind=cd.env.encodeWikiMarkup(this.heading),sectionHeadingsRegExp=/^((=+)(.*?)\2[ \t]*(?:<!--[^]*?-->[ \t]*)*)\n/gm,adjustedPageCode=pageCode.replace(/(<!--)([^]*?)(-->)/g,function(s,m1,m2,m3){return m1+" ".repeat(m2.length)+m3}),sectionFound=!1,searchForSection=function(_ref2){var checkHeading=_ref2.checkHeading,checkFirstMsg=_ref2.checkFirstMsg;if(checkHeading||checkFirstMsg){for(var sectionHeadingsMatches,thisHeadingCount=0;sectionHeadingsMatches=sectionHeadingsRegExp.exec(adjustedPageCode);){var thisHeading=sectionHeadingsMatches[3];if((thisHeading=thisHeading&&cd.env.encodeWikiMarkup(cd.env.cleanSectionHeading(thisHeading)))===headingToFind&&(thisHeadingCount++,!checkFirstMsg&&1<thisHeadingCount))return}if(!checkHeading||checkFirstMsg||thisHeadingCount)for(;sectionHeadingsMatches=sectionHeadingsRegExp.exec(adjustedPageCode);){var _thisHeading=sectionHeadingsMatches[3];if(_thisHeading=_thisHeading&&cd.env.encodeWikiMarkup(cd.env.cleanSectionHeading(_thisHeading)),!checkHeading||_thisHeading===headingToFind){var fullMatch=sectionHeadingsMatches[1],equalSigns=sectionHeadingsMatches[2],equalSignsPattern="={1,".concat(equalSigns.length,"}"),codeFromSection=pageCode.slice(sectionHeadingsMatches.index),adjustedCodeFromSection=adjustedPageCode.slice(sectionHeadingsMatches.index),sectionMatches=adjustedCodeFromSection.match("("+mw.RegExp.escape(fullMatch)+"[^]*?\n)"+equalSignsPattern+"[^=].*?=+[ \t]*(?:\x3c!--[^]*?--\x3e[ \t]*)*\n")||codeFromSection.match("("+mw.RegExp.escape(fullMatch)+"[^]*$)"),sectionSubdivisionMatches=adjustedCodeFromSection.match("("+mw.RegExp.escape(fullMatch)+"[^]*?\n)\n*={1,6}[^=].*?=+[ \t]*(?:\x3c!--[^]*?--\x3e[ \t]*)*\n")||codeFromSection.match("("+mw.RegExp.escape(fullMatch)+"[^]*$)");if(sectionCode=sectionMatches&&codeFromSection.substr(sectionMatches.index,sectionMatches[1].length),sectionSubdivisionCode=sectionSubdivisionMatches&&codeFromSection.substr(sectionSubdivisionMatches.index,sectionSubdivisionMatches[1].length),!sectionCode||!sectionSubdivisionCode){console.log("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \xab".concat(_thisHeading,"\xbb."));continue}if(checkFirstMsg){var _cd$env$findFirstMsg=cd.env.findFirstMsg(sectionCode),firstMsgInCodeMatch=(0,_slicedToArray2.default)(_cd$env$findFirstMsg,1)[0];if(firstMsgInCodeMatch){var _cd$env$collectAuthor=cd.env.collectAuthorAndDate(firstMsgInCodeMatch),_cd$env$collectAuthor2=(0,_slicedToArray2.default)(_cd$env$collectAuthor,2),authorInCode=_cd$env$collectAuthor2[0],dateInCode=_cd$env$collectAuthor2[1];if(!firstMsgDate&&!firstMsgAuthor&&!checkHeading||dateInCode!==firstMsgDate||authorInCode!==firstMsgAuthor||"Dibot"===authorInCode&&!checkHeading)continue}else if(_this4.msgs&&_this4.msgs[0]||!checkHeading||1<thisHeadingCount)continue}sectionFound=!0,sectionStartPos=sectionHeadingsMatches.index,sectionEndPos=sectionStartPos+sectionCode.length,sectionContentStartPos=sectionHeadingsMatches.index+sectionHeadingsMatches[0].length,sectionSubdivisionEndPos=sectionStartPos+sectionSubdivisionCode.length;break}}}};if(searchForSection({checkHeading:!0,checkFirstMsg:!0}),sectionFound||searchForSection({checkFirstMsg:!0}),sectionFound||searchForSection({checkHeading:!0}),sectionFound)return sectionCode=pageCode.slice(sectionStartPos,sectionEndPos),this.inCode={startPos:sectionStartPos,endPos:sectionEndPos,contentStartPos:sectionContentStartPos,code:sectionCode,subdivisionEndPos:sectionSubdivisionEndPos,subdivisionCode:sectionSubdivisionCode},this.inCode}else console.error("\u0412 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 Section.loadCode \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u0432 \u043a\u043e\u0434\u0435 (\u043e\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 Section.inCode).")}},{key:"loadCode",value:function(){var _this5=this;return cd.env.loadPageCode(cd.env.CURRENT_PAGE).then(function(result){return _this5.locateInCode(result.code)?$.Deferred().resolve().promise():$.Deferred().reject(["parse",cd.strings.couldntLocateSectionInCode]).promise()},function(errorType,data){return $.Deferred().reject(errorType,data).promise()})}},{key:"addMenuItem",value:function(item){if((0,_classPrivateFieldGet2.default)(this,_closingBracketElement)){var a=document.createElement("a");a.textContent=item.label,a.href=item.href||"javascript:",a.onclick=item.func,a.className="cd-"+item.class,item.tooltip&&(a.title=item.tooltip);var divider=document.createElement("span");divider.className="cd-sectionMenuItemsDivider",divider.textContent=" | ",(0,_classPrivateFieldGet2.default)(this,_editsectionElement).insertBefore(divider,(0,_classPrivateFieldGet2.default)(this,_closingBracketElement)),(0,_classPrivateFieldGet2.default)(this,_editsectionElement).insertBefore(a,(0,_classPrivateFieldGet2.default)(this,_closingBracketElement))}}},{key:"$elements",get:function(){return void 0===(0,_classPrivateFieldGet2.default)(this,_cached$elements)&&(0,_classPrivateFieldSet2.default)(this,_cached$elements,$((0,_classPrivateFieldGet2.default)(this,_elements))),(0,_classPrivateFieldGet2.default)(this,_cached$elements)},set:function(value){(0,_classPrivateFieldSet2.default)(this,_cached$elements,value)}}]),Section}();exports.default=Section;var _closingBracketElement=new WeakMap,_editsectionElement=new WeakMap,_elements=new WeakMap,_cached$elements=new WeakMap},{"./MsgForm":21,"@babel/runtime/helpers/asyncToGenerator":3,"@babel/runtime/helpers/classCallCheck":4,"@babel/runtime/helpers/classPrivateFieldGet":5,"@babel/runtime/helpers/classPrivateFieldSet":6,"@babel/runtime/helpers/createClass":7,"@babel/runtime/helpers/interopRequireDefault":8,"@babel/runtime/helpers/slicedToArray":13,"@babel/runtime/regenerator":16}],23:[function(require,module,exports){"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault"),_toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")),_typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof")),_debug=_interopRequireDefault(require("./debug")),_parse=_interopRequireDefault(require("./parse")),_env=_interopRequireDefault(require("./env")),_msgLinks=_interopRequireDefault(require("./msgLinks")),_talkPage=_interopRequireDefault(require("./talkPage.less")),_logPages=_interopRequireDefault(require("./logPages.less")),_config=_interopRequireDefault(require("./config")),_strings=_interopRequireDefault(require("./strings"));!function(){function main(){if(!location.host.endsWith(".m.wikipedia.org"))if(window.convenientDiscussions=window.convenientDiscussions||window.cd||{},"object"!==(0,_typeof2.default)(window.convenientDiscussions)&&(window.convenientDiscussions={}),window.cd=window.convenientDiscussions,cd=window.cd,cd.strings=_strings.default,cd.debug=_debug.default,cd.debug.initTimers(),cd.debug.startTimer(cd.strings.start),cd.hasRun)console.warn(cd.strings.oneInstanceIsRunning);else if(cd.hasRun=!0,mw.hook("cd.launched").fire(cd),cd.debug.startTimer(cd.strings.totalTime),cd.config=cd.config||{},$.extend(cd.config,_config.default,{debug:!0}),cd.env=_env.default,cd.env.parse=_parse.default,cd.env.$content.length){cd.config.helpLink===cd.config.defaultHelpLink?cd.env.HELP_LINK=cd.env.IS_RUWIKI?cd.config.helpLink:"w:ru:"+cd.config.helpLink:cd.env.HELP_LINK=cd.config.helpLink,cd.env.UNDERLAYER_NEW_BGCOLOR=cd.env.UNDERLAYER_NEWEST_BGCOLOR,cd.env.SUMMARY_POSTFIX=" ([[".concat(cd.env.HELP_LINK,"|CD]])"),cd.env.ACTUAL_SUMMARY_LENGTH_LIMIT=cd.env.SUMMARY_LENGTH_LIMIT-cd.env.SUMMARY_POSTFIX.length;for(var sigPattern="(?:",i=0;i<cd.config.sigPatterns.length;i++)0!==i&&(sigPattern+="|"),sigPattern+=cd.config.sigPatterns[i][0];sigPattern+=")",cd.env.SIG_PATTERN=sigPattern;var anyTypeOfSpace=function(s){return s.replace(/:/g," : ").replace(/[ _]/g,"[ _]*")},namespaceIds=mw.config.get("wgNamespaceIds"),userNamespaces=[];for(var key in namespaceIds)2!==namespaceIds[key]&&3!==namespaceIds[key]||userNamespaces.push(key);var captureUserNameRegexp="\\[\\[[ _]*(?:(?:";userNamespaces.forEach(function(el,i){0!==i&&(captureUserNameRegexp+="|"),captureUserNameRegexp+=anyTypeOfSpace(el)}),captureUserNameRegexp+=")[ _]*:[ _]*|(?:Special[ _]*:[ _]*Contributions|"+anyTypeOfSpace(cd.config.contributionsPage)+")\\/[ _]*)([^|\\]#/]+)",cd.env.CAPTURE_USER_NAME_REGEXPS=[new RegExp(captureUserNameRegexp,"ig"),new RegExp("\\[\\[[^|]+\\|([^\\]]+)\\]\\]","g")];var generateAnyCasePattern=function(s){for(var result="",_i=0;_i<s.length;_i++)s[_i].toUpperCase()!==s[_i].toLowerCase()?result+="["+s[_i].toUpperCase()+s[_i].toLowerCase()+"]":result+=s[_i];return result},userNamePattern="\\s*\\[\\[[ _]*:?\\w*:?\\w*:?(?:(?:";userNamespaces.forEach(function(el,i){0!==i&&(userNamePattern+="|"),userNamePattern+=anyTypeOfSpace(generateAnyCasePattern(el))}),userNamePattern+=")[ _]*:[ _]*|(?:"+anyTypeOfSpace(generateAnyCasePattern("Special:Contributions"))+"|"+anyTypeOfSpace(generateAnyCasePattern(cd.config.contributionsPage))+")\\/[ _]*)",cd.env.USER_NAME_PATTERN=userNamePattern;var authorSelector="";[].concat((0,_toConsumableArray2.default)(cd.config.canonicalUserNamespaces),[cd.config.contributionsPage]).forEach(function(el){authorSelector+='a[href^="/wiki/'.concat(encodeURI(el.replace(/ /g,"_")),'"], ')}),cd.config.canonicalUserNamespacesWithoutTalk.forEach(function(el,i){authorSelector+='a[href^="/w/index.php?title='.concat(encodeURI(el.replace(/ /g,"_")),'"]'),i!==cd.config.canonicalUserNamespacesWithoutTalk.length-1&&(authorSelector+=", ")}),cd.env.AUTHOR_SELECTOR=authorSelector;var captureAuthorNamespaces=[].concat((0,_toConsumableArray2.default)(cd.config.canonicalUserNamespaces),["User"]),captureAuthorRegexp="(?:";if(captureAuthorNamespaces.forEach(function(el,i){0!==i&&(captureAuthorRegexp+="|"),captureAuthorRegexp+="".concat(encodeURI(el.replace(/ /g,"_")),":([^#\\/]+)")}),captureAuthorRegexp+="|".concat(encodeURI(cd.config.contributionsPage.replace(/ /g,"_")))+"\\/([^#\\/]+))",cd.env.CAPTURE_AUTHOR_REGEXP=new RegExp(captureAuthorRegexp),cd.env.isDiscussionPage(cd.env.CURRENT_PAGE,cd.env.NAMESPACE_NUMBER)&&mw.config.get("wgIsArticle")&&cd.env.$content.is(':contains("'.concat(cd.config.messagesCommonString,'")'))){cd.env.firstRun=!0;var bodyBgcolor="timeless"===cd.env.CURRENT_SKIN?window.getComputedStyle($("#mw-content")[0]).backgroundColor:window.getComputedStyle($(".mw-body")[0]).backgroundColor,underlayerFocusedGradientToColor=cd.env.getTransparentColor(cd.env.UNDERLAYER_FOCUSED_BGCOLOR);cd.env.addCSS(_talkPage.default),"white"!==cd.env.UNDERLAYER_FOCUSED_BGCOLOR&&"#fff"!==cd.env.UNDERLAYER_FOCUSED_BGCOLOR.toLowerCase()&&"#ffffff"!==cd.env.UNDERLAYER_FOCUSED_BGCOLOR.toLowerCase()&&cd.env.addCSS("\n .cd-underlayer-focused {\n background-color: ".concat(cd.env.UNDERLAYER_FOCUSED_BGCOLOR,";\n }\n ")),cd.env.addCSS("\n .cd-linksUnderlayer-gradient {\n background-image: linear-gradient(to left, ".concat(cd.env.UNDERLAYER_FOCUSED_BGCOLOR,",\n ").concat(underlayerFocusedGradientToColor,");\n }\n\n .cd-msgForm-noIndentation.cd-msgForm-noIndentation.cd-msgForm-noIndentation {\n background-color: ").concat(bodyBgcolor,";\n }\n\n .cd-closeButton {\n background-color: ").concat(bodyBgcolor,";\n }\n ")),cd.settings&&!1===cd.settings.showLoadingOverlay||cd.env.setLoadingOverlay(),cd.debug.endTimer(cd.strings.start),cd.debug.startTimer(cd.strings.loadingModules);var loadingError=function(e){console.error(e),!1!==cd.settings.showLoadingOverlay&&cd.env.removeLoadingOverlay(),cd.hasRun=!1},modulesRequest=mw.loader.using(["jquery.color","jquery.client","mediawiki.api","mediawiki.cookie","mediawiki.notify","mediawiki.Title","mediawiki.util","mediawiki.widgets.visibleLengthLimit","oojs","oojs-ui","user.options"]).done(function(){(0,_parse.default)()}).fail(function(e){loadingError(e)});setTimeout(function(){"pending"===modulesRequest.state()&&loadingError('The promise is in the "pending" state for 5 seconds; halting request.')},5e3)}("Watchlist"===mw.config.get("wgCanonicalSpecialPageName")||"Contributions"===mw.config.get("wgCanonicalSpecialPageName")||"history"===mw.config.get("wgAction")&&cd.env.isDiscussionPage(cd.env.CURRENT_PAGE,cd.env.NAMESPACE_NUMBER)||cd.env.IS_DIFF_PAGE)&&(cd.env.addCSS(_logPages.default),mw.loader.using(["user.options","mediawiki.util"]).done(function(){(0,_msgLinks.default)()}))}else console.error(cd.strings.mwContentTextNotFound)}"undefined"!=typeof runAsEarlyAsPossible?runAsEarlyAsPossible(main):$(main)}()},{"./config":24,"./debug":25,"./env":26,"./logPages.less":27,"./msgLinks":28,"./parse":29,"./strings":30,"./talkPage.less":31,"@babel/runtime/helpers/interopRequireDefault":8,"@babel/runtime/helpers/toConsumableArray":14,"@babel/runtime/helpers/typeof":15}],24:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default={canonicalUserNamespaces:["\u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a","\u0423\u0447\u0430\u0441\u0442\u043d\u0438\u0446\u0430","\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430","\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u0446\u044b"],canonicalUserNamespacesWithoutTalk:["\u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a","\u0423\u0447\u0430\u0441\u0442\u043d\u0438\u0446\u0430"],contributionsPage:"\u0421\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f:\u0412\u043a\u043b\u0430\u0434",discussionPageRegexp:new RegExp("^(?:\u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f:(?:\u0424\u043e\u0440\u0443\u043c[/ ]|\u0413\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f/|\u041e\u043f\u0440\u043e\u0441\u044b/|\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b/|\u0417\u0430\u044f\u0432\u043a\u0438 \u043d\u0430 |\u0417\u0430\u043f\u0440\u043e\u0441\u044b|\u041a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u044b \u0432 .*/|\u041a (?:\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e|\u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044e|\u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044e|\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044e|\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e|\u043e\u0446\u0435\u043d\u043a\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432|\u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u0443)/|\u041e\u0441\u043f\u0430\u0440\u0438\u0432\u0430\u043d\u0438\u0435|\u0420\u0435\u0446\u0435\u043d\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435/|\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432/|\u0424\u0438\u043b\u044c\u0442\u0440 \u043f\u0440\u0430\u0432\u043e\u043a/\u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f|.* \u0437\u0430\u043f\u0440\u043e\u0441\u044b)|\u041f\u0440\u043e\u0435\u043a\u0442:(?:\u0418\u043d\u043a\u0443\u0431\u0430\u0442\u043e\u0440/(?:\u041c\u0438\u043d\u0438-\u0440\u0435\u0446\u0435\u043d\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435|\u0424\u043e\u0440\u0443\u043c)|\u0421\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c/\u0424\u043e\u0440\u0443\u043c|\u0412\u043e\u0434\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b|\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430/(?:\u0422\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u043a\u043d\u0438\u0433\u0438|\u0412\u043e\u043f\u0440\u043e\u0441\u044b|\u0413\u043e\u0440\u044f\u0447\u0438\u0435 \u0442\u0435\u043c\u044b|\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b)|\u0413\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0430\u0441\u0442\u0435\u0440\u0441\u043a\u0430\u044f/\u0417\u0430\u044f\u0432\u043a\u0438|\u0414\u043e\u0431\u0440\u043e\u0442\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438/\u041a \u043b\u0438\u0448\u0435\u043d\u0438\u044e \u0441\u0442\u0430\u0442\u0443\u0441\u0430|\u0413\u0440\u0430\u043c\u043e\u0442\u043d\u043e\u0441\u0442\u044c/\u0417\u0430\u043f\u0440\u043e\u0441\u044b))"),sigPrefixRegexp:/(?:\s*\u0421 \u0443\u0432\u0430\u0436\u0435\u043d\u0438\u0435\u043c,)?(?:\s+>+)?[-\u2013\u2014\s~\u2192]*'*$/,sigPatterns:[["[^|] *(\\b\\d?\\d:\\d\\d, \\d\\d? [\u0430-\u044f]+ \\d\\d\\d\\d \\(UTC\\))",["date"]],["\\{\\{ *(?:[uU]nsigned(?:IP)?|[\u043d\u041d]\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043e) *\\|[ \u200e]*([^}|]+?) *(?:\\| *([^}]+?)[ \u200e]*)?\\}\\}",["author","date"]],["\\{\\{ *(?:[uU]nsigned(?:IP)?2|[\u043d\u041d]\u0435\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043e|[\u043d\u041d]\u043f\u043f) *\\| *([^}|]+?)[ \u200e]*(?:\\|[ \u200e]*([^}]+?) *)?\\}\\}",["date","author"]]],extractAuthorDatePatterns:["\\{\\{ *(?:[uU]nsigned(?:IP)?|[\u043d\u041d]\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043e) *\\|[ \u200e]*%author *\\| *%date[ \u200e]*\\}\\}[ \xa0\t]*","\\{\\{ *(?:[uU]nsigned(?:IP)?2|[\u043d\u041d]\u0435\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043e|[\u043d\u041d]\u043f\u043f) *\\| *%date[ \u200e]*\\|[ \u200e]*%author *\\}\\}[ \xa0\t]*"],extractAuthorPatterns:["\\{\\{ *(?:[uU]nsigned(?:IP)?|[\u043d\u041d]\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043e) *\\|[ \u200e]*%author *(?:\\| *[^}]+?[ \u200e]*)?\\}\\}[ \xa0\t]*","\\{\\{ *(?:[uU]nsigned(?:IP)?2|[\u043d\u041d]\u0435\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043e|[\u043d\u041d]\u043f\u043f) *\\| *[^|]*[ \u200e]*\\|[ \u200e]*%author *\\}\\}[ \xa0\t]*"],helpLink:"U:JWBTH/CD",defaultHelpLink:"U:JWBTH/CD",blocksToExcludeClasses:["botMessage","ruwiki-movedTemplate","ambox","NavFrame"],templatesToExclude:["\u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u043e \u0441","moved from","\u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u043e \u043d\u0430","moved to","\u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u043e \u0438\u0437 \u0440\u0430\u0437\u0434\u0435\u043b\u0430","\u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b","\u043a\u043e\u043f\u0438\u044f \u0441","\u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0430"],msgAntipatterns:["--\xa0?\\[\\[\u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a:DimaBot\\|DimaBot\\]\\]"],messagesCommonString:"(UTC)",insertButtons:[["{{ping|+}}"],["{{u|+}}"],["{{tl|+}}"],["{{+}}"],["[[+]]"],["<>+</>","</>"],["<code>+</code>","<code />"],["<nowiki>+</nowiki>","<nowiki />"],['<source lang="">+</source>',"<source />"],["<small>+</small>","<small />"]],logoDataUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUQAAAAoCAYAAACGq4NTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAL0AAAC9ABdzF0jwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA+hSURBVHic7Z17tFdFFcc/916RhyKpUYSaCSKEhs8UzEzFQtOrheYrM8oytcxaqJiP0pYVlavI1HybhkqW4fKRj7Q0zeyh+VZQQAmEEFBEeXNvf3zPrDNnn8fv/O793d8PuPNda9b9zZk9c/aZM7Nnz957zgVhGDAVeBto7+K0ELgWeB8BAQEB6xiGAW/S9YLQpleAzevwfAEBAQGlMZX6C0OXflCH5wsICAgojXpsk/PSP+rwfAEBAQGl0Az0beD9N2vgvXs38N7rO/oCxwNjgR4N5mVdwnbAicA+jWZkHcFI4CvAkEYzUg0qaXHPAJOB10rQtgNtwAPAFGBpBdoX6/B8DiOAi4HngHej+y8HpgGXEwZxWWwGTCd+h38FNmooRx3HAGBGQXoGjeVLgVagZ0FbewHLiPvl+13G9fqBbxP3xUrgk41lpzyKBNaVSIsEaVSPVqBvB4712h4MLCqgrYdA7AvcAKwtwfvdBO93JRxPut8+3lCOJKhagc8BO1dRb2uqM/HMRhpPU0Zbvza07wItVT/JhoPZJPvjj41lpzyKBsBAQ3tYBfosAfeLKulriQFola9m0P+pi3la35E1BkY0lCM42ePlZ1XUq1YgujSFtMnlEkMzn2zB2V3wHMn+uKWx7JRH0YsfYGgPr0D/XEb7dqBkCcQdvWsLkGa6ZSefqwfwSMY9FwM3AxOj+7zkla0AduvkfTd0NKPB3Y607h81lh0AfkvtBOJlwIQoXYiE35IMultICryBxEJgCZor3RkHoLnWjkwsgxvLTnkUCbjLiF96H7IFjE1Hem1vT7kt844ZZS/QOYfPaRlt3gq8x9A1AUcBjwMndOJ+3Q1b0/lFq1aYS+0E4sgMui2B2zJo7XhpQRO/TxU8bMjojWTAemM6aEIvtghPoW3n/sA2JdpsA+5HDpWDKBZqLwEfRgIxS7s8j47FKm4EvAps5V37O7AvsKYD7Q1CW8WPoOdZBPwbuAN4I4P+ZKAfsBppEvOAUcBnUR8uBu4E7o3om4BvARtH+YXI7ml57Q18MWobtPJO9cr7R/fYHQW9LwQeQ5N5uWmrFRiO3v99wNNo8B4LDAVWIYfJTdFzOGwEjPfyy4BfZvTB5sgLvQcSKIvRovN74B1DOwbYJfr9IOrbbYHPo/GxFtmvJyMtHtRXuyJn2MVeW48Cd0W/3amoPGwN/NdcGxXxadECPAx8zLs2C9gBvaftgSO8shfQO/axC9Ict0fvfA4y0fyZ7HnYL6LfE73bd4Dn0ft8zaM7i1hxWU16URhP7PhqA35qyj+AlIKdgU2A/6FxcyeyhfrYOOJpn6jeUuBZ4HY05xwOAD7q5e9BcsRiN+AQtJD0RPPJvcNlhrYnmidEfF2LxsOhyGkzAPXLFOCJjHuBxtNYNMZb0Nx8EMmstdAxG0qtUpGG2A78JeehKmHvjLYO7EA7vdG2ek0Of++QHIwOMz2aKcCNOfVvJnZaWQ3k5Ax+zjU0J3llp5Pv1Z8HjDZt3eSVT4ueY2VG3SdIaoK9TPmCDD6/Sv7ppzfQAPZxhVc+F2n3yzPqPo8mIcB+Oe37KWuR9VFWQ3TYJ4P+E1FZq7l+k1evB1rg8vh8Es0BHyeQv7tahUw+TvPyHYZ2sYFkX64yZacioZJ1n/kkhfwI5H3Pol2NzGPOE/8zU/4Vc98ByNGS1yfzzL1BEQ4+zUS0aNu6bcA5pm4zWrjbcu73Alq8qxJgtU6VBGKelK+Ec0w7S6lebe+BBHKZ57jY1J1Zsl478I2oziHm+n0ZPD3llS8j3v5fWOI+y5Hm6HBTiTouTfbqVRKIZ5RobxVJz/QVJeq4dEdUZ/cStLUWiCDtyad3O5gigTixBK8nevRfK9kX+0f0HRWIY8gXEC7dHNFugrTpItoFwHsj+iKB2J9yc6SNpFnCCsRKdff16p5Vos6ZRfFjS5CxurMYRMe0s85gK5OfTqQOV4HxSAtxmI+2GjPRSnIG8Wo4Hk3Uv+a09Sayx74EHENSQzoFxbndiwacM0vsjwTeW1F+O5IhJbdGZXsB53vXZ6MJ9XTE51VoNe4F/JzkIPGxBrgGbVf2BL7plR0d5Rfn1HXYiaSTZX7Ey7+QdnF19Hw9UPRBngOrDYWxPBS1eSaxFn4oEmRPou3tkSS38LchAQvp7V4t8DzJ0KwPVqBvQX3gMAeNgUVoSzkOeB24LirfGphk2rgRmV76IJPGEUjb+UvV3CdxCnG/tqOQqn+iQOovoDHntqitEW8ON6B3vRnaQrcC30Nmikq4JGrb4Vk0PxZGbX0hut4E/AqZFebltDUT7eJeR+PAmV6aUL+7OXmqV2cRMhHMjejHod3Rz6FYwlYT05WHWwvu0VUa4mTTTp6gykMzaU3ACnW7fb3dK7Or3zCvbBPiwHDXz84I/wNT72iv3pmmzAk227+fMnyeaMqdwLUa4jhT73FT7rSRIg3xGlNmtzxHmfLh0XWrIZ5m6t1vyg8reL6ucKr4uMPQOzthnoa4pbn+L4oD2b9v6O/KoNmSpJmmoxrif7zrK0lHlfiYYPg6pYAW8jXEbQy/K0mH9/3e1L0wum41xIXApl69XU35S9H1ZpKa8HRie30CzVkXIzShAV4UnV8Jh5P0OtcLS0y+2iOCO5PUAuYiw6uP35j8aPK35f6q+S7SEhyaiLe+TqA4+KEbn/V+z0Qef0ieAGhDWuEEL+1CEjbvsMjkp5u89c5nwZ5G2Mnwsqcp37ULeekq2LFUSWteQtI5sAcSRN8m20lpbb3XZNA422Jn4WtdGyOnx0Sy38t8k/8lso8fjhbJshhNUu48gLQ7Hzea/JictlaQXACmmXL3Na02pOA4DEHmlAkkNdVCgQh6eXcT2wWqwVGkY7XqhbkmP5TqXtq2Ju+OLfqYQ9ILvCnlw1DaTN710SyS2uyn0UDdCm2NHa6O+OlLUjg0Iy1zope+QRL9KAdrYqg0VppJmyouMLyMN+VlF6pqeekqNCEh7+PVCnXWoKOhPnZCGtSraGcxyCv7kKF9uRoGq4SNDuiPhMSTUfIXuKkkPfItaAdze3T9XMqda8+aWxb2mq2Th7x5BTLR+BiCxuQMZK7aEcoNrNFI8n6XysGVvZCN5x5kf2zUBxQeMflewGeqqG+3NNYzB+p8GxaTqYZXCT9MpB9yPhxC/K7WEK+gfjiMK5tZkKaRHfpQC7SRFFxtFXiZjjSl9QkHkF707i9R73xkI7SLajPSsJ4k1lTs2LPvuJa4By2YNiQLpCXeh45Dgr6KdRhpbR2kMF1EudMoZebWSpOvxQdELkZCMUtojkGmjI+UXWm3QPv4V5D29RiypVyPOuEB5AFdgmwqB3WS+c7icdJG2ItI2huK8D+Tz7KtbE5S61xLdkxitbiN5Jb/0yS3DPcSbzFWIIeNQztyXgzOScPoOoEIyT5vQlptHi9DyY73W1fRA2kUPl6m3DOsQLbOHYGfkNYq+yENC9Je+zKxv53BZcgxNJ705/iaEL8OT6FnGAv8jrQgPYJyXnof78+gsfPNbtc7gjXIQbQDkgVWsPcGLuzI1mMg8u61IkP8MUiL3JnaaEi1wGrSKvJgtJoPSpPzCaSm34Ge4d/EAcCgybu9qWOF/j9Jr2wdwTKSK+2BJO1K1yXJedj73YO0I8OhHqYLf7vfRNIpVC9euqLtgWih38NcP4/qohdeRFvSQSjA3ofTEP9urmfZ4O0z+oKpD9WflFmItvAjkefft+ltS3InuQZtn49C/eIfDID0lt/iMZM/kLSf4mCTtzu+zmAG0tiHIu3c1xi3a5QtxuHtLmx7Eukt2Sg0KO9HK+M1aFV8CK2SrchDvYqkUGpC2rA7hjSKtLZgBVVn4Lc1gtjut4C01/Eqk5+EFqlNkUf7YKTBr6A6s0FHYHn5EZr4m6FJeiAKxl2BQjxqgbdMfm8kXKy3vSxOJbZ5/gLZ0F8hbdi/Dnn4y2AfNN5GRXnnPfa3w87RZh0KX45Szyidgp75Co/G13aakHmrL7JVTiHffj4QhXwdRyz0niJpK3wdCY0m4GwUWrNFVPYWCtPyMYdi/Idk9Mh7UdjM+5EyMpZkiEw7tZlbu6N3cIB37UEUo+wwx92wUckFtdY67MZhEBrM1fDktMSBaAtoy1dnXHuUpJ3Dht1Yp9SLptw6IyAZhO2SPXLlkHXONiu9TbwdsWE3rabN60250zwrBWbbenlpObFWZMNujjNt2i8mjfPKhhXcY2yqp5Lo6NduriW9G8oLu9mCZAjX00gYzjX0vsDNClVbSfrE1DER/dlV8O7b7O71rs9Gwv9ZQ++2zF/yrr2DYiAfIDkfZhDbCIsCs0eSfToma25d6dWzYTdW+OaNzT7IYemuv4DewauG/jiq6Mhap5eJ3eKjcmg6KxBB4TM2rikrrUETz1ffi44qufQw8s75qIVAPD3jXsMz6ECa4B8q8LkK+LpXp6sEYi/ScaBZfX2WV6czAhHkHMi6zxyKHXvVCsRp5JsB8gTiflT+UPKPTVt9kUOjqM5U79l6I8dMFt0i4G9e3gnE/mgOVhrbm0T0lU4TLSIZVlXp6N4hVP7ndteTnI8dFYi7E395Jy9dBTQ14kvHC5EW9h1ih0BXnmRZgOwwe6LBPBqdh90COUHcAfub0SkEH8+gbcdJKA5wOPFHE55AE/9W0p6r50jGp1lv9PMkT1FkeRIno22lsxdNRytbFt5F2tChaHs1kvhjAC+jgX0pyXCGWSQXHLv1fM2Uu3fVlnPdwW2Hb0BnmvdGi9IytFA4XmZ4dWabNm1s339NuY1TPBIZyo9AW6/X0Lu7lGwPqsMqihfd5WiMvIi0oUfI/zjIW6atWdHfh5Cp5avIfPFhZM5YgBwyl6OPO/hYGtEejzSzXdFkd3WuJXm0czkKnL+AuA/mIfPED9GCfAnSlBz/b6CPlXye+IMg/dH7fBbNh1979CcjIT8ORT5sE5XNQgvSJJJOtTmmP+wJlruRg+O06FmHIME+H9kZryJ9EmetadMuxnlj84mo/S+jOTIchau9gbzLV+OZooqk5gS6HkPIXylqoSEGBAQElEaeMDy7i+/bH6nRCwp4CAIxICCgrsgSROdFZX1yyuuVgkAMCAioK/KEIQSBGBAQ0M2QJwxBsUmraIwwDAIxICCg7nDC5/yc8kru/yAQAwICNhi0o8j2PIygchxVEIgBAQEbBL5XgmYndJaz3oIxCMSAgIBugxb0odUgEAMCAgIoFopBIAYEBHQ75AnFIBADAgK6JVpIfxQgCMSAgIBuixaSX2EJAjEgIKBbwxeKQSAGBATUDY34/FclrAVOQJ+9GtpgXgICAgLWCfQAzmk0EwEBAd0H/wd1jJzKq1cF/QAAAABJRU5ErkJggg=="};exports.default=_default},{}],25:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default={timers:{},timerStarts:{},timerRunTimes:{},timerTotal:{},abstractCounters:{},abstractGlobalVars:{},initTimers:function(){this.timers={},this.timerStarts={},this.timerRunTimes={},this.timerTotal={},this.abstractCounters=[];for(var i=0;i<20;i++)this.abstractCounters.push(null);this.abstractGlobalVars=[]},startTimer:function(label){this.timerStarts[label]=$.now()},endTimer:function(label){if(null!=this.timerStarts[label]){null==this.timers[label]&&(this.timers[label]=0);var thisTime=$.now()-this.timerStarts[label];this.timers[label]+=thisTime,(this.timerStarts[label]=null)==this.timerTotal[label]&&(this.timerTotal[label]=0,this.timerRunTimes[label]=0),this.timerTotal[label]+=thisTime,this.timerRunTimes[label]+=1}},resetTimer:function(label){null!=this.timerStarts[label]&&this.endTimer(label),this.timers[label]=null},fullResetTimer:function(label){this.resetTimer(label),this.timerTotal[label]=0,this.timerRunTimes[label]=0},logAndResetTimer:function(label){null!=this.timerStarts[label]&&this.endTimer(label),null!=this.timers[label]&&(console.log(label+": "+this.timers[label]),this.resetTimer(label))},logAndResetTimers:function(sort){var obj;for(var label in sort&&(this.timers=(obj=this.timers,Object.keys(obj).sort().reduce(function(result,key){return result[key]=obj[key],result},{}))),this.timers)this.logAndResetTimer(label)},averageTimerTime:function(label){this.timerTotal[label]?console.log(label+": "+(this.timerTotal[label]/this.timerRunTimes[label]).toFixed(1)+" average for "+this.timerRunTimes[label]+" runs."):console.error("No data for this.timer "+label)}};exports.default=_default},{}],26:[function(require,module,exports){"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")),_regenerator=_interopRequireDefault(require("@babel/runtime/regenerator")),_slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")),_asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")),_typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof")),_lzString=_interopRequireDefault(require("lz-string")),_parse=_interopRequireDefault(require("./parse")),_default={IS_RUWIKI:"ru.wikipedia.org"===mw.config.get("wgServerName"),UNDERLAYER_FOCUSED_BGCOLOR:"#eaf3ff",UNDERLAYER_TARGET_BGCOLOR:"#fff1c7",UNDERLAYER_NEWEST_BGCOLOR:"#edffdb",UNDERLAYER_SIDE_MARGIN:5,SUMMARY_LENGTH_LIMIT:mw.config.get("wgCommentCodePointLimit"),SUMMARY_FULL_MSG_TEXT_LENGTH_LIMIT:50,VISITS_OPTION_NAME:"cd-visits",WATCHED_TOPICS_OPTION_NAME:"cd-watchedTopics",HIGHLIGHT_NEW_INTERVAL:15,NAMESPACE_NUMBER:mw.config.get("wgNamespaceNumber"),IS_DIFF_PAGE:mw.config.get("wgIsArticle")&&/[?&]diff=[^&]/.test(location.search),CURRENT_PAGE:mw.config.get("wgPageName").replace(/_/g," "),CURRENT_USER:mw.config.get("wgUserName"),CURRENT_SKIN:mw.config.get("skin"),SECONDS_IN_A_DAY:86400,MILLISECONDS_IN_A_MINUTE:6e4,POPULAR_NOT_INLINE_ELEMENTS:["P","OL","UL","LI","PRE","BLOCKQUOTE","DL","DD","DIV","HR","H2","H3","H4","H5","H6","TABLE","INPUT","FORM"],POPULAR_INLINE_ELEMENTS:["A","SMALL","B","STRONG","I","EM","U","S","SPAN","CODE","TT","KBD","BR","IMG","SUP","SUB","ABBR","CITE"],$content:$("#mw-content-text"),underlayers:[],floatingRects:[],mouseOverUpdatePanel:!1,scrollHandleTimeout:!1,recalculateUnderlayersTimeout:!1,pageOverlaysOn:!1,msgFormsCounter:0,addCSS:function(css){var styleElem=document.createElement("style");styleElem.appendChild(document.createTextNode(css)),document.getElementsByTagName("head")[0].appendChild(styleElem)},packVisits:function(visits){var visitsString="";for(var key in visits)visitsString+="".concat(key,",").concat(visits[key].join(","),"\n");return visitsString.trim()},unpackVisits:function(visitsString){for(var matches,visits={},regexp=/^(\d+), *(.+)$/gm;matches=regexp.exec(visitsString);)visits[matches[1]]=matches[2].split(",");return visits},packWatchedTopics:function(watchedTopics){var watchedTopicsString="";for(var key in watchedTopics)watchedTopicsString+=" ".concat(key," ").concat(watchedTopics[key].join("\n"),"\n");return watchedTopicsString.trim()},unpackWatchedTopics:function(watchedTopicsString){for(var pageId,watchedTopics={},pages=watchedTopicsString.split(/(?:^|\n )(\d+) /).slice(1),i=0,isPageId=!0;i<pages.length;i++,isPageId=!isPageId)isPageId?pageId=pages[i]:watchedTopics[pageId]=pages[i].split("\n");return watchedTopics},getTransparentColor:function(color){var dummyElement=document.createElement("span");return dummyElement.style.color=color,color=(color=dummyElement.style.color).includes("rgba")?color.replace(/\d+(?=\))/,"0"):color.replace(/rgb/,"rgba").replace(/\)/,", 0)")},getMonthNumber:function(mesyats){var month=cd.strings.monthNamesGenitive.indexOf(mesyats);if(-1!==month)return month},getTimestampFromDate:function(date,timezoneOffset){var matches=date.match(/(\b\d?\d):(\d\d), (\d\d?) ([\u0430-\u044f]+) (\d\d\d\d)/);if(matches){var hours=Number(matches[1]),minutes=Number(matches[2]),day=Number(matches[3]),month=cd.env.getMonthNumber(matches[4]),year=Number(matches[5]);if(void 0!==month)return Date.UTC(year,month,day,hours,minutes)-(timezoneOffset?timezoneOffset*cd.env.MILLISECONDS_IN_A_MINUTE:0)}},zeroPad:function(n,p){return("0000"+n).slice(-p)},generateMsgAnchor:function(year,month,day,hours,minutes,author){if(void 0!==year&&void 0!==month&&void 0!==day&&void 0!==hours&&void 0!==minutes)return cd.env.zeroPad(year,4)+cd.env.zeroPad(month+1,2)+cd.env.zeroPad(day,2)+cd.env.zeroPad(hours,2)+cd.env.zeroPad(minutes,2)+(author?"_"+author.replace(/ /g,"_"):"")},getDateAndAuthorFromMsgAnchor:function(msgAnchor){var msgDataMatches=msgAnchor.match(/^(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)_(.+)$/),year=Number(msgDataMatches[1]),month=Number(msgDataMatches[2])-1,day=Number(msgDataMatches[3]),hours=Number(msgDataMatches[4]),minutes=Number(msgDataMatches[5]),author=msgDataMatches[6];return[new Date(year,month,day,hours,minutes),author]},generateCaseInsensitiveFirstCharPattern:function(s){var pattern="",firstChar=s[0];return mw.RegExp.escape(firstChar)===firstChar&&firstChar.toUpperCase()!==firstChar.toLowerCase()?pattern+="["+firstChar.toUpperCase()+firstChar.toLowerCase()+"]":pattern+=firstChar,pattern+=mw.RegExp.escape(s.slice(1))},isDiscussionNamespace:function(nsNumber){return nsNumber%2==1||4===nsNumber||104===nsNumber},isDiscussionPage:function(page,nsNumber){return cd.env.isDiscussionNamespace(nsNumber)&&(4!==nsNumber||104!==nsNumber||cd.config.discussionPageRegexp.test(page))},highlightFocused:function(e){if(!cd.env.scrollHandleTimeout&&!cd.env.pageOverlaysOn){var contentLeft=cd.env.contentElement.getBoundingClientRect().left;if(e.pageX<contentLeft-cd.env.UNDERLAYER_SIDE_MARGIN)for(var i=0;i<cd.env.underlayers.length;i++){var underlayer=cd.env.underlayers[i];underlayer.classList.contains("cd-underlayer-focused")&&underlayer.cdTarget.unhighlightFocused()}else for(var _i=0;_i<cd.env.underlayers.length;_i++){var _underlayer=cd.env.underlayers[_i];if(_underlayer.classList.contains("cd-underlayer")){var top=Number(_underlayer.style.top.replace("px","")),left=Number(_underlayer.style.left.replace("px","")),width=Number(_underlayer.style.width.replace("px","")),height=Number(_underlayer.style.height.replace("px",""));!cd.env.mouseOverUpdatePanel&&e.pageY>=-cd.env.underlayersYCorrection+top&&e.pageY<=-cd.env.underlayersYCorrection+top+height&&e.pageX>=-cd.env.underlayersXCorrection+left&&e.pageX<=-cd.env.underlayersXCorrection+left+width?_underlayer.classList.contains("cd-underlayer-focused")||_underlayer.cdTarget.highlightFocused():_underlayer.classList.contains("cd-underlayer-focused")&&_underlayer.cdTarget.unhighlightFocused()}}}},updateUnderlayersCorrection:function(){"vector"!==cd.env.CURRENT_SKIN?(cd.env.underlayersXCorrection=-cd.env.underlayersContainer.offsetParent.offsetLeft,cd.env.underlayersYCorrection=-cd.env.underlayersContainer.offsetParent.offsetTop):cd.env.underlayersYCorrection=cd.env.underlayersXCorrection=0,"monobook"!==cd.env.CURRENT_SKIN&&"timeless"!==cd.env.CURRENT_SKIN||(cd.env.underlayersYCorrection-=1,cd.env.underlayersXCorrection-=1)},windowResizeHandler:function(){cd.env.updateUnderlayersCorrection(),cd.env.recalculateUnderlayers(!1);for(var i=0;i<cd.msgForms.length;i++)cd.msgForms[i].correctLabels()},beforeUnloadHandler:function(e){if(cd.getLastActiveAlteredMsgForm()||cd.env.alwaysConfirmLeavingPage&&cd.getLastActiveMsgForm()){var message="\u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u0412\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0439\u0442\u0438 \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b?";return setTimeout(function(){var lastActiveAlteredMsgForm=cd.getLastActiveMsgForm();lastActiveAlteredMsgForm&&lastActiveAlteredMsgForm.textarea.focus()},0),e.returnValue=message}},findMsgInViewport:function(findClosestDirection){for(var prevMsgTop,prevMsgBottom,higherTop,lowerBottom,keepedMsgTop,keepedMsgBottom,prevMsgId,foundMsgId,keepedMsgId,viewportHeight=window.innerHeight,viewportTop=window.pageYOffset,viewportBottom=viewportTop+viewportHeight,currentMsgId=0,i=0;i<cd.msgs.length;i++){var msg=cd.msgs[currentMsgId];if(!msg)return void console.error("\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 ID "+currentMsgId);if(msg.getPositions(),0===currentMsgId&&msg.positions.downplayedBottom>viewportBottom||currentMsgId===cd.msgs.length-1&&msg.positions.top<viewportTop){"forward"===findClosestDirection?foundMsgId=0:"backward"===findClosestDirection&&(foundMsgId=cd.msgs.length-1);break}if(msg.isInViewport(!1)){foundMsgId=currentMsgId;break}var nextMsgId=void 0;if(void 0!==prevMsgId){var changedDirection=void 0;if(changedDirection=!(msg.positions.top<viewportTop&&prevMsgTop<viewportTop||msg.positions.downplayedBottom>viewportBottom&&viewportBottom<prevMsgBottom)||(void 0===keepedMsgId&&console.warn("keepedMsgId \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u0430."),prevMsgId=keepedMsgId,prevMsgTop=keepedMsgTop,prevMsgBottom=keepedMsgBottom,!1),1===Math.abs(currentMsgId-prevMsgId)){"forward"===findClosestDirection?foundMsgId=Math.max(currentMsgId,prevMsgId):"backward"===findClosestDirection&&(foundMsgId=Math.min(currentMsgId,prevMsgId));break}lowerBottom=msg.positions.top>prevMsgTop?(higherTop=prevMsgTop,prevMsgBottom,msg.positions.top,msg.positions.downplayedBottom):(higherTop=msg.positions.top,msg.positions.downplayedBottom,prevMsgTop,prevMsgBottom);var proportion=(viewportTop-higherTop)/(viewportTop-higherTop+(lowerBottom-viewportBottom!=0?lowerBottom-viewportBottom:1e-4));(proportion<0||1<=proportion)&&console.warn("\u041f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u044f \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 0 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u0430 1.",proportion,currentMsgId,prevMsgId,viewportTop,viewportBottom),nextMsgId=Math.round((Math.abs(currentMsgId-prevMsgId)-1)*proportion+Math.min(prevMsgId,currentMsgId)+.5),changedDirection&&(keepedMsgId=prevMsgId,keepedMsgTop=prevMsgTop,keepedMsgBottom=prevMsgBottom)}else nextMsgId=cd.msgs.length-1;prevMsgId=currentMsgId,currentMsgId=nextMsgId,prevMsgTop=msg.positions.top,prevMsgBottom=msg.positions.downplayedBottom}return cd.msgs[foundMsgId]},goToPrevNewMsg:function(){var foundMsg=cd.env.findMsgInViewport("forward");if(foundMsg){for(var i=foundMsg.id;0<=i;i--){var msg=cd.msgs[i];if(msg||console.error("\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 ID "+foundMsg.id),msg.newness&&!msg.isInViewport(!0))return void msg.$elements.cdScrollTo("middle",cd.env.updateNextButton)}for(var _i2=cd.msgs.length-1;_i2>=foundMsg.id;_i2--){var _msg=cd.msgs[_i2];if(_msg||console.error("\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 ID "+foundMsg.id),_msg.newness&&!_msg.isInViewport(!0))return void _msg.$elements.cdScrollTo("middle",cd.env.updateNextButton)}}},goToNextNewMsg:function(){if(cd.env.newestCount){for(var _loop=function(i){var msg=cd.msgs[i];if("newest"===msg.newness&&!msg.seen)return msg.$elements.cdScrollTo("middle",function(){msg.registerSeen("forward",!0),cd.env.updateNextButton()}),cd.env.lastNewestSeen=i,"break"},i=cd.env.lastNewestSeen||0;i<cd.msgs.length;i++){if("break"===_loop(i))break}"none"===cd.env.$prevButton.css("display")&&cd.env.$prevButton.show()}else{var foundMsg=cd.env.findMsgInViewport("backward");if(!foundMsg)return;for(i=foundMsg.id;i<cd.msgs.length;i++){var msg=cd.msgs[i];if(msg||console.error("\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 ID "+foundMsg.id),msg.newness&&!msg.isInViewport(!0))return void msg.$elements.cdScrollTo("middle",cd.env.updateNextButton)}for(var _i3=0;_i3<foundMsg.id;_i3++){var _msg2=cd.msgs[_i3];if(_msg2||console.error("\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 ID "+foundMsg.id),_msg2.newness&&!_msg2.isInViewport(!0))return void _msg2.$elements.cdScrollTo("middle",cd.env.updateNextButton)}}},globalKeyDownHandler:function(e){if(!cd.env.pageOverlaysOn){if(e.ctrlKey&&!e.shiftKey&&e.altKey&&81===e.keyCode||!e.ctrlKey&&!e.shiftKey&&!e.altKey&&81===e.keyCode&&!$(":focus:input").length&&(!$(":focus").length||!$(":focus")[0].isContentEditable)){e.preventDefault();var msgForm=cd.lastActiveMsgForm;if(!msgForm)return;var selectionText=window.getSelection().toString();if(selectionText||e.ctrlKey&&!e.shiftKey&&e.altKey){if(msgForm.textarea.$input.is(":focus")){if(msgForm.textarea.encapsulateContent("> ''","''\n"),selectionText){var _cursorPos=msgForm.textarea.$input[0].selectionEnd;msgForm.textarea.selectRange(_cursorPos+"''\n".length)}}else{var textarea=msgForm.textarea.$input[0],cursorPos="backward"===textarea.selectionDirection?textarea.selectionStart:textarea.selectionEnd,value=textarea.value,citationCode="> ''"+selectionText.trim()+"''\n",newCursorPos=cursorPos+citationCode.length,newValue=value.slice(0,cursorPos)+citationCode+value.slice(cursorPos);msgForm.textarea.setValue(newValue),msgForm.textarea.selectRange(newCursorPos)}}}e.ctrlKey||e.shiftKey||e.altKey||87!==e.keyCode||$(":focus:input").length||$(":focus").length&&$(":focus")[0].isContentEditable||"none"===cd.env.$prevButton.css("display")||cd.env.goToPrevNewMsg(),e.ctrlKey||e.shiftKey||e.altKey||83!==e.keyCode||$(":focus:input").length||$(":focus").length&&$(":focus")[0].isContentEditable||cd.env.goToNextNewMsg()}},recalculateUnderlayers:function(){var newOnly=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(cd.env.underlayers.length&&!cd.env.recalculateUnderlayersTimeout&&!cd.env.scrollHandleTimeout){newOnly&&(cd.env.recalculateUnderlayersTimeout=!0);for(var _i4=0;_i4<cd.env.floatingElements.length;_i4++)cd.env.floatingRects[_i4]=cd.env.floatingElements[_i4].getBoundingClientRect();var msg,i,lastI=0,allKeys=[],recalculate=function(msg){if(!msg.newness&&!newOnly&&msg.$underlayer&&msg.$underlayer.length)msg.removeUnderlayer();else if(msg.newness&&!msg.isEdited){if(!msg.configureUnderlayer(!1,"isMisplaced"))return lastI=i,!1;allKeys.push(i)}return!0};for(i=cd.msgs.length-1;0<=i&&((msg=cd.msgs[i])||console.error("\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 ID "+foundMsgId),recalculate(msg));i--);for(i=0;i<lastI&&((msg=cd.msgs[i])||console.error("\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 ID "+foundMsgId),recalculate(msg));i++);if(cd.env.floatingRects=[],allKeys.length)for(var _i5=0;_i5<allKeys.length;_i5++)cd.msgs[allKeys[_i5]].updateUnderlayerPositions();newOnly&&(cd.env.recalculateUnderlayersTimeout=!1)}},updateNextButton:function(){cd.env.newestCount?(cd.env.$nextButton.hasClass("cd-updatePanel-nextButton-digit")||cd.env.$nextButton.addClass("cd-updatePanel-nextButton-digit").attr("title","\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043d\u0435\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u043c\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e"),cd.env.$nextButton.text(cd.env.newestCount)):cd.env.$nextButton.hasClass("cd-updatePanel-nextButton-digit")&&(cd.env.$nextButton.removeClass("cd-updatePanel-nextButton-digit").attr("title","\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043d\u043e\u0432\u043e\u043c\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e"),cd.env.$nextButton.text(""),cd.env.$prevButton.show())},setLoadingOverlay:function(){if(cd.env.$loadingOverlay&&cd.env.$loadingOverlay.length)cd.env.$loadingOverlay.show();else{cd.env.$loadingOverlay=$("<div>").addClass("cd-loadingOverlay");var $loadingPopup=$("<div>").addClass("cd-loadingPopup").appendTo(cd.env.$loadingOverlay);$("<img>").addClass("cd-loadingPopup-logo").attr("src",cd.config.logoDataUrl).appendTo($loadingPopup);$("body").append(cd.env.$loadingOverlay)}cd.env.pageOverlaysOn=!0},removeLoadingOverlay:function(){cd.env.$loadingOverlay&&cd.env.$loadingOverlay.length&&(cd.env.$loadingOverlay.hide(),cd.env.pageOverlaysOn=!1)},createWindowManager:function(){cd.env.windowManager=new OO.ui.WindowManager,cd.env.windowManager.on("opening",function(){cd.env.pageOverlaysOn=!0}),cd.env.windowManager.on("closing",function(){cd.env.pageOverlaysOn=!1})},removeDuplicates:function(array){if(array&&"object"===(0,_typeof2.default)(array))return array.filter(function(value,index){return array.indexOf(value)===index})},toJquerySpan:function(html){return $($.parseHTML(html)).wrapAll("<span>").parent()},requestOptions:function(){return(new mw.Api).get({action:"query",meta:"userinfo",uiprop:"options",formatversion:2}).then(function(data){var options=data&&data.query&&data.query.userinfo&&data.query.userinfo.options;if(!options)return $.Deferred().reject(["api","no data"]).promise();var visitsCompressed=options["userjs-"+cd.env.VISITS_OPTION_NAME],visitsString=visitsCompressed?_lzString.default.decompressFromEncodedURIComponent(visitsCompressed):"",visits=cd.env.unpackVisits(visitsString),watchedTopicsCompressed=options["userjs-"+cd.env.WATCHED_TOPICS_OPTION_NAME],watchedTopicsString=watchedTopicsCompressed?_lzString.default.decompressFromEncodedURIComponent(watchedTopicsCompressed):"";return{visits:visits,watchedTopics:cd.env.unpackWatchedTopics(watchedTopicsString)}},function(jqXHR,textStatus,errorThrown){return $.Deferred().reject(["network",[jqXHR,textStatus,errorThrown]]).promise()})},getVisits:function(){return cd.env.firstRun&&null===mw.user.options.get("userjs-"+cd.env.VISITS_OPTION_NAME)?$.Deferred().resolve(localStorage[cd.env.VISITS_OPTION_NAME]?JSON.parse(localStorage[cd.env.VISITS_OPTION_NAME]):{}).promise():(cd.env.optionsRequest||cd.env.requestOptions()).then(function(options){return options.visits})},setVisits:function(visits){var visitsString=cd.env.packVisits(visits),visitsStringCompressed=_lzString.default.compressToEncodedURIComponent(visitsString);return 65535<visitsStringCompressed.length?$.Deferred().reject(["internal","sizelimit"]):(new mw.Api).postWithToken("csrf",{action:"options",optionname:"userjs-"+cd.env.VISITS_OPTION_NAME,optionvalue:visitsStringCompressed}).then(function(data){if(!data||"success"!==data.options)return $.Deferred().reject(["api","no success"]).promise()},function(jqXHR,textStatus,errorThrown){return $.Deferred().reject(["network",[jqXHR,textStatus,errorThrown]]).promise()})},getWatchedTopics:function(keepedData){var promise;cd.env.firstRun&&null===mw.user.options.get("userjs-"+cd.env.WATCHED_TOPICS_OPTION_NAME)?promise=$.Deferred().resolve({}).promise():promise=(cd.env.optionsRequest||cd.env.requestOptions()).then(function(options){return options.watchedTopics});return promise.done(function(watchedTopics){cd.env.watchedTopics=watchedTopics,cd.env.thisPageWatchedTopics=cd.env.watchedTopics&&cd.env.watchedTopics[cd.env.ARTICLE_ID]||[],cd.env.thisPageWatchedTopics.length||(cd.env.watchedTopics[cd.env.ARTICLE_ID]=cd.env.thisPageWatchedTopics),keepedData&&(keepedData.justWatchedTopic&&(cd.env.thisPageWatchedTopics.includes(keepedData.justWatchedTopic)||cd.env.thisPageWatchedTopics.push(keepedData.justWatchedTopic)),keepedData.justUnwatchedTopic&&cd.env.thisPageWatchedTopics.includes(keepedData.justUnwatchedTopic)&&cd.env.thisPageWatchedTopics.splice(cd.env.thisPageWatchedTopics.indexOf(keepedData.justUnwatchedTopic),1))}).fail(function(){console.error("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430")})},setWatchedTopics:function(watchedTopics){var watchedTopicsString=cd.env.packWatchedTopics(watchedTopics),watchedTopicsStringCompressed=_lzString.default.compressToEncodedURIComponent(watchedTopicsString);return 65535<watchedTopicsStringCompressed.length?$.Deferred().reject(["internal","sizelimit"]):(new mw.Api).postWithToken("csrf",{action:"options",optionname:"userjs-"+cd.env.WATCHED_TOPICS_OPTION_NAME,optionvalue:watchedTopicsStringCompressed}).then(function(data){if(!data||"success"!==data.options)return $.Deferred().reject(["api","no success"]).promise()},function(jqXHR,textStatus,errorThrown){return $.Deferred().reject(["network",[jqXHR,textStatus,errorThrown]]).promise()})},editWatchedTopics:function(){return(0,_asyncToGenerator2.default)(_regenerator.default.mark(function _callee4(){var watchedTopicsPromise,watchedTopics,pageIds,pageTitles,pageIdToTitle,pagesIdAndTitle,pageTitleToId,topics,setWatchedTopicsAndClose,queryPageProperties,EditWatchedTopicsDialog,editWatchedTopicsDialog;return _regenerator.default.wrap(function(_context4){for(;;)switch(_context4.prev=_context4.next){case 0:return EditWatchedTopicsDialog=function(){EditWatchedTopicsDialog.parent.call(this)},watchedTopicsPromise=cd.env.getWatchedTopics(),_context4.next=4,mw.loader.using(["mediawiki.api","mediawiki.notify","oojs","oojs-ui","user.options"]);case 4:return _context4.next=6,watchedTopicsPromise;case 6:watchedTopics=_context4.sent,setWatchedTopicsAndClose=function(){var _setWatchedTopicsAndClose=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function _callee(watchedTopics){var errorType,data,_e;return _regenerator.default.wrap(function(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.prev=0,_context.next=3,cd.env.setWatchedTopics(watchedTopics);case 3:editWatchedTopicsDialog.popPending(),editWatchedTopicsDialog.close(),_context.next=13;break;case 7:_context.prev=7,_context.t0=_context.catch(0),$.isArray(_context.t0)?(_e=(0,_slicedToArray2.default)(_context.t0,2),errorType=_e[0],data=_e[1]):console.error(_context.t0),"internal"===errorType&&"sizelimit"===data?editWatchedTopicsDialog.showErrors(new OO.ui.Error("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438: \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043f\u0438\u0441\u043a\u0430 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0442\u0435\u043c \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439. \u0423\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043f\u0438\u0441\u043a\u0430, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c.",!0)):editWatchedTopicsDialog.showErrors(new OO.ui.Error("\u0412\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u0435\u043c: ".concat(errorType,"/").concat(data),!0)),console.log(errorType,data),editWatchedTopicsDialog.popPending();case 13:case"end":return _context.stop()}},_callee,this,[[0,7]])}));return function(_x){return _setWatchedTopicsAndClose.apply(this,arguments)}}(),queryPageProperties=function(){var _queryPageProperties=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function _callee3(property,pageidOrTitleSet){var queryOptions,doneCallback,data,error,errorType,_data,_e2;return _regenerator.default.wrap(function(_context3){for(;;)switch(_context3.prev=_context3.next){case 0:return queryOptions={action:"query",formatversion:2},"titles"===property?($.extend(queryOptions,{pageids:pageidOrTitleSet}),doneCallback=function(query){for(var pages=query.pages,i=0;i<pages.length;i++)pagesIdAndTitle.push([pages[i].pageid,pages[i].title]),pageIdToTitle[pages[i].pageid]=pages[i].title;var nextPageIds=pageIds.splice(0,50).join("|");if(nextPageIds.length)queryPageProperties("titles",nextPageIds);else{pagesIdAndTitle.sort(function(a,b){return a[1]>b[1]?1:-1});for(var sortedWatchedTopics=[],_i6=0;_i6<pagesIdAndTitle.length;_i6++)sortedWatchedTopics.push([pagesIdAndTitle[_i6][0],watchedTopics[pagesIdAndTitle[_i6][0]]]);for(var topicList="",_i7=0;_i7<sortedWatchedTopics.length;_i7++)if(sortedWatchedTopics[_i7][1])for(var j=0;j<sortedWatchedTopics[_i7][1].length;j++)topicList+=pageIdToTitle[sortedWatchedTopics[_i7][0]]+"#"+sortedWatchedTopics[_i7][1][j]+"\n";editWatchedTopicsDialog.textarea.setValue(topicList.trim()),editWatchedTopicsDialog.popPending()}}):"pageids"===property&&($.extend(queryOptions,{titles:pageidOrTitleSet,redirects:!0}),doneCallback=function(){var _ref=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function _callee2(query){var normalized,redirects,pages,i,_i8,_i9,nextTitles,newWatchedTopics,key;return _regenerator.default.wrap(function(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:for(normalized=query.normalized||[],redirects=query.redirects||[],pages=query.pages,i=0;i<normalized.length;i++)topics[normalized[i].from]&&(topics[normalized[i].to]=topics[normalized[i].from],delete topics[normalized[i].from]);for(_i8=0;_i8<redirects.length;_i8++)topics[redirects[_i8].from]&&(topics[redirects[_i8].to]?topics[redirects[_i8].to]=topics[redirects[_i8].to].concat(topics[redirects[_i8].from]):topics[redirects[_i8].to]=topics[redirects[_i8].from],delete topics[redirects[_i8].from]);for(_i9=0;_i9<pages.length;_i9++)pages[_i9].pageid&&(pageTitleToId[pages[_i9].title]=pages[_i9].pageid);if((nextTitles=pageTitles.splice(0,50).join("|")).length)queryPageProperties("pageids",nextTitles);else{for(key in newWatchedTopics={},topics)pageTitleToId[key]&&(newWatchedTopics[pageTitleToId[key]]=cd.env.removeDuplicates(topics[key]));setWatchedTopicsAndClose(newWatchedTopics)}case 8:case"end":return _context2.stop()}},_callee2,this)}));return function(_x4){return _ref.apply(this,arguments)}}()),_context3.prev=2,_context3.next=5,(new mw.Api).post(queryOptions);case 5:if(data=_context3.sent,error=data.error&&data.error.code&&data.error.info&&data.error.code+": "+data.error.info)return _context3.abrupt("return",$.Deferred().reject(["api",error]).promise());_context3.next=9;break;case 9:if(data&&data.query&&data.query.pages){_context3.next=11;break}return _context3.abrupt("return",$.Deferred().reject(["api","no data"]).promise());case 11:doneCallback(data.query),_context3.next=20;break;case 14:_context3.prev=14,_context3.t0=_context3.catch(2),$.isArray(_context3.t0)?(_e2=(0,_slicedToArray2.default)(_context3.t0,2),errorType=_e2[0],_data=_e2[1]):console.error(_context3.t0),editWatchedTopicsDialog.showErrors(new OO.ui.Error("\u0412\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u0435\u043c: ".concat(errorType,"/").concat(_data),!0)),console.log(errorType,_data),editWatchedTopicsDialog.popPending();case 20:case"end":return _context3.stop()}},_callee3,this,[[2,14]])}));function queryPageProperties(_x2,_x3){return _queryPageProperties.apply(this,arguments)}return queryPageProperties}(),OO.inheritClass(EditWatchedTopicsDialog,OO.ui.ProcessDialog),EditWatchedTopicsDialog.static.name="editWatchedTopicsDialog",EditWatchedTopicsDialog.static.title="\u041f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0435\u043c",EditWatchedTopicsDialog.static.actions=[{action:"save",label:"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c",flags:["primary","progressive"]},{label:"\u041e\u0442\u043c\u0435\u043d\u0430",flags:"safe"}],EditWatchedTopicsDialog.prototype.initialize=function(){EditWatchedTopicsDialog.parent.prototype.initialize.apply(this,arguments),this.pushPending(),this.textarea=new OO.ui.MultilineTextInputWidget({value:"",rows:30}),this.$body.append(this.textarea.$element),pageIds=Object.keys(watchedTopics),pageIdToTitle={},pagesIdAndTitle=[];var nextPageIds=pageIds.splice(0,50).join("|");""!==nextPageIds?queryPageProperties("titles",nextPageIds):this.popPending()},EditWatchedTopicsDialog.prototype.getActionProcess=function(action){var dialog=this;return"save"===action?new OO.ui.Process(function(){dialog.pushPending();var rawTopics=dialog.textarea.getValue().split("\n");topics={},pageTitles=[];for(var i=0;i<rawTopics.length;i++){var matches=rawTopics[i].split("#");matches[0]&&matches[1]&&(matches[0]=matches[0].trim(),matches[1]=matches[1].trim(),topics[matches[0]]||(topics[matches[0]]=[],pageTitles.push(matches[0])),topics[matches[0]].push(matches[1]))}pageTitleToId={};var nextTitles=pageTitles.splice(0,50).join("|");""!==nextTitles?queryPageProperties("pageids",nextTitles):setWatchedTopicsAndClose({})}):EditWatchedTopicsDialog.parent.prototype.getActionProcess.call(dialog,action)},editWatchedTopicsDialog=new EditWatchedTopicsDialog,cd.env.windowManager||cd.env.createWindowManager(),$("body").append(cd.env.windowManager.$element),cd.env.windowManager.addWindows([editWatchedTopicsDialog]),cd.env.windowManager.openWindow(editWatchedTopicsDialog).opened.then(function(){editWatchedTopicsDialog.textarea.focus()});case 21:case"end":return _context4.stop()}},_callee4,this)}))()},getLastGlobalCapture:function(s,regexp){for(var matches,lastCapture;matches=regexp.exec(s);)lastCapture=matches[1];return lastCapture},findPrevMsg:function(code){for(var regexp=new RegExp("^[^]*(?:^|\\n)(.*".concat(cd.env.SIG_PATTERN,".*\\n)")),match=code.match(regexp);match&&cd.env.MSG_ANTIPATTERN_REGEXP&&cd.env.MSG_ANTIPATTERN_REGEXP.test(match[0]);)match=(code=code.replace(/(?:^|\n).*$/,"")).match(regexp);return match},findFirstMsg:function(code){code+="\n";var regexp=new RegExp("^[^]*?(?:^|\\n)(.*".concat(cd.env.SIG_PATTERN,".*\\n)")),match=code.match(regexp),initialPos=0;if(cd.env.MSG_ANTIPATTERN_REGEXP)for(var antipatternMatch;antipatternMatch=match&&match[0].match(cd.env.MSG_ANTIPATTERN_REGEXP);){var increase=antipatternMatch.index+antipatternMatch[0].length;initialPos+=increase,match=(code=code.substr(increase)).match(regexp)}return[match,initialPos]},collectAuthorAndDate:function(match){var text=match[1],authorDate=[],nextMatchNumber=2;return cd.config.sigPatterns.forEach(function(el){for(var captureNames=el[1],i=0;i<captureNames.length;i++,nextMatchNumber++)match[nextMatchNumber]&&(authorDate[captureNames[i]]=match[nextMatchNumber]);if(!captureNames.includes("author"))for(var _i10=0;_i10<cd.env.CAPTURE_USER_NAME_REGEXPS.length&&(authorDate.author=cd.env.getLastGlobalCapture(text,cd.env.CAPTURE_USER_NAME_REGEXPS[_i10]),!authorDate.author);_i10++);}),authorDate.date&&!authorDate.date.includes("(UTC)")&&(authorDate.date+=" (UTC)"),authorDate.author&&(authorDate.author=(authorDate.author[0].toUpperCase()+authorDate.author.slice(1)).replace(/[ _]+/g," ")),[authorDate.author,authorDate.date]},findFirstDate:function(code){var _cd$env$findFirstMsg=cd.env.findFirstMsg(code),firstMsgMatch=(0,_slicedToArray2.default)(_cd$env$findFirstMsg,1)[0];if(firstMsgMatch)for(var nextMatchNumber=2,i=0;i<cd.config.sigPatterns.length;i++)for(var captureNames=cd.config.sigPatterns[i][1],j=0;j<captureNames.length;j++,nextMatchNumber++)if("date"===captureNames[j])return firstMsgMatch[nextMatchNumber]},isInline:function(el){if(el.nodeType===Node.ELEMENT_NODE)return!!cd.env.POPULAR_INLINE_ELEMENTS.includes(el.tagName)||!cd.env.POPULAR_NOT_INLINE_ELEMENTS.includes(el.tagName)&&"inline"===window.getComputedStyle(el).display},getLastMatch:function(s,regexp){if(regexp.global){for(var matches,lastMatch;matches=regexp.exec(s);)lastMatch=matches;return lastMatch}console.error("\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0441 \u0444\u043b\u0430\u0433\u043e\u043c global.")},encodeWikiMarkup:function(text){return text.replace("<","<").replace(">",">").replace("[","[").replace("]","]").replace("{","{").replace("|","|").replace("}","}").replace("\xa0"," ")},cleanSectionHeading:function(heading){return heading.replace(/\[\[:?(?:[^|]*\|)?([^\]]*)\]\]/g,"$1").replace(/\[https?:\/\/[^\]\[<>" ]+ *([^\]]*)\]/g,"$1").replace(/'''(.+?)'''/g,"$1").replace(/''(.+?)''/g,"$1").replace(/<\w+(?: [\w ]+?=[^<>]+?| ?\/?)>/g,"").replace(/<\/\w+ ?>/g,"").replace(/ {2,}/g," ").trim()},formSummary:function(text){return text.trim()+cd.env.SUMMARY_POSTFIX},createTextWithIcon:function(html,iconName){var icon=new OO.ui.IconWidget({icon:iconName}),iconLabel=new OO.ui.LabelWidget({label:html instanceof jQuery?html:new OO.ui.HtmlSnippet(html)});return $("<div>").append(icon.$element,iconLabel.$element)},calculateWordsOverlap:function(s1,s2){var words1=cd.env.removeDuplicates(s1.match(/[A-Za-z\u0410-\u042f\u0430-\u044f\u0401\u0451]{3,}/g)),words2=cd.env.removeDuplicates(s2.match(/[A-Za-z\u0410-\u042f\u0430-\u044f\u0401\u0451]{3,}/g));if(words1&&words2){var isOverlap,total=words2.length,overlap=0;return words1.forEach(function(word1){isOverlap=!1,words2.forEach(function(word2){word2!==word1||(isOverlap=!0)}),isOverlap?overlap++:total++}),0<total?overlap/total:0}},generateAuthorAndDateRegExp:function(author,date){var entitiesPattern,extractPattern,popularHTMLEntities={'"':[""","""],"&":["&","&"],"'":"'","*":"*",";":";","=":"=",">":">","]":"]","|":"|","\xa0":" ","\u2013":"–","\u2014":"—"},authorPattern=cd.env.generateCaseInsensitiveFirstCharPattern(author).replace(/ /g,"[ _]");for(var key in popularHTMLEntities)author.includes(key)&&(entitiesPattern="string"==typeof popularHTMLEntities[key]?popularHTMLEntities[key]:popularHTMLEntities[key].join("|"),authorPattern=authorPattern.replace(mw.RegExp.escape(key),"(?:".concat(mw.RegExp.escape(key),"|").concat(entitiesPattern,")")));if(null!==date){var dateWithOptionalUTCPattern=mw.RegExp.escape(date).replace(/ \\\(UTC\\\)$/,"(?: \\(UTC\\))?");extractPattern=cd.env.USER_NAME_PATTERN+authorPattern+"[|\\]#].*"+mw.RegExp.escape(date)+"[ \xa0\t]*(?:}}|</small>)?[ \xa0\t]*",cd.config.extractAuthorDatePatterns&&cd.config.extractAuthorDatePatterns.forEach(function(el,i){extractPattern+="|"+el.replace("%author",authorPattern).replace("%date",dateWithOptionalUTCPattern)+"[ \xa0\t]*"})}else extractPattern=cd.env.USER_NAME_PATTERN+authorPattern+"[|\\]#]",cd.config.extractAuthorPatterns&&cd.config.extractAuthorPatterns.forEach(function(el,i){extractPattern+="|"+el.replace("%author",authorPattern)+"[ \xa0\t]*"});return new RegExp(extractPattern,"g")},generateAuthorSelector:function(author){var authorEncoded=$.escapeSelector(encodeURI(author.replace(/ /g,"_"))),namespaces=[].concat((0,_toConsumableArray2.default)(cd.config.canonicalUserNamespaces),[cd.config.contributionsPage,"User"]),authorSelector="";return namespaces.forEach(function(el,index){authorSelector+='a[href^="/wiki/'.concat(encodeURI(el),":").concat(authorEncoded,'"]')+':not(a[href^="'.concat(encodeURI(el),":").concat(authorEncoded,'"]), ')}),cd.config.canonicalUserNamespacesWithoutTalk.forEach(function(el,index){authorSelector+='a[href^="/w/index.php?title='.concat(encodeURI(el),'"]'),index!==cd.config.canonicalUserNamespacesWithoutTalk.length-1&&(authorSelector+=", ")}),authorSelector},elementsToText:function(elements){var classesToFilter=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];return elements.map(function(el,index){if(el.nodeType===Node.ELEMENT_NODE)for(var i=0;i<el.classList.length;i++)if(classesToFilter.includes(el.classList[i]))return"";var value=el.textContent;return(elements[index].nodeType===Node.ELEMENT_NODE&&!cd.env.isInline(elements[index])&&"BR"===elements[index].tagName||elements[index-1]&&elements[index-1].nodeType===Node.ELEMENT_NODE&&!cd.env.isInline(elements[index-1]))&&(value=" "+value),value}).join("").trim()},memorizeNewestMsgs:function(){var newestMsgs=[];return cd.msgs.forEach(function(msg){"newest"!==msg.newness||msg.seen||newestMsgs.push({timestamp:msg.timestamp,author:msg.author})}),newestMsgs},updatePageContent:function(html,keepedData){cd.env.underlayersContainer.innerHTML="",cd.env.linksUnderlayersContainer.innerHTML="",cd.env.underlayers=[],cd.debug.endTimer(cd.strings.gettingHtml),cd.debug.startTimer(cd.strings.layingOutHtml),cd.env.$content.html(html),mw.hook("wikipage.content").fire(cd.env.$content),(0,_parse.default)($.extend(keepedData,{memorizedNewestMsgs:cd.env.memorizeNewestMsgs()}))},reloadPage:function(keepedData){return cd.debug.initTimers(),cd.debug.startTimer(cd.strings.totalTime),cd.debug.startTimer(cd.strings.gettingHtml),cd.env.optionsRequest=cd.env.requestOptions(),!1!==cd.settings.showLoadingOverlay&&cd.env.setLoadingOverlay(),cd.env.parseCurrentPage().done(function(html){cd.env.updatePageContent(html,keepedData)})},parseCurrentPage:function(){var request=(new mw.Api).get({action:"parse",page:cd.env.CURRENT_PAGE,prop:"text",formatversion:2}).then(function(data){var error=data.error&&data.error.code&&data.error.info&&data.error.code+": "+data.error.info;if(error)return $.Deferred().reject(["api",error]).promise();var text=data&&data.parse&&data.parse.text;return text||$.Deferred().reject(["api","no data"]).promise()},function(jqXHR,textStatus,errorThrown){return $.Deferred().reject(["network",[jqXHR,textStatus,errorThrown]]).promise()});return $.get(mw.util.getUrl(cd.env.CURRENT_PAGE)),request},loadPageCode:function(title){title instanceof mw.Title&&(title=title.toString());var queryTimestamp=$.now();return(new mw.Api).get({action:"query",titles:title,prop:"revisions",rvprop:"content|timestamp",redirects:!0,formatversion:2}).then(function(data){var error=data.error&&data.error.code&&data.error.info&&data.error.code+": "+data.error.info;if(error)return $.Deferred().reject(["api",error]).promise();var query=data.query;if(!query)return $.Deferred().reject(["api","no data"]).promise();var page=query&&query.pages&&query.pages[0],revision=page&&page.revisions&&page.revisions[0];return page.missing?$.Deferred().reject(["api","missing"]).promise():page.invalid?$.Deferred().reject(["api","invalid"]).promise():{code:revision&&revision.content,timestamp:revision&&revision.timestamp,redirectTarget:query&&query.redirects&&query.redirects[0]&&query.redirects[0].to,queryTimestamp:queryTimestamp}},function(jqXHR,textStatus,errorThrown){return $.Deferred().reject(["network",[jqXHR,textStatus,errorThrown]]).promise()})},registerSeenMsgs:function(){cd.env.newestCount&&!cd.env.scrollHandleTimeout&&(cd.env.scrollHandleTimeout=!0,setTimeout(function(){cd.env.scrollHandleTimeout=!1;var foundMsg=cd.env.findMsgInViewport();if(foundMsg){for(var foundMsgId=foundMsg.id,i=foundMsgId-1;0<=i;i--){var msg=cd.msgs[i];if(msg||console.error("\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 ID "+foundMsgId),!msg.isInViewport(!0))break;msg.registerSeen()}for(var _i11=foundMsgId;_i11<cd.msgs.length;_i11++){var _msg3=cd.msgs[_i11];if(_msg3||console.error("\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 ID "+foundMsgId),!_msg3.isInViewport(!0))break;_msg3.registerSeen()}cd.env.updateNextButton()}},100))},genericErrorHandler:function(options){if("parse"===options.errorType)this.abort(options.data,null,options.retryFunc);else if("api"===options.errorType){var text;text="missing"===options.data?"\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0431\u044b\u043b\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0430.":"\u041e\u0448\u0438\u0431\u043a\u0430 API: ".concat(options.data,"."),this.abort(options.message+". "+text,options.data,options.retryFunc)}else"network"===options.errorType?this.abort(options.message+" (\u0441\u0435\u0442\u0435\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430).",options.data,options.retryFunc):this.abort(options.message+" (\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430).",options.data,options.retryFunc)},watchTopic:function(heading){var silent=1<arguments.length&&void 0!==arguments[1]&&arguments[1],callback=2<arguments.length?arguments[2]:void 0;return(0,_asyncToGenerator2.default)(_regenerator.default.mark(function _callee5(){return _regenerator.default.wrap(function(_context5){for(;;)switch(_context5.prev=_context5.next){case 0:if(heading.trim()){_context5.next=2;break}return _context5.abrupt("return");case 2:return _context5.next=4,cd.env.getWatchedTopics();case 4:cd.env.thisPageWatchedTopics.push(heading),cd.env.setWatchedTopics(cd.env.watchedTopics).done(function(){silent||mw.notify(cd.env.toJquerySpan("\u0418\u043a\u043e\u043d\u043a\u0430 \u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \xab".concat(heading,"\xbb \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u0438\u043d\u0435\u0439."))),callback&&callback()}).fail(function(e){var errorType,data;if($.isArray(e)){var _e3=(0,_slicedToArray2.default)(e,2);errorType=_e3[0],data=_e3[1]}else console.error(e);"internal"===errorType&&"sizelimit"===data?mw.notify("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438: \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043f\u0438\u0441\u043a\u0430 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0442\u0435\u043c \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439. \u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c."):mw.notify("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.")});case 6:case"end":return _context5.stop()}},_callee5,this)}))()},Exception:function(message){this.name="Exception",this.message=message,this.stack=(new Error).stack}};exports.default=_default},{"./parse":29,"@babel/runtime/helpers/asyncToGenerator":3,"@babel/runtime/helpers/interopRequireDefault":8,"@babel/runtime/helpers/slicedToArray":13,"@babel/runtime/helpers/toConsumableArray":14,"@babel/runtime/helpers/typeof":15,"@babel/runtime/regenerator":16,"lz-string":17}],27:[function(require,module,exports){module.exports=".cd-rcMsgLink:not(.cd-rcMsgLink-image):before{content:'('}.cd-rcMsgLink:not(.cd-rcMsgLink-image):after{content:')'}.cd-rcMsgLink-image{display:inline-block;vertical-align:middle;width:16px;height:11px;padding:4px 2px;margin-top:-4px}.cd-rcMsgLink-regular.cd-rcMsgLink-image{background:url('data:image/svg+xml,%3Csvg width=\"16\" height=\"11\" viewBox=\"0 0 16 11\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3E %3Cpath d=\"M16 2.5C16 1.11929 14.8807 0 13.5 0H5.5C4.11929 0 3 1.11929 3 2.5V8L0 11H13.5C14.8807 11 16 9.88071 16 8.5V2.5Z\" fill=\"%2372777D\"/%3E %3C/svg%3E') center center / 16px 11px no-repeat}.cd-rcMsgLink-interesting.cd-rcMsgLink-image{background:url('data:image/svg+xml,%3Csvg width=\"16\" height=\"11\" viewBox=\"0 0 16 11\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3E %3Cpath d=\"M16 2.5C16 1.11929 14.8807 0 13.5 0H5.5C4.11929 0 3 1.11929 3 2.5V8L0 11H13.5C14.8807 11 16 9.88071 16 8.5V2.5Z\" fill=\"%233366CC\"/%3E %3C/svg%3E') center center / 16px 11px no-repeat}.cd-watchlistMenu{display:inline-block;margin:-4px 1em 0}.cd-watchlistMenu a:not(:first-child){margin-left:3px}.cd-watchlistMenu-switchInteresting{display:inline-block;vertical-align:middle;width:20px;height:14px;background:url(\"data:image/svg+xml,%3Csvg width='20' height='14' viewBox='0 0 20 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath d='M20 3C20 1.34315 18.6569 0 17 0H7C5.34315 0 4 1.34315 4 3V10L0 14H17C18.6569 14 20 12.6569 20 11V3Z' fill='%233366CC'/%3E %3C/svg%3E\") center center / 20px 14px no-repeat;padding:4px 2px}.cd-watchlistMenu-editWatchedTopics{display:inline-block;vertical-align:middle;width:14px;height:14px;background:url(\"data:image/svg+xml, %3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cline y1='2' x2='14' y2='2' stroke='%233366CC' stroke-width='2'/%3E %3Cline y1='7' x2='14' y2='7' stroke='%233366CC' stroke-width='2'/%3E %3Cline y1='12' x2='14' y2='12' stroke='%233366CC' stroke-width='2'/%3E %3C/svg%3E\") center center / 14px 14px no-repeat;padding:4px 2px}"},{}],28:[function(require,module,exports){"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(){return _msgLinks.apply(this,arguments)};var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator")),_asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));function _msgLinks(){return(_msgLinks=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function _callee2(){var addMsgLinks,_addMsgLinks,isMobile,$aRegularPrototype,$aInterestingPrototype,$wrapperRegularPrototype,$wrapperInterestingPrototype,currentUserRegexp,watchedTopics;return _regenerator.default.wrap(function(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:if(_addMsgLinks=function(){return(_addMsgLinks=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function _callee($content){var watchedTopics,lines,blueIconsPresent,i,line,nsMatches,nsNumber,isNested,linkElement,pageName,botMark,comment,commentText,bytesAddedElement,bytesAddedMatches,bytesAdded,date,author,anchor,link,wrapper,isWatched,curLink,curIdMatches,curId,thisPageWatchedTopics,j,destination,addWatchlistMenu,timezone,timezoneParts,timezoneOffset,list,_lines,_i,_line,_linkElement,_pageName,_link,_comment,_commentText,_bytesAddedElement,_bytesAddedMatches,_bytesAdded,dateElement,timestamp,dateObj,year,month,day,hour,minute,_anchor,_wrapper,_timezone,_timezoneParts,_timezoneOffset,_list,_lines2,_link2,ARTICLE_ID,_i2,_line2,_comment2,_commentText2,_bytesAddedElement2,_bytesAddedMatches2,_bytesAdded2,_dateElement,_timestamp,_dateObj,_year,_month,_day,_hour,_minute,_author,_anchor2,_wrapper2,_isWatched,_thisPageWatchedTopics,_j,separators,_destination;return _regenerator.default.wrap(function(_context){for(;;)switch(_context.prev=_context.next){case 0:if($content.parent().length){_context.next=2;break}return _context.abrupt("return");case 2:return _context.next=4,cd.env.getWatchedTopics();case 4:if(watchedTopics=_context.sent,"Watchlist"!==mw.config.get("wgCanonicalSpecialPageName")){_context.next=85;break}lines=$content[0].querySelectorAll(".mw-changeslist-line:not(.mw-collapsible)"),blueIconsPresent=!1,i=0;case 9:if(!(i<lines.length)){_context.next=83;break}if(line=lines[i],nsMatches=line.className.match(/mw-changeslist-ns(\d+)/),void 0===(nsNumber=nsMatches&&Number(nsMatches[1])))return _context.abrupt("continue",80);_context.next=15;break;case 15:if(isNested="TR"===line.tagName,linkElement=(isNested?line.parentElement:line).querySelector(".mw-changeslist-title")){_context.next=19;break}return _context.abrupt("continue",80);case 19:if(pageName=linkElement.textContent,cd.env.isDiscussionPage(pageName,nsNumber)){_context.next=22;break}return _context.abrupt("continue",80);case 22:if(line.querySelector(".minoredit"))return _context.abrupt("continue",80);_context.next=25;break;case 25:if(botMark=line.querySelector(".botedit"),comment=line.querySelector(".comment"),(commentText=comment&&comment.textContent)&&(botMark&&commentText.includes("Archiving")||commentText.includes("\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430")||commentText.includes("\u043e\u0442\u043c\u0435\u043d\u0430 \u043f\u0440\u0430\u0432\u043a\u0438")||commentText.includes(": \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u043e")))return _context.abrupt("continue",80);_context.next=30;break;case 30:if(bytesAddedElement=line.querySelector(".mw-plusminus-pos")){_context.next=33;break}return _context.abrupt("continue",80);case 33:if("STRONG"===bytesAddedElement.tagName){_context.next=38;break}if(bytesAddedMatches=bytesAddedElement.textContent.match(/\d+/),!(bytesAdded=bytesAddedMatches&&Number(bytesAddedMatches[0]))||bytesAdded<50)return _context.abrupt("continue",80);_context.next=38;break;case 38:if(date=(date=line.getAttribute("data-mw-ts"))&&date.slice(0,12)){_context.next=42;break}return _context.abrupt("continue",80);case 42:if((author=(author=line.querySelector(".mw-userlink"))&&author.textContent)&&"MediaWiki message delivery"!==author){_context.next=46;break}return _context.abrupt("continue",80);case 46:if(anchor=date+"_"+author.replace(/ /g,"_"),link=linkElement.href){_context.next=50;break}return _context.abrupt("continue",80);case 50:if(wrapper=void 0,!commentText||!currentUserRegexp.test(" "+commentText+" ")){_context.next=57;break}(wrapper=$wrapperInterestingPrototype[0].cloneNode(!0)).lastChild.title="\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e (\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u043e \u0432\u0430\u043c)",blueIconsPresent=!0,_context.next=75;break;case 57:if(isWatched=!1,!commentText){_context.next=74;break}if(curLink=line.querySelector(".mw-changeslist-diff-cur")||line.querySelector(".mw-changeslist-history"),curIdMatches=curLink&&curLink.href&&curLink.href.match(/[&?]curid=(\d+)/),!(curId=curIdMatches&&Number(curIdMatches[1]))){_context.next=74;break}if(!(thisPageWatchedTopics=watchedTopics&&watchedTopics[curId]||[]).length){_context.next=74;break}j=0;case 66:if(!(j<thisPageWatchedTopics.length)){_context.next=73;break}if(commentText.includes("\u2192\u200e"+thisPageWatchedTopics[j]))return isWatched=!0,_context.abrupt("break",73);_context.next=70;break;case 70:j++,_context.next=66;break;case 73:isWatched&&((wrapper=$wrapperInterestingPrototype[0].cloneNode(!0)).lastChild.title="\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e (\u0432\u044b \u0441\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u043e\u0439)",blueIconsPresent=!0);case 74:isWatched||(wrapper=$wrapperRegularPrototype[0].cloneNode(!0));case 75:if(wrapper.lastChild.href=link+"#"+anchor,destination=line.querySelector(".mw-usertoollinks")){_context.next=79;break}return _context.abrupt("continue",80);case 79:destination.parentElement.insertBefore(wrapper,destination.nextSibling);case 80:i++,_context.next=9;break;case 83:addWatchlistMenu=function(){var interestingOnly=!1;if(mw.hook("wikipage.content").add(function(){interestingOnly=!1}),!$content.find(".mw-rcfilters-ui-changesLimitAndDateButtonWidget .cd-watchlistMenu").length){var $menu=$("<div>").addClass("cd-watchlistMenu");if(blueIconsPresent){var isEnhanced=!$(".mw-changeslist").find("ul.special").length;$("<a>").addClass("cd-watchlistMenu-switchInteresting").attr("title","\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u043c\u0430\u0445, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u044f \u0441\u043b\u0435\u0436\u0443, \u0438 \u0430\u0434\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u043d\u0435").click(function(){var $collapsibles=$content.find(".mw-changeslist .mw-collapsible:not(.mw-changeslist-legend)"),$lines=$content.find(".mw-changeslist-line:not(.mw-collapsible)");interestingOnly?(isEnhanced&&mw.user.options.get("extendwatchlist")||$lines.not(":has(.cd-rcMsgLink-interesting)").show(),$collapsibles.not(":has(.cd-rcMsgLink-interesting)").find(".mw-rcfilters-ui-highlights-enhanced-toplevel").show(),$collapsibles.not(".mw-collapsed").find(".mw-enhancedchanges-arrow").click()):($collapsibles.not(".mw-collapsed").find(".mw-enhancedchanges-arrow").click(),$collapsibles.has(".cd-rcMsgLink-interesting").find(".mw-enhancedchanges-arrow").click(),$collapsibles.not(":has(.cd-rcMsgLink-interesting)").find(".mw-rcfilters-ui-highlights-enhanced-toplevel").hide(),$lines.not(":has(.cd-rcMsgLink-interesting)").hide()),interestingOnly=!interestingOnly}).appendTo($menu)}$("<a>").addClass("cd-watchlistMenu-editWatchedTopics").attr("title","\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043c\u044b, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u044f \u0441\u043b\u0435\u0436\u0443").click(cd.env.editWatchedTopics).appendTo($menu),$content.find(".wlinfo").append($menu),$content.find(".mw-rcfilters-ui-changesLimitAndDateButtonWidget").prepend($menu)}},mw.user.options.get("wlenhancedfilters-disable")?addWatchlistMenu():mw.hook("structuredChangeFilters.ui.initialized").add(addWatchlistMenu);case 85:if("Contributions"!==mw.config.get("wgCanonicalSpecialPageName")){_context.next=141;break}if(timezone=mw.user.options.get("timecorrection"),timezoneParts=timezone&&timezone.split("|"),null==(timezoneOffset=timezoneParts&&Number(timezoneParts[1]))||isNaN(timezoneOffset))return _context.abrupt("return");_context.next=91;break;case 91:list=$content[0].querySelector(".mw-contributions-list"),_lines=list.children,_i=0;case 94:if(!(_i<_lines.length)){_context.next=141;break}if(_line=_lines[_i],_linkElement=_line.querySelector(".mw-contributions-title")){_context.next=99;break}return _context.abrupt("continue",138);case 99:if((_pageName=_linkElement.textContent).startsWith("\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 ")&&_pageName.includes(":")||(_pageName.startsWith("\u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f:")||_pageName.startsWith("\u041f\u0440\u043e\u0435\u043a\u0442:"))&&cd.config.discussionPageRegexp.test(_pageName)){_context.next=102;break}return _context.abrupt("continue",138);case 102:if(_link=_linkElement.href){_context.next=105;break}return _context.abrupt("continue",138);case 105:if(_line.querySelector(".minoredit"))return _context.abrupt("continue",138);_context.next=108;break;case 108:if(_comment=_line.querySelector(".comment"),(_commentText=_comment&&_comment.textContent)&&(_commentText.includes("Archiving")||_commentText.includes("\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430")||_commentText.includes("\u043e\u0442\u043c\u0435\u043d\u0430 \u043f\u0440\u0430\u0432\u043a\u0438")||_commentText.includes(": \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u043e")))return _context.abrupt("continue",138);_context.next=112;break;case 112:if(_bytesAddedElement=_line.querySelector(".mw-plusminus-pos")){_context.next=115;break}return _context.abrupt("continue",138);case 115:if("STRONG"===_bytesAddedElement.tagName){_context.next=120;break}if(_bytesAddedMatches=_bytesAddedElement.textContent.match(/\d+/),!(_bytesAdded=_bytesAddedMatches&&Number(_bytesAddedMatches[0]))||_bytesAdded<50)return _context.abrupt("continue",138);_context.next=120;break;case 120:if(dateElement=_line.querySelector(".mw-changeslist-date")){_context.next=123;break}return _context.abrupt("continue",138);case 123:if(timestamp=cd.env.getTimestampFromDate(dateElement.textContent,timezoneOffset)){_context.next=126;break}return _context.abrupt("continue",138);case 126:dateObj=new Date(timestamp),year=dateObj.getUTCFullYear(),month=dateObj.getUTCMonth(),day=dateObj.getUTCDate(),hour=dateObj.getUTCHours(),minute=dateObj.getUTCMinutes(),_anchor=cd.env.generateMsgAnchor(year,month,day,hour,minute,mw.config.get("wgRelevantUserName")),_wrapper=void 0,_commentText&¤tUserRegexp.test(" "+_commentText+" ")?(_wrapper=$wrapperInterestingPrototype[0].cloneNode(!0)).lastChild.title="\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e (\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u043e \u0432\u0430\u043c)":_wrapper=$wrapperRegularPrototype[0].cloneNode(!0),_wrapper.lastChild.href=_link+"#"+_anchor,_linkElement.nextSibling&&(_linkElement.nextSibling.textContent=_linkElement.nextSibling.textContent.replace(/^\s/,"")),_linkElement.parentElement.insertBefore(_wrapper,_linkElement.nextSibling);case 138:_i++,_context.next=94;break;case 141:if("history"!==mw.config.get("wgAction")||!cd.env.isDiscussionPage(cd.env.CURRENT_PAGE,cd.env.NAMESPACE_NUMBER)){_context.next=215;break}if(_timezone=mw.user.options.get("timecorrection"),_timezoneParts=_timezone&&_timezone.split("|"),null==(_timezoneOffset=_timezoneParts&&Number(_timezoneParts[1]))||isNaN(_timezoneOffset))return _context.abrupt("return");_context.next=147;break;case 147:_list=$content[0].querySelector("#pagehistory"),_lines2=_list.children,_link2=mw.util.getUrl(cd.env.CURRENT_PAGE),ARTICLE_ID=mw.config.get("wgArticleId"),_i2=0;case 152:if(!(_i2<_lines2.length)){_context.next=215;break}if(_line2=_lines2[_i2],_line2.querySelector(".minoredit"))return _context.abrupt("continue",212);_context.next=157;break;case 157:if(_comment2=_line2.querySelector(".comment"),(_commentText2=_comment2&&_comment2.textContent)&&(_commentText2.includes("Archiving")||_commentText2.includes("\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430")||_commentText2.includes("\u043e\u0442\u043c\u0435\u043d\u0430 \u043f\u0440\u0430\u0432\u043a\u0438")||_commentText2.includes(": \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u043e")))return _context.abrupt("continue",212);_context.next=161;break;case 161:if(_bytesAddedElement2=_line2.querySelector(".mw-plusminus-pos")){_context.next=164;break}return _context.abrupt("continue",212);case 164:if("STRONG"===_bytesAddedElement2.tagName){_context.next=169;break}if(_bytesAddedMatches2=_bytesAddedElement2.textContent.match(/\d+/),!(_bytesAdded2=_bytesAddedMatches2&&Number(_bytesAddedMatches2[0]))||_bytesAdded2<50)return _context.abrupt("continue",212);_context.next=169;break;case 169:if(_dateElement=_line2.querySelector(".mw-changeslist-date")){_context.next=172;break}return _context.abrupt("continue",212);case 172:if(_timestamp=cd.env.getTimestampFromDate(_dateElement.textContent,_timezoneOffset)){_context.next=175;break}return _context.abrupt("continue",212);case 175:if(_dateObj=new Date(_timestamp),_year=_dateObj.getUTCFullYear(),_month=_dateObj.getUTCMonth(),_day=_dateObj.getUTCDate(),_hour=_dateObj.getUTCHours(),_minute=_dateObj.getUTCMinutes(),(_author=(_author=_line2.querySelector(".mw-userlink"))&&_author.textContent)&&"MediaWiki message delivery"!==_author){_context.next=185;break}return _context.abrupt("continue",212);case 185:if(_anchor2=cd.env.generateMsgAnchor(_year,_month,_day,_hour,_minute,_author),_wrapper2=void 0,!_commentText2||!currentUserRegexp.test(" "+_commentText2+" ")){_context.next=192;break}(_wrapper2=$wrapperInterestingPrototype[0].cloneNode(!0)).lastChild.title="\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e (\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u043e \u0432\u0430\u043c)",_context.next=206;break;case 192:if(_isWatched=!1,!_commentText2){_context.next=205;break}if(!(_thisPageWatchedTopics=watchedTopics&&watchedTopics[ARTICLE_ID]||[]).length){_context.next=205;break}_j=0;case 197:if(!(_j<_thisPageWatchedTopics.length)){_context.next=204;break}if(_commentText2.includes("\u2192\u200e"+_thisPageWatchedTopics[_j]))return _isWatched=!0,_context.abrupt("break",204);_context.next=201;break;case 201:_j++,_context.next=197;break;case 204:_isWatched&&((_wrapper2=$wrapperInterestingPrototype[0].cloneNode(!0)).lastChild.title="\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e (\u0432\u044b \u0441\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u043e\u0439)");case 205:_isWatched||(_wrapper2=$wrapperRegularPrototype[0].cloneNode(!0));case 206:if(_wrapper2.lastChild.href=_link2+"#"+_anchor2,separators=_line2.querySelectorAll(".mw-changeslist-separator"),_destination=separators&&separators[separators.length-1]){_context.next=211;break}return _context.abrupt("continue",212);case 211:_destination.parentElement.insertBefore(_wrapper2,_destination.nextSibling);case 212:_i2++,_context.next=152;break;case 215:mw.hook("cd.msgLinksCreated").fire(cd);case 216:case"end":return _context.stop()}},_callee,this)}))).apply(this,arguments)},addMsgLinks=function(_x){return _addMsgLinks.apply(this,arguments)},isMobile=/Mobi|Android/i.test(navigator.userAgent)||void 0!==window.orientation,$aRegularPrototype=$("<a>").addClass("cd-rcMsgLink cd-rcMsgLink-regular").attr("title","\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e"),$aInterestingPrototype=$("<a>").addClass("cd-rcMsgLink cd-rcMsgLink-interesting"),$wrapperRegularPrototype=$("<span>").addClass("cd-rcMsgLink-wrapper").append($aRegularPrototype)[cd.env.IS_DIFF_PAGE?"append":"prepend"](document.createTextNode(" ")),$wrapperInterestingPrototype=$("<span>").addClass("cd-rcMsgLink-wrapper").append($aInterestingPrototype)[cd.env.IS_DIFF_PAGE?"append":"prepend"](document.createTextNode(" ")),isMobile?($aRegularPrototype.text("\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435"),$aInterestingPrototype.text("(!) \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435")):($aRegularPrototype.addClass("cd-rcMsgLink-image"),$aInterestingPrototype.addClass("cd-rcMsgLink-image"),$wrapperRegularPrototype.addClass("cd-rcMsgLink-image-wrapper"),$wrapperInterestingPrototype.addClass("cd-rcMsgLink-image-wrapper")),currentUserRegexp=new RegExp("[^A-Z\u0410-\u042f\u0401a-z\u0430-\u044f\u0451]"+cd.env.generateCaseInsensitiveFirstCharPattern(cd.env.CURRENT_USER).replace(/ /g,"[ _]")+"[^A-Z\u0410-\u042f\u0401a-z\u0430-\u044f\u0451]"),mw.hook("wikipage.content").add(addMsgLinks),mw.config.get("wgIsArticle")&&/[?&]diff=[^&]/.test(location.search))return _context2.next=13,cd.env.getWatchedTopics();_context2.next=15;break;case 13:watchedTopics=_context2.sent,mw.hook("cd.pageReady").add(function(){var timezone=mw.user.options.get("timecorrection"),timezoneParts=timezone&&timezone.split("|"),timezoneOffset=timezoneParts&&Number(timezoneParts[1]);if(null!=timezoneOffset&&!isNaN(timezoneOffset)){var area=document.querySelector(".diff-ntitle");if(area)if(!area.querySelector(".minoredit")){var comment=area.querySelector(".comment"),commentText=comment&&comment.textContent;if(!commentText||!(commentText.includes("Archiving")||commentText.includes("\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430")||commentText.includes("\u043e\u0442\u043c\u0435\u043d\u0430 \u043f\u0440\u0430\u0432\u043a\u0438")||commentText.includes(": \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u043e"))){var dateElement=area.querySelector("#mw-diff-ntitle1 a");if(dateElement){var timestamp=cd.env.getTimestampFromDate(dateElement.textContent,timezoneOffset);if(timestamp){var dateObj=new Date(timestamp),year=dateObj.getUTCFullYear(),month=dateObj.getUTCMonth(),day=dateObj.getUTCDate(),hour=dateObj.getUTCHours(),minute=dateObj.getUTCMinutes(),author=area.querySelector(".mw-userlink");if((author=author&&author.textContent)&&"MediaWiki message delivery"!==author){var wrapper,anchor=cd.env.generateMsgAnchor(year,month,day,hour,minute,author);if(commentText&¤tUserRegexp.test(" "+commentText+" "))(wrapper=$wrapperInterestingPrototype[0].cloneNode(!0)).lastChild.title="\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e (\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u043e \u0432\u0430\u043c)";else{var isWatched=!1;if(commentText){var curId=mw.config.get("wgArticleId"),thisPageWatchedTopics=watchedTopics&&watchedTopics[curId]||[];if(thisPageWatchedTopics.length){for(var j=0;j<thisPageWatchedTopics.length;j++)if(commentText.includes("\u2192\u200e"+thisPageWatchedTopics[j])){isWatched=!0;break}isWatched&&((wrapper=$wrapperInterestingPrototype[0].cloneNode(!0)).lastChild.title="\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e (\u0432\u044b \u0441\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u043e\u0439)")}}isWatched||(wrapper=$wrapperRegularPrototype[0].cloneNode(!0))}wrapper.firstChild.href="#"+anchor,wrapper.onclick=function(e){e.preventDefault();var msg=cd.getMsgByAnchor(anchor);msg&&(msg.scrollToAndHighlightTarget(),history.replaceState({},"","#"+anchor))};var destination=area.querySelector("#mw-diff-ntitle3");destination&&(destination.insertBefore(wrapper,destination.firstChild),mw.hook("cd.msgLinksCreated").fire(cd))}}}}}}});case 15:case"end":return _context2.stop()}},_callee2,this)}))).apply(this,arguments)}},{"@babel/runtime/helpers/asyncToGenerator":3,"@babel/runtime/helpers/interopRequireDefault":8,"@babel/runtime/regenerator":16}],29:[function(require,module,exports){"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(keepedData){cd.env.firstRun?cd.debug.endTimer(cd.strings.loadingModules):cd.debug.endTimer(cd.strings.layingOutHtml);cd.debug.startTimer(cd.strings.preparations);var $parserOutput=cd.env.$content.children(".mw-parser-output");$parserOutput.length?(cd.env.$content=$parserOutput,cd.env.contentElement=$parserOutput[0]):cd.env.contentElement=cd.env.$content[0];cd.msgs=[],cd.sections=[],cd.msgForms=[],cd.settings=cd.settings||{},cd.defaultSettings={additionalInsertButtons:[],allowEditOthersMsgs:!1,alwaysExpandSettings:!1,closerTemplate:"{{subst:\u041f\u0418}}",defaultCopyLinkType:"wikilink",mySig:"~~".concat("~~"),slideEffects:!0,showLoadingOverlay:!0,showToolbars:!0,watchTopicsOnReply:!0},Object.keys(cd.defaultSettings).forEach(function(name){var settingName="cd"+name[0].toUpperCase()+name.slice(1);settingName in window&&(cd.settings[name]=window[settingName])}),cd.settings=$.extend({},cd.defaultSettings,cd.settings);var highlightLastMessagesEnabled="undefined"!=typeof highlightMessagesAfterLastVisit;cd.settings.highlightNew&&highlightLastMessagesEnabled&&(highlightMessagesAfterLastVisit=!1,highlightMessages=0);if(cd.env.createWindowManager(),!cd.env.MSG_REPLY_BUTTON_PROTOTYPE){cd.env.MSG_UP_BUTTON_PROTOTYPE=new OO.ui.ButtonWidget({label:"\u25b2",title:"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e",framed:!1,classes:["cd-button","cd-msgButton"]}).$element[0],cd.env.MSG_EDIT_BUTTON_PROTOTYPE=new OO.ui.ButtonWidget({label:"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c",framed:!1,classes:["cd-button","cd-msgButton"]}).$element[0],cd.env.MSG_REPLY_BUTTON_PROTOTYPE=new OO.ui.ButtonWidget({label:"\u041e\u0442\u0432\u0435\u0442\u0438\u0442\u044c",framed:!1,classes:["cd-button","cd-msgButton"]}).$element[0],cd.env.MSG_LINK_BUTTON_PROTOTYPE=new OO.ui.ButtonWidget({label:"#",title:"\u041d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u043a\u0438-\u0441\u0441\u044b\u043b\u043a\u0443. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0441 \u0437\u0430\u0436\u0430\u0442\u044b\u043c Ctrl, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0438\u0434 \u0441\u0441\u044b\u043b\u043a\u0438.",framed:!1,classes:["cd-button","cd-msgButton"]}).$element[0],cd.env.SECTION_REPLY_BUTTON_PROTOTYPE=new OO.ui.ButtonWidget({label:"\u041e\u0442\u0432\u0435\u0442\u0438\u0442\u044c",framed:!1,classes:["cd-button","cd-sectionButton"]}).$element[0],cd.env.SECTION_ADDSUBSECTION_BUTTON_PROTOTYPE=new OO.ui.ButtonWidget({label:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b",framed:!1,classes:["cd-button","cd-sectionButton"]}).$element[0],cd.env.UNDERLAYER_PROTOTYPE=document.createElement("div"),cd.env.UNDERLAYER_PROTOTYPE.className="cd-underlayer",cd.env.LINKS_UNDERLAYER_PROTOTYPE=document.createElement("div"),cd.env.LINKS_UNDERLAYER_PROTOTYPE.className="cd-linksUnderlayer";var LINKS_UNDERLAYER_WRAPPER=document.createElement("div");LINKS_UNDERLAYER_WRAPPER.className="cd-linksUnderlayer-wrapper",cd.env.LINKS_UNDERLAYER_PROTOTYPE.appendChild(LINKS_UNDERLAYER_WRAPPER);var LINKS_UNDERLAYER_GRADIENT=document.createElement("div");LINKS_UNDERLAYER_GRADIENT.textContent="\xa0",LINKS_UNDERLAYER_GRADIENT.className="cd-linksUnderlayer-gradient",LINKS_UNDERLAYER_WRAPPER.appendChild(LINKS_UNDERLAYER_GRADIENT);var LINKS_UNDERLAYER_TEXT=document.createElement("div");LINKS_UNDERLAYER_TEXT.className="cd-linksUnderlayer-text",LINKS_UNDERLAYER_WRAPPER.appendChild(LINKS_UNDERLAYER_TEXT)}cd.env.CURRENT_USER_SIG=mw.user.options.get("nickname");var authorInSigMatches=cd.env.CURRENT_USER_SIG.match(new RegExp(cd.env.USER_NAME_PATTERN));authorInSigMatches&&(cd.env.CURRENT_USER_SIG_PREFIX_REGEXP=new RegExp((cd.settings.mySig!==cd.defaultSettings.mySig&&cd.settings.mySig.includes("~~".concat("~"))?mw.RegExp.escape(cd.settings.mySig.slice(0,cd.settings.mySig.indexOf("~~".concat("~")))):"")+mw.RegExp.escape(cd.env.CURRENT_USER_SIG.slice(0,authorInSigMatches.index))+"$"));cd.env.PNIE_PATTERN="(?:".concat(cd.env.POPULAR_NOT_INLINE_ELEMENTS.join("|"),")"),cd.env.EVERYTHING_MUST_BE_FROZEN=!!(cd.env.CURRENT_PAGE.includes("/\u0410\u0440\u0445\u0438\u0432")||(/[?&]diff=[^&]/.test(location.search)||/[?&]oldid=[^&]/.test(location.search))&&mw.config.get("wgRevisionId")!==mw.config.get("wgCurRevisionId"));var firstVisibleElement,firstVisibleElementTopOffset,getVisitsPromise,msgAntipatternPatternParts=[];cd.config.blocksToExcludeClasses||cd.config.templatesToExclude,cd.config.blocksToExcludeClasses&&msgAntipatternPatternParts.push("class=([\\'\"])[^\\1]*(?:\\b"+cd.config.blocksToExcludeClasses.join("\\b|\\b")+"\\b)[^\\1]*\\1"),cd.config.templatesToExclude&&msgAntipatternPatternParts.push("\\{\\{ *(?:"+cd.config.templatesToExclude.map(function(template){return cd.env.generateCaseInsensitiveFirstCharPattern(template)}).join("|")+") *(?:\\||\\}\\})"),cd.config.msgAntipatterns.forEach(function(antiPattern){msgAntipatternPatternParts.push(antiPattern)}),cd.env.MSG_ANTIPATTERN_REGEXP=new RegExp("(?:".concat(msgAntipatternPatternParts.join("|"),").*\\n$"));if(cd.env.firstRun&&0!==window.pageYOffset&&cd.env.contentElement.getBoundingClientRect().top<=0)for(var _currentElement=cd.env.contentElement.firstElementChild;_currentElement;){if(cd.env.POPULAR_NOT_INLINE_ELEMENTS.includes(_currentElement.tagName)){var rect=_currentElement.getBoundingClientRect();if(0<=rect.bottom&&0!==rect.height){firstVisibleElement=_currentElement,firstVisibleElementTopOffset=rect.top;var child=_currentElement.firstElementChild;if(child){_currentElement=child;continue}break}}_currentElement=_currentElement.nextElementSibling}$.extend(cd,{getMsgByAnchor:function(anchor){if(cd.msgs&&anchor)for(var i=0;i<cd.msgs.length;i++)if(cd.msgs[i].anchor===anchor)return cd.msgs[i]},getLastActiveMsgForm:function(){if(cd.lastActiveMsgForm&&cd.lastActiveMsgForm.isActive())return cd.lastActiveMsgForm;for(var i=cd.msgForms.length-1;0<=i;i--)if(cd.msgForms[i].isActive())return cd.msgForms[i]},getLastActiveAlteredMsgForm:function(){if(cd.lastActiveMsgForm&&cd.lastActiveMsgForm.isActive()&&cd.lastActiveMsgForm.isAltered())return cd.lastActiveMsgForm;for(var i=cd.msgForms.length-1;0<=i;i--)if(cd.msgForms[i].isActive()&&cd.msgForms[i].isAltered())return cd.msgForms[i]}}),$.fn.extend({cdRemoveNonTagNodes:function(){return $(this).filter(function(){return this.nodeType===Node.ELEMENT_NODE})},cdScrollTo:function(){var positionOnScreen=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"top",callback=1<arguments.length?arguments[1]:void 0,smooth=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],yCorrection=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;cd.env.scrollHandleTimeout=!0;var offset,$el=$(this).cdRemoveNonTagNodes();$el.is(":visible")||$el.prev().hasClass("cd-msgForm")&&($el=$el.prev()),offset="middle"===positionOnScreen?Math.min($el.first().offset().top,$el.first().offset().top+.5*($el.last().offset().top+$el.last().height()-$el.first().offset().top)-.5*$(window).height()+yCorrection):"bottom"===positionOnScreen?$el.last().offset().top+$el.last().height()+yCorrection:$el.first().offset().top+yCorrection,smooth?$("body, html").animate({scrollTop:offset},{complete:function(){cd.env.scrollHandleTimeout=!1,callback&&callback()}}):(window.scrollTo(0,offset),cd.env.scrollHandleTimeout=!1)},cdIsInViewport:function(){var partly=0<arguments.length&&void 0!==arguments[0]&&arguments[0],$elements=$(this).cdRemoveNonTagNodes(),wasHidden=!1;1===$elements.length&&"none"===$elements.css("display")&&(wasHidden=!0,$elements.show());var elementTop=$elements.first().offset().top,elementBottom=$elements.last().offset().top+$elements.last().height();wasHidden&&$elements.hide();var viewportTop=$(window).scrollTop(),viewportBottom=viewportTop+$(window).height();return partly?elementTop<viewportBottom&&viewportTop<elementBottom:elementBottom<viewportBottom&&viewportTop<elementTop},cdAddCloseButton:function(blockName,msg){var $obj=$(this),$closeButton=$("<a>").attr("title","\u0417\u0430\u043a\u0440\u044b\u0442\u044c "+blockName).addClass("cd-closeButton").css("display","none").click(function(){$obj.children(".mw-parser-output, table.diff").cdFadeOut("fast",function(){$obj.empty()},msg)});return $obj.prepend($closeButton).mouseenter(function(){$closeButton.fadeIn("fast")}).mouseleave(function(){$closeButton.fadeOut("fast")}),$(this)},cdHide:function(msg){return msg||(msg=cd.env.findMsgInViewport()),$(this).hide(),msg&&(msg.prepareUnderlayersInViewport(!1),msg.updateUnderlayersInViewport(!1)),$(this)},cdShow:function(){var msg=0<arguments.length&&void 0!==arguments[0]?arguments[0]:cd.env.findMsgInViewport();return msg&&msg.prepareUnderlayersInViewport(!1),$(this).show(),msg&&msg.updateUnderlayersInViewport(!1),$(this)},cdSlideDown:function(duration){var msg=1<arguments.length&&void 0!==arguments[1]?arguments[1]:cd.env.findMsgInViewport();return msg&&msg.prepareUnderlayersInViewport(!0),$(this).slideDown(duration,function(){msg&&msg.updateUnderlayersInViewport(!0)}),$(this)},cdSlideUp:function(duration,callback){var msg=2<arguments.length&&void 0!==arguments[2]?arguments[2]:cd.env.findMsgInViewport();return msg&&msg.prepareUnderlayersInViewport(!0,0),$(this).slideUp(duration,function(){callback&&callback(),msg&&(msg.prepareUnderlayersInViewport(!1),msg.updateUnderlayersInViewport(!0))}),$(this)},cdFadeIn:function(duration){var msg=1<arguments.length&&void 0!==arguments[1]?arguments[1]:cd.env.findMsgInViewport();return msg&&msg.prepareUnderlayersInViewport(!1),$(this).fadeIn(duration),msg&&msg.updateUnderlayersInViewport(!1),$(this)},cdFadeOut:function(duration,callback){var msg=2<arguments.length&&void 0!==arguments[2]?arguments[2]:cd.env.findMsgInViewport();return $(this).fadeOut(duration,function(){callback&&callback(),msg&&(msg.prepareUnderlayersInViewport(!1),msg.updateUnderlayersInViewport(!1))}),$(this)},cdHtml:function(html){var msg=1<arguments.length&&void 0!==arguments[1]?arguments[1]:cd.env.findMsgInViewport();return msg&&msg.prepareUnderlayersInViewport(!1),$(this).html(html),msg&&msg.updateUnderlayersInViewport(!1),$(this)},cdAppend:function(content){var msg=1<arguments.length&&void 0!==arguments[1]?arguments[1]:cd.env.findMsgInViewport();return msg&&msg.prepareUnderlayersInViewport(!1),$(this).append(content),msg&&msg.updateUnderlayersInViewport(!1),$(this)},cdAppendTo:function(content){var msg=1<arguments.length&&void 0!==arguments[1]?arguments[1]:cd.env.findMsgInViewport();return msg&&msg.prepareUnderlayersInViewport(!1),$(this).appendTo(content),msg&&msg.updateUnderlayersInViewport(!1),$(this)},cdRemove:function(){var msg=0<arguments.length&&void 0!==arguments[0]?arguments[0]:cd.env.findMsgInViewport();return $(this).remove(),msg&&(msg.prepareUnderlayersInViewport(!1),msg.updateUnderlayersInViewport(!1)),$(this)},cdEmpty:function(){var msg=0<arguments.length&&void 0!==arguments[0]?arguments[0]:cd.env.findMsgInViewport();if(msg)return $(this).empty(),msg&&(msg.prepareUnderlayersInViewport(!1),msg.updateUnderlayersInViewport(!1)),$(this)}}),cd.env.Exception.prototype=new Error,cd.debug.endTimer(cd.strings.preparations),cd.debug.startTimer(cd.strings.mainCode),cd.env.ARTICLE_ID=mw.config.get("wgArticleId"),cd.env.optionsRequest||(cd.env.optionsRequest=cd.env.requestOptions());cd.env.getWatchedTopicsPromise=cd.env.getWatchedTopics(keepedData),cd.env.EVERYTHING_MUST_BE_FROZEN||mw.util.getParamValue("diff")||(getVisitsPromise=cd.env.getVisits());cd.env.optionsRequest=null,cd.env.closedDiscussions=cd.env.$content.find(".ruwiki-closedDiscussion").get(),cd.env.pageHasOutdents=!!cd.env.$content.find(".outdent-template").length;for(var blocksToExcludeSelector="blockquote, "+cd.config.blocksToExcludeClasses.map(function(s){return"."+s}).join(", "),blocksToExclude=cd.env.$content.find(blocksToExcludeSelector).get(),potentialDateContainers=cd.env.contentElement.querySelectorAll("li, dd, p, div"),dateContainers=[],i=0;i<potentialDateContainers.length;i++)for(var potentialDateContainer=potentialDateContainers[i],pmChildNodes=potentialDateContainer.childNodes,j=pmChildNodes.length-1;0<=j;j--){var pmChildNode=pmChildNodes[j],pmChildNodeText=pmChildNode.textContent;if((pmChildNode.nodeType===Node.TEXT_NODE||pmChildNode.nodeType===Node.ELEMENT_NODE&&cd.env.isInline(pmChildNode))&&(pmChildNodeText.includes("(UTC)")||pmChildNodeText.includes("\u042d\u0442\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430")||"\u043e\u0431\u0441."===pmChildNodeText)){for(var broken=!1,k=0;k<blocksToExclude.length;k++)if(blocksToExclude[k].contains(potentialDateContainer)||cd.env.EVERYTHING_MUST_BE_FROZEN&&potentialDateContainer.className.includes("boilerplate")){broken=!0;break}if(broken)break;dateContainers.push(potentialDateContainer);break}}if(cd.env.firstRun){var $underlayersContainer=$("<div>").attr("id","cd-underlayersContainer");$(".mw-body").prepend($underlayersContainer),cd.env.underlayersContainer=$underlayersContainer[0],cd.env.updateUnderlayersCorrection();var $linksUnderlayersContainer=$("<div>").attr("id","cd-linksUnderlayersContainer");$("body").prepend($linksUnderlayersContainer),cd.env.linksUnderlayersContainer=$linksUnderlayersContainer[0]}for(var _i=cd.env.currentMsgId=0;_i<dateContainers.length;_i++)try{var msg=new _Msg.default(dateContainers[_i]);void 0!==msg.id&&(cd.msgs.push(msg),cd.env.currentMsgId++)}catch(e){e instanceof cd.env.Exception||console.error(e.stack)}var collapseAdjacentMsgLevels=function(levels){if(levels&&levels[0]){cd.debug.startTimer("collapseAdjacentMsgLevels");for(var changeElementType=function(element,newType){for(var id,newElement=document.createElement(newType);element.firstChild;)newElement.appendChild(element.firstChild);element.classList.contains("cd-msgPart")&&(id=Number(element.getAttribute("data-id")),newElement.onmouseenter=element.onmouseenter,newElement.onmouseleave=element.onmouseleave);for(var _i2=0,a=element.attributes;_i2<a.length;_i2++)newElement.setAttribute(a[_i2].name,a[_i2].value);if(element.parentNode.replaceChild(newElement,element),id)for(var _msg=cd.msgs[id],_i3=_msg.elements.length-1;0<=_i3;_i3--)if(_msg.elements[_i3]===element){_msg.elements.splice(_i3,1,newElement);break}return element===firstVisibleElement&&(firstVisibleElement=newElement),newElement},_i4=0;_i4<levels.length;_i4++){var bottomElement=levels[_i4],topElement=bottomElement.previousElementSibling;if(topElement){var currentTopElement=topElement,currentBottomElement=bottomElement;do{var topTag=currentTopElement.tagName,bottomInnerTags={};"UL"===topTag?bottomInnerTags.DD="LI":"DL"===topTag&&(bottomInnerTags.LI="DD");var firstMoved=null;if(currentTopElement.classList.contains("cd-msgLevel")&&"OL"!==currentTopElement.tagName||currentTopElement.querySelector(".cd-msgLevel:not(ol)")){for(;currentBottomElement.childNodes.length;){var _child=currentBottomElement.firstChild;if(_child.tagName)bottomInnerTags[_child.tagName]&&(_child=changeElementType(_child,bottomInnerTags[_child.tagName])),null===firstMoved&&(firstMoved=_child);else if(null===firstMoved&&_child.textContent.trim()){firstMoved=!1;var newChild=document.createElement("span");newChild.appendChild(_child),_child=newChild}currentTopElement.appendChild(_child)}currentBottomElement.parentElement.removeChild(currentBottomElement)}currentTopElement=(currentBottomElement=firstMoved)&&firstMoved.previousElementSibling}while(currentTopElement&¤tBottomElement&&(currentBottomElement.classList.contains("cd-msgLevel")&&"OL"!==currentBottomElement.tagName||currentBottomElement.querySelector(".cd-msgLevel:not(ol)")))}}cd.debug.endTimer("collapseAdjacentMsgLevels")}};collapseAdjacentMsgLevels(cd.env.contentElement.querySelectorAll(".cd-msgLevel:not(ol) + .cd-msgLevel:not(ol)")),collapseAdjacentMsgLevels(cd.env.contentElement.querySelectorAll(".cd-msgLevel:not(ol) + .cd-msgLevel:not(ol)")),cd.env.contentElement.querySelectorAll(".cd-msgLevel:not(ol) + .cd-msgLevel:not(ol)").length&&console.error("\u041e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0441\u043e\u0441\u0435\u0434\u0441\u0442\u0432\u0430 .cd-msgLevel.");for(var elements=document.getElementsByClassName("ruwiki-msgIndentation-minus1level"),_i5=0;_i5<elements.length;_i5++){for(var element=elements[_i5],_currentElement2=element,bgcolor=void 0;_currentElement2&&_currentElement2!==cd.env.contentElement&&(!bgcolor||!bgcolor.includes("rgb("));)_currentElement2=_currentElement2.parentElement,bgcolor=_currentElement2.style.backgroundColor;element.style.backgroundColor=bgcolor||"#fff",element.classList.contains("cd-msgPart")&&(element.style.margin="0")}if(mw.hook("cd.msgsReady").fire(cd.msgs),!cd.msgs[0]&&cd.env.NAMESPACE_NUMBER%2!=1)return void(!1!==cd.settings.showLoadingOverlay&&cd.env.removeLoadingOverlay());cd.env.currentSectionId=0;for(var subsections,headingCandidates=cd.env.contentElement.querySelectorAll("h2, h3, h4, h5, h6"),headings=[],_i6=0;_i6<headingCandidates.length;_i6++){var headingCandidate=headingCandidates[_i6];headingCandidate.querySelector(".mw-headline")&&headings.push(headingCandidate)}for(var _i7=0;_i7<headings.length;_i7++)try{var section=new _Section.default(headings[_i7],_i7===headings.length-1);void 0!==section.id&&(cd.sections.push(section),cd.env.currentSectionId++)}catch(e){e instanceof cd.env.Exception||console.error(e.stack)}for(var _i8=0;_i8<cd.msgs.length;_i8++)cd.msgs[_i8].isOpeningSection||(cd.msgs[_i8].isOpeningSection=!1);for(var _i9=0;_i9<cd.sections.length;_i9++){subsections=[];for(var _section=cd.sections[_i9],_j=_i9+1;_j<cd.sections.length&&cd.sections[_j].level>_section.level;_j++)subsections.push(cd.sections[_j]),2===_section.level&&(cd.sections[_j].baseSection=_section);if(_section.subsections=subsections,!_section.frozen&&2===_section.level){var sectionWithLastReplyButton=void 0,replyButtonA=(sectionWithLastReplyButton=subsections.length&&!subsections[subsections.length-1].frozen?subsections[subsections.length-1]:_section).$replyButtonContainer&§ionWithLastReplyButton.$replyButtonContainer[0].firstChild.firstChild;replyButtonA.onmouseenter=_section.replyButtonHoverHandler,replyButtonA.onmouseleave=_section.replyButtonUnhoverHandler}}mw.hook("cd.sectionsReady").fire(cd.sections),cd.debug.endTimer(cd.strings.mainCode),cd.env.addSectionForm=null;var addTopicSelectors=".ruwiki-addTopicLink a, .ruwiki-addSectionBottom";cd.env.firstRun&&(addTopicSelectors+=", #ca-addsection");$(addTopicSelectors).click(function(e){if(!/[?&]preload=/.test($(this).attr("href"))){e.preventDefault(),cd.env.addSectionForm||(cd.env.addSectionForm=new _MsgForm.default("addSection",null,$(this)));var height=cd.env.addSectionForm.$element.height(),willBeInViewport=cd.env.addSectionForm.$element.cdIsInViewport();"none"===cd.env.addSectionForm.$element.css("display")&&cd.env.addSectionForm.show(cd.settings.slideEffects?"slideDown":"fadeIn"),willBeInViewport||cd.env.addSectionForm.$element.cdScrollTo("middle",null,!0,height/2),cd.env.addSectionForm.headingInput.focus()}}),cd.debug.startTimer(cd.strings.finalCodeAndRendering),firstVisibleElement&&window.scrollTo(0,window.pageYOffset+firstVisibleElement.getBoundingClientRect().top-firstVisibleElementTopOffset);var floatingElementsNodeList=cd.env.contentElement.querySelectorAll('.tright, .floatright, .infobox, *[style*="float:right"], *[style*="float: right"]');cd.env.floatingElements=[];for(var _i10=0;_i10<floatingElementsNodeList.length;_i10++){var floatingElement=floatingElementsNodeList[_i10];"SPAN"===floatingElement.tagName||floatingElement.classList.contains("mw-collapsible-toggle")||"1em 21px 0.5em"===floatingElement.style.padding||"-4px 0px 0px 0.5em"===floatingElement.style.margin||cd.env.floatingElements.push(floatingElement)}var decodedFragment,fragment=location.hash.slice(1);try{decodedFragment=decodeURIComponent(fragment)}catch(e){console.error(e.stack)}var $targetMsg,escapedFragment=$.escapeSelector(fragment),escapedDecodedFragment=decodedFragment&&$.escapeSelector(decodedFragment),isMsgFragment=/^\d{12}_.+$/.test(fragment),msgAnchor=cd.env.firstRun?isMsgFragment&&decodedFragment:keepedData&&keepedData.anchor;if(msgAnchor){var correctedMsgAnchor;if($targetMsg=$('[id="'.concat($.escapeSelector(msgAnchor),'"]')),cd.env.firstRun&&!$targetMsg.length)for(var _cd$env$getDateAndAut=cd.env.getDateAndAuthorFromMsgAnchor(msgAnchor),_cd$env$getDateAndAut2=(0,_slicedToArray2.default)(_cd$env$getDateAndAut,2),date=_cd$env$getDateAndAut2[0],author=_cd$env$getDateAndAut2[1],gap=1;gap<=5;gap++){var dateToFind=new Date(date.getTime()-cd.env.MILLISECONDS_IN_A_MINUTE*gap);if(correctedMsgAnchor=cd.env.generateMsgAnchor(dateToFind.getFullYear(),dateToFind.getMonth(),dateToFind.getDate(),dateToFind.getHours(),dateToFind.getMinutes(),author),($targetMsg=$('[id="'.concat($.escapeSelector(correctedMsgAnchor),'"]'))).length)break}if($targetMsg.length){var _msg2=cd.getMsgByAnchor(correctedMsgAnchor||msgAnchor);_msg2&&setTimeout(function(){_msg2.scrollToAndHighlightTarget()},0)}}var processFragment=function(fragment){var dotToPercent=function(code){return code.replace(/\.([0-9A-F][0-9A-F])/g,"%$1")};fragment=fragment.replace(/(^|[^0-9A-F\.])(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/g,"$1$2,$3,$4,$5").replace(/\.F[0-4]\.[89AB][\dA-F]\.[89AB][\dA-F]\.[89AB][\dA-F]/g,dotToPercent).replace(/\.E[\dA-F]\.[89AB][\dA-F]\.[89AB][\dA-F]/g,dotToPercent).replace(/\.[CD][\dA-F]\.[89AB][\dA-F]/g,dotToPercent).replace(/\.[2-7][0-9A-F]/g,function(code){var ch=decodeURIComponent(dotToPercent(code));return"!\"#$%&'()*+,/;<=>?@\\^`~".includes(ch)?dotToPercent(code):code}).replace(/(^|[^0-9A-F\.])(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?),(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?),(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?),(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/g,"$1$2.$3.$4.$5").replace(/_/g," ");try{fragment=decodeURIComponent(fragment)}catch(e){return void console.error(e.stack)}return fragment.trim()};window.proceedToArchiveHasRun||!fragment||!decodedFragment||isMsgFragment&&(!$targetMsg||$targetMsg.length)||cd.env.CURRENT_PAGE.includes("/\u0410\u0440\u0445\u0438\u0432")||/^\u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f:(\u041a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e|\u041a \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e|\u041a \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044e|\u041a \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044e|\u041a \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044e|\u041a \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e)\//.test(cd.env.CURRENT_PAGE)||mw.util.getParamValue("oldid")||mw.util.getParamValue("diff")||"\u041f\u0440\u0435\u0430\u043c\u0431\u0443\u043b\u0430"===fragment||"\u041f\u0440\u0435\u0430\u043c\u0431\u0443\u043b\u0430"===decodedFragment||fragment.startsWith("/media/")||$(":target").length||$('a[name="'.concat(escapedDecodedFragment,'"]')).length||$('*[id="'.concat(escapedDecodedFragment,'"]')).length||$('a[name="'.concat(escapedFragment,'"]')).length||$('*[id="'.concat(escapedFragment,'"]')).length||(window.proceedToArchiveHasRun=!0,function(){var messageDialog=new OO.ui.MessageDialog;$("body").append(cd.env.windowManager.$element),cd.env.windowManager.addWindows([messageDialog]);var notFound=isMsgFragment?'<span style="color:#c61313;">\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e.</span> \u041e\u043d\u043e \u043c\u043e\u0433\u043b\u043e \u0443\u0439\u0442\u0438 \u0432 \u0430\u0440\u0445\u0438\u0432.':'<span style="color:#c61313;">\u0422\u0435\u043c\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430.</span> \u041e\u043d\u0430 \u043c\u043e\u0433\u043b\u0430 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0430 \u0438\u043b\u0438 \u0443\u0439\u0442\u0438 \u0432 \u0430\u0440\u0445\u0438\u0432.';cd.env.windowManager.openWindow(messageDialog,{message:$('<div style="text-align:center;"><p style="margin-top:0;">'+notFound+'</p><p style="font-size:125%;">\u041f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u0432 \u0430\u0440\u0445\u0438\u0432\u0435?</p></div>'),actions:[{label:"\u0414\u0430",action:"yes"},{label:"\u041d\u0435\u0442",action:"no"}]}).closed.then(function(data){if(data&&"yes"===data.action){var text;if(isMsgFragment){var _cd$env$getDateAndAut3=cd.env.getDateAndAuthorFromMsgAnchor(msgAnchor),_cd$env$getDateAndAut4=(0,_slicedToArray2.default)(_cd$env$getDateAndAut3,1),_date=_cd$env$getDateAndAut4[0];text=cd.env.zeroPad(_date.getHours(),2)+":"+_date.getMinutes()+", "+_date.getDate()+" "+cd.strings.monthNamesGenitive[_date.getMonth()]+" "+_date.getFullYear()}else text=processFragment(fragment).replace(/"/g,"");var archivePrefix,pageTitle=mw.config.get("wgTitle");archivePrefix=0===pageTitle.indexOf("\u0424\u043e\u0440\u0443\u043c/")?0===pageTitle.indexOf("\u0424\u043e\u0440\u0443\u043c/\u0413\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439")?"\u0424\u043e\u0440\u0443\u043c/\u0413\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439/\u0410\u0440\u0445\u0438\u0432\u044b":"\u0424\u043e\u0440\u0443\u043c/\u0410\u0440\u0445\u0438\u0432/"+pageTitle.slice(6):pageTitle;var searchQuery='"'.concat(text,'" prefix:')+mw.config.get("wgFormattedNamespaces")[cd.env.NAMESPACE_NUMBER]+":"+archivePrefix,url=mw.util.getUrl("Special:Search",{profile:"default",fulltext:"Search",search:searchQuery});location.assign(mw.config.get("wgServer")+url)}})}());cd.env.lastNewestSeen=0,cd.env.EVERYTHING_MUST_BE_FROZEN||mw.util.getParamValue("diff")||(cd.env.firstRun?(cd.env.$updatePanel=$("<div>").attr("id","cd-updatePanel").mouseenter(function(){cd.env.mouseOverUpdatePanel=!0}).mouseleave(function(){cd.env.mouseOverUpdatePanel=!1}),cd.env.$refreshButton=$("<div>").attr("id","cd-updatePanel-refreshButton").attr("title","\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443").appendTo(cd.env.$updatePanel).click(function(){if(cd.getLastActiveAlteredMsgForm())if(confirm("\u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043d\u0435\u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b. \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e?"))cd.env.reloadPage();else{var lastActiveAlteredMsgForm=cd.getLastActiveAlteredMsgForm();lastActiveAlteredMsgForm&&lastActiveAlteredMsgForm.textarea.focus()}else cd.env.reloadPage()}),cd.env.$prevButton=$("<div>").attr("id","cd-updatePanel-prevButton").attr("title","\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443 \u043d\u043e\u0432\u043e\u043c\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e").click(cd.env.goToPrevNewMsg).css("display","none").appendTo(cd.env.$updatePanel),cd.env.$nextButton=$("<div>").attr("id","cd-updatePanel-nextButton").attr("title","\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043d\u043e\u0432\u043e\u043c\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e").click(cd.env.goToNextNewMsg).css("display","none").appendTo(cd.env.$updatePanel),cd.env.$updatePanel.appendTo($("body"))):(cd.env.$nextButton.hide().addClass("cd-updatePanel-nextButton-digit"),cd.env.$prevButton.hide()),getVisitsPromise.done(function(visits){var firstVisit,thisPageVisits=visits&&visits[cd.env.ARTICLE_ID]||[],currentUnixTime=Math.floor($.now()/1e3);if(cd.env.visits=visits,(cd.env.thisPageVisits=thisPageVisits).length){firstVisit=!1;for(var _i11=thisPageVisits.length-1;0<=_i11;_i11--)if(thisPageVisits[_i11]<currentUnixTime-60*cd.env.HIGHLIGHT_NEW_INTERVAL){thisPageVisits.splice(0,_i11);break}}else firstVisit=!0,visits[cd.env.ARTICLE_ID]=thisPageVisits;if(cd.env.newestCount=0,cd.env.newCount=0,!firstVisit){for(var _i12=0;_i12<cd.env.floatingElements.length;_i12++)cd.env.floatingRects[_i12]=cd.env.floatingElements[_i12].getBoundingClientRect();var underlayersToAdd=[];cd.msgs.forEach(function(msg){var msgUnixTime=Math.floor(msg.timestamp/1e3);if(keepedData&&keepedData.memorizedNewestMsgs)for(var _i13=0;_i13<keepedData.memorizedNewestMsgs.length;_i13++){var memorizedMsg=keepedData.memorizedNewestMsgs[_i13];if(memorizedMsg.timestamp===msg.timestamp&&memorizedMsg.author===msg.author){msg.newness="newest",cd.env.newestCount++;break}}if(thisPageVisits.length&&msgUnixTime>thisPageVisits[thisPageVisits.length-1]&&msg.author!==cd.env.CURRENT_USER){"newest"!==msg.newness&&cd.env.newestCount++,cd.env.newCount++,msg.newness="newest",msg.seen=!1;var underlayerData=msg.configureUnderlayer(!0,"underlayers");underlayerData&&underlayersToAdd.push(underlayerData),msg.$underlayer[0].className+=" cd-underlayer-newest"}else if(msgUnixTime>thisPageVisits[0]){cd.env.newCount++,msg.newness||(msg.newness="new"),msg.seen=!1;var _underlayerData=msg.configureUnderlayer(!0,"underlayers");_underlayerData&&underlayersToAdd.push(_underlayerData),msg.$underlayer[0].className+=" cd-underlayer-new"}}),cd.env.floatingRects=[];for(var _i14=0;_i14<underlayersToAdd.length;_i14++)cd.env.underlayersContainer.appendChild(underlayersToAdd[_i14].underlayer),cd.env.linksUnderlayersContainer.appendChild(underlayersToAdd[_i14].linksUnderlayer)}thisPageVisits.push(currentUnixTime),cd.env.setVisits(visits).fail(function(e){var _e=(0,_slicedToArray2.default)(e,2),errorType=_e[0],data=_e[1];if("internal"===errorType&&"sizelimit"===data){var timestamps=[];for(var key in visits)for(var _i15=0;_i15<visits[key].length;_i15++)timestamps.push(visits[key][_i15]);timestamps.sort(function(a,b){return b<a?1:-1});var boundary=timestamps[Math.floor(timestamps.length/3)];for(var _key in visits){for(var _i16=visits[_key].length-1;0<=_i16;_i16--)visits[_key][_i16]<boundary&&visits[_key].splice(_i16,1);visits[_key].length||delete visits[_key]}cd.env.setVisits(visits)}}),cd.env.newCount&&(cd.env.$nextButton.show(),0===cd.env.newestCount&&cd.env.$prevButton.show(),cd.env.updateNextButton()),cd.env.newestCount&&cd.msgs.length&&cd.env.registerSeenMsgs()}).fail(function(){console.error("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430")}));if(cd.env.firstRun){$(document).on("mousemove mouseover",cd.env.highlightFocused).keydown(cd.env.globalKeyDownHandler),$(window).on("resize orientationchange",cd.env.windowResizeHandler).on("beforeunload",cd.env.beforeUnloadHandler),cd.env.EVERYTHING_MUST_BE_FROZEN||($(document).on("scroll resize orientationchange",cd.env.registerSeenMsgs),setInterval(function(){cd.env.recalculateUnderlayers(!0)},500));var defaultAdjustSizePrototype=OO.ui.MultilineTextInputWidget.prototype.adjustSize;OO.ui.MultilineTextInputWidget.prototype.adjustSize=function(){var initialHeight;if(this.cdMsgForm&&(initialHeight=this.$input.outerHeight()),defaultAdjustSizePrototype.call(this),this.cdMsgForm&&initialHeight!==this.$input.outerHeight()){var _msg3=this.cdMsgForm.getTargetMsg(!0,!0);_msg3&&(_msg3.prepareUnderlayersInViewport(!1),_msg3.updateUnderlayersInViewport(!1))}}}var generateEditCommonJsLink=function(){return mw.util.getUrl("User:".concat(cd.env.CURRENT_USER,"/common.js"),{action:"edit"})};if(highlightLastMessagesEnabled&&!mw.cookie.get("cd-hlmConflict")){if("undefined"!=typeof messagesHighlightColor){var dummyElement=document.createElement("span");dummyElement.style.color=messagesHighlightColor;for(var hlmStyledElements=cd.env.contentElement.querySelectorAll('.cd-msgPart[style="background-color: '.concat(dummyElement.style.color,';"],')+'.cd-msgPart[style="background-color: '.concat(messagesHighlightColor,'"]')),_i17=0;_i17<hlmStyledElements.length;_i17++)hlmStyledElements[_i17].style.backgroundColor=null}mw.notify(cd.env.toJquerySpan('\u0423 \u0432\u0430\u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d \u0441\u043a\u0440\u0438\u043f\u0442 <a href="//ru.wikipedia.org/wiki/\u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a:\u041a\u0438\u043a\u0430\u043d/highlightLastMessages.js">highlightLastMessages.js</a>, \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0443\u044e\u0449\u0438\u0439 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \xab\u0423\u0434\u043e\u0431\u043d\u044b\u0435 \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u0438\xbb. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0432 <a href="'.concat(generateEditCommonJsLink(),'">\u0432\u0430\u0448\u0435\u043c common.js</a> (\u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a).')),{autoHide:!1}),mw.cookie.set("cd-hlmConflict","1",{path:"/",expires:30*cd.env.SECONDS_IN_A_DAY})}"undefined"==typeof proceedToArchiveRunned||mw.cookie.get("cd-ptaConflict")||(mw.notify(cd.env.toJquerySpan('\u0423 \u0432\u0430\u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d \u0441\u043a\u0440\u0438\u043f\u0442 <a href="//ru.wikipedia.org/wiki/\u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a:Jack_who_built_the_house/proceedToArchive.js">proceedToArchive.js</a>, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0432 \u0441\u043a\u0440\u0438\u043f\u0442 \xab\u0423\u0434\u043e\u0431\u043d\u044b\u0435 \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u0438\xbb. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0432 <a href="'.concat(generateEditCommonJsLink(),'">\u0432\u0430\u0448\u0435\u043c common.js</a> (\u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a).')),{autoHide:!1}),mw.cookie.set("cd-ptaConflict","1",{path:"/",expires:30*cd.env.SECONDS_IN_A_DAY}));document.querySelector('.localcomments[style="font-size: 95%; white-space: nowrap;"]')&&mw.notify(cd.env.toJquerySpan('\u0421\u043a\u0440\u0438\u043f\u0442 <a href="//ru.wikipedia.org/wiki/\u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a:\u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440_\u0414\u043c\u0438\u0442\u0440\u0438\u0435\u0432/comments_in_local_time_ru.js">comments in local time ru.js</a> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \xab\u0423\u0434\u043e\u0431\u043d\u044b\u0435 \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u0438\xbb, \u0447\u0442\u043e \u043c\u0435\u0448\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e. \u041f\u0440\u043e\u0441\u043b\u0435\u0434\u0443\u0439\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c <a href="'.concat(mw.util.getUrl(cd.env.HELP_LINK),'#\u0421\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c">\u0437\u0434\u0435\u0441\u044c</a>, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0438\u0445 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c.')),{autoHide:!1});cd.env.alwaysConfirmLeavingPage=!1,mw.user.options.get("editondblclick")&&mw.loader.using("mediawiki.action.view.dblClickEdit").done(function(){$("#ca-edit").off("click"),cd.env.alwaysConfirmLeavingPage=!0});mw.user.options.get("editsectiononrightclick")&&mw.loader.using("mediawiki.action.view.rightClickEdit").done(function(){$(".mw-editsection a").off("click"),cd.env.alwaysConfirmLeavingPage=!0});mw.hook("cd.pageReady").fire(cd),!1!==cd.settings.showLoadingOverlay&&cd.env.removeLoadingOverlay();cd.env.firstRun=!1,cd.env.contentElement.getBoundingClientRect(),cd.debug.endTimer(cd.strings.finalCodeAndRendering),cd.debug.endTimer(cd.strings.totalTime);var timePerMsg=(cd.debug.timers[cd.strings.mainCode]+cd.debug.timers[cd.strings.finalCodeAndRendering])/cd.msgs.length,totalTime=cd.debug.timers[cd.strings.totalTime];cd.debug.logAndResetTimer(cd.strings.totalTime),console.log("".concat(cd.strings.numberOfMessages,": ").concat(cd.msgs.length)),console.log("".concat(cd.strings.perMessage,": ").concat(timePerMsg.toFixed(1))),cd.debug.logAndResetTimers();for(var _i18=0;_i18<cd.debug.abstractCounters.length;_i18++)null!==cd.debug.abstractCounters[_i18]&&console.log("".concat(cd.strings.counter," ").concat(_i18,": ").concat(cd.debug.abstractCounters[_i18]));for(var _i19=0;_i19<cd.debug.abstractGlobalVars.length;_i19++)console.log("".concat(cd.strings.globalVariable," ").concat(_i19,": ").concat(cd.debug.abstractGlobalVars[_i19]));var currentValue=totalTime/cd.msgs.length;console.log("".concat(Math.round(currentValue/4*100),"% ")+cd.strings.ofReferenceValue)};var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")),_Msg=(_interopRequireDefault(require("./debug")),_interopRequireDefault(require("./Msg"))),_Section=_interopRequireDefault(require("./Section")),_MsgForm=_interopRequireDefault(require("./MsgForm"))},{"./Msg":20,"./MsgForm":21,"./Section":22,"./debug":25,"@babel/runtime/helpers/interopRequireDefault":8,"@babel/runtime/helpers/slicedToArray":13}],30:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;exports.default={scriptName:"\xab\u0423\u0434\u043e\u0431\u043d\u044b\u0435 \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u0438\xbb",oneInstanceIsRunning:"\u041e\u0434\u0438\u043d \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0443\u0436\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d.",mwContentTextNotFound:"\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442 #mw-content-text.",start:"\u043d\u0430\u0447\u0430\u043b\u043e",loadingModules:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439",gettingHtml:"\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 HTML",layingOutHtml:"\u0437\u0430\u043b\u0438\u0432\u043a\u0430 HTML",preparations:"\u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f",totalTime:"\u043e\u0431\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f",finalCodeAndRendering:"\u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433",mainCode:"\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434",numberOfMessages:"\u0447\u0438\u0441\u043b\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439",perMessage:"\u043d\u0430 \u043e\u0434\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435",counter:"\u0441\u0447\u0451\u0442\u0447\u0438\u043a",globalVariable:"\u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f",ofReferenceValue:"\u043e\u0442 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f",couldntLocateMsgInCode:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434\u0435. \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043c\u043e\u0433\u043b\u043e \u0431\u044b\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u043e \u0438\u043b\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043a\u043e\u0434\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043d\u0435\u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442\u0430.",couldntLocateSectionInCode:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u0432 \u043a\u043e\u0434\u0435. \u0420\u0430\u0437\u0434\u0435\u043b \u043c\u043e\u0433 \u0431\u044b\u0442\u044c \u0443\u0434\u0430\u043b\u0451\u043d. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043a\u043e\u0434\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u0438\u043b\u0438 \u043d\u0435\u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442\u0430.",monthNamesGenitive:["\u044f\u043d\u0432\u0430\u0440\u044f","\u0444\u0435\u0432\u0440\u0430\u043b\u044f","\u043c\u0430\u0440\u0442\u0430","\u0430\u043f\u0440\u0435\u043b\u044f","\u043c\u0430\u044f","\u0438\u044e\u043d\u044f","\u0438\u044e\u043b\u044f","\u0430\u0432\u0433\u0443\u0441\u0442\u0430","\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f","\u043e\u043a\u0442\u044f\u0431\u0440\u044f","\u043d\u043e\u044f\u0431\u0440\u044f","\u0434\u0435\u043a\u0430\u0431\u0440\u044f"]}},{}],31:[function(require,module,exports){module.exports=".cd-underlayer{position:absolute;z-index:0}.cd-underlayer-newest{background-color:#edffdb}.cd-underlayer-new{background-color:#edffdb}.cd-linksUnderlayer{position:absolute;display:none}.cd-linksUnderlayer-focused{display:block}.cd-linksUnderlayer-wrapper{position:absolute;z-index:1;bottom:3px;right:0;text-align:right;font-size:14px;line-height:normal}.cd-linksUnderlayer-gradient{width:1.4em;display:inline-block;padding:1px;vertical-align:middle;-moz-user-select:none;-webkit-user-select:none;user-select:none}.cd-linksUnderlayer-text{display:inline-block;background-color:#eaf3ff;padding:0 .5em 0 1em}.cd-linksUnderlayer-text .oo-ui-buttonWidget{margin-right:0}.cd-linksUnderlayer-text .cd-msgButton:not(:first-child){margin-left:1em}.cd-msgButton.oo-ui-buttonElement-frameless.oo-ui-labelElement>.oo-ui-buttonElement-button,.cd-sectionButton.oo-ui-buttonElement-frameless.oo-ui-labelElement>.oo-ui-buttonElement-button{padding:0}.cd-msgButton.oo-ui-buttonElement-frameless.oo-ui-labelElement:first-child,.cd-sectionButton.oo-ui-buttonElement-frameless.oo-ui-labelElement:first-child{margin-left:0}.cd-button.oo-ui-buttonElement-frameless.oo-ui-widget-enabled>.oo-ui-buttonElement-button:hover,.cd-button.oo-ui-buttonElement-frameless.oo-ui-widget-enabled>.oo-ui-buttonElement-button:active{background-color:transparent}.cd-button.oo-ui-buttonElement>.oo-ui-buttonElement-button{min-height:unset}.cd-sectionMenuItemsDivider{color:#54595d}.cd-replyButtonContainer{margin-left:-1px}.cd-msgForm+.cd-replyButtonContainer,.ruwiki-closedDiscussion+.cd-replyButtonContainerContainer{margin-top:.5em}.cd-sectionButton{padding-top:0;padding-bottom:0}.cd-addSubsectionButtonContainer{margin-top:.625em}.cd-msgForm.cd-msgForm{margin:.5em 0 0 0;clear:left;padding-bottom:1px}.cd-msgForm.cd-msgForm-addSection,.cd-msgForm.cd-msgForm-addSubsection,.cd-msgForm.cd-msgForm-replyInSection:not(.cd-msgForm-inNumberedList),.cd-msgForm.cd-msgForm-msgOpeningSection{margin-top:1em}.cd-msgForm.cd-msgLevel>.cd-msgForm-wrapper{padding-left:1.5em}.cd-msgForm>form{overflow:hidden;padding-bottom:1px}.cd-msgForm .cd-headingInput{margin-bottom:.25em}.cd-msgForm .oo-ui-textInputWidget{max-width:none}.cd-msgForm .cd-summaryInput{margin-top:.25em}.cd-msgForm .cd-checkboxesContainer{margin-top:.5em;line-height:0}.cd-msgForm .cd-checkboxesContainer .oo-ui-fieldLayout{margin-right:1em}.cd-msgForm .cd-checkboxesContainer .oo-ui-fieldLayout:last-child{margin-right:0}.cd-msgForm .cd-buttonsContainer{margin-top:.5em}.cd-msgForm .cd-leftButtonsContainer{float:left}.cd-msgForm .cd-rightButtonsContainer{float:right}.cd-msgForm .cd-rightButtonsContainer>.oo-ui-buttonWidget:last-child{margin-right:-0.3125em}.cd-msgForm .oo-ui-buttonElement-framed>.oo-ui-buttonElement-button{vertical-align:middle}.cd-msgForm table.diff{margin-bottom:.5em}.cd-msgForm-wrapper{overflow:hidden;margin-left:-0.5em;padding-left:.5em;padding-bottom:1px}.cd-msgForm+.cd-msgLevel,.cd-msgForm+dd>.cd-msgLevel:first-child,.cd-msgForm+li>.cd-msgLevel:first-child{padding-top:.1px}.cd-msgForm+.cd-msgForm{padding-top:.5em}.cd-msgForm .wikiEditor-ui-toolbar{background-image:none;background-color:#eaecf0}.cd-msgForm .wikiEditor-ui-toolbar .sections .section{background-color:#f8f9fa}.cd-msgForm .wikiEditor-ui-toolbar .booklet .index .current{background-color:#eaecf0}.cd-msgForm .wikiEditor-ui-toolbar .group,.cd-msgForm .wikiEditor-ui-toolbar .sections .section{border-color:#c8ccd1}.cd-msgForm .wikiEditor-ui .wikiEditor-ui-view,.cd-msgForm .wikiEditor-ui .wikiEditor-ui-top{border-color:#c8ccd1}dd.cd-msgForm.cd-msgLevel.cd-msgLevel{margin-left:2em}.cd-msgForm-noIndentation.cd-msgForm-noIndentation.cd-msgForm-noIndentation{padding-top:1em}li.cd-msgForm-noIndentation.cd-msgForm-noIndentation.cd-msgForm-noIndentation{margin:-0.5em 0 0 -2em}dd.cd-msgForm-noIndentation.cd-msgForm-noIndentation.cd-msgForm-noIndentation{margin:-0.5em 0 0 -1em}.cd-previewArea{margin-bottom:.5em}.cd-previewArea>.mw-parser-output>*:first-child{margin-top:0}.cd-previewArea:empty{margin-bottom:0}.cd-previewArea,.cd-infoArea{position:relative}.cd-closeButton{position:absolute;top:0;right:0;width:24px;height:24px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+Cgk8ZyBpZD0iY2xvc2UiPgoJCTxwYXRoIGlkPSJjcm9zcyIgZD0iTTE3LjQgOC4xYy44LS44LjgtMiAwLTIuOEwxMiAxMC44IDcuNCA2LjIgNiA3LjZsNC42IDQuNi00IDRjLS44LjgtLjggMiAwIDIuOGw1LjQtNS40IDQuNiA0LjYgMS40LTEuNC00LjYtNC42eiIvPgoJPC9nPgo8L3N2Zz4=)}.cd-info{margin:.25em 0}.cd-info .oo-ui-iconElement.oo-ui-iconElement{position:relative;top:-1px;margin-right:.25em}.cd-info-alert{color:#c00}.cd-popupsOverlay{position:absolute;top:0;left:0;z-index:5;font-size:14px}.cd-insertButtons{margin-left:-0.375em}.cd-insertButtons-item{font:bold 1.1em monospace;color:#222;padding:.15em .375em;white-space:nowrap}.cd-insertButtons-item:hover,.cd-insertButtons-item:focus{text-decoration:none;color:#222}.cd-insertButtons-item:active{background-color:#eaecf0}.cd-msgLevel .paragraphbreak{margin-top:.25em !important}.cd-msgPart-first{margin-top:.5em}.cd-msgPart-last{margin-bottom:.5em}ol>li.cd-msgPart-first{margin-top:0}ol>li.cd-msgPart-last{margin-bottom:.1em}.cd-msgLevel.cd-msgLevel:not(ol){margin:0 0 0 1em;border-left:1px solid #c8ccd1}ul.cd-msgLevel{list-style-type:none;list-style-image:none;padding-left:1em}dl.cd-msgLevel.cd-msgLevel>dd{margin-left:1em}.ruwiki-msgIndentation-minus1level{margin-left:-2em !important}#cd-updatePanel{position:fixed;bottom:45%;left:0;z-index:5;width:32px;background-color:#fff;cursor:pointer;border:1px solid #a2a9b1;border-radius:2px 0 0 2px;border-left:0;opacity:.53;-moz-user-select:none;-webkit-user-select:none;user-select:none}#cd-updatePanel:hover{opacity:1}#cd-updatePanel-refreshButton{display:block;padding:4px;width:24px;height:24px;background:url(\"data:image/svg+xml,%3Csvg xmlns=\\'http://www.w3.org/2000/svg\\' width=\\'36\\' height=\\'36\\' viewBox=\\'0 0 36 36\\'%3E%3Cpath d=\\'M0 0h36v36h-36z\\' fill=\\'none\\'/%3E%3Cpath d=\\'M26.47 9.53c-2.17-2.18-5.15-3.53-8.47-3.53-6.63 0-12 5.37-12 12s5.37 12 12 12c5.94 0 10.85-4.33 11.81-10h-3.04c-.91 4.01-4.49 7-8.77 7-4.97 0-9-4.03-9-9s4.03-9 9-9c2.49 0 4.71 1.03 6.34 2.66l-4.34 4.34h10v-10l-3.53 3.53z\\'/%3E%3C/svg%3E\") center center / 24px 24px no-repeat}#cd-updatePanel-prevButton,#cd-updatePanel-nextButton{position:relative;display:block;height:29px;margin-top:1px;color:#000;text-align:center;font-size:13px}#cd-updatePanel-prevButton{background:url(\"data:image/svg+xml,%3Csvg xmlns=\\'http://www.w3.org/2000/svg\\' width=\\'24\\' height=\\'24\\' viewBox=\\'0 0 24 24\\'%3E%3Cpath d=\\'M12 6.5l8.9 8.9c-.8.8-2 .8-2.8 0L12 9.3l-6.1 6c-.8.8-2 .8-2.8 0L12 6.5z\\'/%3E%3C/svg%3E\") center center / 16px 16px no-repeat}#cd-updatePanel-nextButton{background:url(\"data:image/svg+xml,%3Csvg xmlns=\\'http://www.w3.org/2000/svg\\' width=\\'24\\' height=\\'24\\' viewBox=\\'0 0 24 24\\'%3E%3Cpath d=\\'M12 16l8.9-8.9c-.8-.8-2-.8-2.8 0L12 13.2l-6.1-6c-.8-.8-2-.8-2.8 0L12 16z\\'/%3E%3C/svg%3E\") center center / 16px 16px no-repeat}#cd-updatePanel-nextButton.cd-updatePanel-nextButton-digit{height:15px;padding:7px 0;background:none}#cd-updatePanel-prevButton:before,#cd-updatePanel-nextButton:before{position:absolute;top:-1px;left:4px;margin:0 auto 1px;width:24px;height:0;border-top:solid 1px #a2a9b1;content:\"\"}#cd-updatePanel-refreshButton:hover,#cd-updatePanel-prevButton:hover,#cd-updatePanel-nextButton:hover{background-color:#f3f4f5}.cd-loadingOverlay{position:fixed;z-index:102;top:0;bottom:0;left:0;right:0;background-color:rgba(255,255,255,0.5)}.cd-loadingPopup{position:fixed;left:0;right:0;bottom:1.7em;z-index:111;width:324px;margin:0 auto;padding:17px 17px 14px 17px;background-color:#fff;border-radius:2px}.cd-loadingPopup-logo{width:324px;height:40px;display:block;margin:0 auto}.skin-monobook .cd-underlayer{z-index:-1}.skin-monobook .cd-linksUnderlayer-wrapper{z-index:2;bottom:2px}.skin-monobook .cd-msgButton.oo-ui-buttonElement.oo-ui-labelElement>.oo-ui-buttonElement-button>.oo-ui-labelElement-label{line-height:1.172em}.skin-timeless .mw-body-content{position:relative}"},{}]},{},[23]); |