User:Casualdejekyll/convenientDiscussions.js

/*!

* For documentation and feedback, see the script's homepage:

* https://commons.wikimedia.org/wiki/User:Jack_who_built_the_house/Convenient_Discussions

* For license information, see

* https://commons.wikimedia.org/wiki/User:Jack_who_built_the_house/convenientDiscussions.js.LICENSE.js

*/

/*! */!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};e[i].call(o.exports,o,o.exports,n);o.l=!0;return o.exports}n.m=e;n.c=t;n.d=function(e,t,i){if(!n.o(e,t))Object.defineProperty(e,t,{enumerable:!0,get:i})};n.r=function(e){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})};n.t=function(e,t){if(1&t)e=n(e);if(8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);n.r(i);Object.defineProperty(i,"default",{enumerable:!0,value:e});if(2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i};n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};n.d(t,"a",t);return t};n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};n.p="";n(n.s=72)}([function(e,t,n){"use strict";const i="undefined"==typeof window?self:window;i.convenientDiscussions=i.convenientDiscussions||{};if("object"!=typeof i.convenientDiscussions)i.convenientDiscussions={};t.a=i.convenientDiscussions},function(e,t,n){"use strict";n.d(t,"Y",(function(){return d}));n.d(t,"d",(function(){return h}));n.d(t,"C",(function(){return m}));n.d(t,"Z",(function(){return f}));n.d(t,"X",(function(){return g}));n.d(t,"U",(function(){return p}));n.d(t,"A",(function(){return b}));n.d(t,"m",(function(){return v}));n.d(t,"D",(function(){return y}));n.d(t,"z",(function(){return w}));n.d(t,"E",(function(){return E}));n.d(t,"h",(function(){return C}));n.d(t,"L",(function(){return T}));n.d(t,"k",(function(){return x}));n.d(t,"w",(function(){return k}));n.d(t,"V",(function(){return S}));n.d(t,"T",(function(){return O}));n.d(t,"J",(function(){return N}));n.d(t,"j",(function(){return _}));n.d(t,"o",(function(){return A}));n.d(t,"i",(function(){return P}));n.d(t,"B",(function(){return I}));n.d(t,"H",(function(){return L}));n.d(t,"x",(function(){return M}));n.d(t,"W",(function(){return j}));n.d(t,"P",(function(){return D}));n.d(t,"N",(function(){return R}));n.d(t,"M",(function(){return H}));n.d(t,"Q",(function(){return B}));n.d(t,"O",(function(){return F}));n.d(t,"s",(function(){return U}));n.d(t,"g",(function(){return W}));n.d(t,"q",(function(){return q}));n.d(t,"c",(function(){return G}));n.d(t,"r",(function(){return z}));n.d(t,"R",(function(){return V}));n.d(t,"I",(function(){return K}));n.d(t,"y",(function(){return X}));n.d(t,"F",(function(){return Z}));n.d(t,"e",(function(){return J}));n.d(t,"G",(function(){return Q}));n.d(t,"l",(function(){return ee}));n.d(t,"S",(function(){return te}));n.d(t,"b",(function(){return ne}));n.d(t,"K",(function(){return ie}));n.d(t,"v",(function(){return oe}));n.d(t,"u",(function(){return ae}));n.d(t,"n",(function(){return se}));n.d(t,"p",(function(){return re}));n.d(t,"a",(function(){return ce}));n.d(t,"t",(function(){return le}));n.d(t,"f",(function(){return ue}));var i=n(2),o=n.n(i),a=n(12),s=n(3),r=n(0),c=n(18);const l={offset:null};let u=[];function d(e,t={}){const n=(e instanceof $?e:$($.parseHTML(e))).wrapAll(`<${t.tagName||"span"}>`).parent(),i=[];if(t.callbacks)Object.keys(t.callbacks).forEach(e=>{const o=n.find("."+e);if(!o.find("a").length)o.wrapInner("");const s=new a.a({element:o.find("a").get(0),action:t.callbacks[e]});i.push(s)});if(t.targetBlank)n.find("a[href]").attr("target","_blank");return i.length?{$wrapper:n,buttons:i}:n}function h(e){if(void 0===e.addPostfix)e.addPostfix=!0;let t,n=(e.section?`/* ${e.section} */ `:"")+e.text.trim();if(e.optionalText){let i=n+e.optionalText;if(r.a.config.transformSummary)i=r.a.config.transformSummary(i);if(i.length<=r.a.g.SUMMARY_LENGTH_LIMIT){n=i;t=!0}}if(!t){if(r.a.config.transformSummary)n=r.a.config.transformSummary(n);if(n.length>r.a.g.SUMMARY_LENGTH_LIMIT)n=n.slice(0,r.a.g.SUMMARY_LENGTH_LIMIT-1)+"\u2026"}if(e.addPostfix)n+=r.a.g.SUMMARY_POSTFIX;return n}function m(){return document.body.classList.contains("oo-ui-windowManager-modal-active")||r.a.state.isFirstRun||r.a.state.isPageBeingReloaded}function f(e){return'

'+e+"
"}function g(e,t,n){return n.indexOf(e)===t}function p(e){const t=document.createElement("span");t.style.color=e;return(e=t.style.color).includes("rgba")?e.replace(/\d+(?=\))/,"0"):e.replace("rgb","rgba").replace(")",", 0)")}function b(e,t){if(t&&e.nodeType===Node.TEXT_NODE)return!0;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(r.a.g.POPULAR_INLINE_ELEMENTS.includes(e.tagName))return!0;else if(r.a.g.POPULAR_NOT_INLINE_ELEMENTS.includes(e.tagName))return!1;else if("undefined"!=typeof window){console.warn("Expensive operation: isInline() called for:",e);return window.getComputedStyle(e).display.startsWith("inline")}else return null}function v(e){const t=e[0];if(!t)return"";const n=t.toUpperCase(),i=t.toLowerCase();return(n!==i?"["+n+i+"]":mw.util.escapeRegExp(t))+mw.util.escapeRegExp(e.slice(1)).replace(/[ _]+/g,"[ _]+")}function y(e,t){var n,i;return(t%2==1||(null===(n=r.a.g.PAGE_WHITELIST_REGEXP)||void 0===n?void 0:n.test(e))||!r.a.g.PAGE_WHITELIST_REGEXP&&r.a.config.customTalkNamespaces.includes(t))&&!(null!==(i=r.a.g.PAGE_BLACKLIST_REGEXP)&&void 0!==i&&i.test(e))}function w(e){return e&&(e.includes(`${r.a.s("es-edit")} ${r.a.s("es-reply-genitive")}`)||e.includes(`${r.a.s("es-edit")} ${r.a.s("es-addition-genitive")}`))}function E(e){return e&&r.a.config.undoTexts.some(t=>e.includes(t))}function C(e){return void 0!==e}function T(e,t,n=!1){return n?e.slice(t+1).concat(e.slice(0,t+1)).reverse():e.slice(t).concat(e.slice(0,t))}function x(e){return[].concat(...e)}function k(e,t){if(Array.isArray(e))[e,t]=e;throw"http"===e?new s.a({type:"network"}):new s.a({type:"api",code:"error",apiData:t})}function S(e){return e.replace(/_/g," ")}function O(e){return e.replace(/ /g,"_")}function N(e){return e.replace(/ {2,}/g," ")}function _(e){return e.length?function(e){if(""===r.a.g.PHP_CHAR_TO_UPPER_JSON[e])return e;else return r.a.g.PHP_CHAR_TO_UPPER_JSON[e]||e.toUpperCase()}(e[0])+e.slice(1):""}function A(e){return e.map(e=>r.a.g.contentLanguageMessages[e])}function P(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return null}function I(){return $(":focus:input").length||$(":focus").prop("isContentEditable")}function L(e){if(!e)return null;const t=e.map(e=>e.source||e).join("|");return t?new RegExp(`(${t})`):null}function M(e,t,n,i){return e.replace(t,(e,t,o)=>{if("number"==typeof t){t=null;o=null}return(t||"")+("table"===i?"\x03":"\x01")+n.push(o||e)+(i?"_"+i:"")+("table"===i?"\x04":"\x02")})}function j(e,t,n){const i=n?new RegExp(`(?:\\x01|\\x03)(\\d+)(?:_${n})?(?:\\x02|\\x04)`,"g"):/(?:\x01|\x03)(\d+)(?:_\w+)?(?:\x02|\x04)/g;for(;i.test(e);)e=e.replace(i,(e,n)=>t[n-1]);return e}function D(e=null,t=window.scrollY){if(e&&r.a.g.$toc.length&&r.a.g.$toc.offset().top+r.a.g.$toc.outerHeight()>t)B(e.saveTocHeight);else{l.element=null;l.elementTop=null;l.touchesBottom=!1;l.offsetBottom=document.documentElement.scrollHeight-(t+window.innerHeight);if(l.offsetBottom<100)l.touchesBottom=!0;else if(0!==t&&r.a.g.rootElement.getBoundingClientRect().top<=0){const e=new c.b(r.a.g.rootElement.firstElementChild);for(;;){if(!b(e.currentNode)){const t=e.currentNode.getBoundingClientRect();if(t.bottom>=0&&0!==t.height){l.element=e.currentNode;l.elementTop=t.top;if(e.firstChild())continue;else break}}if(!e.nextSibling())break}}}}function R(e=!1){if(e&&null!==l.offset)F();else if(l.touchesBottom&&0!==window.scrollY){const e=document.documentElement.scrollHeight-window.innerHeight-l.offsetBottom;window.scrollTo(0,e)}else if(l.element){const e=l.element.getBoundingClientRect();if(oe(e))window.scrollTo(0,window.scrollY+e.top-l.elementTop)}}function H(e,t){if(l.element&&e===l.element)l.element=t}function B(e=!0){l.offset=window.scrollY;l.tocHeight=(e||l.tocHeight)&&r.a.g.$toc.length&&!r.a.g.isTocFloating&&0!==window.scrollY&&window.scrollY+window.innerHeight>r.a.g.$toc.offset().top+r.a.g.$toc.outerHeight()?r.a.g.$toc.outerHeight():null}function F(e=!0){if(null!==l.offset){if(l.tocHeight)l.offset+=(r.a.g.$toc.outerHeight()||0)-l.tocHeight;window.scrollTo(0,l.offset);l.offset=null;if(e)l.tocHeight=null}}function U(e){return Y.apply(this,arguments)}function Y(){return(Y=o()((function*(e){const t={};return Promise.race([e,t]).then(e=>e===t?"pending":"resolved",()=>"rejected")}))).apply(this,arguments)}function W(e){if("loading"===mw.loader.getState(e)){const e=d(r.a.sParse("error-needreloadpage"),{callbacks:{"cd-notification-reloadPage":()=>{location.reload()}}}).$wrapper;mw.notify(e,{type:"error"});return!0}return!1}function q(e){if(void 0===e.convenientDiscussionsMarginTop){const t=window.getComputedStyle(e);e.convenientDiscussionsMarginTop=parseFloat(t.marginTop);e.convenientDiscussionsMarginBottom=parseFloat(t.marginBottom);e.convenientDiscussionsMarginLeft=parseFloat(t.marginLeft);e.convenientDiscussionsMarginRight=parseFloat(t.marginRight)}const t=e.getBoundingClientRect(),n=oe(t);return{top:t.top,bottom:t.bottom,left:t.left,right:t.right,width:t.width,height:t.height,outerTop:t.top-(n?e.convenientDiscussionsMarginTop:0),outerBottom:t.bottom+(n?e.convenientDiscussionsMarginBottom:0),outerLeft:t.left-(n?e.convenientDiscussionsMarginLeft:0),outerRight:t.right+(n?e.convenientDiscussionsMarginRight:0)}}function G(e,t,n=!1){const i=e=>null!==e&&"object"==typeof e&&!(e instanceof RegExp||e instanceof Date||"function"==typeof Node&&e instanceof Node||"function"==typeof Worker&&e instanceof Worker),o=e=>e instanceof RegExp||e instanceof Date?e.toString():e;if(!i(e)||!i(t))return o(e)===o(t);const a=Object.keys(e).filter(t=>void 0!==e[t]),s=Object.keys(t).filter(e=>void 0!==t[e]);return(a.length===s.length||n)&&a.every(n=>G(e[n],t[n]))}function z(e){const t=mw.storage.getObject("convenientDiscussions-"+e);if(!1===t)console.error("Storage is unavailable.");return t||{}}function V(e,t){mw.storage.setObject("convenientDiscussions-"+e,t)}function K(e,t){return e.replace(/[\u200e\u200f]/g,t?" ":"")}function X(e,t){ee(e);if(!document.execCommand("insertText",!1,t))e.insertContent(t)}function Z(e,t=[],n=[]){const i=Object.assign({},e);Object.keys(i).forEach(e=>{if(n.includes(e)){delete i[e];return}const o=i[e];if("object"==typeof o&&null!==o&&!(o instanceof RegExp||o instanceof Date))try{if(!G(o,JSON.parse(JSON.stringify(o))))delete i[e]}catch(t){delete i[e]}else if("function"==typeof o)if(t.includes(e))i[e]=o.toString();else delete i[e]});return i}function J(e,t){const n=new RegExp(`[${r.a.g.LETTER_PATTERN}]{2,}`,"g"),i=(e.match(n)||[]).filter(g),o=(t.match(n)||[]).filter(g);if(!i.length||!o.length)return 0;let a=o.length,s=0;i.forEach(e=>{if(o.some(t=>t===e))s++;else a++});return s/a}function Q(e,t,n=[]){return e.keyCode===t&&["ctrl","shift","alt","meta"].every(t=>n.includes(t)===e[t+"Key"])}function ee(e){e.$input.get(0).focus()}function te(e){return $(e[r.a.g.SKIN]||e.default||e.vector)}function ne(e,t){if(void 0!==t&&!e.includes(t))e.push(t)}function ie(e,t){if(void 0!==t&&e.includes(t))e.splice(e.indexOf(t),1)}function oe(...e){return!e.some(e=>0===e.left&&0===e.height)}function ae(e,t){let n={};if(t)n.oldid=mw.config.get("wgRevisionId");const i=decodeURI(r.a.page.getUrl(n));return`${r.a.g.SERVER}${i}#${e}`}function se(e){const t=e.map(e=>e.getGender());let n;if(t.every(e=>"female"===e))n="female";else if(t.every(e=>"female"!==e))n="male";else n="unknown";return n}function re(e,t){let n;for(let i=e;i;i=i.parentNode)if(i.contains(t)){n=i;break}const i=[e];if(!e.contains(t)){const o=new c.b(e);for(;o.currentNode.parentNode!==n;){for(;o.nextSibling();)i.push(o.currentNode);o.parentNode()}o.nextSibling();for(;!o.currentNode.contains(t);){i.push(o.currentNode);o.nextSibling()}for(;o.currentNode!==t;){o.firstChild();for(;!o.currentNode.contains(t);){i.push(o.currentNode);o.nextSibling()}}i.push(t)}return i}function ce(e,t,n={}){const i=mw.notification.notify(e,t);u.push(Object.assign(n,{notification:i}));return i}function le(){return u}function ue(e=!0){u.forEach(t=>{if(!e)t.notification.$notification.hide();t.notification.close()});u=[]}},function(e,t){function n(e,t,n,i,o,a,s){try{var r=e[a](s),c=r.value}catch(e){n(e);return}if(r.done)t(c);else Promise.resolve(c).then(i,o)}e.exports=function(e){return function(){var t=this,i=arguments;return new Promise((function(o,a){var s=e.apply(t,i);function r(e){n(s,o,a,r,c,"next",e)}function c(e){n(s,o,a,r,c,"throw",e)}r(void 0)}))}};e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";class CdError extends Error{constructor(e){let t;if(e){var n,i;t=e.type;if(e.code)t+="/"+e.code;if(null!=e&&null!==(n=e.apiData)&&void 0!==n&&null!==(i=n.error)&&void 0!==i&&i.code)t+="/"+e.apiData.error.code}else t="";super(t);this.name="CdError";this.data=e}}t.a=CdError},function(e,t,n){"use strict";n.d(t,"p",(function(){return _}));n.d(t,"g",(function(){return A}));n.d(t,"n",(function(){return I}));n.d(t,"j",(function(){return L}));n.d(t,"o",(function(){return M}));n.d(t,"c",(function(){return j}));n.d(t,"f",(function(){return B}));n.d(t,"q",(function(){return z}));n.d(t,"d",(function(){return V}));n.d(t,"i",(function(){return K}));n.d(t,"h",(function(){return X}));n.d(t,"k",(function(){return J}));n.d(t,"e",(function(){return ee}));n.d(t,"m",(function(){return te}));n.d(t,"l",(function(){return ne}));n.d(t,"s",(function(){return ie}));n.d(t,"b",(function(){return ae}));n.d(t,"a",(function(){return le}));n.d(t,"r",(function(){return de}));var i=n(2),o=n.n(i),a=n(7),s=n(13),r=n(27),c=n(14),l=n(15),u=n(43),d=n.n(u);function h(){return d()('/*! \n * For documentation and feedback, see the script\'s homepage:\n * https://commons.wikimedia.org/wiki/User:Jack_who_built_the_house/Convenient_Discussions\n * For license information, see\n * https://commons.wikimedia.org/wiki/User:Jack_who_built_the_house/convenientDiscussions-worker.js.LICENSE.js\n */\n!function(e){var t={};function i(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};e[r].call(n.exports,n,n.exports,i);n.l=!0;return n.exports}i.m=e;i.c=t;i.d=function(e,t,r){if(!i.o(e,t))Object.defineProperty(e,t,{enumerable:!0,get:r})};i.r=function(e){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})};i.t=function(e,t){if(1&t)e=i(e);if(8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);i.r(r);Object.defineProperty(r,"default",{enumerable:!0,value:e});if(2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r};i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};i.d(t,"a",t);return t};i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};i.p="";i(i.s=30)}([function(e,t,i){"use strict";const r="undefined"==typeof window?self:window;r.convenientDiscussions=r.convenientDiscussions||{};if("object"!=typeof r.convenientDiscussions)r.convenientDiscussions={};t.a=r.convenientDiscussions},function(e,t,i){"use strict";i.d(t,"k",(function(){return n}));i.d(t,"g",(function(){return s}));i.d(t,"a",(function(){return a}));i.d(t,"c",(function(){return o}));i.d(t,"j",(function(){return l}));i.d(t,"i",(function(){return c}));i.d(t,"b",(function(){return u}));i.d(t,"d",(function(){return d}));i.d(t,"f",(function(){return h}));i.d(t,"h",(function(){return f}));i.d(t,"e",(function(){return p}));i(22);i(4);var cd=i(0),r=i(2);function n(e,t,i){return i.indexOf(e)===t}function s(e,t){if(t&&e.nodeType===Node.TEXT_NODE)return!0;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(cd.a.g.POPULAR_INLINE_ELEMENTS.includes(e.tagName))return!0;else if(cd.a.g.POPULAR_NOT_INLINE_ELEMENTS.includes(e.tagName))return!1;else if("undefined"!=typeof window){console.warn("Expensive operation: isInline() called for:",e);return window.getComputedStyle(e).display.startsWith("inline")}else return null}function a(e){return void 0!==e}function o(e){return[].concat(...e)}function l(e){return e.replace(/_/g," ")}function c(e){return e.replace(/ /g,"_")}function u(e){return e.length?function(e){if(""===cd.a.g.PHP_CHAR_TO_UPPER_JSON[e])return e;else return cd.a.g.PHP_CHAR_TO_UPPER_JSON[e]||e.toUpperCase()}(e[0])+e.slice(1):""}function d(e){return e.map(e=>cd.a.g.contentLanguageMessages[e])}function h(e,t,i,r){return e.replace(t,(e,t,n)=>{if("number"==typeof t){t=null;n=null}return(t||"")+("table"===r?"\\x03":"\\x01")+i.push(n||e)+(r?"_"+r:"")+("table"===r?"\\x04":"\\x02")})}function f(e,t){return e.replace(/[\\u200e\\u200f]/g,t?" ":"")}function p(e,t){let i;for(let r=e;r;r=r.parentNode)if(r.contains(t)){i=r;break}const n=[e];if(!e.contains(t)){const s=new r.b(e);for(;s.currentNode.parentNode!==i;){for(;s.nextSibling();)n.push(s.currentNode);s.parentNode()}s.nextSibling();for(;!s.currentNode.contains(t);){n.push(s.currentNode);s.nextSibling()}for(;s.currentNode!==t;){s.firstChild();for(;!s.currentNode.contains(t);){n.push(s.currentNode);s.nextSibling()}}n.push(t)}return n}},function(e,t,i){"use strict";i.d(t,"c",(function(){return TreeWalker}));i.d(t,"b",(function(){return ElementsTreeWalker}));i.d(t,"a",(function(){return ElementsAndTextTreeWalker}));var r=i(0);class TreeWalker{constructor(e,t,i=!1,r=e){this.acceptNode=t;this.root=e;this.currentNode=r;if(i){this.firstChildProp="firstElementChild";this.lastChildProp="lastElementChild";this.previousSiblingProp="previousElementSibling";this.nextSiblingProp="nextElementSibling"}else{this.firstChildProp="firstChild";this.lastChildProp="lastChild";this.previousSiblingProp="previousSibling";this.nextSiblingProp="nextSibling"}}tryMove(e){let t=this.currentNode;if(t===this.root&&!e.includes("Child"))return null;do{t=t[e]}while(t&&this.acceptNode&&!this.acceptNode(t));if(t)this.currentNode=t;return t||null}parentNode(){return this.tryMove("parentNode")}firstChild(){return this.tryMove(this.firstChildProp)}lastChild(){return this.tryMove(this.lastChildProp)}previousSibling(){return this.tryMove(this.previousSiblingProp)}nextSibling(){return this.tryMove(this.nextSiblingProp)}nextNode(){let e=this.currentNode;do{if(e[this.firstChildProp])e=e[this.firstChildProp];else{for(;e&&!e[this.nextSiblingProp]&&e.parentNode!==this.root;)e=e.parentNode;if(e)e=e[this.nextSiblingProp]}}while(e&&this.acceptNode&&!this.acceptNode(e));if(e)this.currentNode=e;return e}previousNode(){let e=this.currentNode;if(e!==this.root){do{if(e[this.previousSiblingProp]){e=e[this.previousSiblingProp];for(;e[this.lastChildProp];)e=e[this.lastChildProp]}else e=e.parentNode}while(e&&this.acceptNode&&!this.acceptNode(e));if(e)this.currentNode=e;return e}}}class ElementsTreeWalker extends TreeWalker{constructor(e,t=r.a.g.rootElement){super(t,null,!0);if(e)this.currentNode=e}}class ElementsAndTextTreeWalker extends TreeWalker{constructor(e,t=r.a.g.rootElement){super(t,e=>e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE);if(e)this.currentNode=e}}},function(e,t,i){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,i,r){if(void 0===r)r=i;Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,r){if(void 0===r)r=i;e[r]=t[i]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i))r(t,e,i);n(t,e);return t},a=this&&this.__exportStar||function(e,t){for(var i in e)if("default"!==i&&!Object.prototype.hasOwnProperty.call(t,i))r(t,e,i)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});t.RssHandler=t.DefaultHandler=t.DomUtils=t.ElementType=t.Tokenizer=t.createDomStream=t.parseDOM=t.parseDocument=t.DomHandler=t.Parser=void 0;var l=i(12);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return l.Parser}});var c=i(6);Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return c.DomHandler}});Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return c.DomHandler}});function u(e,t){var i=new c.DomHandler(void 0,t);new l.Parser(i,t).end(e);return i.root}t.parseDocument=u;t.parseDOM=function(e,t){return u(e,t).children};t.createDomStream=function(e,t,i){var r=new c.DomHandler(e,t,i);return new l.Parser(r,t)};var d=i(13);Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return o(d).default}});var h=s(i(8));t.ElementType=h;a(i(17),t);t.DomUtils=s(i(18));var f=i(17);Object.defineProperty(t,"RssHandler",{enumerable:!0,get:function(){return f.FeedHandler}})},function(e,t,i){"use strict";class CdError extends Error{constructor(e){let t;if(e){var i,r;t=e.type;if(e.code)t+="/"+e.code;if(null!=e&&null!==(i=e.apiData)&&void 0!==i&&null!==(r=i.error)&&void 0!==r&&r.code)t+="/"+e.apiData.error.code}else t="";super(t);this.name="CdError";this.data=e}}t.a=CdError},function(e,t,i){"use strict";i.d(t,"b",(function(){return x}));i.d(t,"c",(function(){return N}));i.d(t,"a",(function(){return C}));i.d(t,"d",(function(){return w}));i.d(t,"e",(function(){return O}));i(7),i(25),i(26);var r={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function n(e){return function(t){var i=t||{},r=i.width?String(i.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var s={date:n({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:n({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:n({formats:{full:"{{date}} \'at\' {{time}}",long:"{{date}} \'at\' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},a={lastWeek:"\'last\' eeee \'at\' p",yesterday:"\'yesterday at\' p",today:"\'today at\' p",tomorrow:"\'tomorrow at\' p",nextWeek:"eeee \'at\' p",other:"P"};function o(e){return function(t,i){var r,n=i||{};if("formatting"===(n.context?String(n.context):"standalone")&&e.formattingValues){var s=e.defaultFormattingWidth||e.defaultWidth,a=n.width?String(n.width):s;r=e.formattingValues[a]||e.formattingValues[s]}else{var o=e.defaultWidth,l=n.width?String(n.width):e.defaultWidth;r=e.values[l]||e.values[o]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function l(e){return function(t,i){var r=String(t),n=i||{},s=n.width,a=s&&e.matchPatterns[s]||e.matchPatterns[e.defaultMatchWidth],o=r.match(a);if(!o)return null;var l,c=o[0],u=s&&e.parsePatterns[s]||e.parsePatterns[e.defaultParseWidth];if("[object Array]"===Object.prototype.toString.call(u))l=function(e,t){for(var i=0;i=0)r[s]=parseInt(i[n].value,10)}return r}(i,e):function(e,t){var i=e.format(t).replace(/\\u200E/g,""),r=/(\\d+)\\/(\\d+)\\/(\\d+),? (\\d+):(\\d+):(\\d+)/.exec(i);return[r[3],r[1],r[2],r[4],r[5],r[6]]}(i,e)}var d={year:0,month:1,day:2,hour:3,minute:4,second:5};var h={};var f={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-])(\\d{2})$/,timezoneHHMM:/^([+-])(\\d{2}):?(\\d{2})$/,timezoneIANA:/(UTC|(?:[a-zA-Z]+\\/[a-zA-Z_-]+(?:\\/[a-zA-Z_]+)?))$/};function p(e,t,i){var r,n,s;if(r=f.timezoneZ.exec(e))return 0;if(r=f.timezoneHH.exec(e)){if(!g(s=parseInt(r[2],10)))return NaN;n=36e5*s;return"+"===r[1]?-n:n}if(r=f.timezoneHHMM.exec(e)){s=parseInt(r[2],10);var a=parseInt(r[3],10);if(!g(s,a))return NaN;n=36e5*s+6e4*a;return"+"===r[1]?-n:n}if(r=f.timezoneIANA.exec(e)){t=new Date(t||Date.now());var o=m(i?t:function(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}(t),e);return-(i?o:function(e,t,i){var r=e.getTime()-t,n=m(new Date(r),i);if(t===n)return t;r-=n-t;var s=m(new Date(r),i);if(n===s)return n;return Math.max(n,s)}(t,o,e))}return 0}function m(e,t){var i=u(e,t),r=Date.UTC(i[0],i[1]-1,i[2],i[3]%24,i[4],i[5]),n=e.getTime(),s=n%1e3;return r-(n-=s>=0?s:1e3+s)}function g(e,t){if(null!=t&&(t<0||t>59))return!1;else return!0}function b(e,t){return-p(e,t)}var cd=i(0),_=i(1);let v,y;const E={xg:["january-gen","february-gen","march-gen","april-gen","may-gen","june-gen","july-gen","august-gen","september-gen","october-gen","november-gen","december-gen"],D:["sun","mon","tue","wed","thu","fri","sat"],l:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],F:["january","february","march","april","may_long","june","july","august","september","october","november","december"],M:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]};let T=[];function x(e){return/^\\d{12}_.+$/.test(e)}function N(e,t){e=Object(_.h)(e,!0);let i;if(void 0===t){v=v||new RegExp(`^([^]*)(${cd.a.g.CONTENT_TIMESTAMP_REGEXP.source})(?!["\\xbb])`);i=v}else{y=y||new RegExp(`^([^]*)(${cd.a.g.UI_TIMESTAMP_REGEXP.source})`);i=y}const r=e.match(i);if(!r)return null;return{date:function(e,t){let i=void 0===t;if(i)t=cd.a.g.CONTENT_TIMEZONE;const r=i?cd.a.g.CONTENT_DIGITS:cd.a.g.UI_DIGITS,n=i?cd.a.g.CONTENT_TIMESTAMP_MATCHING_GROUPS:cd.a.g.UI_TIMESTAMP_MATCHING_GROUPS,s=e=>{if(!r)return e;const t=new RegExp("["+r+"]","g");return e.replace(t,e=>r.indexOf(e))};let a=0,o=0,l=0,c=0,u=0;for(let t=0;t=t?e:""+Array(t+1-r.length).join(i)+e},b={s:g,z:function(e){var t=-e.utcOffset(),i=Math.abs(t),r=Math.floor(i/60),n=i%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(n,2,"0")},m:function e(t,i){if(t.date()"$ms",i],["$s",r],["$m",n],["$H",s],["$W",a],["$M",l],["$y",u],["$D",d.forEach((function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),T.extend=function(e,t){return e.$i||(e(t,N,T),e.$i=!0),T},T.locale=E,T.isDayjs=y,T.unix=function(e){return T(1e3*e)},T.en=v[_],T.Ls=v,T.p={},T}()},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0;var r;!function(e){e.Root="root";e.Text="text";e.Directive="directive";e.Comment="comment";e.Script="script";e.Style="style";e.Tag="tag";e.CDATA="cdata";e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={}));t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style};t.Root=r.Root;t.Text=r.Text;t.Directive=r.Directive;t.Comment=r.Comment;t.Script=r.Script;t.Style=r.Style;t.Tag=r.Tag;t.CDATA=r.CDATA;t.Doctype=r.Doctype},function(e){e.exports=JSON.parse(\'{"Aacute":"\\xc1","aacute":"\\xe1","Abreve":"\\u0102","abreve":"\\u0103","ac":"\\u223e","acd":"\\u223f","acE":"\\u223e\\u0333","Acirc":"\\xc2","acirc":"\\xe2","acute":"\\xb4","Acy":"\\u0410","acy":"\\u0430","AElig":"\\xc6","aelig":"\\xe6","af":"\\u2061","Afr":"\\ud835\\udd04","afr":"\\ud835\\udd1e","Agrave":"\\xc0","agrave":"\\xe0","alefsym":"\\u2135","aleph":"\\u2135","Alpha":"\\u0391","alpha":"\\u03b1","Amacr":"\\u0100","amacr":"\\u0101","amalg":"\\u2a3f","amp":"&","AMP":"&","andand":"\\u2a55","And":"\\u2a53","and":"\\u2227","andd":"\\u2a5c","andslope":"\\u2a58","andv":"\\u2a5a","ang":"\\u2220","ange":"\\u29a4","angle":"\\u2220","angmsdaa":"\\u29a8","angmsdab":"\\u29a9","angmsdac":"\\u29aa","angmsdad":"\\u29ab","angmsdae":"\\u29ac","angmsdaf":"\\u29ad","angmsdag":"\\u29ae","angmsdah":"\\u29af","angmsd":"\\u2221","angrt":"\\u221f","angrtvb":"\\u22be","angrtvbd":"\\u299d","angsph":"\\u2222","angst":"\\xc5","angzarr":"\\u237c","Aogon":"\\u0104","aogon":"\\u0105","Aopf":"\\ud835\\udd38","aopf":"\\ud835\\udd52","apacir":"\\u2a6f","ap":"\\u2248","apE":"\\u2a70","ape":"\\u224a","apid":"\\u224b","apos":"\\\'","ApplyFunction":"\\u2061","approx":"\\u2248","approxeq":"\\u224a","Aring":"\\xc5","aring":"\\xe5","Ascr":"\\ud835\\udc9c","ascr":"\\ud835\\udcb6","Assign":"\\u2254","ast":"*","asymp":"\\u2248","asympeq":"\\u224d","Atilde":"\\xc3","atilde":"\\xe3","Auml":"\\xc4","auml":"\\xe4","awconint":"\\u2233","awint":"\\u2a11","backcong":"\\u224c","backepsilon":"\\u03f6","backprime":"\\u2035","backsim":"\\u223d","backsimeq":"\\u22cd","Backslash":"\\u2216","Barv":"\\u2ae7","barvee":"\\u22bd","barwed":"\\u2305","Barwed":"\\u2306","barwedge":"\\u2305","bbrk":"\\u23b5","bbrktbrk":"\\u23b6","bcong":"\\u224c","Bcy":"\\u0411","bcy":"\\u0431","bdquo":"\\u201e","becaus":"\\u2235","because":"\\u2235","Because":"\\u2235","bemptyv":"\\u29b0","bepsi":"\\u03f6","bernou":"\\u212c","Bernoullis":"\\u212c","Beta":"\\u0392","beta":"\\u03b2","beth":"\\u2136","between":"\\u226c","Bfr":"\\ud835\\udd05","bfr":"\\ud835\\udd1f","bigcap":"\\u22c2","bigcirc":"\\u25ef","bigcup":"\\u22c3","bigodot":"\\u2a00","bigoplus":"\\u2a01","bigotimes":"\\u2a02","bigsqcup":"\\u2a06","bigstar":"\\u2605","bigtriangledown":"\\u25bd","bigtriangleup":"\\u25b3","biguplus":"\\u2a04","bigvee":"\\u22c1","bigwedge":"\\u22c0","bkarow":"\\u290d","blacklozenge":"\\u29eb","blacksquare":"\\u25aa","blacktriangle":"\\u25b4","blacktriangledown":"\\u25be","blacktriangleleft":"\\u25c2","blacktriangleright":"\\u25b8","blank":"\\u2423","blk12":"\\u2592","blk14":"\\u2591","blk34":"\\u2593","block":"\\u2588","bne":"=\\u20e5","bnequiv":"\\u2261\\u20e5","bNot":"\\u2aed","bnot":"\\u2310","Bopf":"\\ud835\\udd39","bopf":"\\ud835\\udd53","bot":"\\u22a5","bottom":"\\u22a5","bowtie":"\\u22c8","boxbox":"\\u29c9","boxdl":"\\u2510","boxdL":"\\u2555","boxDl":"\\u2556","boxDL":"\\u2557","boxdr":"\\u250c","boxdR":"\\u2552","boxDr":"\\u2553","boxDR":"\\u2554","boxh":"\\u2500","boxH":"\\u2550","boxhd":"\\u252c","boxHd":"\\u2564","boxhD":"\\u2565","boxHD":"\\u2566","boxhu":"\\u2534","boxHu":"\\u2567","boxhU":"\\u2568","boxHU":"\\u2569","boxminus":"\\u229f","boxplus":"\\u229e","boxtimes":"\\u22a0","boxul":"\\u2518","boxuL":"\\u255b","boxUl":"\\u255c","boxUL":"\\u255d","boxur":"\\u2514","boxuR":"\\u2558","boxUr":"\\u2559","boxUR":"\\u255a","boxv":"\\u2502","boxV":"\\u2551","boxvh":"\\u253c","boxvH":"\\u256a","boxVh":"\\u256b","boxVH":"\\u256c","boxvl":"\\u2524","boxvL":"\\u2561","boxVl":"\\u2562","boxVL":"\\u2563","boxvr":"\\u251c","boxvR":"\\u255e","boxVr":"\\u255f","boxVR":"\\u2560","bprime":"\\u2035","breve":"\\u02d8","Breve":"\\u02d8","brvbar":"\\xa6","bscr":"\\ud835\\udcb7","Bscr":"\\u212c","bsemi":"\\u204f","bsim":"\\u223d","bsime":"\\u22cd","bsolb":"\\u29c5","bsol":"\\\\\\\\","bsolhsub":"\\u27c8","bull":"\\u2022","bullet":"\\u2022","bump":"\\u224e","bumpE":"\\u2aae","bumpe":"\\u224f","Bumpeq":"\\u224e","bumpeq":"\\u224f","Cacute":"\\u0106","cacute":"\\u0107","capand":"\\u2a44","capbrcup":"\\u2a49","capcap":"\\u2a4b","cap":"\\u2229","Cap":"\\u22d2","capcup":"\\u2a47","capdot":"\\u2a40","CapitalDifferentialD":"\\u2145","caps":"\\u2229\\ufe00","caret":"\\u2041","caron":"\\u02c7","Cayleys":"\\u212d","ccaps":"\\u2a4d","Ccaron":"\\u010c","ccaron":"\\u010d","Ccedil":"\\xc7","ccedil":"\\xe7","Ccirc":"\\u0108","ccirc":"\\u0109","Cconint":"\\u2230","ccups":"\\u2a4c","ccupssm":"\\u2a50","Cdot":"\\u010a","cdot":"\\u010b","cedil":"\\xb8","Cedilla":"\\xb8","cemptyv":"\\u29b2","cent":"\\xa2","centerdot":"\\xb7","CenterDot":"\\xb7","cfr":"\\ud835\\udd20","Cfr":"\\u212d","CHcy":"\\u0427","chcy":"\\u0447","check":"\\u2713","checkmark":"\\u2713","Chi":"\\u03a7","chi":"\\u03c7","circ":"\\u02c6","circeq":"\\u2257","circlearrowleft":"\\u21ba","circlearrowright":"\\u21bb","circledast":"\\u229b","circledcirc":"\\u229a","circleddash":"\\u229d","CircleDot":"\\u2299","circledR":"\\xae","circledS":"\\u24c8","CircleMinus":"\\u2296","CirclePlus":"\\u2295","CircleTimes":"\\u2297","cir":"\\u25cb","cirE":"\\u29c3","cire":"\\u2257","cirfnint":"\\u2a10","cirmid":"\\u2aef","cirscir":"\\u29c2","ClockwiseContourIntegral":"\\u2232","CloseCurlyDoubleQuote":"\\u201d","CloseCurlyQuote":"\\u2019","clubs":"\\u2663","clubsuit":"\\u2663","colon":":","Colon":"\\u2237","Colone":"\\u2a74","colone":"\\u2254","coloneq":"\\u2254","comma":",","commat":"@","comp":"\\u2201","compfn":"\\u2218","complement":"\\u2201","complexes":"\\u2102","cong":"\\u2245","congdot":"\\u2a6d","Congruent":"\\u2261","conint":"\\u222e","Conint":"\\u222f","ContourIntegral":"\\u222e","copf":"\\ud835\\udd54","Copf":"\\u2102","coprod":"\\u2210","Coproduct":"\\u2210","copy":"\\xa9","COPY":"\\xa9","copysr":"\\u2117","CounterClockwiseContourIntegral":"\\u2233","crarr":"\\u21b5","cross":"\\u2717","Cross":"\\u2a2f","Cscr":"\\ud835\\udc9e","cscr":"\\ud835\\udcb8","csub":"\\u2acf","csube":"\\u2ad1","csup":"\\u2ad0","csupe":"\\u2ad2","ctdot":"\\u22ef","cudarrl":"\\u2938","cudarrr":"\\u2935","cuepr":"\\u22de","cuesc":"\\u22df","cularr":"\\u21b6","cularrp":"\\u293d","cupbrcap":"\\u2a48","cupcap":"\\u2a46","CupCap":"\\u224d","cup":"\\u222a","Cup":"\\u22d3","cupcup":"\\u2a4a","cupdot":"\\u228d","cupor":"\\u2a45","cups":"\\u222a\\ufe00","curarr":"\\u21b7","curarrm":"\\u293c","curlyeqprec":"\\u22de","curlyeqsucc":"\\u22df","curlyvee":"\\u22ce","curlywedge":"\\u22cf","curren":"\\xa4","curvearrowleft":"\\u21b6","curvearrowright":"\\u21b7","cuvee":"\\u22ce","cuwed":"\\u22cf","cwconint":"\\u2232","cwint":"\\u2231","cylcty":"\\u232d","dagger":"\\u2020","Dagger":"\\u2021","daleth":"\\u2138","darr":"\\u2193","Darr":"\\u21a1","dArr":"\\u21d3","dash":"\\u2010","Dashv":"\\u2ae4","dashv":"\\u22a3","dbkarow":"\\u290f","dblac":"\\u02dd","Dcaron":"\\u010e","dcaron":"\\u010f","Dcy":"\\u0414","dcy":"\\u0434","ddagger":"\\u2021","ddarr":"\\u21ca","DD":"\\u2145","dd":"\\u2146","DDotrahd":"\\u2911","ddotseq":"\\u2a77","deg":"\\xb0","Del":"\\u2207","Delta":"\\u0394","delta":"\\u03b4","demptyv":"\\u29b1","dfisht":"\\u297f","Dfr":"\\ud835\\udd07","dfr":"\\ud835\\udd21","dHar":"\\u2965","dharl":"\\u21c3","dharr":"\\u21c2","DiacriticalAcute":"\\xb4","DiacriticalDot":"\\u02d9","DiacriticalDoubleAcute":"\\u02dd","DiacriticalGrave":"`","DiacriticalTilde":"\\u02dc","diam":"\\u22c4","diamond":"\\u22c4","Diamond":"\\u22c4","diamondsuit":"\\u2666","diams":"\\u2666","die":"\\xa8","DifferentialD":"\\u2146","digamma":"\\u03dd","disin":"\\u22f2","div":"\\xf7","divide":"\\xf7","divideontimes":"\\u22c7","divonx":"\\u22c7","DJcy":"\\u0402","djcy":"\\u0452","dlcorn":"\\u231e","dlcrop":"\\u230d","dollar":"$","Dopf":"\\ud835\\udd3b","dopf":"\\ud835\\udd55","Dot":"\\xa8","dot":"\\u02d9","DotDot":"\\u20dc","doteq":"\\u2250","doteqdot":"\\u2251","DotEqual":"\\u2250","dotminus":"\\u2238","dotplus":"\\u2214","dotsquare":"\\u22a1","doublebarwedge":"\\u2306","DoubleContourIntegral":"\\u222f","DoubleDot":"\\xa8","DoubleDownArrow":"\\u21d3","DoubleLeftArrow":"\\u21d0","DoubleLeftRightArrow":"\\u21d4","DoubleLeftTee":"\\u2ae4","DoubleLongLeftArrow":"\\u27f8","DoubleLongLeftRightArrow":"\\u27fa","DoubleLongRightArrow":"\\u27f9","DoubleRightArrow":"\\u21d2","DoubleRightTee":"\\u22a8","DoubleUpArrow":"\\u21d1","DoubleUpDownArrow":"\\u21d5","DoubleVerticalBar":"\\u2225","DownArrowBar":"\\u2913","downarrow":"\\u2193","DownArrow":"\\u2193","Downarrow":"\\u21d3","DownArrowUpArrow":"\\u21f5","DownBreve":"\\u0311","downdownarrows":"\\u21ca","downharpoonleft":"\\u21c3","downharpoonright":"\\u21c2","DownLeftRightVector":"\\u2950","DownLeftTeeVector":"\\u295e","DownLeftVectorBar":"\\u2956","DownLeftVector":"\\u21bd","DownRightTeeVector":"\\u295f","DownRightVectorBar":"\\u2957","DownRightVector":"\\u21c1","DownTeeArrow":"\\u21a7","DownTee":"\\u22a4","drbkarow":"\\u2910","drcorn":"\\u231f","drcrop":"\\u230c","Dscr":"\\ud835\\udc9f","dscr":"\\ud835\\udcb9","DScy":"\\u0405","dscy":"\\u0455","dsol":"\\u29f6","Dstrok":"\\u0110","dstrok":"\\u0111","dtdot":"\\u22f1","dtri":"\\u25bf","dtrif":"\\u25be","duarr":"\\u21f5","duhar":"\\u296f","dwangle":"\\u29a6","DZcy":"\\u040f","dzcy":"\\u045f","dzigrarr":"\\u27ff","Eacute":"\\xc9","eacute":"\\xe9","easter":"\\u2a6e","Ecaron":"\\u011a","ecaron":"\\u011b","Ecirc":"\\xca","ecirc":"\\xea","ecir":"\\u2256","ecolon":"\\u2255","Ecy":"\\u042d","ecy":"\\u044d","eDDot":"\\u2a77","Edot":"\\u0116","edot":"\\u0117","eDot":"\\u2251","ee":"\\u2147","efDot":"\\u2252","Efr":"\\ud835\\udd08","efr":"\\ud835\\udd22","eg":"\\u2a9a","Egrave":"\\xc8","egrave":"\\xe8","egs":"\\u2a96","egsdot":"\\u2a98","el":"\\u2a99","Element":"\\u2208","elinters":"\\u23e7","ell":"\\u2113","els":"\\u2a95","elsdot":"\\u2a97","Emacr":"\\u0112","emacr":"\\u0113","empty":"\\u2205","emptyset":"\\u2205","EmptySmallSquare":"\\u25fb","emptyv":"\\u2205","EmptyVerySmallSquare":"\\u25ab","emsp13":"\\u2004","emsp14":"\\u2005","emsp":"\\u2003","ENG":"\\u014a","eng":"\\u014b","ensp":"\\u2002","Eogon":"\\u0118","eogon":"\\u0119","Eopf":"\\ud835\\udd3c","eopf":"\\ud835\\udd56","epar":"\\u22d5","eparsl":"\\u29e3","eplus":"\\u2a71","epsi":"\\u03b5","Epsilon":"\\u0395","epsilon":"\\u03b5","epsiv":"\\u03f5","eqcirc":"\\u2256","eqcolon":"\\u2255","eqsim":"\\u2242","eqslantgtr":"\\u2a96","eqslantless":"\\u2a95","Equal":"\\u2a75","equals":"=","EqualTilde":"\\u2242","equest":"\\u225f","Equilibrium":"\\u21cc","equiv":"\\u2261","equivDD":"\\u2a78","eqvparsl":"\\u29e5","erarr":"\\u2971","erDot":"\\u2253","escr":"\\u212f","Escr":"\\u2130","esdot":"\\u2250","Esim":"\\u2a73","esim":"\\u2242","Eta":"\\u0397","eta":"\\u03b7","ETH":"\\xd0","eth":"\\xf0","Euml":"\\xcb","euml":"\\xeb","euro":"\\u20ac","excl":"!","exist":"\\u2203","Exists":"\\u2203","expectation":"\\u2130","exponentiale":"\\u2147","ExponentialE":"\\u2147","fallingdotseq":"\\u2252","Fcy":"\\u0424","fcy":"\\u0444","female":"\\u2640","ffilig":"\\ufb03","fflig":"\\ufb00","ffllig":"\\ufb04","Ffr":"\\ud835\\udd09","ffr":"\\ud835\\udd23","filig":"\\ufb01","FilledSmallSquare":"\\u25fc","FilledVerySmallSquare":"\\u25aa","fjlig":"fj","flat":"\\u266d","fllig":"\\ufb02","fltns":"\\u25b1","fnof":"\\u0192","Fopf":"\\ud835\\udd3d","fopf":"\\ud835\\udd57","forall":"\\u2200","ForAll":"\\u2200","fork":"\\u22d4","forkv":"\\u2ad9","Fouriertrf":"\\u2131","fpartint":"\\u2a0d","frac12":"\\xbd","frac13":"\\u2153","frac14":"\\xbc","frac15":"\\u2155","frac16":"\\u2159","frac18":"\\u215b","frac23":"\\u2154","frac25":"\\u2156","frac34":"\\xbe","frac35":"\\u2157","frac38":"\\u215c","frac45":"\\u2158","frac56":"\\u215a","frac58":"\\u215d","frac78":"\\u215e","frasl":"\\u2044","frown":"\\u2322","fscr":"\\ud835\\udcbb","Fscr":"\\u2131","gacute":"\\u01f5","Gamma":"\\u0393","gamma":"\\u03b3","Gammad":"\\u03dc","gammad":"\\u03dd","gap":"\\u2a86","Gbreve":"\\u011e","gbreve":"\\u011f","Gcedil":"\\u0122","Gcirc":"\\u011c","gcirc":"\\u011d","Gcy":"\\u0413","gcy":"\\u0433","Gdot":"\\u0120","gdot":"\\u0121","ge":"\\u2265","gE":"\\u2267","gEl":"\\u2a8c","gel":"\\u22db","geq":"\\u2265","geqq":"\\u2267","geqslant":"\\u2a7e","gescc":"\\u2aa9","ges":"\\u2a7e","gesdot":"\\u2a80","gesdoto":"\\u2a82","gesdotol":"\\u2a84","gesl":"\\u22db\\ufe00","gesles":"\\u2a94","Gfr":"\\ud835\\udd0a","gfr":"\\ud835\\udd24","gg":"\\u226b","Gg":"\\u22d9","ggg":"\\u22d9","gimel":"\\u2137","GJcy":"\\u0403","gjcy":"\\u0453","gla":"\\u2aa5","gl":"\\u2277","glE":"\\u2a92","glj":"\\u2aa4","gnap":"\\u2a8a","gnapprox":"\\u2a8a","gne":"\\u2a88","gnE":"\\u2269","gneq":"\\u2a88","gneqq":"\\u2269","gnsim":"\\u22e7","Gopf":"\\ud835\\udd3e","gopf":"\\ud835\\udd58","grave":"`","GreaterEqual":"\\u2265","GreaterEqualLess":"\\u22db","GreaterFullEqual":"\\u2267","GreaterGreater":"\\u2aa2","GreaterLess":"\\u2277","GreaterSlantEqual":"\\u2a7e","GreaterTilde":"\\u2273","Gscr":"\\ud835\\udca2","gscr":"\\u210a","gsim":"\\u2273","gsime":"\\u2a8e","gsiml":"\\u2a90","gtcc":"\\u2aa7","gtcir":"\\u2a7a","gt":">","GT":">","Gt":"\\u226b","gtdot":"\\u22d7","gtlPar":"\\u2995","gtquest":"\\u2a7c","gtrapprox":"\\u2a86","gtrarr":"\\u2978","gtrdot":"\\u22d7","gtreqless":"\\u22db","gtreqqless":"\\u2a8c","gtrless":"\\u2277","gtrsim":"\\u2273","gvertneqq":"\\u2269\\ufe00","gvnE":"\\u2269\\ufe00","Hacek":"\\u02c7","hairsp":"\\u200a","half":"\\xbd","hamilt":"\\u210b","HARDcy":"\\u042a","hardcy":"\\u044a","harrcir":"\\u2948","harr":"\\u2194","hArr":"\\u21d4","harrw":"\\u21ad","Hat":"^","hbar":"\\u210f","Hcirc":"\\u0124","hcirc":"\\u0125","hearts":"\\u2665","heartsuit":"\\u2665","hellip":"\\u2026","hercon":"\\u22b9","hfr":"\\ud835\\udd25","Hfr":"\\u210c","HilbertSpace":"\\u210b","hksearow":"\\u2925","hkswarow":"\\u2926","hoarr":"\\u21ff","homtht":"\\u223b","hookleftarrow":"\\u21a9","hookrightarrow":"\\u21aa","hopf":"\\ud835\\udd59","Hopf":"\\u210d","horbar":"\\u2015","HorizontalLine":"\\u2500","hscr":"\\ud835\\udcbd","Hscr":"\\u210b","hslash":"\\u210f","Hstrok":"\\u0126","hstrok":"\\u0127","HumpDownHump":"\\u224e","HumpEqual":"\\u224f","hybull":"\\u2043","hyphen":"\\u2010","Iacute":"\\xcd","iacute":"\\xed","ic":"\\u2063","Icirc":"\\xce","icirc":"\\xee","Icy":"\\u0418","icy":"\\u0438","Idot":"\\u0130","IEcy":"\\u0415","iecy":"\\u0435","iexcl":"\\xa1","iff":"\\u21d4","ifr":"\\ud835\\udd26","Ifr":"\\u2111","Igrave":"\\xcc","igrave":"\\xec","ii":"\\u2148","iiiint":"\\u2a0c","iiint":"\\u222d","iinfin":"\\u29dc","iiota":"\\u2129","IJlig":"\\u0132","ijlig":"\\u0133","Imacr":"\\u012a","imacr":"\\u012b","image":"\\u2111","ImaginaryI":"\\u2148","imagline":"\\u2110","imagpart":"\\u2111","imath":"\\u0131","Im":"\\u2111","imof":"\\u22b7","imped":"\\u01b5","Implies":"\\u21d2","incare":"\\u2105","in":"\\u2208","infin":"\\u221e","infintie":"\\u29dd","inodot":"\\u0131","intcal":"\\u22ba","int":"\\u222b","Int":"\\u222c","integers":"\\u2124","Integral":"\\u222b","intercal":"\\u22ba","Intersection":"\\u22c2","intlarhk":"\\u2a17","intprod":"\\u2a3c","InvisibleComma":"\\u2063","InvisibleTimes":"\\u2062","IOcy":"\\u0401","iocy":"\\u0451","Iogon":"\\u012e","iogon":"\\u012f","Iopf":"\\ud835\\udd40","iopf":"\\ud835\\udd5a","Iota":"\\u0399","iota":"\\u03b9","iprod":"\\u2a3c","iquest":"\\xbf","iscr":"\\ud835\\udcbe","Iscr":"\\u2110","isin":"\\u2208","isindot":"\\u22f5","isinE":"\\u22f9","isins":"\\u22f4","isinsv":"\\u22f3","isinv":"\\u2208","it":"\\u2062","Itilde":"\\u0128","itilde":"\\u0129","Iukcy":"\\u0406","iukcy":"\\u0456","Iuml":"\\xcf","iuml":"\\xef","Jcirc":"\\u0134","jcirc":"\\u0135","Jcy":"\\u0419","jcy":"\\u0439","Jfr":"\\ud835\\udd0d","jfr":"\\ud835\\udd27","jmath":"\\u0237","Jopf":"\\ud835\\udd41","jopf":"\\ud835\\udd5b","Jscr":"\\ud835\\udca5","jscr":"\\ud835\\udcbf","Jsercy":"\\u0408","jsercy":"\\u0458","Jukcy":"\\u0404","jukcy":"\\u0454","Kappa":"\\u039a","kappa":"\\u03ba","kappav":"\\u03f0","Kcedil":"\\u0136","kcedil":"\\u0137","Kcy":"\\u041a","kcy":"\\u043a","Kfr":"\\ud835\\udd0e","kfr":"\\ud835\\udd28","kgreen":"\\u0138","KHcy":"\\u0425","khcy":"\\u0445","KJcy":"\\u040c","kjcy":"\\u045c","Kopf":"\\ud835\\udd42","kopf":"\\ud835\\udd5c","Kscr":"\\ud835\\udca6","kscr":"\\ud835\\udcc0","lAarr":"\\u21da","Lacute":"\\u0139","lacute":"\\u013a","laemptyv":"\\u29b4","lagran":"\\u2112","Lambda":"\\u039b","lambda":"\\u03bb","lang":"\\u27e8","Lang":"\\u27ea","langd":"\\u2991","langle":"\\u27e8","lap":"\\u2a85","Laplacetrf":"\\u2112","laquo":"\\xab","larrb":"\\u21e4","larrbfs":"\\u291f","larr":"\\u2190","Larr":"\\u219e","lArr":"\\u21d0","larrfs":"\\u291d","larrhk":"\\u21a9","larrlp":"\\u21ab","larrpl":"\\u2939","larrsim":"\\u2973","larrtl":"\\u21a2","latail":"\\u2919","lAtail":"\\u291b","lat":"\\u2aab","late":"\\u2aad","lates":"\\u2aad\\ufe00","lbarr":"\\u290c","lBarr":"\\u290e","lbbrk":"\\u2772","lbrace":"{","lbrack":"[","lbrke":"\\u298b","lbrksld":"\\u298f","lbrkslu":"\\u298d","Lcaron":"\\u013d","lcaron":"\\u013e","Lcedil":"\\u013b","lcedil":"\\u013c","lceil":"\\u2308","lcub":"{","Lcy":"\\u041b","lcy":"\\u043b","ldca":"\\u2936","ldquo":"\\u201c","ldquor":"\\u201e","ldrdhar":"\\u2967","ldrushar":"\\u294b","ldsh":"\\u21b2","le":"\\u2264","lE":"\\u2266","LeftAngleBracket":"\\u27e8","LeftArrowBar":"\\u21e4","leftarrow":"\\u2190","LeftArrow":"\\u2190","Leftarrow":"\\u21d0","LeftArrowRightArrow":"\\u21c6","leftarrowtail":"\\u21a2","LeftCeiling":"\\u2308","LeftDoubleBracket":"\\u27e6","LeftDownTeeVector":"\\u2961","LeftDownVectorBar":"\\u2959","LeftDownVector":"\\u21c3","LeftFloor":"\\u230a","leftharpoondown":"\\u21bd","leftharpoonup":"\\u21bc","leftleftarrows":"\\u21c7","leftrightarrow":"\\u2194","LeftRightArrow":"\\u2194","Leftrightarrow":"\\u21d4","leftrightarrows":"\\u21c6","leftrightharpoons":"\\u21cb","leftrightsquigarrow":"\\u21ad","LeftRightVector":"\\u294e","LeftTeeArrow":"\\u21a4","LeftTee":"\\u22a3","LeftTeeVector":"\\u295a","leftthreetimes":"\\u22cb","LeftTriangleBar":"\\u29cf","LeftTriangle":"\\u22b2","LeftTriangleEqual":"\\u22b4","LeftUpDownVector":"\\u2951","LeftUpTeeVector":"\\u2960","LeftUpVectorBar":"\\u2958","LeftUpVector":"\\u21bf","LeftVectorBar":"\\u2952","LeftVector":"\\u21bc","lEg":"\\u2a8b","leg":"\\u22da","leq":"\\u2264","leqq":"\\u2266","leqslant":"\\u2a7d","lescc":"\\u2aa8","les":"\\u2a7d","lesdot":"\\u2a7f","lesdoto":"\\u2a81","lesdotor":"\\u2a83","lesg":"\\u22da\\ufe00","lesges":"\\u2a93","lessapprox":"\\u2a85","lessdot":"\\u22d6","lesseqgtr":"\\u22da","lesseqqgtr":"\\u2a8b","LessEqualGreater":"\\u22da","LessFullEqual":"\\u2266","LessGreater":"\\u2276","lessgtr":"\\u2276","LessLess":"\\u2aa1","lesssim":"\\u2272","LessSlantEqual":"\\u2a7d","LessTilde":"\\u2272","lfisht":"\\u297c","lfloor":"\\u230a","Lfr":"\\ud835\\udd0f","lfr":"\\ud835\\udd29","lg":"\\u2276","lgE":"\\u2a91","lHar":"\\u2962","lhard":"\\u21bd","lharu":"\\u21bc","lharul":"\\u296a","lhblk":"\\u2584","LJcy":"\\u0409","ljcy":"\\u0459","llarr":"\\u21c7","ll":"\\u226a","Ll":"\\u22d8","llcorner":"\\u231e","Lleftarrow":"\\u21da","llhard":"\\u296b","lltri":"\\u25fa","Lmidot":"\\u013f","lmidot":"\\u0140","lmoustache":"\\u23b0","lmoust":"\\u23b0","lnap":"\\u2a89","lnapprox":"\\u2a89","lne":"\\u2a87","lnE":"\\u2268","lneq":"\\u2a87","lneqq":"\\u2268","lnsim":"\\u22e6","loang":"\\u27ec","loarr":"\\u21fd","lobrk":"\\u27e6","longleftarrow":"\\u27f5","LongLeftArrow":"\\u27f5","Longleftarrow":"\\u27f8","longleftrightarrow":"\\u27f7","LongLeftRightArrow":"\\u27f7","Longleftrightarrow":"\\u27fa","longmapsto":"\\u27fc","longrightarrow":"\\u27f6","LongRightArrow":"\\u27f6","Longrightarrow":"\\u27f9","looparrowleft":"\\u21ab","looparrowright":"\\u21ac","lopar":"\\u2985","Lopf":"\\ud835\\udd43","lopf":"\\ud835\\udd5d","loplus":"\\u2a2d","lotimes":"\\u2a34","lowast":"\\u2217","lowbar":"_","LowerLeftArrow":"\\u2199","LowerRightArrow":"\\u2198","loz":"\\u25ca","lozenge":"\\u25ca","lozf":"\\u29eb","lpar":"(","lparlt":"\\u2993","lrarr":"\\u21c6","lrcorner":"\\u231f","lrhar":"\\u21cb","lrhard":"\\u296d","lrm":"\\u200e","lrtri":"\\u22bf","lsaquo":"\\u2039","lscr":"\\ud835\\udcc1","Lscr":"\\u2112","lsh":"\\u21b0","Lsh":"\\u21b0","lsim":"\\u2272","lsime":"\\u2a8d","lsimg":"\\u2a8f","lsqb":"[","lsquo":"\\u2018","lsquor":"\\u201a","Lstrok":"\\u0141","lstrok":"\\u0142","ltcc":"\\u2aa6","ltcir":"\\u2a79","lt":"<","LT":"<","Lt":"\\u226a","ltdot":"\\u22d6","lthree":"\\u22cb","ltimes":"\\u22c9","ltlarr":"\\u2976","ltquest":"\\u2a7b","ltri":"\\u25c3","ltrie":"\\u22b4","ltrif":"\\u25c2","ltrPar":"\\u2996","lurdshar":"\\u294a","luruhar":"\\u2966","lvertneqq":"\\u2268\\ufe00","lvnE":"\\u2268\\ufe00","macr":"\\xaf","male":"\\u2642","malt":"\\u2720","maltese":"\\u2720","Map":"\\u2905","map":"\\u21a6","mapsto":"\\u21a6","mapstodown":"\\u21a7","mapstoleft":"\\u21a4","mapstoup":"\\u21a5","marker":"\\u25ae","mcomma":"\\u2a29","Mcy":"\\u041c","mcy":"\\u043c","mdash":"\\u2014","mDDot":"\\u223a","measuredangle":"\\u2221","MediumSpace":"\\u205f","Mellintrf":"\\u2133","Mfr":"\\ud835\\udd10","mfr":"\\ud835\\udd2a","mho":"\\u2127","micro":"\\xb5","midast":"*","midcir":"\\u2af0","mid":"\\u2223","middot":"\\xb7","minusb":"\\u229f","minus":"\\u2212","minusd":"\\u2238","minusdu":"\\u2a2a","MinusPlus":"\\u2213","mlcp":"\\u2adb","mldr":"\\u2026","mnplus":"\\u2213","models":"\\u22a7","Mopf":"\\ud835\\udd44","mopf":"\\ud835\\udd5e","mp":"\\u2213","mscr":"\\ud835\\udcc2","Mscr":"\\u2133","mstpos":"\\u223e","Mu":"\\u039c","mu":"\\u03bc","multimap":"\\u22b8","mumap":"\\u22b8","nabla":"\\u2207","Nacute":"\\u0143","nacute":"\\u0144","nang":"\\u2220\\u20d2","nap":"\\u2249","napE":"\\u2a70\\u0338","napid":"\\u224b\\u0338","napos":"\\u0149","napprox":"\\u2249","natural":"\\u266e","naturals":"\\u2115","natur":"\\u266e","nbsp":"\\xa0","nbump":"\\u224e\\u0338","nbumpe":"\\u224f\\u0338","ncap":"\\u2a43","Ncaron":"\\u0147","ncaron":"\\u0148","Ncedil":"\\u0145","ncedil":"\\u0146","ncong":"\\u2247","ncongdot":"\\u2a6d\\u0338","ncup":"\\u2a42","Ncy":"\\u041d","ncy":"\\u043d","ndash":"\\u2013","nearhk":"\\u2924","nearr":"\\u2197","neArr":"\\u21d7","nearrow":"\\u2197","ne":"\\u2260","nedot":"\\u2250\\u0338","NegativeMediumSpace":"\\u200b","NegativeThickSpace":"\\u200b","NegativeThinSpace":"\\u200b","NegativeVeryThinSpace":"\\u200b","nequiv":"\\u2262","nesear":"\\u2928","nesim":"\\u2242\\u0338","NestedGreaterGreater":"\\u226b","NestedLessLess":"\\u226a","NewLine":"\\\\n","nexist":"\\u2204","nexists":"\\u2204","Nfr":"\\ud835\\udd11","nfr":"\\ud835\\udd2b","ngE":"\\u2267\\u0338","nge":"\\u2271","ngeq":"\\u2271","ngeqq":"\\u2267\\u0338","ngeqslant":"\\u2a7e\\u0338","nges":"\\u2a7e\\u0338","nGg":"\\u22d9\\u0338","ngsim":"\\u2275","nGt":"\\u226b\\u20d2","ngt":"\\u226f","ngtr":"\\u226f","nGtv":"\\u226b\\u0338","nharr":"\\u21ae","nhArr":"\\u21ce","nhpar":"\\u2af2","ni":"\\u220b","nis":"\\u22fc","nisd":"\\u22fa","niv":"\\u220b","NJcy":"\\u040a","njcy":"\\u045a","nlarr":"\\u219a","nlArr":"\\u21cd","nldr":"\\u2025","nlE":"\\u2266\\u0338","nle":"\\u2270","nleftarrow":"\\u219a","nLeftarrow":"\\u21cd","nleftrightarrow":"\\u21ae","nLeftrightarrow":"\\u21ce","nleq":"\\u2270","nleqq":"\\u2266\\u0338","nleqslant":"\\u2a7d\\u0338","nles":"\\u2a7d\\u0338","nless":"\\u226e","nLl":"\\u22d8\\u0338","nlsim":"\\u2274","nLt":"\\u226a\\u20d2","nlt":"\\u226e","nltri":"\\u22ea","nltrie":"\\u22ec","nLtv":"\\u226a\\u0338","nmid":"\\u2224","NoBreak":"\\u2060","NonBreakingSpace":"\\xa0","nopf":"\\ud835\\udd5f","Nopf":"\\u2115","Not":"\\u2aec","not":"\\xac","NotCongruent":"\\u2262","NotCupCap":"\\u226d","NotDoubleVerticalBar":"\\u2226","NotElement":"\\u2209","NotEqual":"\\u2260","NotEqualTilde":"\\u2242\\u0338","NotExists":"\\u2204","NotGreater":"\\u226f","NotGreaterEqual":"\\u2271","NotGreaterFullEqual":"\\u2267\\u0338","NotGreaterGreater":"\\u226b\\u0338","NotGreaterLess":"\\u2279","NotGreaterSlantEqual":"\\u2a7e\\u0338","NotGreaterTilde":"\\u2275","NotHumpDownHump":"\\u224e\\u0338","NotHumpEqual":"\\u224f\\u0338","notin":"\\u2209","notindot":"\\u22f5\\u0338","notinE":"\\u22f9\\u0338","notinva":"\\u2209","notinvb":"\\u22f7","notinvc":"\\u22f6","NotLeftTriangleBar":"\\u29cf\\u0338","NotLeftTriangle":"\\u22ea","NotLeftTriangleEqual":"\\u22ec","NotLess":"\\u226e","NotLessEqual":"\\u2270","NotLessGreater":"\\u2278","NotLessLess":"\\u226a\\u0338","NotLessSlantEqual":"\\u2a7d\\u0338","NotLessTilde":"\\u2274","NotNestedGreaterGreater":"\\u2aa2\\u0338","NotNestedLessLess":"\\u2aa1\\u0338","notni":"\\u220c","notniva":"\\u220c","notnivb":"\\u22fe","notnivc":"\\u22fd","NotPrecedes":"\\u2280","NotPrecedesEqual":"\\u2aaf\\u0338","NotPrecedesSlantEqual":"\\u22e0","NotReverseElement":"\\u220c","NotRightTriangleBar":"\\u29d0\\u0338","NotRightTriangle":"\\u22eb","NotRightTriangleEqual":"\\u22ed","NotSquareSubset":"\\u228f\\u0338","NotSquareSubsetEqual":"\\u22e2","NotSquareSuperset":"\\u2290\\u0338","NotSquareSupersetEqual":"\\u22e3","NotSubset":"\\u2282\\u20d2","NotSubsetEqual":"\\u2288","NotSucceeds":"\\u2281","NotSucceedsEqual":"\\u2ab0\\u0338","NotSucceedsSlantEqual":"\\u22e1","NotSucceedsTilde":"\\u227f\\u0338","NotSuperset":"\\u2283\\u20d2","NotSupersetEqual":"\\u2289","NotTilde":"\\u2241","NotTildeEqual":"\\u2244","NotTildeFullEqual":"\\u2247","NotTildeTilde":"\\u2249","NotVerticalBar":"\\u2224","nparallel":"\\u2226","npar":"\\u2226","nparsl":"\\u2afd\\u20e5","npart":"\\u2202\\u0338","npolint":"\\u2a14","npr":"\\u2280","nprcue":"\\u22e0","nprec":"\\u2280","npreceq":"\\u2aaf\\u0338","npre":"\\u2aaf\\u0338","nrarrc":"\\u2933\\u0338","nrarr":"\\u219b","nrArr":"\\u21cf","nrarrw":"\\u219d\\u0338","nrightarrow":"\\u219b","nRightarrow":"\\u21cf","nrtri":"\\u22eb","nrtrie":"\\u22ed","nsc":"\\u2281","nsccue":"\\u22e1","nsce":"\\u2ab0\\u0338","Nscr":"\\ud835\\udca9","nscr":"\\ud835\\udcc3","nshortmid":"\\u2224","nshortparallel":"\\u2226","nsim":"\\u2241","nsime":"\\u2244","nsimeq":"\\u2244","nsmid":"\\u2224","nspar":"\\u2226","nsqsube":"\\u22e2","nsqsupe":"\\u22e3","nsub":"\\u2284","nsubE":"\\u2ac5\\u0338","nsube":"\\u2288","nsubset":"\\u2282\\u20d2","nsubseteq":"\\u2288","nsubseteqq":"\\u2ac5\\u0338","nsucc":"\\u2281","nsucceq":"\\u2ab0\\u0338","nsup":"\\u2285","nsupE":"\\u2ac6\\u0338","nsupe":"\\u2289","nsupset":"\\u2283\\u20d2","nsupseteq":"\\u2289","nsupseteqq":"\\u2ac6\\u0338","ntgl":"\\u2279","Ntilde":"\\xd1","ntilde":"\\xf1","ntlg":"\\u2278","ntriangleleft":"\\u22ea","ntrianglelefteq":"\\u22ec","ntriangleright":"\\u22eb","ntrianglerighteq":"\\u22ed","Nu":"\\u039d","nu":"\\u03bd","num":"#","numero":"\\u2116","numsp":"\\u2007","nvap":"\\u224d\\u20d2","nvdash":"\\u22ac","nvDash":"\\u22ad","nVdash":"\\u22ae","nVDash":"\\u22af","nvge":"\\u2265\\u20d2","nvgt":">\\u20d2","nvHarr":"\\u2904","nvinfin":"\\u29de","nvlArr":"\\u2902","nvle":"\\u2264\\u20d2","nvlt":"<\\u20d2","nvltrie":"\\u22b4\\u20d2","nvrArr":"\\u2903","nvrtrie":"\\u22b5\\u20d2","nvsim":"\\u223c\\u20d2","nwarhk":"\\u2923","nwarr":"\\u2196","nwArr":"\\u21d6","nwarrow":"\\u2196","nwnear":"\\u2927","Oacute":"\\xd3","oacute":"\\xf3","oast":"\\u229b","Ocirc":"\\xd4","ocirc":"\\xf4","ocir":"\\u229a","Ocy":"\\u041e","ocy":"\\u043e","odash":"\\u229d","Odblac":"\\u0150","odblac":"\\u0151","odiv":"\\u2a38","odot":"\\u2299","odsold":"\\u29bc","OElig":"\\u0152","oelig":"\\u0153","ofcir":"\\u29bf","Ofr":"\\ud835\\udd12","ofr":"\\ud835\\udd2c","ogon":"\\u02db","Ograve":"\\xd2","ograve":"\\xf2","ogt":"\\u29c1","ohbar":"\\u29b5","ohm":"\\u03a9","oint":"\\u222e","olarr":"\\u21ba","olcir":"\\u29be","olcross":"\\u29bb","oline":"\\u203e","olt":"\\u29c0","Omacr":"\\u014c","omacr":"\\u014d","Omega":"\\u03a9","omega":"\\u03c9","Omicron":"\\u039f","omicron":"\\u03bf","omid":"\\u29b6","ominus":"\\u2296","Oopf":"\\ud835\\udd46","oopf":"\\ud835\\udd60","opar":"\\u29b7","OpenCurlyDoubleQuote":"\\u201c","OpenCurlyQuote":"\\u2018","operp":"\\u29b9","oplus":"\\u2295","orarr":"\\u21bb","Or":"\\u2a54","or":"\\u2228","ord":"\\u2a5d","order":"\\u2134","orderof":"\\u2134","ordf":"\\xaa","ordm":"\\xba","origof":"\\u22b6","oror":"\\u2a56","orslope":"\\u2a57","orv":"\\u2a5b","oS":"\\u24c8","Oscr":"\\ud835\\udcaa","oscr":"\\u2134","Oslash":"\\xd8","oslash":"\\xf8","osol":"\\u2298","Otilde":"\\xd5","otilde":"\\xf5","otimesas":"\\u2a36","Otimes":"\\u2a37","otimes":"\\u2297","Ouml":"\\xd6","ouml":"\\xf6","ovbar":"\\u233d","OverBar":"\\u203e","OverBrace":"\\u23de","OverBracket":"\\u23b4","OverParenthesis":"\\u23dc","para":"\\xb6","parallel":"\\u2225","par":"\\u2225","parsim":"\\u2af3","parsl":"\\u2afd","part":"\\u2202","PartialD":"\\u2202","Pcy":"\\u041f","pcy":"\\u043f","percnt":"%","period":".","permil":"\\u2030","perp":"\\u22a5","pertenk":"\\u2031","Pfr":"\\ud835\\udd13","pfr":"\\ud835\\udd2d","Phi":"\\u03a6","phi":"\\u03c6","phiv":"\\u03d5","phmmat":"\\u2133","phone":"\\u260e","Pi":"\\u03a0","pi":"\\u03c0","pitchfork":"\\u22d4","piv":"\\u03d6","planck":"\\u210f","planckh":"\\u210e","plankv":"\\u210f","plusacir":"\\u2a23","plusb":"\\u229e","pluscir":"\\u2a22","plus":"+","plusdo":"\\u2214","plusdu":"\\u2a25","pluse":"\\u2a72","PlusMinus":"\\xb1","plusmn":"\\xb1","plussim":"\\u2a26","plustwo":"\\u2a27","pm":"\\xb1","Poincareplane":"\\u210c","pointint":"\\u2a15","popf":"\\ud835\\udd61","Popf":"\\u2119","pound":"\\xa3","prap":"\\u2ab7","Pr":"\\u2abb","pr":"\\u227a","prcue":"\\u227c","precapprox":"\\u2ab7","prec":"\\u227a","preccurlyeq":"\\u227c","Precedes":"\\u227a","PrecedesEqual":"\\u2aaf","PrecedesSlantEqual":"\\u227c","PrecedesTilde":"\\u227e","preceq":"\\u2aaf","precnapprox":"\\u2ab9","precneqq":"\\u2ab5","precnsim":"\\u22e8","pre":"\\u2aaf","prE":"\\u2ab3","precsim":"\\u227e","prime":"\\u2032","Prime":"\\u2033","primes":"\\u2119","prnap":"\\u2ab9","prnE":"\\u2ab5","prnsim":"\\u22e8","prod":"\\u220f","Product":"\\u220f","profalar":"\\u232e","profline":"\\u2312","profsurf":"\\u2313","prop":"\\u221d","Proportional":"\\u221d","Proportion":"\\u2237","propto":"\\u221d","prsim":"\\u227e","prurel":"\\u22b0","Pscr":"\\ud835\\udcab","pscr":"\\ud835\\udcc5","Psi":"\\u03a8","psi":"\\u03c8","puncsp":"\\u2008","Qfr":"\\ud835\\udd14","qfr":"\\ud835\\udd2e","qint":"\\u2a0c","qopf":"\\ud835\\udd62","Qopf":"\\u211a","qprime":"\\u2057","Qscr":"\\ud835\\udcac","qscr":"\\ud835\\udcc6","quaternions":"\\u210d","quatint":"\\u2a16","quest":"?","questeq":"\\u225f","quot":"\\\\"","QUOT":"\\\\"","rAarr":"\\u21db","race":"\\u223d\\u0331","Racute":"\\u0154","racute":"\\u0155","radic":"\\u221a","raemptyv":"\\u29b3","rang":"\\u27e9","Rang":"\\u27eb","rangd":"\\u2992","range":"\\u29a5","rangle":"\\u27e9","raquo":"\\xbb","rarrap":"\\u2975","rarrb":"\\u21e5","rarrbfs":"\\u2920","rarrc":"\\u2933","rarr":"\\u2192","Rarr":"\\u21a0","rArr":"\\u21d2","rarrfs":"\\u291e","rarrhk":"\\u21aa","rarrlp":"\\u21ac","rarrpl":"\\u2945","rarrsim":"\\u2974","Rarrtl":"\\u2916","rarrtl":"\\u21a3","rarrw":"\\u219d","ratail":"\\u291a","rAtail":"\\u291c","ratio":"\\u2236","rationals":"\\u211a","rbarr":"\\u290d","rBarr":"\\u290f","RBarr":"\\u2910","rbbrk":"\\u2773","rbrace":"}","rbrack":"]","rbrke":"\\u298c","rbrksld":"\\u298e","rbrkslu":"\\u2990","Rcaron":"\\u0158","rcaron":"\\u0159","Rcedil":"\\u0156","rcedil":"\\u0157","rceil":"\\u2309","rcub":"}","Rcy":"\\u0420","rcy":"\\u0440","rdca":"\\u2937","rdldhar":"\\u2969","rdquo":"\\u201d","rdquor":"\\u201d","rdsh":"\\u21b3","real":"\\u211c","realine":"\\u211b","realpart":"\\u211c","reals":"\\u211d","Re":"\\u211c","rect":"\\u25ad","reg":"\\xae","REG":"\\xae","ReverseElement":"\\u220b","ReverseEquilibrium":"\\u21cb","ReverseUpEquilibrium":"\\u296f","rfisht":"\\u297d","rfloor":"\\u230b","rfr":"\\ud835\\udd2f","Rfr":"\\u211c","rHar":"\\u2964","rhard":"\\u21c1","rharu":"\\u21c0","rharul":"\\u296c","Rho":"\\u03a1","rho":"\\u03c1","rhov":"\\u03f1","RightAngleBracket":"\\u27e9","RightArrowBar":"\\u21e5","rightarrow":"\\u2192","RightArrow":"\\u2192","Rightarrow":"\\u21d2","RightArrowLeftArrow":"\\u21c4","rightarrowtail":"\\u21a3","RightCeiling":"\\u2309","RightDoubleBracket":"\\u27e7","RightDownTeeVector":"\\u295d","RightDownVectorBar":"\\u2955","RightDownVector":"\\u21c2","RightFloor":"\\u230b","rightharpoondown":"\\u21c1","rightharpoonup":"\\u21c0","rightleftarrows":"\\u21c4","rightleftharpoons":"\\u21cc","rightrightarrows":"\\u21c9","rightsquigarrow":"\\u219d","RightTeeArrow":"\\u21a6","RightTee":"\\u22a2","RightTeeVector":"\\u295b","rightthreetimes":"\\u22cc","RightTriangleBar":"\\u29d0","RightTriangle":"\\u22b3","RightTriangleEqual":"\\u22b5","RightUpDownVector":"\\u294f","RightUpTeeVector":"\\u295c","RightUpVectorBar":"\\u2954","RightUpVector":"\\u21be","RightVectorBar":"\\u2953","RightVector":"\\u21c0","ring":"\\u02da","risingdotseq":"\\u2253","rlarr":"\\u21c4","rlhar":"\\u21cc","rlm":"\\u200f","rmoustache":"\\u23b1","rmoust":"\\u23b1","rnmid":"\\u2aee","roang":"\\u27ed","roarr":"\\u21fe","robrk":"\\u27e7","ropar":"\\u2986","ropf":"\\ud835\\udd63","Ropf":"\\u211d","roplus":"\\u2a2e","rotimes":"\\u2a35","RoundImplies":"\\u2970","rpar":")","rpargt":"\\u2994","rppolint":"\\u2a12","rrarr":"\\u21c9","Rrightarrow":"\\u21db","rsaquo":"\\u203a","rscr":"\\ud835\\udcc7","Rscr":"\\u211b","rsh":"\\u21b1","Rsh":"\\u21b1","rsqb":"]","rsquo":"\\u2019","rsquor":"\\u2019","rthree":"\\u22cc","rtimes":"\\u22ca","rtri":"\\u25b9","rtrie":"\\u22b5","rtrif":"\\u25b8","rtriltri":"\\u29ce","RuleDelayed":"\\u29f4","ruluhar":"\\u2968","rx":"\\u211e","Sacute":"\\u015a","sacute":"\\u015b","sbquo":"\\u201a","scap":"\\u2ab8","Scaron":"\\u0160","scaron":"\\u0161","Sc":"\\u2abc","sc":"\\u227b","sccue":"\\u227d","sce":"\\u2ab0","scE":"\\u2ab4","Scedil":"\\u015e","scedil":"\\u015f","Scirc":"\\u015c","scirc":"\\u015d","scnap":"\\u2aba","scnE":"\\u2ab6","scnsim":"\\u22e9","scpolint":"\\u2a13","scsim":"\\u227f","Scy":"\\u0421","scy":"\\u0441","sdotb":"\\u22a1","sdot":"\\u22c5","sdote":"\\u2a66","searhk":"\\u2925","searr":"\\u2198","seArr":"\\u21d8","searrow":"\\u2198","sect":"\\xa7","semi":";","seswar":"\\u2929","setminus":"\\u2216","setmn":"\\u2216","sext":"\\u2736","Sfr":"\\ud835\\udd16","sfr":"\\ud835\\udd30","sfrown":"\\u2322","sharp":"\\u266f","SHCHcy":"\\u0429","shchcy":"\\u0449","SHcy":"\\u0428","shcy":"\\u0448","ShortDownArrow":"\\u2193","ShortLeftArrow":"\\u2190","shortmid":"\\u2223","shortparallel":"\\u2225","ShortRightArrow":"\\u2192","ShortUpArrow":"\\u2191","shy":"\\xad","Sigma":"\\u03a3","sigma":"\\u03c3","sigmaf":"\\u03c2","sigmav":"\\u03c2","sim":"\\u223c","simdot":"\\u2a6a","sime":"\\u2243","simeq":"\\u2243","simg":"\\u2a9e","simgE":"\\u2aa0","siml":"\\u2a9d","simlE":"\\u2a9f","simne":"\\u2246","simplus":"\\u2a24","simrarr":"\\u2972","slarr":"\\u2190","SmallCircle":"\\u2218","smallsetminus":"\\u2216","smashp":"\\u2a33","smeparsl":"\\u29e4","smid":"\\u2223","smile":"\\u2323","smt":"\\u2aaa","smte":"\\u2aac","smtes":"\\u2aac\\ufe00","SOFTcy":"\\u042c","softcy":"\\u044c","solbar":"\\u233f","solb":"\\u29c4","sol":"/","Sopf":"\\ud835\\udd4a","sopf":"\\ud835\\udd64","spades":"\\u2660","spadesuit":"\\u2660","spar":"\\u2225","sqcap":"\\u2293","sqcaps":"\\u2293\\ufe00","sqcup":"\\u2294","sqcups":"\\u2294\\ufe00","Sqrt":"\\u221a","sqsub":"\\u228f","sqsube":"\\u2291","sqsubset":"\\u228f","sqsubseteq":"\\u2291","sqsup":"\\u2290","sqsupe":"\\u2292","sqsupset":"\\u2290","sqsupseteq":"\\u2292","square":"\\u25a1","Square":"\\u25a1","SquareIntersection":"\\u2293","SquareSubset":"\\u228f","SquareSubsetEqual":"\\u2291","SquareSuperset":"\\u2290","SquareSupersetEqual":"\\u2292","SquareUnion":"\\u2294","squarf":"\\u25aa","squ":"\\u25a1","squf":"\\u25aa","srarr":"\\u2192","Sscr":"\\ud835\\udcae","sscr":"\\ud835\\udcc8","ssetmn":"\\u2216","ssmile":"\\u2323","sstarf":"\\u22c6","Star":"\\u22c6","star":"\\u2606","starf":"\\u2605","straightepsilon":"\\u03f5","straightphi":"\\u03d5","strns":"\\xaf","sub":"\\u2282","Sub":"\\u22d0","subdot":"\\u2abd","subE":"\\u2ac5","sube":"\\u2286","subedot":"\\u2ac3","submult":"\\u2ac1","subnE":"\\u2acb","subne":"\\u228a","subplus":"\\u2abf","subrarr":"\\u2979","subset":"\\u2282","Subset":"\\u22d0","subseteq":"\\u2286","subseteqq":"\\u2ac5","SubsetEqual":"\\u2286","subsetneq":"\\u228a","subsetneqq":"\\u2acb","subsim":"\\u2ac7","subsub":"\\u2ad5","subsup":"\\u2ad3","succapprox":"\\u2ab8","succ":"\\u227b","succcurlyeq":"\\u227d","Succeeds":"\\u227b","SucceedsEqual":"\\u2ab0","SucceedsSlantEqual":"\\u227d","SucceedsTilde":"\\u227f","succeq":"\\u2ab0","succnapprox":"\\u2aba","succneqq":"\\u2ab6","succnsim":"\\u22e9","succsim":"\\u227f","SuchThat":"\\u220b","sum":"\\u2211","Sum":"\\u2211","sung":"\\u266a","sup1":"\\xb9","sup2":"\\xb2","sup3":"\\xb3","sup":"\\u2283","Sup":"\\u22d1","supdot":"\\u2abe","supdsub":"\\u2ad8","supE":"\\u2ac6","supe":"\\u2287","supedot":"\\u2ac4","Superset":"\\u2283","SupersetEqual":"\\u2287","suphsol":"\\u27c9","suphsub":"\\u2ad7","suplarr":"\\u297b","supmult":"\\u2ac2","supnE":"\\u2acc","supne":"\\u228b","supplus":"\\u2ac0","supset":"\\u2283","Supset":"\\u22d1","supseteq":"\\u2287","supseteqq":"\\u2ac6","supsetneq":"\\u228b","supsetneqq":"\\u2acc","supsim":"\\u2ac8","supsub":"\\u2ad4","supsup":"\\u2ad6","swarhk":"\\u2926","swarr":"\\u2199","swArr":"\\u21d9","swarrow":"\\u2199","swnwar":"\\u292a","szlig":"\\xdf","Tab":"\\\\t","target":"\\u2316","Tau":"\\u03a4","tau":"\\u03c4","tbrk":"\\u23b4","Tcaron":"\\u0164","tcaron":"\\u0165","Tcedil":"\\u0162","tcedil":"\\u0163","Tcy":"\\u0422","tcy":"\\u0442","tdot":"\\u20db","telrec":"\\u2315","Tfr":"\\ud835\\udd17","tfr":"\\ud835\\udd31","there4":"\\u2234","therefore":"\\u2234","Therefore":"\\u2234","Theta":"\\u0398","theta":"\\u03b8","thetasym":"\\u03d1","thetav":"\\u03d1","thickapprox":"\\u2248","thicksim":"\\u223c","ThickSpace":"\\u205f\\u200a","ThinSpace":"\\u2009","thinsp":"\\u2009","thkap":"\\u2248","thksim":"\\u223c","THORN":"\\xde","thorn":"\\xfe","tilde":"\\u02dc","Tilde":"\\u223c","TildeEqual":"\\u2243","TildeFullEqual":"\\u2245","TildeTilde":"\\u2248","timesbar":"\\u2a31","timesb":"\\u22a0","times":"\\xd7","timesd":"\\u2a30","tint":"\\u222d","toea":"\\u2928","topbot":"\\u2336","topcir":"\\u2af1","top":"\\u22a4","Topf":"\\ud835\\udd4b","topf":"\\ud835\\udd65","topfork":"\\u2ada","tosa":"\\u2929","tprime":"\\u2034","trade":"\\u2122","TRADE":"\\u2122","triangle":"\\u25b5","triangledown":"\\u25bf","triangleleft":"\\u25c3","trianglelefteq":"\\u22b4","triangleq":"\\u225c","triangleright":"\\u25b9","trianglerighteq":"\\u22b5","tridot":"\\u25ec","trie":"\\u225c","triminus":"\\u2a3a","TripleDot":"\\u20db","triplus":"\\u2a39","trisb":"\\u29cd","tritime":"\\u2a3b","trpezium":"\\u23e2","Tscr":"\\ud835\\udcaf","tscr":"\\ud835\\udcc9","TScy":"\\u0426","tscy":"\\u0446","TSHcy":"\\u040b","tshcy":"\\u045b","Tstrok":"\\u0166","tstrok":"\\u0167","twixt":"\\u226c","twoheadleftarrow":"\\u219e","twoheadrightarrow":"\\u21a0","Uacute":"\\xda","uacute":"\\xfa","uarr":"\\u2191","Uarr":"\\u219f","uArr":"\\u21d1","Uarrocir":"\\u2949","Ubrcy":"\\u040e","ubrcy":"\\u045e","Ubreve":"\\u016c","ubreve":"\\u016d","Ucirc":"\\xdb","ucirc":"\\xfb","Ucy":"\\u0423","ucy":"\\u0443","udarr":"\\u21c5","Udblac":"\\u0170","udblac":"\\u0171","udhar":"\\u296e","ufisht":"\\u297e","Ufr":"\\ud835\\udd18","ufr":"\\ud835\\udd32","Ugrave":"\\xd9","ugrave":"\\xf9","uHar":"\\u2963","uharl":"\\u21bf","uharr":"\\u21be","uhblk":"\\u2580","ulcorn":"\\u231c","ulcorner":"\\u231c","ulcrop":"\\u230f","ultri":"\\u25f8","Umacr":"\\u016a","umacr":"\\u016b","uml":"\\xa8","UnderBar":"_","UnderBrace":"\\u23df","UnderBracket":"\\u23b5","UnderParenthesis":"\\u23dd","Union":"\\u22c3","UnionPlus":"\\u228e","Uogon":"\\u0172","uogon":"\\u0173","Uopf":"\\ud835\\udd4c","uopf":"\\ud835\\udd66","UpArrowBar":"\\u2912","uparrow":"\\u2191","UpArrow":"\\u2191","Uparrow":"\\u21d1","UpArrowDownArrow":"\\u21c5","updownarrow":"\\u2195","UpDownArrow":"\\u2195","Updownarrow":"\\u21d5","UpEquilibrium":"\\u296e","upharpoonleft":"\\u21bf","upharpoonright":"\\u21be","uplus":"\\u228e","UpperLeftArrow":"\\u2196","UpperRightArrow":"\\u2197","upsi":"\\u03c5","Upsi":"\\u03d2","upsih":"\\u03d2","Upsilon":"\\u03a5","upsilon":"\\u03c5","UpTeeArrow":"\\u21a5","UpTee":"\\u22a5","upuparrows":"\\u21c8","urcorn":"\\u231d","urcorner":"\\u231d","urcrop":"\\u230e","Uring":"\\u016e","uring":"\\u016f","urtri":"\\u25f9","Uscr":"\\ud835\\udcb0","uscr":"\\ud835\\udcca","utdot":"\\u22f0","Utilde":"\\u0168","utilde":"\\u0169","utri":"\\u25b5","utrif":"\\u25b4","uuarr":"\\u21c8","Uuml":"\\xdc","uuml":"\\xfc","uwangle":"\\u29a7","vangrt":"\\u299c","varepsilon":"\\u03f5","varkappa":"\\u03f0","varnothing":"\\u2205","varphi":"\\u03d5","varpi":"\\u03d6","varpropto":"\\u221d","varr":"\\u2195","vArr":"\\u21d5","varrho":"\\u03f1","varsigma":"\\u03c2","varsubsetneq":"\\u228a\\ufe00","varsubsetneqq":"\\u2acb\\ufe00","varsupsetneq":"\\u228b\\ufe00","varsupsetneqq":"\\u2acc\\ufe00","vartheta":"\\u03d1","vartriangleleft":"\\u22b2","vartriangleright":"\\u22b3","vBar":"\\u2ae8","Vbar":"\\u2aeb","vBarv":"\\u2ae9","Vcy":"\\u0412","vcy":"\\u0432","vdash":"\\u22a2","vDash":"\\u22a8","Vdash":"\\u22a9","VDash":"\\u22ab","Vdashl":"\\u2ae6","veebar":"\\u22bb","vee":"\\u2228","Vee":"\\u22c1","veeeq":"\\u225a","vellip":"\\u22ee","verbar":"|","Verbar":"\\u2016","vert":"|","Vert":"\\u2016","VerticalBar":"\\u2223","VerticalLine":"|","VerticalSeparator":"\\u2758","VerticalTilde":"\\u2240","VeryThinSpace":"\\u200a","Vfr":"\\ud835\\udd19","vfr":"\\ud835\\udd33","vltri":"\\u22b2","vnsub":"\\u2282\\u20d2","vnsup":"\\u2283\\u20d2","Vopf":"\\ud835\\udd4d","vopf":"\\ud835\\udd67","vprop":"\\u221d","vrtri":"\\u22b3","Vscr":"\\ud835\\udcb1","vscr":"\\ud835\\udccb","vsubnE":"\\u2acb\\ufe00","vsubne":"\\u228a\\ufe00","vsupnE":"\\u2acc\\ufe00","vsupne":"\\u228b\\ufe00","Vvdash":"\\u22aa","vzigzag":"\\u299a","Wcirc":"\\u0174","wcirc":"\\u0175","wedbar":"\\u2a5f","wedge":"\\u2227","Wedge":"\\u22c0","wedgeq":"\\u2259","weierp":"\\u2118","Wfr":"\\ud835\\udd1a","wfr":"\\ud835\\udd34","Wopf":"\\ud835\\udd4e","wopf":"\\ud835\\udd68","wp":"\\u2118","wr":"\\u2240","wreath":"\\u2240","Wscr":"\\ud835\\udcb2","wscr":"\\ud835\\udccc","xcap":"\\u22c2","xcirc":"\\u25ef","xcup":"\\u22c3","xdtri":"\\u25bd","Xfr":"\\ud835\\udd1b","xfr":"\\ud835\\udd35","xharr":"\\u27f7","xhArr":"\\u27fa","Xi":"\\u039e","xi":"\\u03be","xlarr":"\\u27f5","xlArr":"\\u27f8","xmap":"\\u27fc","xnis":"\\u22fb","xodot":"\\u2a00","Xopf":"\\ud835\\udd4f","xopf":"\\ud835\\udd69","xoplus":"\\u2a01","xotime":"\\u2a02","xrarr":"\\u27f6","xrArr":"\\u27f9","Xscr":"\\ud835\\udcb3","xscr":"\\ud835\\udccd","xsqcup":"\\u2a06","xuplus":"\\u2a04","xutri":"\\u25b3","xvee":"\\u22c1","xwedge":"\\u22c0","Yacute":"\\xdd","yacute":"\\xfd","YAcy":"\\u042f","yacy":"\\u044f","Ycirc":"\\u0176","ycirc":"\\u0177","Ycy":"\\u042b","ycy":"\\u044b","yen":"\\xa5","Yfr":"\\ud835\\udd1c","yfr":"\\ud835\\udd36","YIcy":"\\u0407","yicy":"\\u0457","Yopf":"\\ud835\\udd50","yopf":"\\ud835\\udd6a","Yscr":"\\ud835\\udcb4","yscr":"\\ud835\\udcce","YUcy":"\\u042e","yucy":"\\u044e","yuml":"\\xff","Yuml":"\\u0178","Zacute":"\\u0179","zacute":"\\u017a","Zcaron":"\\u017d","zcaron":"\\u017e","Zcy":"\\u0417","zcy":"\\u0437","Zdot":"\\u017b","zdot":"\\u017c","zeetrf":"\\u2128","ZeroWidthSpace":"\\u200b","Zeta":"\\u0396","zeta":"\\u03b6","zfr":"\\ud835\\udd37","Zfr":"\\u2128","ZHcy":"\\u0416","zhcy":"\\u0436","zigrarr":"\\u21dd","zopf":"\\ud835\\udd6b","Zopf":"\\u2124","Zscr":"\\ud835\\udcb5","zscr":"\\ud835\\udccf","zwj":"\\u200d","zwnj":"\\u200c"}\')},function(e){e.exports=JSON.parse(\'{"amp":"&","apos":"\\\'","gt":">","lt":"<","quot":"\\\\""}\')},function(e,t,i){"use strict";var r=i(4),n=i(0),s=i(2),a=i(1);t.a=class{constructor(e,t){this.parser=e;let i=this.parser.collectParts(t.element);i=this.parser.removeNestedParts(i);i=this.parser.encloseInlineParts(i,t.element);i=this.parser.filterParts(i,t.element);i.reverse();i=this.parser.replaceListsWithItems(i,t.element);i=this.parser.wrapNumberedList(i,t.element);this.id=n.a.comments.length;this.date=t.date||null;this.timestamp=t.timestampText;this.authorName=t.authorName;this.signatureElement=t.element;this.timestampElement=t.timestampElement;this.authorLink=t.authorLink;this.authorTalkLink=t.authorTalkLink;this.isOwn=this.authorName===n.a.g.USER_NAME;this.anchor=t.anchor;this.isUnsigned=t.isUnsigned;this.parts=i;this.elements=this.parts.map(e=>e.node);this.highlightables=this.elements.filter(e=>!/^(H[1-6]|STYLE|LINK)$/.test(e.tagName)&&!n.a.g.UNHIGHLIGHTABLE_ELEMENT_CLASSES.some(t=>e.classList.contains(t))&&!/float: *(?:left|right)|display: *none/.test(e.getAttribute("style")));if(!this.highlightables.length)throw new r.a;this.wrapHighlightables();this.setLevels();this.followsHeading=!1;if(this.parts[0].isHeading&&0!==this.level){this.parts.shift();this.elements.shift()}if(this.parts[0].isHeading){this.isOpeningSection=!0;const e=this.parts[0].node.tagName.match(/^H([1-6])$/);this.openingSectionOfLevel=e&&Number(e[1])}else this.isOpeningSection=!1;this.addAttributes();this.section=null;this.isOutdented=!1}wrapHighlightables(){[this.highlightables[0],this.highlightables[this.highlightables.length-1]].filter(a.k).filter(e=>n.a.g.BAD_HIGHLIGHTABLE_ELEMENTS.includes(e.tagName)||this.highlightables.length>1&&"LI"===e.tagName&&"OL"===e.parentNode.tagName||e.className||e.getAttribute("style")).forEach(e=>{const t=this.parser.context.document.createElement("div");t.className="cd-comment-replacedPart";e.parentNode.insertBefore(t,e);this.elements.splice(this.elements.indexOf(e),1,t);this.highlightables.splice(this.highlightables.indexOf(e),1,t);t.appendChild(e)})}addAttributes(){this.elements.forEach(e=>{e.classList.add("cd-comment-part");e.setAttribute("data-comment-id",String(this.id))});this.highlightables[0].classList.add("cd-comment-part-first");this.highlightables[this.highlightables.length-1].classList.add("cd-comment-part-last")}setLevels(){const e=this.highlightables.map(this.parser.getListsUpTree.bind(this.parser));this.level=Math.min(e[0].length,e[e.length-1].length);this.logicalLevel=this.level;if(this.level&&this.elements.length>2){const e=this.elements.map(this.parser.getListsUpTree.bind(this.parser)),t=[];e.forEach((e,i)=>{if(!e.length)t.push(i)});t.forEach(t=>{const i=e.slice(0,t).reverse().find(e=>e.length).slice(-1)[0];if(i){const e="DL"===i.tagName?"dd":"li",r=this.parser.context.document.createElement(e);r.appendChild(this.elements[t]);i.appendChild(r)}})}for(let t=0;t{var i;null===(i=e[t])||void 0===i||i.classList.add("cd-commentLevel","cd-commentLevel-"+(t+1))})}getParent(e=!1){const t=e?"level":"logicalLevel";if(void 0===this.cachedParent)this.cachedParent={};if(void 0===this.cachedParent[t]){this.cachedParent[t]=null;if(0!==this[t])for(let e=this.id-1;e>=0;e--){const i=n.a.comments[e];if(i.section===this.section&&i[t]{if(t.section===this.section&&t[r]>this[r]){if(t[r]===this[r]+1||t.getParent()===this||e)i.push(t);return!1}else return!0});return i}static processOutdents(){if(n.a.g.pageHasOutdents)Array.from(n.a.g.rootElement.getElementsByClassName(n.a.config.outdentClass)).reverse().forEach(e=>{const t=new s.b(e);for(;t.nextNode();){let e=Number(t.currentNode.getAttribute("data-comment-id"));if(0!==e){const t=n.a.comments[e-1],i=n.a.comments[e],r=i.level;if(i.date{if(e.section!==t.section||e.logicalLevel0&&o[e].has(r=this.stack[this.stack.length-1]);)this.onclosetag(r);if(this.options.xmlMode||!l.has(e)){this.stack.push(e);if(c.has(e))this.foreignContext.push(!0);else if(u.has(e))this.foreignContext.push(!1)}null===(i=(t=this.cbs).onopentagname)||void 0===i||i.call(t,e);if(this.cbs.onopentag)this.attribs={}};e.prototype.onopentagend=function(){var e,t;this.updatePosition(1);if(this.attribs){null===(t=(e=this.cbs).onopentag)||void 0===t||t.call(e,this.tagname,this.attribs);this.attribs=null}if(!this.options.xmlMode&&this.cbs.onclosetag&&l.has(this.tagname))this.cbs.onclosetag(this.tagname);this.tagname=""};e.prototype.onclosetag=function(e){this.updatePosition(1);if(this.lowerCaseTagNames)e=e.toLowerCase();if(c.has(e)||u.has(e))this.foreignContext.pop();if(this.stack.length&&(this.options.xmlMode||!l.has(e))){var t=this.stack.lastIndexOf(e);if(-1!==t)if(this.cbs.onclosetag){t=this.stack.length-t;for(;t--;)this.cbs.onclosetag(this.stack.pop())}else this.stack.length=t;else if("p"===e&&!this.options.xmlMode){this.onopentagname(e);this.closeCurrentTag()}}else if(!this.options.xmlMode&&("br"===e||"p"===e)){this.onopentagname(e);this.closeCurrentTag()}};e.prototype.onselfclosingtag=function(){if(this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1])this.closeCurrentTag();else this.onopentagend()};e.prototype.closeCurrentTag=function(){var e,t,i=this.tagname;this.onopentagend();if(this.stack[this.stack.length-1]===i){null===(t=(e=this.cbs).onclosetag)||void 0===t||t.call(e,i);this.stack.pop()}};e.prototype.onattribname=function(e){if(this.lowerCaseAttributeNames)e=e.toLowerCase();this.attribname=e};e.prototype.onattribdata=function(e){this.attribvalue+=e};e.prototype.onattribend=function(e){var t,i;null===(i=(t=this.cbs).onattribute)||void 0===i||i.call(t,this.attribname,this.attribvalue,e);if(this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname))this.attribs[this.attribname]=this.attribvalue;this.attribname="";this.attribvalue=""};e.prototype.getInstructionName=function(e){var t=e.search(d),i=t<0?e:e.substr(0,t);if(this.lowerCaseTagNames)i=i.toLowerCase();return i};e.prototype.ondeclaration=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("!"+t,"!"+e)}};e.prototype.onprocessinginstruction=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("?"+t,"?"+e)}};e.prototype.oncomment=function(e){var t,i,r,n;this.updatePosition(4);null===(i=(t=this.cbs).oncomment)||void 0===i||i.call(t,e);null===(n=(r=this.cbs).oncommentend)||void 0===n||n.call(r)};e.prototype.oncdata=function(e){var t,i,r,n,s,a;this.updatePosition(1);if(this.options.xmlMode||this.options.recognizeCDATA){null===(i=(t=this.cbs).oncdatastart)||void 0===i||i.call(t);null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,e);null===(a=(s=this.cbs).oncdataend)||void 0===a||a.call(s)}else this.oncomment("[CDATA["+e+"]]")};e.prototype.onerror=function(e){var t,i;null===(i=(t=this.cbs).onerror)||void 0===i||i.call(t,e)};e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag)for(var i=this.stack.length;i>0;this.cbs.onclosetag(this.stack[--i]));null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)};e.prototype.reset=function(){var e,t,i,r;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e);this.tokenizer.reset();this.tagname="";this.attribname="";this.attribs=null;this.stack=[];null===(r=(i=this.cbs).onparserinit)||void 0===r||r.call(i,this)};e.prototype.parseComplete=function(e){this.reset();this.end(e)};e.prototype.write=function(e){this.tokenizer.write(e)};e.prototype.end=function(e){this.tokenizer.end(e)};e.prototype.pause=function(){this.tokenizer.pause()};e.prototype.resume=function(){this.tokenizer.resume()};e.prototype.parseChunk=function(e){this.write(e)};e.prototype.done=function(e){this.end(e)};return e}();t.Parser=h},function(e,t,i){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=r(i(14)),s=r(i(9)),a=r(i(15)),o=r(i(10));function l(e){return" "===e||"\\n"===e||"\\t"===e||"\\f"===e||"\\r"===e}function c(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"}function u(e,t,i){var r=e.toLowerCase();if(e===r)return function(e,n){if(n===r)e._state=t;else{e._state=i;e._index--}};else return function(n,s){if(s===r||s===e)n._state=t;else{n._state=i;n._index--}}}function d(e,t){var i=e.toLowerCase();return function(r,n){if(n===i||n===e)r._state=t;else{r._state=3;r._index--}}}var h=u("C",24,16),f=u("D",25,16),p=u("A",26,16),m=u("T",27,16),g=u("A",28,16),b=d("R",35),_=d("I",36),v=d("P",37),y=d("T",38),E=u("R",40,1),T=u("I",41,1),x=u("P",42,1),N=u("T",43,1),S=d("Y",45),C=d("L",46),w=d("E",47),O=u("Y",49,1),D=u("L",50,1),L=u("E",51,1),M=d("I",54),A=d("T",55),P=d("L",56),k=d("E",57),I=u("I",58,1),q=u("T",59,1),U=u("L",60,1),j=u("E",61,1),B=u("#",63,64),R=u("X",66,65),H=function(){function e(e,t){var i;this._state=1;this.buffer="";this.sectionStart=0;this._index=0;this.bufferOffset=0;this.baseState=1;this.special=1;this.running=!0;this.ended=!1;this.cbs=t;this.xmlMode=!!(null==e?void 0:e.xmlMode);this.decodeEntities=null!==(i=null==e?void 0:e.decodeEntities)&&void 0!==i?i:!0}e.prototype.reset=function(){this._state=1;this.buffer="";this.sectionStart=0;this._index=0;this.bufferOffset=0;this.baseState=1;this.special=1;this.running=!0;this.ended=!1};e.prototype.write=function(e){if(this.ended)this.cbs.onerror(Error(".write() after done!"));this.buffer+=e;this.parse()};e.prototype.end=function(e){if(this.ended)this.cbs.onerror(Error(".end() after done!"));if(e)this.write(e);this.ended=!0;if(this.running)this.finish()};e.prototype.pause=function(){this.running=!1};e.prototype.resume=function(){this.running=!0;if(this._indexthis.sectionStart)this.cbs.ontext(this.getSection());this._state=2;this.sectionStart=this._index}else if(this.decodeEntities&&"&"===e&&(1===this.special||4===this.special)){if(this._index>this.sectionStart)this.cbs.ontext(this.getSection());this.baseState=1;this._state=62;this.sectionStart=this._index}};e.prototype.isTagStartChar=function(e){return c(e)||this.xmlMode&&!l(e)&&"/"!==e&&">"!==e};e.prototype.stateBeforeTagName=function(e){if("/"===e)this._state=5;else if("<"===e){this.cbs.ontext(this.getSection());this.sectionStart=this._index}else if(">"===e||1!==this.special||l(e))this._state=1;else if("!"===e){this._state=15;this.sectionStart=this._index+1}else if("?"===e){this._state=17;this.sectionStart=this._index+1}else if(!this.isTagStartChar(e))this._state=1;else{this._state=!this.xmlMode&&("s"===e||"S"===e)?32:!this.xmlMode&&("t"===e||"T"===e)?52:3;this.sectionStart=this._index}};e.prototype.stateInTagName=function(e){if("/"===e||">"===e||l(e)){this.emitToken("onopentagname");this._state=8;this._index--}};e.prototype.stateBeforeClosingTagName=function(e){if(l(e));else if(">"===e)this._state=1;else if(1!==this.special)if(4!==this.special&&("s"===e||"S"===e))this._state=33;else if(4===this.special&&("t"===e||"T"===e))this._state=53;else{this._state=1;this._index--}else if(!this.isTagStartChar(e)){this._state=20;this.sectionStart=this._index}else{this._state=6;this.sectionStart=this._index}};e.prototype.stateInClosingTagName=function(e){if(">"===e||l(e)){this.emitToken("onclosetag");this._state=7;this._index--}};e.prototype.stateAfterClosingTagName=function(e){if(">"===e){this._state=1;this.sectionStart=this._index+1}};e.prototype.stateBeforeAttributeName=function(e){if(">"===e){this.cbs.onopentagend();this._state=1;this.sectionStart=this._index+1}else if("/"===e)this._state=4;else if(!l(e)){this._state=9;this.sectionStart=this._index}};e.prototype.stateInSelfClosingTag=function(e){if(">"===e){this.cbs.onselfclosingtag();this._state=1;this.sectionStart=this._index+1;this.special=1}else if(!l(e)){this._state=8;this._index--}};e.prototype.stateInAttributeName=function(e){if("="===e||"/"===e||">"===e||l(e)){this.cbs.onattribname(this.getSection());this.sectionStart=-1;this._state=10;this._index--}};e.prototype.stateAfterAttributeName=function(e){if("="===e)this._state=11;else if("/"===e||">"===e){this.cbs.onattribend(void 0);this._state=8;this._index--}else if(!l(e)){this.cbs.onattribend(void 0);this._state=9;this.sectionStart=this._index}};e.prototype.stateBeforeAttributeValue=function(e){if(\'"\'===e){this._state=12;this.sectionStart=this._index+1}else if("\'"===e){this._state=13;this.sectionStart=this._index+1}else if(!l(e)){this._state=14;this.sectionStart=this._index;this._index--}};e.prototype.handleInAttributeValue=function(e,t){if(e===t){this.emitToken("onattribdata");this.cbs.onattribend(t);this._state=8}else if(this.decodeEntities&&"&"===e){this.emitToken("onattribdata");this.baseState=this._state;this._state=62;this.sectionStart=this._index}};e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,\'"\')};e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,"\'")};e.prototype.stateInAttributeValueNoQuotes=function(e){if(l(e)||">"===e){this.emitToken("onattribdata");this.cbs.onattribend(null);this._state=8;this._index--}else if(this.decodeEntities&&"&"===e){this.emitToken("onattribdata");this.baseState=this._state;this._state=62;this.sectionStart=this._index}};e.prototype.stateBeforeDeclaration=function(e){this._state="["===e?23:"-"===e?18:16};e.prototype.stateInDeclaration=function(e){if(">"===e){this.cbs.ondeclaration(this.getSection());this._state=1;this.sectionStart=this._index+1}};e.prototype.stateInProcessingInstruction=function(e){if(">"===e){this.cbs.onprocessinginstruction(this.getSection());this._state=1;this.sectionStart=this._index+1}};e.prototype.stateBeforeComment=function(e){if("-"===e){this._state=19;this.sectionStart=this._index+1}else this._state=16};e.prototype.stateInComment=function(e){if("-"===e)this._state=21};e.prototype.stateInSpecialComment=function(e){if(">"===e){this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index));this._state=1;this.sectionStart=this._index+1}};e.prototype.stateAfterComment1=function(e){if("-"===e)this._state=22;else this._state=19};e.prototype.stateAfterComment2=function(e){if(">"===e){this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2));this._state=1;this.sectionStart=this._index+1}else if("-"!==e)this._state=19};e.prototype.stateBeforeCdata6=function(e){if("["===e){this._state=29;this.sectionStart=this._index+1}else{this._state=16;this._index--}};e.prototype.stateInCdata=function(e){if("]"===e)this._state=30};e.prototype.stateAfterCdata1=function(e){if("]"===e)this._state=31;else this._state=29};e.prototype.stateAfterCdata2=function(e){if(">"===e){this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2));this._state=1;this.sectionStart=this._index+1}else if("]"!==e)this._state=29};e.prototype.stateBeforeSpecialS=function(e){if("c"===e||"C"===e)this._state=34;else if("t"===e||"T"===e)this._state=44;else{this._state=3;this._index--}};e.prototype.stateBeforeSpecialSEnd=function(e){if(2===this.special&&("c"===e||"C"===e))this._state=39;else if(3===this.special&&("t"===e||"T"===e))this._state=48;else this._state=1};e.prototype.stateBeforeSpecialLast=function(e,t){if("/"===e||">"===e||l(e))this.special=t;this._state=3;this._index--};e.prototype.stateAfterSpecialLast=function(e,t){if(">"===e||l(e)){this.special=1;this._state=6;this.sectionStart=this._index-t;this._index--}else this._state=1};e.prototype.parseFixedEntity=function(e){if(void 0===e)e=this.xmlMode?o.default:s.default;if(this.sectionStart+1=2;){var i=this.buffer.substr(e,t);if(Object.prototype.hasOwnProperty.call(a.default,i)){this.emitPartial(a.default[i]);this.sectionStart+=t+1;return}t--}};e.prototype.stateInNamedEntity=function(e){if(";"===e){this.parseFixedEntity();if(1===this.baseState&&this.sectionStart+1"9")&&!c(e)){if(this.xmlMode||this.sectionStart+1===this._index);else if(1!==this.baseState){if("="!==e)this.parseFixedEntity(a.default)}else this.parseLegacyEntity();this._state=this.baseState;this._index--}};e.prototype.decodeNumericEntity=function(e,t,i){var r=this.sectionStart+e;if(r!==this._index){var s=this.buffer.substring(r,this._index),a=parseInt(s,t);this.emitPartial(n.default(a));this.sectionStart=i?this._index+1:this._index}this._state=this.baseState};e.prototype.stateInNumericEntity=function(e){if(";"===e)this.decodeNumericEntity(2,10,!0);else if(e<"0"||e>"9"){if(!this.xmlMode)this.decodeNumericEntity(2,10,!1);else this._state=this.baseState;this._index--}};e.prototype.stateInHexEntity=function(e){if(";"===e)this.decodeNumericEntity(3,16,!0);else if((e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")){if(!this.xmlMode)this.decodeNumericEntity(3,16,!1);else this._state=this.baseState;this._index--}};e.prototype.cleanup=function(){if(this.sectionStart<0){this.buffer="";this.bufferOffset+=this._index;this._index=0}else if(this.running){if(1===this._state){if(this.sectionStart!==this._index)this.cbs.ontext(this.buffer.substr(this.sectionStart));this.buffer="";this.bufferOffset+=this._index;this._index=0}else if(this.sectionStart===this._index){this.buffer="";this.bufferOffset+=this._index;this._index=0}else{this.buffer=this.buffer.substr(this.sectionStart);this._index-=this.sectionStart;this.bufferOffset+=this.sectionStart}this.sectionStart=0}};e.prototype.parse=function(){for(;this._index65535){e-=65536;t+=String.fromCharCode(e>>>10&1023|55296);e=56320|1023&e}return t+=String.fromCharCode(e)};t.default=function(e){if(e>=55296&&e<=57343||e>1114111)return"\\ufffd";if(e in n.default)e=n.default[e];return s(e)}},function(e){e.exports=JSON.parse(\'{"Aacute":"\\xc1","aacute":"\\xe1","Acirc":"\\xc2","acirc":"\\xe2","acute":"\\xb4","AElig":"\\xc6","aelig":"\\xe6","Agrave":"\\xc0","agrave":"\\xe0","amp":"&","AMP":"&","Aring":"\\xc5","aring":"\\xe5","Atilde":"\\xc3","atilde":"\\xe3","Auml":"\\xc4","auml":"\\xe4","brvbar":"\\xa6","Ccedil":"\\xc7","ccedil":"\\xe7","cedil":"\\xb8","cent":"\\xa2","copy":"\\xa9","COPY":"\\xa9","curren":"\\xa4","deg":"\\xb0","divide":"\\xf7","Eacute":"\\xc9","eacute":"\\xe9","Ecirc":"\\xca","ecirc":"\\xea","Egrave":"\\xc8","egrave":"\\xe8","ETH":"\\xd0","eth":"\\xf0","Euml":"\\xcb","euml":"\\xeb","frac12":"\\xbd","frac14":"\\xbc","frac34":"\\xbe","gt":">","GT":">","Iacute":"\\xcd","iacute":"\\xed","Icirc":"\\xce","icirc":"\\xee","iexcl":"\\xa1","Igrave":"\\xcc","igrave":"\\xec","iquest":"\\xbf","Iuml":"\\xcf","iuml":"\\xef","laquo":"\\xab","lt":"<","LT":"<","macr":"\\xaf","micro":"\\xb5","middot":"\\xb7","nbsp":"\\xa0","not":"\\xac","Ntilde":"\\xd1","ntilde":"\\xf1","Oacute":"\\xd3","oacute":"\\xf3","Ocirc":"\\xd4","ocirc":"\\xf4","Ograve":"\\xd2","ograve":"\\xf2","ordf":"\\xaa","ordm":"\\xba","Oslash":"\\xd8","oslash":"\\xf8","Otilde":"\\xd5","otilde":"\\xf5","Ouml":"\\xd6","ouml":"\\xf6","para":"\\xb6","plusmn":"\\xb1","pound":"\\xa3","quot":"\\\\"","QUOT":"\\\\"","raquo":"\\xbb","reg":"\\xae","REG":"\\xae","sect":"\\xa7","shy":"\\xad","sup1":"\\xb9","sup2":"\\xb2","sup3":"\\xb3","szlig":"\\xdf","THORN":"\\xde","thorn":"\\xfe","times":"\\xd7","Uacute":"\\xda","uacute":"\\xfa","Ucirc":"\\xdb","ucirc":"\\xfb","Ugrave":"\\xd9","ugrave":"\\xf9","uml":"\\xa8","Uuml":"\\xdc","uuml":"\\xfc","Yacute":"\\xdd","yacute":"\\xfd","yen":"\\xa5","yuml":"\\xff"}\')},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),s=this&&this.__assign||function(){return(s=Object.assign||function(e){for(var t,i=1,r=arguments.length;ia.ElementType.Tag,1],[a.ElementType.Script,1],[a.ElementType.Style,1],[a.ElementType.Directive,1],[a.ElementType.Text,3],[a.ElementType.CDATA,4],[a.ElementType.Comment,8],[a.ElementType.Root,9),l=function(){function e(e){this.type=e;this.parent=null;this.prev=null;this.next=null;this.startIndex=null;this.endIndex=null}Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=o.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0});Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0});Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0});Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0});e.prototype.cloneNode=function(e){if(void 0===e)e=!1;return T(this,e)};return e}();t.Node=l;var c=function(e){n(t,e);function t(t,i){var r=e.call(this,t)||this;r.data=i;return r}Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0});return t}(l);t.DataNode=c;var u=function(e){n(t,e);function t(t){return e.call(this,a.ElementType.Text,t)||this}return t}(c);t.Text=u;var d=function(e){n(t,e);function t(t){return e.call(this,a.ElementType.Comment,t)||this}return t}(c);t.Comment=d;var h=function(e){n(t,e);function t(t,i){var r=e.call(this,a.ElementType.Directive,i)||this;r.name=t;return r}return t}(c);t.ProcessingInstruction=h;var f=function(e){n(t,e);function t(t,i){var r=e.call(this,t)||this;r.children=i;return r}Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0});Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0});Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0});return t}(l);t.NodeWithChildren=f;var p=function(e){n(t,e);function t(t){return e.call(this,a.ElementType.Root,t)||this}return t}(f);t.Document=p;var m=function(e){n(t,e);function t(t,i,r,n){if(void 0===r)r=[];if(void 0===n)n="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag;var s=e.call(this,n,r)||this;s.name=t;s.attribs=i;return s}Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0});Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var i,r;return{name:t,value:e.attribs[t],namespace:null===(i=e["x-attribsNamespace"])||void 0===i?void 0:i[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0});return t}(f);t.Element=m;function g(e){return a.isTag(e)}t.isTag=g;function b(e){return e.type===a.ElementType.CDATA}t.isCDATA=b;function _(e){return e.type===a.ElementType.Text}t.isText=_;function v(e){return e.type===a.ElementType.Comment}t.isComment=v;function y(e){return e.type===a.ElementType.Directive}t.isDirective=y;function E(e){return e.type===a.ElementType.Root}t.isDocument=E;t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")};function T(e,t){if(void 0===t)t=!1;var i;if(_(e))i=new u(e.data);else if(v(e))i=new d(e.data);else if(g(e)){var r=t?x(e.children):[],n=new m(e.name,s({},e.attribs),r);r.forEach((function(e){return e.parent=n}));if(e["x-attribsNamespace"])n["x-attribsNamespace"]=s({},e["x-attribsNamespace"]);if(e["x-attribsPrefix"])n["x-attribsPrefix"]=s({},e["x-attribsPrefix"]);i=n}else if(b(e)){r=t?x(e.children):[];var o=new f(a.ElementType.CDATA,r);r.forEach((function(e){return e.parent=o}));i=o}else if(E(e)){r=t?x(e.children):[];var l=new p(r);r.forEach((function(e){return e.parent=l}));if(e["x-mode"])l["x-mode"]=e["x-mode"];i=l}else if(y(e)){var c=new h(e.name,e.data);if(null!=e["x-name"]){c["x-name"]=e["x-name"];c["x-publicId"]=e["x-publicId"];c["x-systemId"]=e["x-systemId"]}i=c}else throw new Error("Not implemented yet: "+e.type);i.startIndex=e.startIndex;i.endIndex=e.endIndex;return i}t.cloneNode=T;function x(e){for(var t=e.map((function(e){return T(e,!0)})),i=1;i1?f(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}var m=new RegExp(s.source+"|"+h.source,"g");t.escape=function(e){return e.replace(m,p)};t.escapeUTF8=function(e){return e.replace(s,p)};function g(e){return function(t){return t.replace(m,(function(t){return e[t]||p(t)}))}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var r=i(6);t.filter=function(e,t,i,r){if(void 0===i)i=!0;if(void 0===r)r=1/0;if(!Array.isArray(t))t=[t];return n(e,t,i,r)};function n(e,t,i,s){for(var a=[],o=0,l=t;o0){var u=n(e,c.children,i,s);a.push.apply(a,u);if((s-=u.length)<=0)break}}return a}t.find=n;t.findOneChild=function(e,t){return t.find(e)};t.findOne=function e(t,i,n){if(void 0===n)n=!0;for(var s=null,a=0;a0)s=e(t,o.children)}return s};t.existsOne=function e(t,i){return i.some((function(i){return r.isTag(i)&&(t(i)||i.children.length>0&&e(t,i.children))}))};t.findAll=function(e,t){for(var i,n,s=[],a=t.filter(r.isTag);n=a.shift();){var o=null===(i=n.children)||void 0===i?void 0:i.filter(r.isTag);if(o&&o.length>0)a.unshift.apply(a,o);if(e(n))s.push(n)}return s}},function(e,t){function i(e,t,i,r,n,s,a){try{var o=e[s](a),l=o.value}catch(e){i(e);return}if(o.done)t(l);else Promise.resolve(l).then(r,n)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(n,s){var a=e.apply(t,r);function o(e){i(a,n,s,o,l,"next",e)}function l(e){i(a,n,s,o,l,"throw",e)}o(void 0)}))}};e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,i){"use strict";var r=i(4),n=i(0),s=i(2),a=i(1);t.a=class{constructor(e,t,i){this.parser=e;this.headingElement=t;this.headlineElement=this.parser.context.getElementByClassName(t,"mw-headline");if(!this.headlineElement)throw new r.a;this.anchor=this.headlineElement.getAttribute("id");this.parseHeadline();const s=t.tagName.match(/^H([1-6])$/);this.level=s&&Number(s[1]);this.sectionNumber=null;let a=this.parser.context.getElementByClassName(t,"mw-editsection");if(!a)a=this.createSectionMenu();const o=Array.from(a.getElementsByTagName("a")).find(e=>{var t;return null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("action=edit")});if(o){const e=n.a.g.SERVER+o.getAttribute("href");this.editUrl=new URL(e);if(this.editUrl){const e=this.editUrl.searchParams.get("section");if(e.startsWith("T-")){this.sourcePageName=this.editUrl.searchParams.get("title");this.sectionNumber=Number(e.match(/\\d+/)[0])}else this.sectionNumber=Number(e);this.editUrl=this.editUrl.href}}this.setContentProperties(i);this.id=n.a.sections.length}createSectionMenu(){const e=this.parser.context.document.createElement("span");e.setAttribute("class","mw-editsection-bracket");e.textContent="[";const t=this.parser.context.document.createElement("span");t.setAttribute("class","mw-editsection-bracket");t.textContent="]";const i=this.parser.context.document.createElement("span");i.setAttribute("class","mw-editsection");i.appendChild(e);i.appendChild(t);this.headingElement.appendChild(i);return i}setContentProperties(e){const t=new s.c(n.a.g.rootElement,e=>!["STYLE","LINK"].includes(e.tagName)&&!e.classList.contains("cd-section-button-container"),!0,this.headingElement);this.headingNestingLevel=0;for(;t.parentNode();)this.headingNestingLevel++;let i;if(e){i=Object(a.e)(this.headingElement,e);i.pop()}else{let e=n.a.g.rootElement.lastElementChild;for(;e.contains(this.headingElement)&&e!==this.headingElement;)e=e.lastElementChild;i=Object(a.e)(this.headingElement,e)}let r,o,l=!1;i.slice(1).some((e,t)=>{if(void 0===this.lastElementInFirstChunk&&/^H[2-6]$/.test(e.tagName)){l=!0;this.lastElementInFirstChunk=i[t];return!0}else return!1});this.lastElementInFirstChunk=this.lastElementInFirstChunk||i[i.length-1];if(i[1]){t.currentNode=i[i.length-1];for(;t.lastChild(););const e=t.currentNode;t.currentNode=i[1];do{if(t.currentNode.classList.contains("cd-comment-part"))r=t.currentNode}while(!r&&t.currentNode!==e&&t.nextNode());t.currentNode=e;do{if(t.currentNode.classList.contains("cd-comment-part"))o=t.currentNode}while(!o&&t.currentNode!==i[1]&&t.previousNode())}if(r){const e=Number(r.getAttribute("data-comment-id")),t=Number(o.getAttribute("data-comment-id"));this.comments=n.a.comments.slice(e,t+1);if(l){const e=this.comments.findIndex(e=>!(this.parser.context.follows(this.lastElementInFirstChunk,e.elements[0])||this.lastElementInFirstChunk.contains(e.elements[0])));this.commentsInFirstChunk=this.comments.slice(0,e||0)}this.comments.forEach(e=>{if(!this.oldestComment||e.date&&(!this.oldestComment.date||this.oldestComment.date>e.date))this.oldestComment=e});this.comments[0].followsHeading=!0}this.comments=this.comments||[];this.commentsInFirstChunk=this.commentsInFirstChunk||this.comments;this.commentsInFirstChunk.forEach(e=>{e.section=this});this.elements=i}parseHeadline(){const e=["mw-headline-number",...n.a.config.foreignElementInHeadlineClasses],t=Array.from(this.headlineElement.childNodes).filter(t=>t.nodeType!==Node.ELEMENT_NODE||!e.some(e=>t.classList.contains(e)));this.headline=t.map(e=>e.textContent).join("").trim()}getParent(e=!0){if(e&&this.level<=2)return null;else return n.a.sections.slice(0,this.id).reverse().find(e=>e.level=0&&(s[d]=parseInt(u,10))}var h=s[3],f=24===h?0:h,p=s[0]+"-"+s[1]+"-"+s[2]+" "+f+":"+s[4]+":"+s[5]+":000",m=+t;return(n.utc(p).valueOf()-(m-=m%1e3))/6e4},l=r.prototype;l.tz=function(e,t){void 0===e&&(e=s);var i=this.utcOffset(),r=this.toDate(),a=r.toLocaleString("en-US",{timeZone:e}),o=Math.round((r-new Date(a))/1e3/60),l=n(a).$set("millisecond",this.$ms).utcOffset(15*-Math.round(r.getTimezoneOffset()/15)-o,!0);if(t){var c=l.utcOffset();l=l.add(i-c,"minute")}return l.$x.$timezone=e,l},l.offsetName=function(e){var t=this.$x.$timezone||n.tz.guess(),i=a(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return i&&i.value};var c=l.startOf;l.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var i=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return c.call(i,e,t).tz(this.$x.$timezone,!0)},n.tz=function(e,t,i){var r=i&&t,a=i||t||s,l=o(+n(),a);if("string"!=typeof e)return n(e).tz(a);var c=function(e,t,i){var r=e-60*t*1e3,n=o(r,i);if(t===n)return[r,t];var s=o(r-=60*(n-t)*1e3,i);return n===s?[r,n]:[e-60*Math.min(n,s)*1e3,Math.max(n,s)]}(n.utc(e,r).valueOf(),l,a),u=c[0],d=c[1],h=n(u).utcOffset(d);return h.$x.$timezone=a,h},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(e){s=e}}}()},function(e,t,i){e.exports=function(){"use strict";var e="minute",t=/[+-]\\d\\d(?::?\\d\\d)?/g,i=/([+-]|\\d\\d)/g;return function(r,n,s){var a=n.prototype;s.utc=function(e){var t={date:e,utc:!0,args:arguments};return new n(t)},a.utc=function(t){var i=s(this.toDate(),{locale:this.$L,utc:!0});return t?i.add(this.utcOffset(),e):i},a.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var o=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),o.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var c=a.utcOffset;a.utcOffset=function(r,n){var s=this.$utils().u;if(s(r))return this.$u?0:s(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&null===(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var n=(""+r[0]).match(i)||["-",0,0],s=n[0],a=60*+n[1]+ +n[2];return 0===a?0:"+"===s?a:-a}(r)))return this;var a=Math.abs(r)<=16?60*r:r,o=this;if(n)return o.$offset=a,o.$u=0===r,o;if(0!==r){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(a+l,e)).$offset=a,o.$x.$localOffset=l}else o=this.utc();return o};var u=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=a.diff;a.diff=function(e,t,i){if(e&&this.$u===e.$u)return h.call(this,e,t,i);var r=this.local(),n=s(e).local();return h.call(r,n,t,i)}}}()},function(e,t,i){"use strict";const r={init(){this.timerTotal={};this.timerStartTimestamps={};this.timerRunCount={};this.timerAllRunsTotal={};this.initCounters();this.array=[];this.object={}},initCounters(){this.counters="undefined"==typeof Proxy?{}:new Proxy({},{get:(e,t)=>t in e?e[t]:0})},startTimer(e){if(void 0===this.timerTotal[e])this.timerTotal[e]=0;this.timerStartTimestamps[e]=Date.now()},stopTimer(e){if(void 0===this.timerStartTimestamps[e])return;const t=Date.now()-this.timerStartTimestamps[e];this.timerTotal[e]+=t;delete this.timerStartTimestamps[e];if(void 0===this.timerAllRunsTotal[e]){this.timerAllRunsTotal[e]=0;this.timerRunCount[e]=0}this.timerAllRunsTotal[e]+=t;this.timerRunCount[e]++},resetTimer(e){if(void 0!==this.timerStartTimestamps[e])this.stopTimer(e);delete this.timerTotal[e]},fullResetTimer(e){this.resetTimer(e);delete this.timerAllRunsTotal[e];delete this.timerRunCount[e]},logAndResetTimer(e){if(void 0!==this.timerStartTimestamps[e])this.stopTimer(e);if(void 0!==this.timerTotal[e]){console.debug(`${e}: ${this.timerTotal[e]}`);this.resetTimer(e)}},logAndResetEverything(e){const t=Object.keys(this.timerTotal);if(e)t.sort();t.forEach(e=>{this.logAndResetTimer(e)});const i=Object.keys(this.counters);if(e)i.sort();i.forEach(e=>{console.debug(`counter ${e}: ${this.counters[e]}`)});this.initCounters();if(this.array.length){console.debug("array: ",this.array);this.array=[]}if(Object.keys(this.object).length){console.debug("object: ",this.object);this.object={}}},averageTimerTime(e){if(void 0===this.timerAllRunsTotal[e]){console.error("No data for timer "+e);return}const t=this.timerAllRunsTotal[e]/this.timerRunCount[e];console.debug(`${e}: ${t.toFixed(1)} average for ${this.timerRunCount[e]} runs`)},incrementCounter(e){this.counters[e]++}};t.a=r},function(e,t,i){"use strict";var r=i(0),n=i(2),s=i(1),a=i(5);let o,l;class Parser{constructor(e){this.context=e;if(!o){o=["cd-comment-part",...r.a.config.closedDiscussionClasses];if(r.a.g.pageHasOutdents)o.push(r.a.config.outdentClass)}}createComment(e){return new this.context.CommentClass(this,e)}createSection(e,t,i){return new this.context.SectionClass(this,e,t,i)}removeDtMarkup(){const e="undefined"!=typeof mw&&r.a.g.isDtTopicSubscriptionEnabled;let t;if(e){t=this.context.document.createElement("span");t.className="cd-hidden";r.a.g.rootElement.parentNode.appendChild(t)}let i=Array.from(r.a.g.rootElement.getElementsByTagName("span")).filter(e=>e.hasAttribute("data-mw-comment-start")||e.hasAttribute("data-mw-comment-end")).concat(Array.from(r.a.g.rootElement.getElementsByClassName("ext-discussiontools-init-replylink-buttons")));if("undefined"!=typeof mw)i=i.concat(Array.from(r.a.g.rootElement.getElementsByClassName("ext-discussiontools-init-highlight")));i.forEach((i,r)=>{if(e){if(r%10==0)t.appendChild(this.context.document.createElement("span"));t.lastChild.appendChild(i)}else i.remove()})}findTimestamps(){const e=Array.from(r.a.g.rootElement.getElementsByTagName("blockquote")),t=r.a.config.elementsToExcludeClasses.map(e=>Array.from(r.a.g.rootElement.getElementsByClassName(e)));l=[...e,...Object(s.c)(t)];return this.context.getAllTextNodes().map(e=>{const{date:t,match:i}=Object(a.c)(e.textContent)||{};if(t&&!l.some(t=>t.contains(e)))return{node:e,date:t,match:i}}).filter(s.a).map(e=>{const{node:t,match:i,date:r}=e,n=this.context.document.createElement("span");n.classList.add("cd-timestamp");n.appendChild(this.context.document.createTextNode(i[2]));const s=t.textContent.slice(i.index+i[0].length);let a;if(s)a=this.context.document.createTextNode(s);t.textContent=i[1];t.parentNode.insertBefore(n,t.nextSibling);if(a)t.parentNode.insertBefore(a,n.nextSibling);return{element:n,date:r}})}timestampsToSignatures(e){return e.map(e=>{const t=e.date,i=e.element,o=e.element.textContent;let l,c;for(let t=e.element;!c;t=t.parentNode)if(Object(s.g)(t)){if(t.classList.contains(r.a.config.unsignedClass))l=t}else c=t;const u=Boolean(l),d=Array.from(c[this.context.childElementsProp]),h=new n.b(e.element,c);let f=!1;for(;h.nextNode()&&(!d.includes(h.currentNode)||Object(s.g)(h.currentNode));){if("A"===h.currentNode.tagName)f=!0;if(h.currentNode.classList.contains("cd-timestamp")&&f)return}const p=l||e.element,m=new n.a(p);let g,b,_,v,y,E,T,x,N=0,S=[];if(l)T=p;else{S.push(p);m.previousSibling()}do{var C;const e=m.currentNode;N+=e.textContent.length;if(e.tagName){if(e.classList.contains("cd-timestamp")||["S","STRIKE","DEL"].includes(e.tagName)&&N>=30)break;let t=!1;const i=({userName:e,linkType:i},r)=>{if(e){if(!g)g=e;if(g===e){if(["user","userForeign"].includes(i)){if(_)return!1;if("userForeign"!==i)_=r;b=r}else if(["userTalk","userTalkForeign"].includes(i)){if(y)return!1;if("userTalkForeign"!==i)y=r;v=r}else if(["contribs","contribsForeign"].includes(i)){if(E&&(b||v))return!1;if("contribsForeign"!==i)E=r}else if(["userSubpage","userSubpageForeign"].includes(i)){if(b||v)return!1}else if(["userTalkSubpage","userTalkSubpageForeign"].includes(i)){if(b||v)return!1}else if(b||v)return!1;t=!0}}return!0};if("A"===e.tagName){if(!i(Parser.processLink(e)||{},e))break}else{const t=Array.from(e.getElementsByTagName("a")).reverse();for(const e of t){if(e.classList.contains("external"))continue;i(Parser.processLink(e)||{},e)}}if(t)T=e}S.push(e);x=m.previousSibling();if(!x&&!T){x=m.parentNode();if(!x||!Object(s.g)(x))break;N=0;S=[]}if(g&&null!==(C=x)&&void 0!==C&&C.tagName&&["S","STRIKE","DEL"].includes(x.tagName))break}while(x&&N{if(this.context.getElementByClassName(e,"cd-timestamp"))return!1;for(let t=e;t&&t!==r.a.g.rootElement;t=t.parentNode)if(t.classList.contains("cd-signature"))return!1;return!0}).forEach(t=>{Array.from(t.getElementsByTagName("a")).some(i=>{const{userName:r,linkType:n}=Parser.processLink(i)||{};if(r){let s,a;if("user"===n)s=i;else if("userTalk"===n)a=i;t.classList.add("cd-signature");const o=!0;e.push({element:t,authorName:r,isUnsigned:o,authorLink:s,authorTalkLink:a});return!0}})});return e}findSignatures(e){let t=this.timestampsToSignatures(e);const i=this.findUnsigneds();t.push(...i);t.sort((e,t)=>this.context.follows(e.element,t.element)?1:-1);return t}getStartNodes(e,t){const i=[];let r;for(;!r;){for(;!t.currentNode.nextSibling&&t.parentNode(););if(!t.nextSibling())break;if(!Object(s.g)(t.currentNode,!0))r=t.currentNode}if(r&&e.parentNode.contains(r)||e.parentNode.getElementsByClassName("cd-signature",2).length>1||!this.isElementEligible(e.parentNode,t,"start")){t.currentNode=e;for(;t.nextSibling()&&Object(s.g)(t.currentNode,!0);)i.push({node:t.currentNode,isTextNode:t.currentNode.nodeType===Node.TEXT_NODE,isHeading:!1,hasCurrentSignature:!1,hasForeignComponents:!1,lastStep:"start"});i.reverse();t.currentNode=e}else t.currentNode=e.parentNode;i.push({node:t.currentNode,isTextNode:!1,isHeading:!1,hasCurrentSignature:!0,hasForeignComponents:!1,lastStep:"start"});return[i,r]}isElementEligible(e,t,i){var n,s;return!(e===t.root||o.some(t=>e.classList.contains(t))||"toc"===e.getAttribute("id")||"DT"===e.tagName||function(e){if(!["TD","TH"].includes(e.tagName))return!1;let t;for(let i=e;!t&&i!==r.a.g.rootElement;i=i.parentNode)if("TABLE"===i.tagName)t=i;return!t||t.getElementsByClassName("cd-signature",2).length>1}(e)||"HR"===e.tagName&&e.previousElementSibling&&this.context.getElementByClassName(e.previousElementSibling,"cd-signature")||r.a.g.pageHasOutdents&&this.context.getElementByClassName(e,r.a.config.outdentClass)||r.a.g.NAMESPACE_NUMBER%2==1&&e.classList.contains("tmbox")||e.classList.contains("ombox")&&"up"!==i||null!==(n=(s=r.a.config).checkForCustomForeignComponents)&&void 0!==n&&n.call(s,e,this.context))}isIntroList(e,t=!1){var i;const r=e.tagName;if(!["DL","UL","OL"].includes(r))return!1;const n=null===(i=e.previousElementSibling)||void 0===i?void 0:i.tagName;let s="DL"===r&&e.firstChild&&"DT"===e.firstChild.tagName||["DL","UL"].includes(r)&&n&&/^H[1-6]$/.test(n)||"UL"===r&&e.classList.contains("gallery");if(t&&!s){const t=e.nextElementSibling;if(t)s=this.getClosestElementsWithText(t).levelsPassed>1}return s}traverseDom(e,t,i,n){for(let c=0;c<500;c++){var a;let c;const u=e[e.length-1];if(!u.hasCurrentSignature&&u.hasForeignComponents){let e,t=!1;for(;(e=i.currentNode)&&i.lastChild();){if(Object(s.g)(i.currentNode,!0)){i.currentNode=e;break}t=!0}if(t)c="dive";else break}else if(i.previousSibling())c="back";else{if(!i.parentNode())break;c="up"}const d=i.currentNode,h=d.nodeType===Node.TEXT_NODE;if("back"===c&&(["OL","UL"].includes(u.node.tagName)||"DL"===u.node.tagName&&u.node.parentNode!==r.a.g.rootElement&&u.node.parentNode.parentNode!==r.a.g.rootElement)&&!(["DL","OL","UL"].includes(d.tagName)&&!this.isIntroList(d)||h&&d.previousSibling&&["DL","OL","UL"].includes(d.previousSibling.tagName)&&!this.isIntroList(d.previousSibling))&&(null===(a=u.node[this.context.childElementsProp][0])||void 0===a?void 0:a.contains(t)))break;let f=null,p=null,m=null;if(!h){if(!this.isElementEligible(d,i,c))break;f=/^H[1-6]$/.test(d.tagName);p=d.contains(t);m=d.getElementsByClassName("cd-signature",Number(p)+1).length-Number(p)>0||n&&d.contains(n)&&"TABLE"!==d.tagName;if(!p){var o;if(!Object(s.g)(d,!0)&&null!==(o=r.a.config.signatureEndingRegexp)&&void 0!==o&&o.test(d.textContent)&&!l.some(e=>e.contains(d)))break}}e.push({node:d,isTextNode:h,isHeading:f,hasCurrentSignature:p,hasForeignComponents:m,lastStep:c});if(f)break}return e}collectParts(e){const t=new n.a(e);let[i,r]=this.getStartNodes(e,t);i=this.traverseDom(i,e,t,r);return i}removeNestedParts(e){for(let t=e.length-1;t>=0;t--){const i=e[t];if("up"===i.lastStep&&!i.hasForeignComponents){let i=0;for(let r=t-1;r>0;r--)if("dive"===e[r].lastStep){i=r;break}e.splice(i,t-i);t=i}}return e}encloseInlineParts(e,t){const i=[];let r=null,n=!1;for(let t=0;t<=e.length;t++){const a=e[t];if(a&&(null===r||["back","start"].includes(a.lastStep))&&!a.hasForeignComponents&&!a.isHeading){if(null===r)if(Object(s.g)(a.node.parentNode)){for(let i=t+1;i=0;r--){const n=i[r],s=this.context.document.createElement("div"),a=e[n.start].node.nextSibling,o=e[n.start].node.parentNode;for(let t=n.end;t>=n.start;t--)s.appendChild(e[t].node);o.insertBefore(s,a);const l={node:s,isTextNode:!1,isHeading:!1,hasCurrentSignature:s.contains(t),hasForeignComponents:!1,lastStep:"replaced"};e.splice(n.start,n.end-n.start+1,l)}return e}filterParts(e,t){for(let t=(e=e.filter(e=>!e.hasForeignComponents&&!e.isTextNode)).length-1;t>0;t--){const i=e[t].node;if("P"===i.tagName&&!i.textContent.trim()&&Array.from(i.children).every(e=>"BR"===e.tagName)||"STYLE"===i.tagName||"LINK"===i.tagName||i.classList.contains("reflist-talk"))e.splice(t,1);else break}if(e.length>1){const r=e[e.length-1].node;if(!["DL","OL","UL","DD","LI"].includes(r.tagName)||this.isIntroList(r,!0))for(let r=e.length-1;r>=1;r--){var i;const n=e[r],s=n.node,a=s.nextElementSibling;if(!a)continue;if("back"===n.lastStep&&["DL","OL","UL"].includes(a.tagName)&&(!["DL","OL","UL"].includes(s.tagName)||this.isIntroList(s,!0))&&(null===(i=a[this.context.childElementsProp][0])||void 0===i?void 0:i.contains(t)))e.splice(r)}}return e}getClosestElementsWithText(e){const t=e.textContent.replace(/\\s+/g,"");let i,r=[e],n=0;do{i=r;r=i.reduce((e,t)=>e.concat(Array.from(t[this.context.childElementsProp])),[]);if(["DL","UL","OL"].includes(i[0].tagName))n++}while(r.length&&r.every(e=>["DL","UL","OL","DD","LI"].includes(e.tagName)||!e.textContent.trim()&&Object(s.g)(e))&&r.map(e=>e.textContent).join("").replace(/\\s+/g,"")===t);return{nodes:i,levelsPassed:n}}replaceListsWithItems(e,t){const i=e[e.length-1];for(let r=e.length-1;r>=0;r--){const n=e[r];if(["DL","UL","OL","DD","LI"].includes(n.node.tagName)&&("UL"!==n.node.tagName||!n.node.classList.contains("gallery"))&&("up"===n.lastStep&&(!e[r-1]||"back"!==e[r-1].lastStep)||("DD"===i.node.tagName||"DD"===i.node.parentNode.tagName||"DL"===i.node.tagName)&&!e.slice(r+1).some(e=>"P"===e.node.tagName)&&("back"!==n.lastStep||!["LI","DD"].includes(n.node.tagName)))){const i=this.getClosestElementsWithText(n.node).nodes;if(i.length>1){const n=i.map(e=>({node:e,isTextNode:!1,hasCurrentSignature:e.contains(t),hasForeignComponents:!1,lastStep:"replaced"}));e.splice(r,1,...n)}else if(i[0]!==n.node)Object.assign(n,{node:i[0],lastStep:"replaced"})}}return e}wrapNumberedList(e,t){if(e.length>1){const i=e[0].node.parentNode;if("OL"===i.tagName){const r=Number(i.contains(t));if(i.getElementsByClassName("cd-signature").length-r==0){const t=e.filter(e=>e.node.parentNode===i),r=!e.some(e=>e.node.parentNode!==i&&e.node.parentNode.contains(i));let n,s;const a=i.nextSibling,o=i.parentNode;if(r){s=this.context.document.createElement("dd");n=this.context.document.createElement("dl");n.appendChild(s)}else{s=this.context.document.createElement("div");n=s}s.appendChild(i);o.insertBefore(n,a);const l={node:s,isTextNode:!1,isHeading:!1,hasCurrentSignature:!0,hasForeignComponents:!1,lastStep:"replaced"};e.splice(0,t.length,l)}}}return e}getListsUpTree(e){const t=[],i=new n.b(e);for(;i.parentNode();){const e=i.currentNode;if(["DL","UL","OL"].includes(e.tagName))if(e.classList.contains("cd-commentLevel")){const i=e.getAttribute("class").match(/cd-commentLevel-(\\d+)/);if(i)t.unshift(...Array(Number(i[1])));return t}else t.unshift(e)}return t}findHeadings(){const e=[...r.a.g.rootElement.getElementsByTagName("h1"),...r.a.g.rootElement.getElementsByTagName("h2"),...r.a.g.rootElement.getElementsByTagName("h3"),...r.a.g.rootElement.getElementsByTagName("h4"),...r.a.g.rootElement.getElementsByTagName("h5"),...r.a.g.rootElement.getElementsByTagName("h6")];e.sort((e,t)=>this.context.follows(e,t)?1:-1);return e}static processLink(e){const t=e.getAttribute("href");let i,n=null;if(t){const{pageName:e,domain:o,fragment:l}=function(e){let t,i=r.a.g.HOSTNAME,n=e.replace(/^(?:https?:)?\\/\\/([^/]+)/,(e,t)=>{i=t;return""}).replace(r.a.g.STARTS_WITH_ARTICLE_PATH_REGEXP,"").replace(r.a.g.STARTS_WITH_SCRIPT_TITLE,"").replace(/&action=edit.*/,"").replace(/#(.*)/,(e,i)=>{t=i;return""}).replace(/_/g," ");try{n=decodeURIComponent(n)}catch(e){return null}return{pageName:n,domain:i,fragment:t}}(t)||{};if(!e||Object(a.b)(l))return null;const c=e.match(r.a.g.USER_NAMESPACES_REGEXP);if(c){i=c[1];if(r.a.g.USER_LINK_REGEXP.test(e))n="user";else if(r.a.g.USER_TALK_LINK_REGEXP.test(e))n="userTalk";else if(r.a.g.USER_SUBPAGE_LINK_REGEXP.test(e))n="userSubpage";else if(r.a.g.USER_TALK_SUBPAGE_LINK_REGEXP.test(e))n="userTalkSubpage"}else if(e.startsWith(r.a.g.CONTRIBS_PAGE+"/")){i=e.replace(r.a.g.CONTRIBS_PAGE_LINK_REGEXP,"");if(r.a.g.isIPv6Address(i))i=i.toUpperCase();n="contribs"}if(o!==r.a.g.HOSTNAME)n+="Foreign";if(i)i=Object(s.b)(Object(s.j)(i.replace(/\\/.*/,""))).trim()}else if(e.classList.contains("mw-selflink")&&3===r.a.g.NAMESPACE_NUMBER&&!r.a.g.PAGE_NAME.includes("/"))i=r.a.g.PAGE_TITLE;else return null;return{userName:i,linkType:n}}}t.a=Parser},function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var r=i(3),cd=i(0),n=i(24),s=i.n(n);i(1);i(5);function a(e){if(-1===e.indexOf("&"))return e;else{let t=e;if(-1!==t.indexOf("&amp;"))t=t.replace(/&amp;/g,"&amp;");if(-1!==t.indexOf("&#"))t=t.replace(/&#(\\d+);/g,(e,t)=>String.fromCharCode(t));if(-1!==t.indexOf("&"))t=s()(t);return t}}self.Node={ELEMENT_NODE:1,TEXT_NODE:3};function o(e,t,i){if(i&&t(e))return!0;for(let i=e.firstChild;i;i=i.nextSibling)if(o(i,t,!0))return!0}function l(){let e=[];o(cd.a.g.rootElement,t=>{if(t.nodeType===Node.TEXT_NODE)e.push(t)});return e}const c=Object(r.parseDocument)("a"),u=c.constructor,d=c.childNodes[0],h=d.constructor,f=d.childNodes[0].constructor,p=Object.getPrototypeOf(Object.getPrototypeOf(f));Object.defineProperty(h.prototype,"childElements",{get:function(){return this.childNodes.filter(e=>e.tagName)}});Object.defineProperty(h.prototype,"previousElementSibling",{get:function(){for(let e=this.previousSibling;e;e=e.previousSibling)if(e.tagName)return e;return null}});Object.defineProperty(h.prototype,"nextElementSibling",{get:function(){for(let e=this.nextSibling;e;e=e.nextSibling)if(e.tagName)return e;return null}});Object.defineProperty(h.prototype,"firstElementChild",{get:function(){let e;for(e=this.firstChild;e&&e.nodeType!==Node.ELEMENT_NODE;e=e.nextSibling);return e||null}});Object.defineProperty(h.prototype,"lastElementChild",{get:function(){let e;for(e=this.lastChild;e&&e.nodeType!==Node.ELEMENT_NODE;e=e.previousSibling);return e||null}});Object.defineProperty(h.prototype,"textContent",{get:function(){let e="";this.childNodes.forEach(t=>{e+=t.textContent});return e},set:function(e){this.childNodes.forEach(e=>{e.remove()});this.appendChild(new f(e||""))}});Object.defineProperty(h.prototype,"innerHTML",{get:function(){return r.DomUtils.getInnerHTML(this,{decodeEntities:!1})}});Object.defineProperty(h.prototype,"outerHTML",{get:function(){return r.DomUtils.getOuterHTML(this,{decodeEntities:!1})}});h.prototype.hasAttribute=function(e){return void 0!==this.attribs[e]};h.prototype.getAttribute=function(e){let t=this.attribs[e]||null;if(t&&"string"==typeof t&&-1!==t.indexOf("&"))t=t.replace(/&/g,"&").replace(/"/g,\'"\');return t};h.prototype.setAttribute=function(e,t){if(t&&"string"==typeof t){if(-1!==t.indexOf("&"))t=t.replace(/&/g,"&");if(-1!==t.indexOf(\'"\'))t=t.replace(/"/g,""")}this.attribs[e]=t||""};h.prototype.removeAttribute=function(e){delete this.attribs[e]};h.prototype.appendChild=function(e){r.DomUtils.appendChild(this,e)};h.prototype.insertBefore=function(e,t){if(t)r.DomUtils.prepend(t,e);else this.appendChild(e)};h.prototype.removeChild=function(e){if(e.parentNode===this)r.DomUtils.removeElement(e)};h.prototype.contains=function(e){if(e===this)return!0;if(!this.childNodes.length)return!1;for(let t=e;t;t=t.parentNode)if(t===this)return!0;return!1};h.prototype.follows=function(e){if(this.startIndex&&e.startIndex)return this.startIndex>e.startIndex;if(this===e)return!1;const t=[],i=[];let r,n,s;for(let i=this;i;i=i.parentNode){if(i===e)return!0;t.unshift(i)}for(let a=e;a;a=a.parentNode){i.unshift(a);if(t.includes(a)){r=a;n=t[t.indexOf(a)+1];s=i[1];break}}return!r||r.childNodes.indexOf(n)>r.childNodes.indexOf(s)};Object.defineProperty(h.prototype,"tagName",{get:function(){return this.name.toUpperCase()}});Object.defineProperty(h.prototype,"classList",{get:function(){if(this._classList)return this._classList;else{this._classList={list:[],isMovedFromClassAttr:!1,moveFromClassAttr(e){this.list=(e||"").split(" ");this.isMovedFromClassAttr=!0},add:(...e)=>{e.forEach(e=>{let t=this.getAttribute("class")||"";if(t)t+=" ";t+=e;this.setAttribute("class",t);if(this._classList.isMovedFromClassAttr)this._classList.list.push(e);else this._classList.moveFromClassAttr(t)})},remove:(...e)=>{e.forEach(e=>{let t=this.getAttribute("class")||"";const i=` ${t} `.indexOf(` ${e} `);if(-1!==i){t=t.slice(0,i)+t.slice(i+e.length+1);t=t.trim();this.setAttribute("class",t);if(this._classList.isMovedFromClassAttr)this._classList.list.splice(e,this._classList.list.indexOf(e),1);else this._classList.moveFromClassAttr(t)}})},contains:e=>{const t=this.getAttribute("class");if(!t)return!1;if(!this._classList.isMovedFromClassAttr)this._classList.moveFromClassAttr(t);return Boolean(this._classList.list.length)&&-1!==this._classList.list.indexOf(e)}};return this._classList}}});h.prototype.getElementsByClassName=function(e,t){let i=[];o(this,r=>{if(r.tagName&&r.classList.contains(e)){i.push(r);if(t&&i.length===t)return!0}});return i};h.prototype.getElementsByAttribute=function(e){let t=[];o(this,i=>{if(i.tagName){Object.keys(i.attribs).some(t=>e.test(t));t.push(i)}});return t};h.prototype.getElementsByTagName=function(e){return r.DomUtils.getElementsByTagName(e,this)};Object.defineProperty(f.prototype,"textContent",{get:function(){return a(this.data)},set:function(e){this.data=e}});p.prototype.remove=function(){r.DomUtils.removeElement(this)};u.prototype.createElement=e=>new h(e,{});u.prototype.createTextNode=e=>new f(e||"");u.prototype.getElementsByClassName=h.prototype.getElementsByClassName;self.Document=u},function(e,t,i){"use strict";i.r(t);i(31)},function(module,__webpack_exports__,__webpack_require__){"use strict";var _util__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1),_CdError__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_CommentSkeleton__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(11),_Parser__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(28),_SectionSkeleton__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(23),_cd__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(0),_debug__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(27),_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(29),_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(3),_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_8__),_timestamp__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(5);_util__WEBPACK_IMPORTED_MODULE_0__.k;let firstRun=!0;const context={CommentClass:_CommentSkeleton__WEBPACK_IMPORTED_MODULE_2__.a,SectionClass:_SectionSkeleton__WEBPACK_IMPORTED_MODULE_4__.a,childElementsProp:"childElements",follows:(e,t)=>e.follows(t),getAllTextNodes:_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_7__.a,getElementByClassName:(e,t)=>e.getElementsByClassName(t,1)[0]||null};let alarmTimeout;self.cd=_cd__WEBPACK_IMPORTED_MODULE_5__.a;_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug=_debug__WEBPACK_IMPORTED_MODULE_6__.a;_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.init();function setAlarm(e){clearTimeout(alarmTimeout);alarmTimeout=setTimeout(()=>{postMessage({type:"wakeUp"})},e)}function hideElement(e,t){let i;if(e.classList.contains("reference"))i="reference";else if(e.classList.contains("references"))i="references";else if(e.classList.contains("autonumber"))i="autonumber";else i="templateStyles";const r=t.hiddenElementsData.push({type:i,tagName:e.tagName,html:e.outerHTML}),n=context.document.createTextNode(`\\x01${r}_${i}\\x02`);e.parentNode.insertBefore(n,e);e.remove();if(t.elements.includes(e)){t.elements[t.elements.indexOf(e)]=n;return n}}function keepSafeValues(e,t){Object.keys(e).forEach(i=>{if(t.includes(i))delete e[i]})}function removeDataAttributes(e){Object.keys(e.attribs).forEach(t=>{if(/^data-/.test(t))e.removeAttribute(t)})}function parse(){_cd__WEBPACK_IMPORTED_MODULE_5__.a.comments=[];_cd__WEBPACK_IMPORTED_MODULE_5__.a.sections=[];Object(_timestamp__WEBPACK_IMPORTED_MODULE_9__.e)();_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.startTimer("worker: parse comments");const e=new _Parser__WEBPACK_IMPORTED_MODULE_3__.a(context);e.removeDtMarkup();const t=e.findTimestamps();e.findSignatures(t).forEach(t=>{try{_cd__WEBPACK_IMPORTED_MODULE_5__.a.comments.push(e.createComment(t))}catch(e){if(!(e instanceof _CdError__WEBPACK_IMPORTED_MODULE_1__.a))console.error(e)}});_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.stopTimer("worker: parse comments");_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.startTimer("worker: parse sections");e.findHeadings().forEach(t=>{try{_cd__WEBPACK_IMPORTED_MODULE_5__.a.sections.push(e.createSection(t))}catch(e){if(!(e instanceof _CdError__WEBPACK_IMPORTED_MODULE_1__.a))console.error(e)}});_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.stopTimer("worker: parse sections");_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.startTimer("worker: prepare comments and sections");_CommentSkeleton__WEBPACK_IMPORTED_MODULE_2__.a.processOutdents();_cd__WEBPACK_IMPORTED_MODULE_5__.a.comments.forEach(e=>{e.hiddenElementsData=[];e.elementHtmls=e.elements.map(t=>{if(/^H[1-6]$/.test(t.tagName)){const e=t.getElementsByClassName("mw-headline")[0];if(e){var i;null===(i=e.getElementsByClassName("mw-headline-number")[0])||void 0===i||i.remove();Array.from(t.childNodes).forEach(e=>{e.remove()});Array.from(e.childNodes).forEach(t.appendChild.bind(t))}}removeDataAttributes(t);t.getElementsByAttribute(/^data-/).forEach(removeDataAttributes);t.getElementsByTagName("span").filter(e=>e.attribs.id&&1===Object.keys(e.attribs).length&&!e.textContent).forEach(e=>{e.remove()});if(t.classList.contains("references")||["STYLE","LINK"].includes(t.tagName)){return hideElement(t,e).textContent}else{[...t.getElementsByClassName("autonumber"),...t.getElementsByClassName("reference"),...t.getElementsByClassName("references"),...t.getElementsByTagName("style"),...t.getElementsByTagName("link")].forEach(t=>{hideElement(t,e)});return t.outerHTML}});e.comparedHtml="";e.textComparedHtml="";e.headingComparedHtml="";e.elements.forEach(t=>{let i;if("DIV"===t.tagName){t.classList.remove("cd-comment-part","cd-comment-part-first","cd-comment-part-last");if(!t.getAttribute("class"))t.removeAttribute("class");i=Object.keys(t.attribs).length?t.outerHTML:t.innerHTML}else i=t.innerHTML||t.textContent;e.comparedHtml+=i+"\\n";if(/^H[1-6]$/.test(t.tagName))e.headingComparedHtml+=i;else e.textComparedHtml+=i+"\\n"});e.comparedHtml=e.comparedHtml.trim();e.textComparedHtml=e.textComparedHtml.trim();e.headingComparedHtml=e.headingComparedHtml.trim();e.signatureElement.remove();e.text=e.elements.map(e=>e.textContent).join("\\n").trim();e.elementNames=e.elements.map(e=>e.tagName)});let i=["authorLink","authorTalkLink","cachedParent","elements","highlightables","parser","parts","signatureElement","timestampElement"],r=["cachedAncestors","elements","headingElement","headlineElement","lastElementInFirstChunk","parser"];_cd__WEBPACK_IMPORTED_MODULE_5__.a.comments.forEach((e,t)=>{e.children=e.getChildren();e.children.forEach(t=>{t.parent=e;t.isToMe=e.isOwn});e.previousComments=_cd__WEBPACK_IMPORTED_MODULE_5__.a.comments.slice(Math.max(0,t-2),t).reverse();keepSafeValues(e,i)});_cd__WEBPACK_IMPORTED_MODULE_5__.a.sections.forEach(e=>{var t;e.parent=e.getParent();e.ancestors=e.getAncestors().map(e=>e.headline);e.oldestCommentAnchor=null===(t=e.oldestComment)||void 0===t?void 0:t.anchor;keepSafeValues(e,r)});_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.stopTimer("worker: prepare comments and sections")}function restoreFunc(code){if(code){if(!/^ *function\\b/.test(code)&&!/^.+=>/.test(code))code="function "+code;if(/^ *function *\\(/.test(code))code="("+code+")"}return eval(code)}function onMessageFromWindow(e){const t=e.data;if(firstRun){console.debug("Convenient Discussions\' web worker has been successfully loaded. Click the link with the file name and line number to open the source code in your debug tool.");firstRun=!1}if("setAlarm"===t.type)setAlarm(t.interval);if("removeAlarm"===t.type)clearTimeout(alarmTimeout);if("parse"===t.type){_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.startTimer("worker");_cd__WEBPACK_IMPORTED_MODULE_5__.a.g=t.g;_cd__WEBPACK_IMPORTED_MODULE_5__.a.config=t.config;_cd__WEBPACK_IMPORTED_MODULE_5__.a.config.checkForCustomForeignComponents=restoreFunc(_cd__WEBPACK_IMPORTED_MODULE_5__.a.config.checkForCustomForeignComponents);_cd__WEBPACK_IMPORTED_MODULE_5__.a.g.isIPv6Address=restoreFunc(_cd__WEBPACK_IMPORTED_MODULE_5__.a.g.isIPv6Address);context.document=Object(_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_8__.parseDocument)(t.text,{withStartIndices:!0,withEndIndices:!0,decodeEntities:!1});_cd__WEBPACK_IMPORTED_MODULE_5__.a.g.rootElement=context.document.childNodes[0];_cd__WEBPACK_IMPORTED_MODULE_5__.a.g.pageHasOutdents=Boolean(_cd__WEBPACK_IMPORTED_MODULE_5__.a.g.rootElement.getElementsByClassName(_cd__WEBPACK_IMPORTED_MODULE_5__.a.config.outdentClass,1).length);parse();postMessage({type:t.type,revisionId:t.revisionId,resolverId:t.resolverId,comments:_cd__WEBPACK_IMPORTED_MODULE_5__.a.comments,sections:_cd__WEBPACK_IMPORTED_MODULE_5__.a.sections});_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.stopTimer("worker");_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.logAndResetEverything()}}self.onmessage=onMessageFromWindow},function(e){e.exports=JSON.parse(\'{"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}\')},function(e,t,i){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var n=i(6),s=r(i(34));function a(e,t){return s.default(e,t)}t.getOuterHTML=a;t.getInnerHTML=function(e,t){return n.hasChildren(e)?e.children.map((function(e){return a(e,t)})).join(""):""};t.getText=function e(t){if(Array.isArray(t))return t.map(e).join("");if(n.isTag(t))return"br"===t.name?"\\n":e(t.children);if(n.isCDATA(t))return e(t.children);if(n.isText(t))return t.data;else return""}},function(e,t,i){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,r=arguments.length;i";case o.Comment:return function(e){return"\\x3c!--"+e.data+"--\\x3e"}(e);case o.CDATA:return function(e){return""}(e);case o.Script:case o.Style:case o.Tag:return function(e,t){var i;if("foreign"===t.xmlMode){e.name=null!==(i=c.elementNames.get(e.name))&&void 0!==i?i:e.name;if(e.parent&&p.has(e.parent.name))t=r(r({},t),{xmlMode:!1})}if(!t.xmlMode&&m.has(e.name))t=r(r({},t),{xmlMode:"foreign"});var n="<"+e.name,s=function(e,t){if(e)return Object.keys(e).map((function(i){var r,n,s=null!==(r=e[i])&&void 0!==r?r:"";if("foreign"===t.xmlMode)i=null!==(n=c.attributeNames.get(i))&&void 0!==n?n:i;if(!t.emptyAttrs&&!t.xmlMode&&""===s)return i;else return i+\'="\'+(!1!==t.decodeEntities?l.encodeXML(s):s.replace(/"/g,"""))+\'"\'})).join(" ")}(e.attribs,t);if(s)n+=" "+s;if(0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&d.has(e.name))){if(!t.xmlMode)n+=" ";n+="/>"}else{n+=">";if(e.children.length>0)n+=h(e.children,t);if(t.xmlMode||!d.has(e.name))n+=""}return n}(e,t);case o.Text:return function(e,t){var i=e.data||"";if(!1!==t.decodeEntities&&(t.xmlMode||!e.parent||!u.has(e.parent.name)))i=l.encodeXML(i);return i}(e,t)}}var p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),m=new Set(["svg","math"])},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.encodeHTML5=t.encodeHTML4=t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=t.encode=t.decodeStrict=t.decode=void 0;var r=i(19),n=i(20);t.decode=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTML)(e)};t.decodeStrict=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTMLStrict)(e)};t.encode=function(e,t){return(!t||t<=0?n.encodeXML:n.encodeHTML)(e)};var s=i(20);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return s.encodeXML}});Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return s.encodeHTML}});Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return s.encodeNonAsciiHTML}});Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return s.escape}});Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return s.escapeUTF8}});Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return s.encodeHTML}});Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return s.encodeHTML}});var a=i(19);Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return a.decodeXML}});Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return a.decodeHTML}});Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}});Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return a.decodeHTML}});Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return a.decodeHTML}});Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}});Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}});Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return a.decodeXML}})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.attributeNames=t.elementNames=void 0;t.elementNames=new Map("altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath");t.attributeNames=new Map("definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan")},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var r=i(6),n=[];function s(e){var t;return null!==(t=e.children)&&void 0!==t?t:n}t.getChildren=s;function a(e){return e.parent||null}t.getParent=a;t.getSiblings=function(e){var t=a(e);if(null!=t)return s(t);for(var i=[e],r=e.prev,n=e.next;null!=r;){i.unshift(r);r=r.prev}for(;null!=n;){i.push(n);n=n.next}return i};t.getAttributeValue=function(e,t){var i;return null===(i=e.attribs)||void 0===i?void 0:i[t]};t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]};t.getName=function(e){return e.name};t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!r.isTag(t);)t=t.next;return t};t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!r.isTag(t);)t=t.prev;return t}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0;function r(e){if(e.prev)e.prev.next=e.next;if(e.next)e.next.prev=e.prev;if(e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}t.removeElement=r;t.replaceElement=function(e,t){var i=t.prev=e.prev;if(i)i.next=t;var r=t.next=e.next;if(r)r.prev=t;var n=t.parent=e.parent;if(n){var s=n.children;s[s.lastIndexOf(e)]=t}};t.appendChild=function(e,t){r(t);t.next=null;t.parent=e;if(e.children.push(t)>1){var i=e.children[e.children.length-2];i.next=t;t.prev=i}else t.prev=null};t.append=function(e,t){r(t);var i=e.parent,n=e.next;t.next=n;t.prev=e;e.next=t;t.parent=i;if(n){n.prev=t;if(i){var s=i.children;s.splice(s.lastIndexOf(n),0,t)}}else if(i)i.children.push(t)};t.prependChild=function(e,t){r(t);t.parent=e;t.prev=null;if(1!==e.children.unshift(t)){var i=e.children[1];i.prev=t;t.next=i}else t.next=null};t.prepend=function(e,t){r(t);var i=e.parent;if(i){var n=i.children;n.splice(n.indexOf(e),0,t)}if(e.prev)e.prev.next=t;t.parent=i;t.prev=e.prev;t.next=e;e.prev=t}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var r=i(6),n=i(21),s={tag_name:function(e){if("function"==typeof e)return function(t){return r.isTag(t)&&e(t.name)};else if("*"===e)return r.isTag;return function(t){return r.isTag(t)&&t.name===e}},tag_type:function(e){if("function"==typeof e)return function(t){return e(t.type)};else return function(t){return t.type===e}},tag_contains:function(e){if("function"==typeof e)return function(t){return r.isText(t)&&e(t.data)};else return function(t){return r.isText(t)&&t.data===e}}};function a(e,t){if("function"==typeof t)return function(i){return r.isTag(i)&&t(i.attribs[e])};else return function(i){return r.isTag(i)&&i.attribs[e]===t}}function o(e,t){return function(i){return e(i)||t(i)}}function l(e){var t=Object.keys(e).map((function(t){var i=e[t];return t in s?s[t](i):a(t,i)}));return 0===t.length?null:t.reduce(o)}t.testElement=function(e,t){var i=l(e);return i?i(t):!0};t.getElements=function(e,t,i,r){if(void 0===r)r=1/0;var s=l(e);return s?n.filter(s,t,i,r):[]};t.getElementById=function(e,t,i){if(void 0===i)i=!0;if(!Array.isArray(t))t=[t];return n.findOne(a("id",e),t,i)};t.getElementsByTagName=function(e,t,i,r){if(void 0===i)i=!0;if(void 0===r)r=1/0;return n.filter(s.tag_name(e),t,i,r)};t.getElementsByTagType=function(e,t,i,r){if(void 0===i)i=!0;if(void 0===r)r=1/0;return n.filter(s.tag_type(e),t,i,r)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.uniqueSort=t.compareDocumentPosition=t.removeSubsets=void 0;var r=i(6);t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var i=e[t];if(!(t>0&&e.lastIndexOf(i,t-1)>=0)){for(var r=i.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}else e.splice(t,1)}return e};function n(e,t){var i=[],n=[];if(e===t)return 0;for(var s=r.hasChildren(e)?e:e.parent;s;){i.unshift(s);s=s.parent}s=r.hasChildren(t)?t:t.parent;for(;s;){n.unshift(s);s=s.parent}for(var a=Math.min(i.length,n.length),o=0;oc.indexOf(d))if(l===t)return 20;else return 4;if(l===e)return 10;else return 2}t.compareDocumentPosition=n;t.uniqueSort=function(e){(e=e.filter((function(e,t,i){return!i.includes(e,t+1)}))).sort((function(e,t){var i=n(e,t);if(2&i)return-1;else if(4&i)return 1;return 0}));return e}},function(e,t,i){"use strict";e.exports=function(e,t){var i,r,n,s={},a={},o={},l={};o[0]="HTML_SPECIALCHARS";o[1]="HTML_ENTITIES";l[0]="ENT_NOQUOTES";l[2]="ENT_COMPAT";l[3]="ENT_QUOTES";r=!isNaN(e)?o[e]:e?e.toUpperCase():"HTML_SPECIALCHARS";n=!isNaN(t)?l[t]:t?t.toUpperCase():"ENT_COMPAT";if("HTML_SPECIALCHARS"!==r&&"HTML_ENTITIES"!==r)throw new Error("Table: "+r+" not supported");s[38]="&";if("HTML_ENTITIES"===r){s[160]=" ";s[161]="¡";s[162]="¢";s[163]="£";s[164]="¤";s[165]="¥";s[166]="¦";s[167]="§";s[168]="¨";s[169]="©";s[170]="ª";s[171]="«";s[172]="¬";s[173]="­";s[174]="®";s[175]="¯";s[176]="°";s[177]="±";s[178]="²";s[179]="³";s[180]="´";s[181]="µ";s[182]="¶";s[183]="·";s[184]="¸";s[185]="¹";s[186]="º";s[187]="»";s[188]="¼";s[189]="½";s[190]="¾";s[191]="¿";s[192]="À";s[193]="Á";s[194]="Â";s[195]="Ã";s[196]="Ä";s[197]="Å";s[198]="Æ";s[199]="Ç";s[200]="È";s[201]="É";s[202]="Ê";s[203]="Ë";s[204]="Ì";s[205]="Í";s[206]="Î";s[207]="Ï";s[208]="Ð";s[209]="Ñ";s[210]="Ò";s[211]="Ó";s[212]="Ô";s[213]="Õ";s[214]="Ö";s[215]="×";s[216]="Ø";s[217]="Ù";s[218]="Ú";s[219]="Û";s[220]="Ü";s[221]="Ý";s[222]="Þ";s[223]="ß";s[224]="à";s[225]="á";s[226]="â";s[227]="ã";s[228]="ä";s[229]="å";s[230]="æ";s[231]="ç";s[232]="è";s[233]="é";s[234]="ê";s[235]="ë";s[236]="ì";s[237]="í";s[238]="î";s[239]="ï";s[240]="ð";s[241]="ñ";s[242]="ò";s[243]="ó";s[244]="ô";s[245]="õ";s[246]="ö";s[247]="÷";s[248]="ø";s[249]="ù";s[250]="ú";s[251]="û";s[252]="ü";s[253]="ý";s[254]="þ";s[255]="ÿ"}if("ENT_NOQUOTES"!==n)s[34]=""";if("ENT_QUOTES"===n)s[39]="'";s[60]="<";s[62]=">";for(i in s)if(s.hasOwnProperty(i))a[String.fromCharCode(i)]=s[i];return a}}]);\n',"Worker",void 0,void 0)}var cd=n(0),m=n(33),f=n(11),g=n(35),p=n(23),b=n(26),v=n(16),y=n(1),w=n(6),E=n(19),C=n(5),T=n(10),x=n(9),k=n(25),S=n(8);let O,N;const _={local:["haveInsertButtonsBeenAltered","insertButtons","signaturePrefix"],undocumented:["defaultCommentLinkType","defaultSectionLinkType","showLoadingOverlay"],aliases:{allowEditOthersComments:["allowEditOthersMsgs"],alwaysExpandAdvanced:["alwaysExpandSettings"],haveInsertButtonsBeenAltered:["areInsertButtonsAltered","insertButtonsChanged"],desktopNotifications:["browserNotifications"],signaturePrefix:["mySig","mySignature"]}};function A(){return P.apply(this,arguments)}function P(){return(P=o()((function*(){_.default={allowEditOthersComments:!1,alwaysExpandAdvanced:!1,haveInsertButtonsBeenAltered:!1,autocompleteTypes:["mentions","commentLinks","wikilinks","templates","tags"],autopreview:!0,desktopNotifications:"unknown",defaultCommentLinkType:null,defaultSectionLinkType:null,enableThreads:!0,hideTimezone:!1,insertButtons:cd.a.config.defaultInsertButtons||[],notifications:"all",notifyCollapsedThreads:!1,notificationsBlacklist:[],reformatComments:null,showContribsLink:!1,showLoadingOverlay:!0,showToolbar:!0,signaturePrefix:cd.a.config.defaultSignaturePrefix,timestampFormat:"default",modifyToc:!0,useBackgroundHighlighting:!0,useTemplateData:!0,useUiTime:!0,watchOnReply:!0,watchSectionOnReply:!0};cd.a.settings=cd.a.settings||{};const e={[cd.a.g.SETTINGS_OPTION_NAME]:mw.user.options.get(cd.a.g.SETTINGS_OPTION_NAME),[cd.a.g.LOCAL_SETTINGS_OPTION_NAME]:mw.user.options.get(cd.a.g.LOCAL_SETTINGS_OPTION_NAME)};Object.keys(_.default).forEach(e=>{(_.aliases[e]||[]).concat(e).forEach(t=>{const n="cd"+Object(y.j)(t);if(n in window&&(typeof window[n]==typeof _.default[e]||null===_.default[e]))cd.a.settings[e]=window[n]})});const t=yield Object(T.b)({options:e,omitLocal:!0});Object.keys(t).forEach(e=>{if(!_.undocumented.includes(e))cd.a.settings[e]=t[e]});if(void 0!==cd.a.settings.signaturePrefix)cd.a.settings.signaturePrefix=cd.a.settings.signaturePrefix.replace(cd.a.g.SIGN_CODE,"");if(!cd.a.settings.haveInsertButtonsBeenAltered&&JSON.stringify(cd.a.settings.insertButtons)!==JSON.stringify(cd.a.config.defaultInsertButtons))cd.a.settings.insertButtons=cd.a.config.defaultInsertButtons;cd.a.settings=Object.assign({},_.default,cd.a.settings);if(!Object(y.c)(cd.a.settings,t))Object(T.e)().catch(e=>{console.warn("Couldn't save the settings to the server.",e)});Object.assign(cd.a.settings,Object(T.a)())}))).apply(this,arguments)}function I(e){const t="ltr"===cd.a.g.CONTENT_DIR?"padding-left":"padding-right";cd.a.g.CONTENT_START_MARGIN=parseFloat(cd.a.g.$contentColumn.css(t));if(cd.a.g.CONTENT_START_MARGIN${cd.a.s("script-name-short")})`;cd.a.g.SUMMARY_LENGTH_LIMIT=mw.config.get("wgCommentCodePointLimit")-cd.a.g.SUMMARY_POSTFIX.length}cd.a.g.isIPv6Address=mw.util.isIPv6Address;cd.a.g.notificationArea=document.querySelector(".mw-notification-area");cd.a.state.dontHandleScroll=!1;cd.a.state.isAutoScrollInProgress=!1;cd.a.state.isPageBeingReloaded=!1;cd.a.state.hasPageBeenReloaded=!1;cd.a.g.processPageInBackground=b.a.processPage;cd.a.g.editWatchedSections=E.a;cd.a.g.showSettingsDialog=E.d;cd.a.g.setVisits=T.f;cd.a.api.getCommentByAnchor=a.a.getByAnchor;cd.a.api.getSectionByAnchor=l.a.getByAnchor;cd.a.api.getSectionsByHeadline=l.a.getByHeadline;cd.a.api.getLastActiveCommentForm=s.a.getLastActive;cd.a.api.getLastActiveAlteredCommentForm=s.a.getLastActiveAltered;cd.a.api.reloadPage=J}function R(){var e,t,n,i,o,a;cd.a.config.customTalkNamespaces=cd.a.config.customTalkNamespaces||[];const s=null===(e=cd.a.config.signatureEndingRegexp)||void 0===e?void 0:null===(t=e.source)||void 0===t?void 0:t.slice(-1);if(s&&"$"!==s)cd.a.config.signatureEndingRegexp=new RegExp(cd.a.config.signatureEndingRegexp.source+"$");cd.a.g.CONTRIBS_PAGE_LINK_REGEXP=new RegExp(`^${cd.a.g.CONTRIBS_PAGE}/`);const r=e=>e.replace(/[ _]/g,"[ _]+").replace(/:/g,"[ _]*:[ _]*"),c=mw.config.get("wgNamespaceIds"),l=Object.keys(c).filter(e=>2===c[e]||3===c[e]).map(r).join("|");cd.a.g.USER_NAMESPACES_REGEXP=new RegExp(`(?:^|:)(?:${l}):(.+)`,"i");const u=Object.keys(c).filter(e=>2===c[e]).map(r).join("|");cd.a.g.USER_LINK_REGEXP=new RegExp(`^:?(?:${u}):([^/]+)$`,"i");cd.a.g.USER_SUBPAGE_LINK_REGEXP=new RegExp(`^:?(?:${u}):.+?/`,"i");const d=Object.keys(c).filter(e=>3===c[e]).map(r).join("|");cd.a.g.USER_TALK_LINK_REGEXP=new RegExp(`^:?(?:${d}):([^/]+)$`,"i");cd.a.g.USER_TALK_SUBPAGE_LINK_REGEXP=new RegExp(`^:?(?:${d}):.+?/`,"i");const h=Object.keys(c).filter(e=>e).join("|");cd.a.g.ALL_NAMESPACES_REGEXP=new RegExp(`^:?(?:${h}):`,"i");const m=r(cd.a.g.CONTRIBS_PAGE);cd.a.g.CAPTURE_USER_NAME_PATTERN=`\\[\\ _]*:?(?:\\w*:){0,2}(?:(?:${l})[ _]*:[ _]*+?(?:\\|[^\\]]+?\\|((?:\\[\\^\\+?\\]\\]|[^|\\]])+))?\\]\\]`,"ig");const I=Object.keys(c).filter(e=>6===c[e]||14===c[e]).map(r).join("|");cd.a.g.COLON_NAMESPACES_PREFIX_REGEXP=new RegExp(`^:(?:${I}):`,"i");cd.a.g.BAD_COMMENT_BEGINNINGS=cd.a.g.BAD_COMMENT_BEGINNINGS.concat(new RegExp(`^\\[\\[${cd.a.g.FILE_PREFIX_PATTERN}.+\\n*(?=[*:#])`,"i")).concat(cd.a.config.customBadCommentBeginnings);if(f){const e=new RegExp(`^\\{\\{ *(?:${f}) *\\}\\} *\\n+`,"i");cd.a.g.BAD_COMMENT_BEGINNINGS.push(e)}cd.a.g.ADD_TOPIC_SELECTOR=["#ca-addsection a",'a[href*="section=new"]','.commentbox input[type="submit"]','.createbox input[type="submit"]'].concat(cd.a.config.customAddTopicLinkSelectors).join(", ");cd.a.g.PAGES_WITHOUT_ARCHIVES_REGEXP=Object(y.H)(cd.a.config.pagesWithoutArchives);cd.a.g.ARCHIVE_PAGES_MAP=new Map;cd.a.g.SOURCE_PAGES_MAP=new Map;const L=(e,t,n)=>{let i=[],o=Object(y.x)(e,/\\[$\\]/g,i);o=mw.util.escapeRegExp(o);if(t)o=o.replace(/\\\$/,"$").replace(/\$(\d+)/,(e,n)=>{const i=t[n-1];return i?`(${i.source})`:e});o="^"+o+(n?".*":"")+"$";o=Object(y.W)(o,i);return new RegExp(o)};cd.a.config.archivePaths.forEach(e=>{if(e instanceof RegExp){let t=new RegExp(e.source+".*");cd.a.g.SOURCE_PAGES_MAP.set(t,"")}else{const t=L(e.source,e.replacements),n=L(e.archive,e.replacements,!0);cd.a.g.ARCHIVE_PAGES_MAP.set(t,e.archive);cd.a.g.SOURCE_PAGES_MAP.set(n,e.source)}})}function H(){Object(w.e)();let e={};const t=document.createElement("span");t.innerHTML=cd.a.sParse("dot-separator");e.separator=t;if(!1!==cd.a.settings.reformatComments){const t=document.createElement("div");t.className="cd-comment-header";const n=document.createElement("span");n.className="cd-comment-author-wrapper";t.appendChild(n);const i=document.createElement("a");i.className="cd-comment-author mw-userlink";n.appendChild(i);const o=document.createElement("bdi");i.appendChild(o);const a=document.createTextNode(" "+cd.a.mws("parentheses-start")),s=document.createTextNode(cd.a.mws("parentheses-end")),r=document.createElement("a");r.textContent=cd.a.s("comment-author-talk");n.appendChild(a);n.appendChild(r);if(cd.a.settings.showContribsLink){const t=document.createElement("a");t.textContent=cd.a.s("comment-author-contribs");const i=e.separator.cloneNode(!0);n.appendChild(i);n.appendChild(t)}n.appendChild(s);e.headerElement=t}if(!0!==cd.a.settings.reformatComments){e.getReplyButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-reply"),framed:!1,classes:["cd-button-ooui","cd-comment-button-ooui"]});e.replyButton=e.getReplyButton().$element.get(0);e.getEditButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-edit"),framed:!1,classes:["cd-button-ooui","cd-comment-button-ooui"]});e.editButton=e.getEditButton().$element.get(0);e.getThankButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-thank"),title:cd.a.s("cm-thank-tooltip"),framed:!1,classes:["cd-button-ooui","cd-comment-button-ooui"]});e.thankButton=e.getThankButton().$element.get(0);e.getCopyLinkButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-copylink"),icon:"link",title:cd.a.s("cm-copylink-tooltip"),framed:!1,invisibleLabel:!0,classes:["cd-button-ooui","cd-comment-button-ooui","cd-comment-button-ooui-icon"]});e.copyLinkButton=e.getCopyLinkButton().$element.get(0);e.getGoToParentButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-gotoparent"),icon:"upTriangle",title:cd.a.s("cm-gotoparent-tooltip"),framed:!1,invisibleLabel:!0,classes:["cd-button-ooui","cd-comment-button-ooui","cd-comment-button-ooui-icon"]});e.goToParentButton=e.getGoToParentButton().$element.get(0);e.getGoToChildButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-gotochild"),icon:"downTriangle",title:cd.a.s("cm-gotochild-tooltip"),framed:!1,invisibleLabel:!0,classes:["cd-button-ooui","cd-comment-button-ooui","cd-comment-button-ooui-icon"]});e.goToChildButton=e.getGoToChildButton().$element.get(0)}const n=document.createElement("div");n.className="cd-comment-underlay";e.underlay=n;const i=document.createElement("div");i.className="cd-comment-overlay";e.overlay=i;const o=document.createElement("div");o.className="cd-comment-overlay-line";i.appendChild(o);const a=document.createElement("div");a.className="cd-comment-overlay-marker";i.appendChild(a);if(!cd.a.settings.reformatComments){const e=document.createElement("div");e.className="cd-comment-overlay-innerWrapper";i.appendChild(e);const t=document.createElement("div");t.textContent="\xa0";t.className="cd-comment-overlay-gradient";e.appendChild(t);const n=document.createElement("div");n.className="cd-comment-overlay-content";e.appendChild(n)}cd.a.g.COMMENT_ELEMENT_PROTOTYPES=e;let s={};s.replyButton=new OO.ui.ButtonWidget({label:cd.a.s("section-reply"),framed:!1,classes:["cd-button-ooui","cd-section-button","cd-thread-button"]}).$element.get(0);s.addSubsectionButton=new OO.ui.ButtonWidget({label:" ",framed:!1,classes:["cd-button-ooui","cd-section-button"]}).$element.get(0);cd.a.g.SECTION_ELEMENT_PROTOTYPES=s;let r={};r.expandButton=new OO.ui.ButtonWidget({label:"Expand the thread",icon:"expand",framed:!1,classes:["cd-button-ooui","cd-button-expandNote","cd-thread-button","cd-thread-button-invisible"]}).$element.get(0);const c=document.createElement("div");c.className="cd-thread-clickArea";c.title=cd.a.s("thread-tooltip");const l=document.createElement("div");l.className="cd-thread-line";c.appendChild(l);r.clickArea=c;cd.a.g.THREAD_ELEMENT_PROTOTYPES=r}function B(e){return F.apply(this,arguments)}function F(){return(F=o()((function*(e){cd.a.g.worker=new h;j();yield Promise.all(e.length?e:Object(k.a)());D();yield A();Object(C.h)("content");R();H();if(cd.a.settings.useBackgroundHighlighting)n(51);$.fn.extend(m.a);Object(C.g)();cd.a.commentForms=[]}))).apply(this,arguments)}function U(){return cd.a.comments.filter(e=>!1===e.isSeen).map(e=>e.anchor)}function Y(e){return W.apply(this,arguments)}function W(){return(W=o()((function*(e){cd.a.debug.stopTimer("getting HTML");try{yield Object(g.a)(e);mw.hook("wikipage.content").fire(cd.a.g.$content)}catch(e){mw.notify(cd.a.s("error-processpage"),{type:"error"});console.error(e);V()}}))).apply(this,arguments)}let q;function G(){return cd.a.settings&&!1===cd.a.settings.showLoadingOverlay||!cd.a.settings&&void 0!==window.cdShowLoadingOverlay&&!1===window.cdShowLoadingOverlay}function z(e=!1){if(e)cd.a.state.isPageBeingReloaded=!0;else cd.a.state.isFirstRun=!0;if(!G())if(!q){q=$("
").addClass("cd-loadingPopup");const e=$("
").addClass("cd-loadingPopup-logo").appendTo(q);$("
").addClass("cd-loadingPopup-logo-partBackground").appendTo(e);$("").attr("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADcAAAA3CAYAAACo29JGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAewQAAHsEBw2lUUwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAK7SURBVGiB3Zq/axRBFMc/60VioQgW1yjEiwa0tdXiCkH9AwLaKCLY+Aek9CxUbGw9/wMbrYQgCIrEpEgUAimNmCAqapWAGL2wFrPr7R374739kZ3ZL7ziuHlv3mdndufN7MJQHaAPbAIDwK/ZBkEufeA4BXQB2LIAKMm2ghzV6lgOFgXsaOEeW5C41PpauE0LkpbahgbMw9y4LY1TjdoFJqSNPcwVcUmetOE+ZeA/wAqwhBnxvPoBvAY+FoghknS+vwNORPymgVWFf2h3gf1BDA+4Buwo/EuH+x3AjGsG+KtI7HlCDvfqhFtK8V9RJHY9IcaZKuCk99xOyn+aDtPiaNVlCJxYqkmn5bGYDk6iq0OfJSR6XxEjDi5qI6WaNOgyMBUJnveB0mN0rbqK7r7NggsBOxq4cAQXgQWK7Ry+Ai+BDzl8JXA+QamWN8G6TAq3oV3EXdLRJsO1pEXoe2C9ykyAi8ChsoNK5vmLsjsd02lMxV/mPecjDOgDZ6tj46kij1BdSVtp0E/AkQrAbipyqAzOB9YYXciL6gZmG2UFnA/8BG4x3Lbk0TS6qbhncKF9Ax4Cl4DDGTAecAozUvMUq27EcGUeM3wHvmBG1g+AJoE2ZiofKKmf8JihC7xKayg+bBGoHZg1cq1C2dU0dg3us6axa3DzmsYuwW0DDyK/J7McXIHbBmYxVVKoGYlj3vWmahtg3g08Iv793BtBDHFnPcmV2iNdQbjguwj2C0HekkX8DkO482VnKtQE5ij/MnBO45hGf1vR1kYTgzUGrhcDBnZ85VAILgkMzKO57oRzw6WBgTnFrTvhXHBZYGAWUxc+6xiBk4CFsv2DnP/WwuxsNXDrwBPMzroNHMSdGtV6zaGYli5KCuisJIBOKwvQeaUBNkJJgI1RHGCjNA7YOEUBG6k5gvKriXoLeP8AAFe0oEsY7eMAAAAASUVORK5CYII=").appendTo(e);$(document.body).append(q)}else q.show()}function V(e=!0){if(e){cd.a.state.isFirstRun=!1;cd.a.state.isPageFirstParsed=!1;cd.a.state.isPageBeingReloaded=!1}if(q&&!G())q.hide()}function K(){return cd.a.state.isFirstRun||cd.a.state.isPageBeingReloaded}function X(){return mw.config.get("wgRevisionId")>=mw.config.get("wgCurRevisionId")}function Z(e){const t=new mw.Uri,n=t.query;if((t.fragment||n.diff||n.oldid)&&!e.isPageReloadedExternally){delete n.title;delete n.curid;let e;if(n.diff||n.oldid){e="pushState";delete n.diff;delete n.oldid;delete n.diffmode;delete n.type;cd.a.g.$content.children(".mw-revslider-container, .ve-init-mw-diffPage-diffMode, .diff, .oo-ui-element-hidden, .diff-hr, .diff-currentversion-title").remove();$(".mw-revision").remove();$("#firstHeading").text(cd.a.page.name);$(window).on("popstate",()=>{if(mw.util.getParamValue("diff")||mw.util.getParamValue("oldid"))location.reload()});cd.a.g.isDiffPage=!1}else e="replaceState";history[e](history.state,"",cd.a.page.getUrl(n))}}function J(){return Q.apply(this,arguments)}function Q(){return(Q=o()((function*(e={}){var t;if(!cd.a.state.isPageBeingReloaded){cd.a.comments.forEach(e=>{var t;null===(t=e.$animatedBackground)||void 0===t||t.add(e.$marker).stop(!0,!0)});if(e.isPageReloadedExternally)a.a.resetLayers();if(X())te();if(!e.commentAnchor&&!e.sectionAnchor)Object(y.Q)();Object(y.f)(null!==(t=e.closeNotificationsSmoothly)&&void 0!==t?t:!0);cd.a.debug.init();cd.a.debug.startTimer("total time");cd.a.debug.startTimer("getting HTML");z(!0);Object(x.h)().catch(e=>{console.warn(e)});if(!e.isPageReloadedExternally){let t;try{t=yield cd.a.page.parse(null,!1,!0)}catch(t){V();if(e.wasCommentFormSubmitted)throw t;else{mw.notify(cd.a.s("error-reloadpage"),{type:"error"});console.warn(t);return}}e.html=t.text;mw.config.set({wgRevisionId:t.revid,wgCurRevisionId:t.revid});mw.loader.load(t.modules);mw.loader.load(t.modulestyles);mw.config.set(t.jsconfigvars)}r.a.reset();cd.a.commentForms.forEach(e=>{e.$outermostElement.detach()});e.unseenCommentAnchors=U();Z(e);cd.a.state.hasPageBeenReloaded=!0;b.a.updatePageTitle(0,!1);yield Y(e);p.a.possiblyHide();if(!e.commentAnchor&&!e.sectionAnchor)Object(y.O)(!1)}}))).apply(this,arguments)}function ee(e){if(e.is("#mw-content-text")){const t=e.children(".mw-parser-output");if(t.length&&!t.data("cd-parsed"))J({isPageReloadedExternally:!0})}}function te(e){const t=()=>{const e=cd.a.commentForms.filter(e=>e.isAltered()).map(e=>{var t,n,i,o,s,r;let c;const u=e.target;if(e.target instanceof a.a)c={anchor:u.anchor};else if(u instanceof l.a){var d;c={headline:u.headline,oldestCommentAnchor:null===(d=u.oldestComment)||void 0===d?void 0:d.anchor,id:u.id,anchor:u.anchor,ancestors:u.getAncestors().map(e=>e.headline)}}return{mode:e.mode,targetData:c,preloadConfig:e.preloadConfig,isNewTopicOnTop:e.isNewTopicOnTop,headline:null===(t=e.headlineInput)||void 0===t?void 0:t.getValue(),comment:e.commentInput.getValue(),summary:e.summaryInput.getValue(),minor:null===(n=e.minorCheckbox)||void 0===n?void 0:n.isSelected(),watch:null===(i=e.watchCheckbox)||void 0===i?void 0:i.isSelected(),watchSection:null===(o=e.watchSectionCheckbox)||void 0===o?void 0:o.isSelected(),omitSignature:null===(s=e.omitSignatureCheckbox)||void 0===s?void 0:s.isSelected(),delete:null===(r=e.deleteCheckbox)||void 0===r?void 0:r.isSelected(),originalHeadline:e.originalHeadline,originalComment:e.originalComment,isSummaryAltered:e.isSummaryAltered,lastFocused:e.lastFocused}}),t=Date.now(),n=e.length?{commentForms:e,saveUnixTime:t}:{},i=Object(y.r)("commentForms");i[mw.config.get("wgPageName")]=n;Object(y.R)("commentForms",i);N=Date.now()},n=Date.now()-(N||0);clearTimeout(O);if(e)t();else O=setTimeout(t,Math.max(0,5e3-n))}function ne(e){if(cd.a.state.isFirstRun||e){cd.a.commentForms=[];const e=function(e){const t=Object.assign({},e),n=60*cd.a.g.SECONDS_IN_DAY*1e3;Object.keys(t).forEach(e=>{var i;if(null===(i=t[e].commentForms)||void 0===i||!i.length||t[e].saveUnixTime{var i,o;const r=s.a.modeToProperty(e.mode);if(null!==(i=e.targetData)&&void 0!==i&&i.headline){const i=l.a.search({headline:e.targetData.headline,oldestCommentAnchor:e.targetData.oldestCommentAnchor,id:e.targetData.id,anchor:e.targetData.anchor,ancestors:e.targetData.ancestors});if(null!=i&&i.isActionable&&!i[r+"Form"])try{i[r](e);t=!0}catch(t){console.warn(t);n.push(e)}else n.push(e)}else if(null!==(o=e.targetData)&&void 0!==o&&o.anchor){const i=a.a.getByAnchor(e.targetData.anchor);if(null!=i&&i.isActionable&&!i[r+"Form"])try{i[r](e);t=!0}catch(t){console.warn(t);n.push(e)}else n.push(e)}else if("addSection"===e.mode)if(!cd.a.g.addSectionForm){cd.a.g.addSectionForm=new s.a({target:cd.a.page,mode:e.mode,dataToRestore:e,preloadConfig:e.preloadConfig,isNewTopicOnTop:e.isNewTopicOnTop});t=!0}else n.push(e)});if(t){mw.notification.notify(cd.a.s("restore-restored-text"),{title:cd.a.s("restore-restored-title")}).$notification.on("click",()=>{f.a.goToNextCommentForm(!0)})}if(n.length)Object(E.b)(n)}(t)}else{const e=[],t=t=>{var n;e.push({headline:null===(n=t.headlineInput)||void 0===n?void 0:n.getValue(),comment:t.commentInput.getValue(),summary:t.summaryInput.getValue()});cd.a.commentForms.splice(cd.a.commentForms.indexOf(t),1)};cd.a.commentForms.forEach(e=>{e.checkCodeRequest=null;const n=e.target;if(n instanceof a.a)if(n.anchor){const i=a.a.getByAnchor(n.anchor);if(null!=i&&i.isActionable)try{e.setTargets(i);i[s.a.modeToProperty(e.mode)](e);e.addToPage()}catch(n){console.warn(n);t(e)}else t(e)}else t(e);else if(n instanceof l.a){var i;const o=l.a.search({headline:n.headline,oldestCommentAnchor:null===(i=n.oldestComment)||void 0===i?void 0:i.anchor,id:n.id,anchor:n.anchor,ancestors:n.getAncestors().map(e=>e.headline)});if(null!=o&&o.isActionable)try{e.setTargets(o);o[s.a.modeToProperty(e.mode)](e);e.addToPage()}catch(n){console.warn(n);t(e)}else t(e)}else if("addSection"===e.mode){e.addToPage();cd.a.g.addSectionForm=e}});if(e.length)Object(E.b)(e)}te();f.a.updateCommentFormButton()}function ie(){return oe.apply(this,arguments)}function oe(){return(oe=o()((function*(){if(null===cd.a.settings.reformatComments){const e=yield Object(T.b)({reuse:!0});if([null,void 0].includes(e.reformatComments)){const t=[{label:cd.a.s("rc-suggestion-yes"),action:"accept",flags:"primary"},{label:cd.a.s("rc-suggestion-no"),action:"reject"}],n=$("
"),i=$("").attr("width",626).attr("height",67).attr("src","//upload.wikimedia.org/wikipedia/commons/0/08/Convenient_Discussions_comment_-_old_format.png").addClass("cd-rc-img"),o=$("").attr("width",30).attr("height",30).attr("src","data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.58 8.59L11 14.17L11 2L9 2L9 14.17L3.41 8.59L2 10L10 18L18 10L16.58 8.59Z' fill='black'/%3E%3C/svg%3E").addClass("cd-rc-img cd-rc-arrow"),a=$("").attr("width",626).attr("height",118).attr("src","//upload.wikimedia.org/wikipedia/commons/d/da/Convenient_Discussions_comment_-_new_format.png").addClass("cd-rc-img"),s=$("
").addClass("cd-rc-text").html(cd.a.sParse("rc-suggestion"));n.append(i,o,a,s);const r=yield Object(w.h)(n,{size:"large",actions:t});let c;if("accept"===r){cd.a.settings.reformatComments=e.reformatComments=!0;c=Object(T.e)(e)}else if("reject"===r){cd.a.settings.reformatComments=e.reformatComments=!1;c=Object(T.e)(e)}if(c)try{yield c;return e.reformatComments}catch(e){mw.notify(cd.a.s("error-settings-save"),{type:"error"});console.warn(e)}}}return!1}))).apply(this,arguments)}function ae(){return se.apply(this,arguments)}function se(){return(se=o()((function*(){if("undefined"!=typeof Notification){if("unknown"===cd.a.settings.desktopNotifications&&"denied"!==Notification.permission){const e=Object(T.b)({reuse:!0});if(["unknown",void 0].includes(e.reformatComments)){const t=[{label:cd.a.s("dn-confirm-yes"),action:"accept",flags:"primary"},{label:cd.a.s("dn-confirm-no"),action:"reject"}],n=yield Object(w.h)(cd.a.s("dn-confirm"),{size:"medium",actions:t});let i;if("accept"===n){if("default"===Notification.permission){OO.ui.alert(cd.a.s("dn-grantpermission"));Notification.requestPermission(t=>{if("granted"===t){cd.a.settings.desktopNotifications=e.desktopNotifications="all";i=Object(T.e)(e)}else if("denied"===t){cd.a.settings.desktopNotifications=e.desktopNotifications="none";i=Object(T.e)(e)}})}else if("granted"===Notification.permission){cd.a.settings.desktopNotifications=e.desktopNotifications="all";i=Object(T.e)(e)}}else if("reject"===n){cd.a.settings.desktopNotifications=e.desktopNotifications="none";i=Object(T.e)(e)}if(i)try{yield i}catch(e){mw.notify(cd.a.s("error-settings-save"),{type:"error"});console.warn(e)}}}if(!["unknown","none"].includes(cd.a.settings.desktopNotifications)&&"default"===Notification.permission){yield OO.ui.alert(cd.a.s("dn-grantpermission-again"),{title:cd.a.s("script-name")});Notification.requestPermission()}}}))).apply(this,arguments)}function re(e,t,n){return cd.a.comments.filter(e=>e.author.name===n&&e.date&&e.datet.getTime()-60*cd.a.g.MILLISECONDS_IN_MINUTE*24).sort((e,t)=>e.date.getTime()-t.date.getTime()).slice(-1)[0]}function ce(e){const t=cd.a.sections.map(t=>({section:t,score:Object(y.e)(e,t.headline)})).filter(e=>e.score>.66).sort((e,t)=>t.score-e.score)[0];return t?t.section:null}function le(e,t,n){return ue.apply(this,arguments)}function ue(){return(ue=o()((function*(e,t,n){let i,o,a="",s="";if(t){i=cd.a.sParse("deadanchor-comment-lead");const e=re(0,t,n);if(e){a=(" "+cd.a.sParse("deadanchor-comment-previous","#"+e.anchor)).replace(cd.a.g.ARTICLE_PATH_REGEXP,"$1");i+=a}}else{o=Object(y.V)(e);i=cd.a.sParse("deadanchor-section-lead",o);const t=ce(o);if(t){s=(" "+cd.a.sParse("deadanchor-section-similar","#"+t.anchor,t.headline)).replace(cd.a.g.ARTICLE_PATH_REGEXP,"$1");if(o.includes("{{"))i+=s}}if(cd.a.page.canHaveArchives()){i+=" ";let n;if(t)i+=cd.a.sParse("deadanchor-comment-finding");else{i+=cd.a.sParse("deadanchor-section-finding");try{n=decodeURIComponent(o.replace(/\.([0-9A-F]{2})/g,"%$1"))}catch(e){n=o}}const c=t?Object(C.d)(t,!1,cd.a.g.CONTENT_TIMEZONE):o.replace(/"/g,"");let l=`"${c}"`;if(o&&o!==n){const e=n.replace(/"/g,"");l+=` OR "${e}"`}if(t)for(let e=1;e<=3;e++){const n=new Date(t.getTime()-cd.a.g.MILLISECONDS_IN_MINUTE*e),i=Object(C.d)(n,!1,cd.a.g.CONTENT_TIMEZONE);l+=` OR "${i}"`}const u=cd.a.page.getArchivePrefix();l+=" prefix:"+u;cd.a.g.mwApi.get({action:"query",list:"search",srsearch:l,srprop:o?"sectiontitle":void 0,srsort:"create_timestamp_desc",srlimit:"20"}).then(i=>{var u;const d=null==i?void 0:null===(u=i.query)||void 0===u?void 0:u.search;let h=mw.util.getUrl("Special:Search",{search:l,sort:"create_timestamp_desc",cdcomment:t&&e});h=cd.a.g.SERVER+h;if(0===d.length){let e;if(t)e=cd.a.sParse("deadanchor-comment-lead")+" "+cd.a.sParse("deadanchor-comment-notfound",h)+a;else{let t="";if(!s||!o.includes("{{"))t=" "+cd.a.sParse("deadanchor-section-notfound",h);e=cd.a.sParse("deadanchor-section-lead",o)+t+s}r.setLabel(Object(y.Y)(e))}else{let i,s,l=o;if(o){for(const[,e]of Object.entries(d))if(e.sectiontitle&&[o,n].includes(e.sectiontitle)){i=e.title;l=Object(y.V)(e.sectiontitle);break}}else{const e=[];for(const[,t]of Object.entries(d)){const n=Object(S.k)(t.snippet);if(n&&n.includes(c))e.push(t.title)}if(1===e.length)i=e[0]}if(i){const n=i+"#"+(t?e:l);s=t?cd.a.sParse("deadanchor-comment-exactmatch",n,h)+a:cd.a.sParse("deadanchor-section-exactmatch",l,n,h)}else s=t?cd.a.sParse("deadanchor-comment-inexactmatch",h)+a:cd.a.sParse("deadanchor-section-inexactmatch",l,h);r.setLabel(Object(y.Y)(s))}})}const r=new OO.ui.MessageWidget({type:"warning",inline:!0,label:Object(y.Y)(i),classes:["cd-message-notFound"]});cd.a.g.$root.prepend(r.$element)}))).apply(this,arguments)}function de(){const e=cd.a.sParse("discussiontools-incompatible"),{$wrapper:t,buttons:[n]}=Object(y.Y)(e,{callbacks:{"cd-notification-disabledt":(i=o()((function*(){n.setPending(!0);try{yield cd.a.g.mwApi.saveOption("discussiontools-betaenable",0).catch(y.w)}catch(e){mw.notify(Object(y.Y)(cd.a.sParse("error-settings-save")));return}finally{n.setPending(!1)}a.$notification.hide();const e=Object(y.Y)(cd.a.sParse("discussiontools-disabled"),{callbacks:{"cd-notification-refresh":()=>{location.reload()}}}).$wrapper;mw.notify(e)})),function(){return i.apply(this,arguments)})}});var i;const a=mw.notification.notify(t,{type:"warn",autoHide:!1})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return $}));n.d(t,"n",(function(){return D}));n.d(t,"g",(function(){return H}));n.d(t,"h",(function(){return U}));n.d(t,"i",(function(){return Y}));n.d(t,"l",(function(){return W}));n.d(t,"b",(function(){return G}));n.d(t,"d",(function(){return V}));n.d(t,"c",(function(){return K}));n.d(t,"e",(function(){return X}));n.d(t,"f",(function(){return Z}));n.d(t,"m",(function(){return J}));n.d(t,"o",(function(){return Q}));n.d(t,"j",(function(){return ee}));n.d(t,"k",(function(){return te}));var i=n(24),o=n.n(i),a=n(41),s=n.n(a),r=n(42),c=n.n(r);function l(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));t.setUTCFullYear(e.getFullYear());return e.getTime()-t.getTime()}function u(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function d(e){u(1,arguments);var t=Object.prototype.toString.call(e);if(e instanceof Date||"object"==typeof e&&"[object Date]"===t)return new Date(e.getTime());else if("number"==typeof e||"[object Number]"===t)return new Date(e);else{if(("string"==typeof e||"[object String]"===t)&&"undefined"!=typeof console){console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule");console.warn((new Error).stack)}return new Date(NaN)}}function h(e,t){u(2,arguments);var n=d(e),i=d(t),o=n.getTime()-i.getTime();if(o<0)return-1;else if(o>0)return 1;else return o}function m(e){return function(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");t=t||{};for(var n in t)if(t.hasOwnProperty(n))e[n]=t[n];return e}({},e)}var f={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function g(e){return function(t){var n=t||{},i=n.width?String(n.width):e.defaultWidth;return e.formats[i]||e.formats[e.defaultWidth]}}var p={date:g({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:g({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:g({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},b={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function v(e){return function(t,n){var i,o=n||{};if("formatting"===(o.context?String(o.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,s=o.width?String(o.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{var r=e.defaultWidth,c=o.width?String(o.width):e.defaultWidth;i=e.values[c]||e.values[r]}return i[e.argumentCallback?e.argumentCallback(t):t]}}function y(e){return function(t,n){var i=String(t),o=n||{},a=o.width,s=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],r=i.match(s);if(!r)return null;var c,l=r[0],u=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth];if("[object Array]"===Object.prototype.toString.call(u))c=function(e,t){for(var n=0;n0)return"in "+i;else return i+" ago";return i},formatLong:p,formatRelative:function(e,t,n,i){return b[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:v({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:v({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:v({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:v({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:v({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(w={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e,t){var n=String(e),i=t||{},o=n.match(w.matchPattern);if(!o)return null;var a=o[0],s=n.match(w.parsePattern);if(!s)return null;var r=w.valueCallback?w.valueCallback(s[0]):s[0];return{value:r=i.valueCallback?i.valueCallback(r):r,rest:n.slice(a.length)}}),era:y({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:y({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:y({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:y({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:y({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};u(2,arguments);var i=n.locale||E;if(!i.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var o=h(e,t);if(isNaN(o))throw new RangeError("Invalid time value");var a,s,r=m(n);r.addSuffix=Boolean(n.addSuffix);r.comparison=o;if(o>0){a=d(t);s=d(e)}else{a=d(e);s=d(t)}var c,f=null==n.roundingMethod?"round":String(n.roundingMethod);if("floor"===f)c=Math.floor;else if("ceil"===f)c=Math.ceil;else if("round"===f)c=Math.round;else throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");var g,p=s.getTime()-a.getTime(),b=p/6e4,v=l(s)-l(a),y=(p-v)/6e4;if(null==n.unit)if(b<1)g="second";else if(b<60)g="minute";else if(b<1440)g="hour";else if(y<43200)g="day";else if(y<525600)g="month";else g="year";else g=String(n.unit);if("second"===g){var w=c(p/1e3);return i.formatDistance("xSeconds",w,r)}else if("minute"===g){var C=c(b);return i.formatDistance("xMinutes",C,r)}else if("hour"===g){var T=c(b/60);return i.formatDistance("xHours",T,r)}else if("day"===g){var x=c(y/1440);return i.formatDistance("xDays",x,r)}else if("month"===g){var k=c(y/43200);return 12===k&&"month"!==n.unit?i.formatDistance("xYears",1,r):i.formatDistance("xMonths",k,r)}else if("year"===g){var S=c(y/525600);return i.formatDistance("xYears",S,r)}throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'")}function T(e,t){var n=function(e){if(!k[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n="06/25/2014, 00:00:00"===t||"\u200e06\u200e/\u200e25\u200e/\u200e2014\u200e \u200e00\u200e:\u200e00\u200e:\u200e00"===t;k[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return k[e]}(t);return n.formatToParts?function(e,t){for(var n=e.formatToParts(t),i=[],o=0;o=0)i[a]=parseInt(n[o].value,10)}return i}(n,e):function(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[i[3],i[1],i[2],i[4],i[5],i[6]]}(n,e)}var x={year:0,month:1,day:2,hour:3,minute:4,second:5};var k={};var S={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-])(\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/,timezoneIANA:/(UTC|(?:[a-zA-Z]+\/[a-zA-Z_-]+(?:\/[a-zA-Z_]+)?))$/};function O(e,t,n){var i,o,a;if(i=S.timezoneZ.exec(e))return 0;if(i=S.timezoneHH.exec(e)){if(!_(a=parseInt(i[2],10)))return NaN;o=36e5*a;return"+"===i[1]?-o:o}if(i=S.timezoneHHMM.exec(e)){a=parseInt(i[2],10);var s=parseInt(i[3],10);if(!_(a,s))return NaN;o=36e5*a+6e4*s;return"+"===i[1]?-o:o}if(i=S.timezoneIANA.exec(e)){t=new Date(t||Date.now());var r=N(n?t:function(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}(t),e);return-(n?r:function(e,t,n){var i=e.getTime()-t,o=N(new Date(i),n);if(t===o)return t;i-=o-t;var a=N(new Date(i),n);if(o===a)return o;return Math.max(o,a)}(t,r,e))}return 0}function N(e,t){var n=T(e,t),i=Date.UTC(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5]),o=e.getTime(),a=o%1e3;return i-(o-=a>=0?a:1e3+a)}function _(e,t){if(null!=t&&(t<0||t>59))return!1;else return!0}function A(e,t){return-O(e,t)}var cd=n(0),P=n(1);let I,L,M,j;const $={xg:["january-gen","february-gen","march-gen","april-gen","may-gen","june-gen","july-gen","august-gen","september-gen","october-gen","november-gen","december-gen"],D:["sun","mon","tue","wed","thu","fri","sat"],l:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],F:["january","february","march","april","may_long","june","july","august","september","october","november","december"],M:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]},D=[{interval:1,start:0,step:1},{interval:60,start:1,step:1},{interval:1440,start:60,step:60},{interval:44640,start:1440,step:1440}];let R=[];function H(){var e;if(o.a.utc)return;const t=null===(e=cd.a.i18n[cd.a.g.USER_LANGUAGE])||void 0===e?void 0:e.dayjsLocale;if(t)o.a.locale(t);o.a.extend(c.a);o.a.extend(s.a);cd.a.g.dayjs=o.a}function B(e){const t="content"===e,n=t?cd.a.g.CONTENT_DATE_FORMAT:cd.a.g.UI_DATE_FORMAT,i=t?cd.a.g.CONTENT_DIGITS:cd.a.g.UI_DIGITS,o=i?`[${i}]`:"\\d";let a="\\b";for(let e=0;e{if(!i)return e;const t=new RegExp("["+i+"]","g");return e.replace(t,e=>i.indexOf(e))};let s=0,r=0,c=0,l=0,u=0;for(let t=0;t0?"+":"-")+Math.abs(e);t+=")";return t}function G(e,t=!1){let n;if("default"===cd.a.settings.timestampFormat)n=V(e,t);else if("improved"===cd.a.settings.timestampFormat)n=K(e,t);else if("relative"===cd.a.settings.timestampFormat)n=X(e);return n}function z(e,t){return("0000"+e).slice(-t)}function V(e,t=!1,n){let i,a,s,r,c,l,u;if(cd.a.settings.useUiTime&&!["UTC",0].includes(cd.a.g.UI_TIMEZONE)&&!n){if(j)i=-e.getTimezoneOffset();else i="number"==typeof cd.a.g.UI_TIMEZONE?cd.a.g.UI_TIMEZONE:A(cd.a.g.UI_TIMEZONE,e.getTime())/cd.a.g.MILLISECONDS_IN_MINUTE;e=new Date(e.getTime()+i*cd.a.g.MILLISECONDS_IN_MINUTE)}else if(!n||"UTC"===n)i=0;else{const t=o()(e).tz(n);i=t.utcOffset();a=t.year();s=t.month();r=t.date();c=t.hour();l=t.minute();u=t.day()}if(void 0===a){a=e.getUTCFullYear();s=e.getUTCMonth();r=e.getUTCDate();c=e.getUTCHours();l=e.getUTCMinutes();u=e.getUTCDay()}let d="";const h=cd.a.g.UI_DATE_FORMAT;for(let e=0;et-cd.a.g.MILLISECONDS_IN_MINUTE)return cd.a.s("comment-timestamp-lessthanminute");else return function(e,t){u(1,arguments);return C(e,Date.now(),t)}(e,{addSuffix:!0,roundingMethod:"floor",locale:cd.a.i18n[cd.a.g.USER_LANGUAGE].dateFnsLocale})}function Z(e,t,n=!1){let i=e.getUTCFullYear(),o=e.getUTCMonth(),a=e.getUTCDate(),s=e.getUTCHours(),r=e.getUTCMinutes(),c=z(i,4)+z(o+1,2)+z(a,2)+z(s,2)+z(r,2)+"_"+Object(P.T)(t);if(n&&R.includes(c)){let e=2;const t=c;do{c=`${t}_${e}`;e++}while(R.includes(c))}return c}function J(e){if(e)R.push(e)}function Q(){R=[]}function ee(e){const t=e.match(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})_(.+)$/);if(!t)return null;const n=Number(t[1]),i=Number(t[2])-1,o=Number(t[3]),a=Number(t[4]),s=Number(t[5]),r=Object(P.V)(t[6]);return{date:new Date(Date.UTC(n,i,o,a,s)),author:r}}function te(e){if(!e.startsWith("c-"))return null;let[,t,n,i]=e.match(/^c-(.+?)-(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z)(?:-(.+))?$/)||[];if(!t)return null;t=Object(P.V)(t);const o=new Date(n);let a,s,r,c;if(i){[a,s]=i.match(/(.+)-(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z)$/)||[];if(a){a=Object(P.V)(a);r=new Date(s)}else c=i}return{author:t,date:o,parentAuthor:a,parentDate:r,sectionAnchorBeginning:c}}},function(e,t,n){"use strict";n.d(t,"e",(function(){return c}));n.d(t,"h",(function(){return l}));n.d(t,"g",(function(){return d}));n.d(t,"a",(function(){return h}));n.d(t,"f",(function(){return f}));n.d(t,"b",(function(){return g}));n.d(t,"d",(function(){return p}));n.d(t,"c",(function(){return b}));n.d(t,"i",(function(){return v}));var i=n(2),o=n.n(i),a=n(3),s=n(0),r=n(17);function c(){if(!s.a.g.windowManager){s.a.g.windowManager=(new OO.ui.WindowManager).on("closing",function(){var e=o()((function*(e,t){yield t;s.a.g.windowManager.clearWindows()}));return function(t,n){return e.apply(this,arguments)}}());$(document.body).append(s.a.g.windowManager.$element)}}function l(e){return u.apply(this,arguments)}function u(){return(u=o()((function*(e,t={}){var n;const i={message:e,actions:[{action:"accept",label:OO.ui.deferMsg("ooui-dialog-message-accept"),flags:"primary"},{action:"reject",label:OO.ui.deferMsg("ooui-dialog-message-reject"),flags:"safe"}]},o=new OO.ui.MessageDialog;s.a.g.windowManager.addWindows([o]);const a=s.a.g.windowManager.openWindow(o,Object.assign({},i,t));return null===(n=yield a.closed)||void 0===n?void 0:n.action}))).apply(this,arguments)}function d(e){const t=e.actions.get({actions:"save"})[0];return t&&!t.isDisabled()}function h(e,t){return m.apply(this,arguments)}function m(){return(m=o()((function*(e,t){if(!d(e)||confirm(s.a.s(t+"-close-confirm"))){e.close({action:"close"});Object(r.f)("dialog")}}))).apply(this,arguments)}function f(e,t,n,i){const o=t instanceof a.a?new OO.ui.Error(s.a.s(n),{recoverable:i}):new OO.ui.Error(s.a.s("error-javascript"),{recoverable:!1});e.showErrors(o);console.warn(t);if(!i)e.$errors.find(".oo-ui-buttonElement-button").on("click",()=>{e.close()});e.actions.setAbilities({close:!0});s.a.g.windowManager.updateWindowSize(e);e.popPending()}function g({value:e,selected:t,disabled:n,label:i,help:o,tabIndex:a,title:s,classes:r}){const c=new OO.ui.CheckboxInputWidget({value:e,selected:t,disabled:n,tabIndex:a});return[new OO.ui.FieldLayout(c,{label:i,align:"inline",help:o,helpInline:!0,title:s,classes:r}),c]}function p({label:e,selected:t,help:n,options:i}){const o=i.map(e=>new OO.ui.RadioOptionWidget(e)),a=new OO.ui.RadioSelectWidget({items:o}),s=new OO.ui.FieldLayout(a,{label:e,align:"top",help:n,helpInline:!0});a.selectItemByData(t);return[s,a,...o]}function b({label:e,value:t,disabled:n=!1,help:i,copyCallback:o}){const a=new OO.ui.TextInputWidget({value:t,disabled:n}),r=new OO.ui.ButtonWidget({label:s.a.s("copy"),icon:"articles",disabled:n});r.on("click",()=>{o(a.getValue())});return new OO.ui.ActionFieldLayout(a,r,{align:"top",label:e,help:i,helpInline:Boolean(i)})}function v(e,t){e.parent=e.super=t;OO.initClass(t);e.static=Object.create(t.static);Object.keys(e).forEach(t=>{e.static[t]=e[t]})}},function(e,t,n){"use strict";var i=n(2),o=n.n(i),a=n(12),s=n(3),cd=n(0);class CommentButton_CommentButton extends a.a{constructor(e){if(e.element)e.buttonElement=e.element.firstChild;super(e);if(e.element)delete this.labelElement;this.element.classList.add("cd-comment-button");this.widgetConstructor=e.widgetConstructor}createWidget(){this.buttonWidget=this.widgetConstructor();const e=this.buttonWidget.$element.get(0);this.element.parentNode.replaceChild(e,this.element);this.element=e;this.buttonElement=e.firstChild;if(this.action)this.setAction(this.action)}setDisabled(e){e=Boolean(e);if(cd.a.settings.reformatComments)super.setDisabled(e);else{if(!this.buttonWidget)this.createWidget();this.buttonWidget.setDisabled(e)}return this}setPending(e){super.setPending(e);return this}setLabel(e){if(cd.a.settings.reformatComments)super.setLabel(e);else{if(!this.buttonWidget)this.createWidget();this.buttonWidget.setLabel(e)}return this}setTooltip(e){if(cd.a.settings.reformatComments)super.setTooltip(e);else{if(!this.buttonWidget)this.createWidget();this.buttonWidget.setTitle(e)}return this}setAction(e){super.setAction(e);this.action=e;return this}isDisabled(){var e;return cd.a.settings.reformatComments?super.isDisabled():Boolean(null===(e=this.buttonWidget)||void 0===e?void 0:e.isDisabled())}isPending(){var e;return cd.a.settings.reformatComments?super.isPending():Boolean(null===(e=this.buttonWidget)||void 0===e?void 0:e.isPending())}}var r=CommentButton_CommentButton,c=n(13),l=n(18),u=n(1);var d=class{constructor(e,t){this.parser=e;let n=this.parser.collectParts(t.element);n=this.parser.removeNestedParts(n);n=this.parser.encloseInlineParts(n,t.element);n=this.parser.filterParts(n,t.element);n.reverse();n=this.parser.replaceListsWithItems(n,t.element);n=this.parser.wrapNumberedList(n,t.element);this.id=cd.a.comments.length;this.date=t.date||null;this.timestamp=t.timestampText;this.authorName=t.authorName;this.signatureElement=t.element;this.timestampElement=t.timestampElement;this.authorLink=t.authorLink;this.authorTalkLink=t.authorTalkLink;this.isOwn=this.authorName===cd.a.g.USER_NAME;this.anchor=t.anchor;this.isUnsigned=t.isUnsigned;this.parts=n;this.elements=this.parts.map(e=>e.node);this.highlightables=this.elements.filter(e=>!/^(H[1-6]|STYLE|LINK)$/.test(e.tagName)&&!cd.a.g.UNHIGHLIGHTABLE_ELEMENT_CLASSES.some(t=>e.classList.contains(t))&&!/float: *(?:left|right)|display: *none/.test(e.getAttribute("style")));if(!this.highlightables.length)throw new s.a;this.wrapHighlightables();this.setLevels();this.followsHeading=!1;if(this.parts[0].isHeading&&0!==this.level){this.parts.shift();this.elements.shift()}if(this.parts[0].isHeading){this.isOpeningSection=!0;const e=this.parts[0].node.tagName.match(/^H([1-6])$/);this.openingSectionOfLevel=e&&Number(e[1])}else this.isOpeningSection=!1;this.addAttributes();this.section=null;this.isOutdented=!1}wrapHighlightables(){[this.highlightables[0],this.highlightables[this.highlightables.length-1]].filter(u.X).filter(e=>cd.a.g.BAD_HIGHLIGHTABLE_ELEMENTS.includes(e.tagName)||this.highlightables.length>1&&"LI"===e.tagName&&"OL"===e.parentNode.tagName||e.className||e.getAttribute("style")).forEach(e=>{const t=this.parser.context.document.createElement("div");t.className="cd-comment-replacedPart";e.parentNode.insertBefore(t,e);this.elements.splice(this.elements.indexOf(e),1,t);this.highlightables.splice(this.highlightables.indexOf(e),1,t);t.appendChild(e)})}addAttributes(){this.elements.forEach(e=>{e.classList.add("cd-comment-part");e.setAttribute("data-comment-id",String(this.id))});this.highlightables[0].classList.add("cd-comment-part-first");this.highlightables[this.highlightables.length-1].classList.add("cd-comment-part-last")}setLevels(){const e=this.highlightables.map(this.parser.getListsUpTree.bind(this.parser));this.level=Math.min(e[0].length,e[e.length-1].length);this.logicalLevel=this.level;if(this.level&&this.elements.length>2){const e=this.elements.map(this.parser.getListsUpTree.bind(this.parser)),t=[];e.forEach((e,n)=>{if(!e.length)t.push(n)});t.forEach(t=>{const n=e.slice(0,t).reverse().find(e=>e.length).slice(-1)[0];if(n){const e="DL"===n.tagName?"dd":"li",i=this.parser.context.document.createElement(e);i.appendChild(this.elements[t]);n.appendChild(i)}})}for(let t=0;t{var n;null===(n=e[t])||void 0===n||n.classList.add("cd-commentLevel","cd-commentLevel-"+(t+1))})}getParent(e=!1){const t=e?"level":"logicalLevel";if(void 0===this.cachedParent)this.cachedParent={};if(void 0===this.cachedParent[t]){this.cachedParent[t]=null;if(0!==this[t])for(let e=this.id-1;e>=0;e--){const n=cd.a.comments[e];if(n.section===this.section&&n[t]{if(t.section===this.section&&t[i]>this[i]){if(t[i]===this[i]+1||t.getParent()===this||e)n.push(t);return!1}else return!0});return n}static processOutdents(){if(cd.a.g.pageHasOutdents)Array.from(cd.a.g.rootElement.getElementsByClassName(cd.a.config.outdentClass)).reverse().forEach(e=>{const t=new l.b(e);for(;t.nextNode();){let e=Number(t.currentNode.getAttribute("data-comment-id"));if(0!==e){const t=cd.a.comments[e-1],n=cd.a.comments[e],i=n.level;if(n.date{if(e.section!==t.section||e.logicalLevel{p(e,t,n)})}function b(e,t,n,i){if(!e.length)return;let o;if(t instanceof O){o=[];e.forEach(e=>{p(e,o,i)})}else o=e;const a=o.map(e=>e.author).filter(u.X),s=a.map(e=>e.name).join(cd.a.mws("comma-separator")),r=Object(u.n)(a),c="thread"===n?"thread-newcomments":"section-newcomments",l=new OO.ui.ButtonWidget({label:cd.a.s(c,o.length,a.length,s,r),framed:!1,classes:["cd-button-ooui","cd-thread-button"]});l.on("click",()=>{const e=o[0].anchor;Object(g.k)({commentAnchor:e})});if(t instanceof O){var d;const{$wrappingItem:e}=t.addSublevelItem("newCommentsNote","bottom");e.addClass("cd-thread-button-container cd-thread-newCommentsNote").append(l.$element);if(null!==(d=t.thread)&&void 0!==d&&d.isCollapsed){t.thread.expand();t.thread.collapse()}}else if("thread"===n&&t.$replyWrapper){const e="DL"===t.$replyContainer.prop("tagName")?"dd":"li";$(`<${e}>`).addClass("cd-thread-button-container cd-thread-newCommentsNote").append(l.$element).insertBefore(t.$replyWrapper)}else{let e,i;if(t.$addSubsectionButtonContainer&&!t.getChildren().length)e=t.$addSubsectionButtonContainer;else if(t.$replyContainer)e=t.$replyContainer;else e=$(t.lastElementInFirstChunk);l.$element.removeClass("cd-thread-button").addClass("cd-section-button");if("section"===n)i=$("
").append(l.$element);else{const e=$("
").append(l.$element);i=$("
").append(e)}i.addClass("cd-section-button-container cd-thread-newCommentsNote").insertAfter(e)}}var v={underlays:[],layersContainers:[],configureAndAddLayers(e){let t;if(e.length)t=cd.a.g.floatingElements.map(u.q);e.forEach(e=>{e.configureLayers({add:!1,update:!1,floatingRects:t})});e.forEach(e=>{e.addLayers()})},redrawLayersIfNecessary(e=!1,t=!1,n){if(Object(g.i)()||document.hidden&&!t)return;this.layersContainers.forEach(e=>{e.cdCouldHaveMoved=!0});const i=[],o=cd.a.g.$root.get(0).getBoundingClientRect().bottom+window.scrollY;let a=0;cd.a.comments.slice().reverse().some(s=>{const r=!s.isCollapsed&&(s.isNew||s.isOwn||s.isTarget||s.isHovered||s.isDeleted||s.isLineGapped),c=s.offset&&s.offset.bottom>o;if(s.underlay&&!r&&(e||c))s.removeLayers();else if(r&&!s.editForm){n=n||cd.a.g.floatingElements.map(u.q);const e=s.configureLayers({add:!0,update:!1,floatingRects:n});if(e||t){a=0;i.push(s)}else if(null===e)s.removeLayers();else if(!s.getLayersContainer().parentNode.parentNode.closest(".cd-commentLayersContainer-parent")){a++;if(3===a)return!0}}return!1});i.forEach(e=>{e.updateLayersOffset()})},resetLayers(){this.underlays=[];this.layersContainers.forEach(e=>{e.innerHTML=""})},registerSeen(){if(document.hidden)return;const e=O.findInViewport();if(!e)return;const t=e=>{const t=e.isInViewport();if(t){e.registerSeen();return!1}else if(!1===t)return!0};cd.a.comments.slice(0,e.id).reverse().some(t);cd.a.comments.slice(e.id).some(t);h.a.updateFirstUnseenButton()},groupBySection(e){const t=new Map;e.forEach(e=>{let n;if(e instanceof O)n=e.section;else if(e.section)n=e.section.match||e.section.anchor;else n=null;if(!t.get(n))t.set(n,[]);t.get(n).push(e)});return t},findInViewport(e){cd.a.comments.forEach(e=>{delete e.roughOffset});const t=window.scrollY+cd.a.g.BODY_SCROLL_PADDING_TOP,n=t+window.innerHeight,i=e=>{e.getOffset({set:!0});return Boolean(e.roughOffset)},o=(e,t=0)=>Object(u.L)(cd.a.comments,t,"backward"===e).find(i)||null,a=o("forward"),s=o("backward",cd.a.comments.length-1);if(!a)return null;let r,c={top:a,bottom:s},l=c.top;const d=(e,t,n=!1)=>{if(e){const i="forward"===e&&n||"backward"===e&&!n?t.top.id:t.bottom.id;return o(e,i)}return null};for(let i=0;il.roughOffset.top)){r=d(e,c,!0);break}if(c.top===c.bottom){r=d(e,c);break}if(l.roughOffset)if(l===a)l=c.bottom;else{c[t>l.roughOffset.top?"top":"bottom"]=l;if(c.bottom.id-c.top.id<=1){r=d(e,c);break}const i=c.top.roughOffset.top,o=(t-i)/(c.bottom.roughOffset.downplayedBottom-n+(t-i));if(o<0||o>=1)console.warn("The proportion shouldn't be more than 0 or less or equal to 1.","proportion",o,"searchArea",c);const a=Math.round((c.bottom.id-c.top.id-1)*o+c.top.id+.5);l=cd.a.comments[a]}else{l=o("forward",c.top.id+1);c.top=l}}return r||null},highlightHovered(e){var t,n,i,o,a;if(cd.a.state.dontHandleScroll||cd.a.state.isAutoScrollInProgress||Object(u.C)())return;const s=Array.from(null===(t=cd.a.g.notificationArea)||void 0===t?void 0:t.querySelectorAll(".mw-notification")).some(e=>e.matches(":hover"))||(null===(n=cd.a.g.activeAutocompleteMenu)||void 0===n?void 0:n.matches(":hover"))||(null===(i=h.a.$element)||void 0===i?void 0:i.get(0).matches(":hover"))||$(document.body).children(".ui-widget-overlay").length||(null===(o=cd.a.g.$popupsOverlay)||void 0===o?void 0:null===(a=o.get(0).querySelector(".oo-ui-popupWidget:not(.oo-ui-element-hidden)"))||void 0===a?void 0:a.matches(":hover"));cd.a.comments.filter(e=>e.underlay).forEach(t=>{const n=t.getLayersContainerOffset(),i=t.layersOffset;if(i)if(!s&&e.pageY>=i.top+n.top&&e.pageY<=i.top+i.height+n.top&&e.pageX>=i.left+n.left&&e.pageX<=i.left+i.width+n.left)t.highlightHovered();else t.unhighlightHovered();else t.removeLayers()})},getByAnchor(e,t){if(!cd.a.comments||!e)return null;const n=e=>cd.a.comments.find(t=>t.anchor===e);let i=n(e);if(!i&&t){const{date:t,author:o}=Object(m.j)(e)||{};for(let e=1;!i&&e<=3;e++){const a=new Date(t.getTime()-cd.a.g.MILLISECONDS_IN_MINUTE*e);i=n(Object(m.f)(a,o))}}return i||null},reviewHighlightables(){cd.a.comments.forEach(e=>{e.reviewHighlightables();e.isLineGapped=e.highlightables.length>1&&e.level>0})},addNewCommentsNotes(e){Object(u.P)();cd.a.comments.forEach(e=>{e.subitemList.remove("newCommentsNote")});$(".cd-thread-newCommentsNote").remove();const t=new Map;e.forEach(e=>{let n;if(e.parent)n=e.parentMatch;else for(let t=e.section;t&&!n;t=t.parent)n=t.match;if(n){if(!t.get(n))t.set(n,[]);t.get(n).push(e)}});const n=e.map(e=>e.id);t.forEach((e,t)=>{if(t instanceof O)b(e,t,"thread",n);else{const i=e.filter(e=>0===e.logicalLevel);let o=[];i.forEach(e=>{p(e,o,n)});const a=e.filter(e=>!o.includes(e));b(o,t,"section",n);b(a,t,"thread",n)}});Object(u.N)()},reformatComments:()=>o()((function*(){if(cd.a.settings.reformatComments){const e=[];$(document.body).addClass("cd-reformattedComments");cd.a.comments.forEach(t=>{e.push(...t.replaceSignatureWithHeader());t.addMenu()});const t={};e.forEach(e=>{const n=e.pageName;if(!t[n])t[n]=[];t[n].push(e.link)});const n=Object.keys(t),i=yield Object(f.c)(n);Object.keys(i).forEach(e=>{t[e].forEach(t=>{t.title=i[e].normalized;if(!i[e].exists){t.classList.add("new");t.href=mw.util.getUrl(e,{action:"edit",redlink:1})}})})}}))(),reformatTimestamps(){if(cd.a.g.ARE_TIMESTAMPS_ALTERED)cd.a.comments.forEach(e=>{e.reformatTimestamp()})}};var y=class{constructor(){this.content={}}add(e,t){this.content[e]=t}remove(e){const t=this.content[e];if(t){delete this.content[e];const n=t.parent("dl, ul, ol");t.remove();if(n.is(":empty")){const e=n.parent("dd, li");if(e.length&&1===e.children().length)e.remove();else n.remove()}}}get(e){return this.content[e]||null}},w=n(27),E=n(16),C=n(8),T=n(19);let x,k;function S(e){let t;if(["UL","OL"].includes(e.tagName)){t=Object(u.q)(e);t.left=t.outerLeft;t.right=t.outerRight}else t=e.getBoundingClientRect();return t}class Comment_Comment extends d{constructor(e,t){super(e,t);if(!x)x=cd.a.g.COMMENT_ELEMENT_PROTOTYPES;this.author=E.a.getUser(this.authorName);this.$signature=$(this.signatureElement);this.isActionable=cd.a.state.isPageActive&&!cd.a.g.closedDiscussionElements.some(e=>e.contains(this.elements[0]));this.highlightables.forEach(this.bindEvents.bind(this));this.setAnchorHighlightable();const n=e=>{const t=new l.b(e);for(;t.parentNode();)if(t.currentNode.classList.contains("cd-commentLevel"))return t.currentNode.tagName.toLowerCase()};if(0!==this.level){this.containerListType=n(this.highlightables[0]);this.ahContainerListType=n(this.anchorHighlightable)}this.isNew=null;this.isSeen=null;this.isTarget=!1;this.isHovered=!1;this.isChangedSincePreviousVisit=null;this.isChanged=null;this.isDeleted=null;this.willFlashChangedOnSight=!1;this.isInSingleCommentTable=!1;this.isCollapsed=!1;this.subitemList=new y}setAnchorHighlightable(){if(this.highlightables.length>1){const e=[],t=[],n=[this.highlightables[0],this.highlightables[this.highlightables.length-1]];n.forEach((n,i)=>{const o=new l.b(n);e[i]=0;for(;o.parentNode();){e[i]++;if(!t[i]&&["DL","UL","OL"].includes(o.currentNode.tagName))t[i]=o.currentNode.tagName.toLowerCase()}});const i=Math.min(...e);let o;for(let n=0;n<2;n++)if(e[n]===i&&void 0===o||"ol"===t[o]&&"ol"!==t[n])o=n;this.anchorHighlightable=n[o]}else this.anchorHighlightable=this.highlightables[0]}cleanUpSignature(){const e=e=>{if(e){if(e.nodeType===Node.TEXT_NODE||!e.children.length)e.textContent=e.textContent.replace(cd.a.config.signaturePrefixRegexp,"").replace(cd.a.config.signaturePrefixRegexp,"");if(e.tagName&&!["B","STRONG"].includes(e.tagName)&&(e.getAttribute("style")||["SUP","SUB"].includes(e.tagName))&&e.textContent.length<30&&!e.classList.length)e.remove()}},t=this.signatureElement.previousSibling,n=null==t?void 0:t.previousSibling;e(t);if(t&&n&&(!t.parentNode||!t.textContent.trim())){const t=n.previousSibling;e(n);if(!n.parentNode)e(t)}}replaceSignatureWithHeader(){const e=[],t=x.headerElement.cloneNode(!0);let n=t.firstChild.firstChild;const i=n.firstChild;let o,a=n.nextElementSibling;if(cd.a.settings.showContribsLink){o=a.nextElementSibling.nextElementSibling;if(!this.author.isRegistered()){o.previousSibling.remove();o.remove()}}if(this.authorLink){const e=this.authorLink.nextElementSibling;if(e&&Array.from(e.classList).includes("userflags-wrapper"))n.parentNode.insertBefore(e,n.nextSibling);n.parentNode.replaceChild(this.authorLink,n);n=this.authorLink;n.classList.add("cd-comment-author");n.innerHTML="";n.appendChild(i)}else{let t;if(this.author.isRegistered()){t="User:"+this.author.name;e.push({pageName:t,link:n})}else t=`${cd.a.g.CONTRIBS_PAGE}/${this.author.name}`;n.title=t;n.href=mw.util.getUrl(t)}if(this.authorTalkLink){a.parentNode.replaceChild(this.authorTalkLink,a);a=this.authorTalkLink;a.textContent=cd.a.s("comment-author-talk")}else{const t="User talk:"+this.author.name;e.push({pageName:t,link:a});a.title=t;a.href=mw.util.getUrl(t)}i.textContent=this.author.name;if(cd.a.settings.showContribsLink&&this.author.isRegistered()){const e=`${cd.a.g.CONTRIBS_PAGE}/${this.author.name}`;o.title=e;o.href=mw.util.getUrl(e)}if(this.timestamp){this.copyLinkButton=new r({label:this.reformattedTimestamp||this.timestamp,tooltip:this.timestampTitle,classes:["cd-comment-button-label","cd-comment-timestamp"],action:this.copyLink.bind(this)});t.appendChild(this.copyLinkButton.element);this.timestampElement=this.copyLinkButton.labelElement;new w.a(this.timestampElement,this.date,!cd.a.settings.hideTimezone)}this.headerElement=t;this.$header=$(this.headerElement);[this.highlightables[0],this.highlightables[this.highlightables.length-1]].filter(u.X).filter(e=>cd.a.g.BAD_HIGHLIGHTABLE_ELEMENTS.includes(e.tagName)||this.highlightables.length>1&&"LI"===e.tagName&&"OL"===e.parentNode.tagName||Array.from(e.classList).some(e=>!e.startsWith("cd-"))).forEach(e=>{const t=document.createElement("div"),n=e;this.replaceElement(e,t);t.appendChild(n);this.addAttributes();n.classList.remove("cd-comment-part","cd-comment-part-first","cd-comment-part-last");delete n.dataset.commentId});this.highlightables[0].insertBefore(t,this.highlightables[0].firstChild);this.cleanUpSignature();this.signatureElement.remove();return e}addMenu(){const e=document.createElement("div");e.className="cd-comment-menu";this.menuElement=e;this.$menu=$(this.menuElement);this.createReplyButton();this.createEditButton();this.createThankButton();this.createGoToParentButton();this.highlightables[this.highlightables.length-1].appendChild(this.menuElement)}createReplyButton(){if(this.isActionable){const e=this.replyButtonClick.bind(this);if(cd.a.settings.reformatComments){this.replyButton=new r({label:cd.a.s("cm-reply"),classes:["cd-comment-button-label"],action:e});this.menuElement.appendChild(this.replyButton.element)}else{const t=x.replyButton.cloneNode(!0),n=x.getReplyButton;this.replyButton=new r({element:t,action:e,widgetConstructor:n});this.overlayMenu.appendChild(this.replyButton.element)}}}createEditButton(){if(this.isActionable&&(this.isOwn||cd.a.settings.allowEditOthersComments)){const e=this.editButtonClick.bind(this);if(cd.a.settings.reformatComments){this.editButton=new r({label:cd.a.s("cm-edit"),classes:["cd-comment-button-label"],action:e});this.menuElement.appendChild(this.editButton.element)}else{const t=x.editButton.cloneNode(!0),n=x.getEditButton;this.editButton=new r({element:t,action:e,widgetConstructor:n});this.overlayMenu.appendChild(this.editButton.element)}}}createThankButton(){if(this.author.isRegistered()&&this.date&&!this.isOwn){if(!k){k=function(e){const t=Object.assign({},e);Object.keys(t).forEach(e=>{if(!t[e].thankUnixTime||t[e].thankUnixTimethis.anchor===k[e].anchor&&Object(u.e)(this.getText(),k[e].text)>.66),t=this.thankButtonClick.bind(this);if(cd.a.settings.reformatComments){this.thankButton=new r({label:cd.a.s(e?"cm-thanked":"cm-thank"),tooltip:cd.a.s(e?"cm-thanked-tooltip":"cm-thank-tooltip"),classes:["cd-comment-button-label"],action:t});this.menuElement.appendChild(this.thankButton.element)}else{const e=x.thankButton.cloneNode(!0),n=x.getThankButton;this.thankButton=new r({element:e,action:t,widgetConstructor:n});this.overlayMenu.appendChild(this.thankButton.element)}if(e)this.setThanked()}}createCopyLinkButton(){if(this.anchor&&!cd.a.settings.reformatComments){const e=x.copyLinkButton.cloneNode(!0),t=x.getCopyLinkButton;this.copyLinkButton=new r({element:e,action:this.copyLink.bind(this),widgetConstructor:t});this.overlayMenu.appendChild(this.copyLinkButton.element)}}createGoToParentButton(){if(this.getParent()){const e=this.goToParentButtonClick.bind(this);if(cd.a.settings.reformatComments){this.goToParentButton=new r({tooltip:cd.a.s("cm-gotoparent-tooltip"),classes:["cd-comment-button-icon","cd-comment-button-goToParent"],action:e});this.headerElement.appendChild(this.goToParentButton.element)}else{const t=x.goToParentButton.cloneNode(!0),n=x.getGoToParentButton;this.goToParentButton=new r({element:t,action:e,widgetConstructor:n});this.overlayMenu.appendChild(this.goToParentButton.element)}}}createGoToChildButton(){if(cd.a.settings.reformatComments){this.goToChildButton=new r({tooltip:cd.a.s("cm-gotochild-tooltip"),classes:["cd-comment-button-icon","cd-comment-button-goToChild"]});const e=this.goToParentButton||this.copyLinkButton||this.authorLink;this.headerElement.insertBefore(this.goToChildButton.element,null==e?void 0:e.nextSibling)}else{const e=x.goToChildButton,t=x.getGoToChildButton;this.goToChildButton=new r({element:e,widgetConstructor:t});this.$overlayMenu.prepend(e)}}reformatTimestamp(){if(!this.date)return;let e,t="";if(cd.a.g.ARE_TIMESTAMPS_ALTERED)e=Object(m.b)(this.date,!cd.a.settings.hideTimezone);if("relative"===cd.a.settings.timestampFormat&&cd.a.settings.useUiTime&&cd.a.g.CONTENT_TIMEZONE!==cd.a.g.UI_TIMEZONE)t=Object(m.d)(this.date,!0)+"\n";if(e){t+=this.timestampElement.textContent;this.reformattedTimestamp=e;this.timestampTitle=t;if(!cd.a.settings.reformatComments){this.timestampElement.textContent=this.reformattedTimestamp;this.timestampElement.title=this.timestampTitle;new w.a(this.timestampElement,this.date,!cd.a.settings.hideTimezone)}}}bindEvents(e){if(!cd.a.settings.reformatComments){e.onmouseenter=this.highlightHovered.bind(this);e.onmouseleave=this.unhighlightHovered.bind(this);e.ontouchstart=this.highlightHovered.bind(this)}}reviewHighlightables(){for(let e=0;e!e.startsWith("cd-")||"cd-comment-replacedPart"===e)){const n=0===e&&t.classList.contains("cd-comment-replacedPart")?t.firstChild:t;if(this.highlightables.length>1&&(cd.a.g.floatingElements.includes(n)||cd.a.g.hiddenElements.includes(n))){if(t.classList.contains("cd-comment-part-first")){t.classList.remove("cd-comment-part-first");this.highlightables[e+1].classList.add("cd-comment-part-first")}if(t.classList.contains("cd-comment-part-last")){t.classList.remove("cd-comment-part-last");this.highlightables[e-1].classList.add("cd-comment-part-last")}delete t.dataset.commentId;this.highlightables.splice(e,1);e--;this.setLevels();this.setAnchorHighlightable()}}}}hideMenu(e){if(e)e.preventDefault();this.overlayInnerWrapper.style.display="none"}replyButtonClick(){if(this.replyForm)this.replyForm.cancel();else this.reply()}editButtonClick(){this.edit()}thankButtonClick(){this.thank()}goToParentButtonClick(){this.goToParent()}setOffsetProperty(e,t){if(t.set)if(t.considerFloating)this.offset=e;else this.roughOffset=e}getAdjustedRects(e,t,n,i=cd.a.g.floatingElements.map(u.q)){let o=0,a=!1;i.forEach(e=>{const t=scrollY+e.outerTop,i=scrollY+e.outerBottom;if(n>t&&nt&&top{n[t]=e.style.overflow;e.style.overflow="hidden"});e=S(this.highlightables[0]);t=1===this.elements.length?e:S(this.highlightables[this.highlightables.length-1]);if(o<=1)this.highlightables.forEach((e,t)=>{e.style.overflow=n[t]});else this.highlightables.forEach((e,t)=>{if(cd.a.g.floatingElements.some(t=>e.contains(t)))e.style.overflow=n[t]})}return[e,t]}setStretchedProperties(e,t){this.isStartStretched=!1;this.isEndStretched=!1;if(0===this.level){const n=e-cd.a.g.CONTENT_START_MARGIN-2,i=t+cd.a.g.CONTENT_START_MARGIN+2;this.isStartStretched="ltr"===this.getDir()?n<=cd.a.g.CONTENT_COLUMN_START:i>=cd.a.g.CONTENT_COLUMN_START;this.isEndStretched="ltr"===this.getDir()?i>=cd.a.g.CONTENT_COLUMN_END:n<=cd.a.g.CONTENT_COLUMN_END}}getOffset(e={}){if(void 0===e.considerFloating)e.considerFloating=Boolean(e.floatingRects);if(void 0===e.set)e.set=!1;if(this.editForm){this.setOffsetProperty(null,e);return null}let t=S(this.highlightables[0]),n=1===this.elements.length?t:S(this.highlightables[this.highlightables.length-1]);if(!Object(u.v)(t,n)){this.setOffsetProperty(null,e);return null}const i=window.scrollY;let o;if(this.offset){const e=i+t.top===this.offset.top,a=n.bottom-t.top==this.offset.bottom-this.offset.top,s=this.highlightables[0].offsetWidth===this.firstHighlightableWidth;o=!e||!a||!s}else o=!0;if(!o){if(e.set&&!e.considerFloating)this.roughOffset=this.offset;return e.set?!1:this.offset}this.firstHighlightableWidth=this.highlightables[0].offsetWidth;const a=i+t.top,s=i+n.bottom;if(e.considerFloating)[t,n]=this.getAdjustedRects(t,n,s,e.floatingRects);const r=window.scrollX,c=r+Math.min(t.left,n.left),l=r+Math.max(t.right,n.right);if(e.considerFloating)this.setStretchedProperties(c,l);const d={top:a,bottom:s,left:c,right:l,downplayedBottom:s-a>window.innerHeight-200?a+(window.innerHeight-200):s};this.setOffsetProperty(d,e);return e.set?!0:d}getDir(){if(!this.cachedDir)if(cd.a.g.areThereLtrRtlMixes){const e=this.elements[0].closest(".mw-content-ltr, .mw-content-rtl").classList.contains("mw-content-ltr");this.cachedDir=e?"ltr":"rtl"}else this.cachedDir=cd.a.g.CONTENT_DIR;return this.cachedDir}getMargins(){let e;if("ol"===this.ahContainerListType)e=1===this.highlightables.length?3.2*cd.a.g.CONTENT_FONT_SIZE:2.2*cd.a.g.CONTENT_FONT_SIZE-1;else if(this.isStartStretched)e=cd.a.g.CONTENT_START_MARGIN;else{const t=this.isCollapsed?this.thread.expandNote:this.anchorHighlightable;if(["DD","LI"].includes(t.tagName)&&t.parentNode.classList.contains("cd-commentLevel"))e=-1;else e=0===this.level?cd.a.g.COMMENT_FALLBACK_SIDE_MARGIN:cd.a.g.CONTENT_FONT_SIZE}const t=this.isEndStretched?cd.a.g.CONTENT_START_MARGIN:cd.a.g.COMMENT_FALLBACK_SIDE_MARGIN;return{left:"ltr"===this.getDir()?e:t,right:"ltr"===this.getDir()?t:e}}setLayersOffsetProperty(e={}){const t=this.getOffset(Object.assign({},e,{considerFloating:!0,set:!0}));if(this.offset){const e=this.getLayersContainerOffset(),t=this.getMargins();this.layersOffset={top:this.offset.top-e.top,left:this.offset.left-t.left-e.left,width:this.offset.right+t.right-(this.offset.left-t.left),height:this.offset.bottom-this.offset.top}}else this.layersOffset=null;return t}createLayers(){this.underlay=x.underlay.cloneNode(!0);Comment_Comment.underlays.push(this.underlay);this.overlay=x.overlay.cloneNode(!0);this.line=this.overlay.firstChild;this.marker=this.overlay.firstChild.nextSibling;if(!cd.a.settings.reformatComments){this.overlayInnerWrapper=this.overlay.lastChild;this.overlayGradient=this.overlayInnerWrapper.firstChild;this.overlayMenu=this.overlayInnerWrapper.lastChild;this.overlayInnerWrapper.oncontextmenu=this.hideMenu.bind(this);let e;const t=t=>{if(1===t.which)e=setTimeout(this.hideMenu.bind(this),1500)},n=()=>{clearTimeout(e)};this.overlayInnerWrapper.onmousedown=t;this.overlayInnerWrapper.onmouseup=n;this.createGoToParentButton();this.createCopyLinkButton();this.createThankButton();this.createEditButton();this.createReplyButton()}this.updateLayersStyles(!0);this.$underlay=$(this.underlay);this.$overlay=$(this.overlay);this.$marker=$(this.marker);if(!cd.a.settings.reformatComments){this.$overlayMenu=$(this.overlayMenu);this.$overlayGradient=$(this.overlayGradient)}mw.hook("convenientDiscussions.commentLayersCreated").fire(this,cd.a)}updateClassesForType(e,t){t=Boolean(t);if(this.underlay.classList.contains("cd-comment-underlay-"+e)!==t){this.underlay.classList.toggle("cd-comment-underlay-"+e,t);this.overlay.classList.toggle("cd-comment-overlay-"+e,t);if("deleted"===e){var n,i;null===(n=this.replyButton)||void 0===n||n.setDisabled(t);null===(i=this.editButton)||void 0===i||i.setDisabled(t)}else if("hovered"===e&&!t)this.overlayInnerWrapper.style.display=""}}updateLayersStyles(e=!1){if(this.underlay){this.updateClassesForType("new",this.isNew);this.updateClassesForType("own",this.isOwn);this.updateClassesForType("deleted",this.isDeleted);if(e){if(this.isLineGapped)this.line.classList.add("cd-comment-overlay-line-closingGap");if(this.isStartStretched)this.overlay.classList.add("cd-comment-overlay-stretchedStart");if(this.isEndStretched)this.overlay.classList.add("cd-comment-overlay-stretchedEnd")}}}configureLayers(e={}){if(void 0===e.add)e.add=!0;if(void 0===e.update)e.update=!0;const t=this.setLayersOffsetProperty(e);if(null===t)return null;if(this.underlay){this.updateLayersStyles();if(t&&e.update)this.updateLayersOffset();return t}else{this.createLayers();if(e.add)this.addLayers();return!1}}addLayers(){if(this.underlay){this.updateLayersOffset();this.getLayersContainer().appendChild(this.underlay);this.getLayersContainer().appendChild(this.overlay)}}updateLayersOffset(){this.underlay.style.top=this.overlay.style.top=this.layersOffset.top+"px";this.underlay.style.left=this.overlay.style.left=this.layersOffset.left+"px";this.underlay.style.width=this.overlay.style.width=this.layersOffset.width+"px";this.underlay.style.height=this.overlay.style.height=this.layersOffset.height+"px"}removeLayers(){var e;if(this.underlay){null===(e=this.$animatedBackground)||void 0===e||e.add(this.$marker).stop(!0,!0);Comment_Comment.underlays.splice(Comment_Comment.underlays.indexOf(this.underlay),1);this.underlay.remove();this.underlay=null;this.$underlay=null;this.overlay.remove();this.overlay=null;this.$overlay=null;this.isHovered=!1}}getLayersContainer(){if(void 0===this.cachedLayersContainer){let e;const t=new l.c(document.body,null,!0,this.elements[0]);for(;t.parentNode();){const n=t.currentNode;if(n.classList.contains("cd-connectToPreviousItem"))continue;let i=n.conveneintDiscussionsStyle;if(!i){i=window.getComputedStyle(n);n.conveneintDiscussionsStyle=i}const o=Array.from(n.classList);if(["absolute","relative"].includes(i.position)||n!==cd.a.g.$content.get(0)&&(o.includes("mw-content-ltr")||o.includes("mw-content-rtl")))e=n;if(i.backgroundColor.includes("rgb(")||"none"!==i.backgroundImage&&!e){e=n;e.classList.add("cd-commentLayersContainer-parent-relative")}if(e)break}if(!e)e=document.body;e.classList.add("cd-commentLayersContainer-parent");let n=e.firstElementChild;if(!n.classList.contains("cd-commentLayersContainer")){n=document.createElement("div");n.classList.add("cd-commentLayersContainer");e.insertBefore(n,e.firstChild)}this.cachedLayersContainer=n;Object(u.b)(Comment_Comment.layersContainers,n)}return this.cachedLayersContainer}getLayersContainerOffset(){const e=this.getLayersContainer();let t=e.cdCachedLayersContainerTop,n=e.cdCachedLayersContainerLeft;if(void 0===t||e.cdCouldHaveMoved){const i=e.getBoundingClientRect();t=i.top+window.scrollY;n=i.left+window.scrollX;e.cdCouldHaveMoved=!1;e.cdCachedLayersContainerTop=t;e.cdCachedLayersContainerLeft=n}return{top:t,left:n}}highlightHovered(e){var t;if(this.isHovered||Object(u.C)()||cd.a.settings.reformatComments)return;if(e&&"touchstart"===e.type)cd.a.comments.filter(e=>e.isHovered).forEach(e=>{e.unhighlightHovered()});null===(t=this.$animatedBackground)||void 0===t||t.stop(!0,!0);if(!this.configureLayers()&&this.underlay){this.updateClassesForType("hovered",!0);this.isHovered=!0}}unhighlightHovered(){var e;if(this.isHovered&&!cd.a.settings.reformatComments){null===(e=this.$animatedBackground)||void 0===e||e.stop(!0,!0);this.updateClassesForType("hovered",!1);this.isHovered=!1}}animateToColors(e,t,n){const i=e=>{const t={backgroundColor:e};if("rgba(0, 0, 0, 0)"===t.backgroundColor)t.opacity=0;return t},o={backgroundColor:"",backgroundImage:"",opacity:""},a=i(e);this.$marker.animate(a,400,"swing",()=>{this.$marker.css(o)});const s=this,r=i(t);this.$animatedBackground.animate(r,400,"swing",(function(){if(this===s.$animatedBackground.get(-1)){if(n)n();s.$animatedBackground.add(s.$overlayGradient).css(o)}}))}animateBack(e,t){var n,i;this.animateBackBound=null;if(null===(n=this.$underlay)||void 0===n||!n.parent().length){if(t)t();return}const o=this.$marker.css("background-color"),a=this.$underlay.css("background-color");this.updateClassesForType(e,!1);const s=this.$marker.css("background-color");let r=this.$underlay.css("background-color");if(r===a)r="rgba(0, 0, 0, 0)";this.$marker.css({backgroundColor:o,opacity:1});this.$animatedBackground.css({backgroundColor:a});null===(i=this.$overlayGradient)||void 0===i||i.css({backgroundImage:"none"});this.animateToColors(s,r,t)}flash(e,t,n){this.configureLayers();if(this.$underlay){if(this.animateBackBound){clearTimeout(this.unhighlightTimeout);this.animateBackBound()}this.$animatedBackground=this.$underlay.add(this.$overlayMenu);this.$animatedBackground.add(this.$marker).stop(!0,!0);this.updateClassesForType(e,!0);this.animateBackBound=this.animateBack.bind(this,e,n);this.unhighlightTimeout=setTimeout(this.animateBackBound,t)}else if(n)n()}flashTarget(){this.isTarget=!0;this.flash("target",2e3,()=>{this.isTarget=!1})}flashChanged(){this.flash("changed",1e3);if(this.isChanged){const e=Object(u.r)("seenRenderedChanges"),t=mw.config.get("wgArticleId");e[t]=e[t]||{};e[t][this.anchor]={comparedHtml:this.comparedHtml,seenUnixTime:Date.now()};Object(u.R)("seenRenderedChanges",e)}}flashChangedOnSight(){if(!document.hidden&&this.isInViewport())this.flashChanged();else this.willFlashChangedOnSight=!0}showDiff(e,t){var n=this;return o()((function*(){var i,o,a,r;if(Object(u.g)("mediawiki.diff.styles"))return;let c=Math.min(mw.config.get("wgRevisionId"),e),l=Math.max(mw.config.get("wgRevisionId"),e);const d=cd.a.g.mwApi.post({action:"query",revids:[c,l],prop:"revisions",rvslots:"main",rvprop:["ids","content"],redirects:!mw.config.get("wgIsRedirect")}).catch(u.w),h=cd.a.g.mwApi.post({action:"compare",fromtitle:n.getSourcePage().name,fromrev:c,torev:l,prop:["diff"]}).catch(u.w);let[m,f]=yield Promise.all([d,h,mw.loader.using("mediawiki.diff.styles")]);const g=null===(i=m.query)||void 0===i?void 0:null===(o=i.pages)||void 0===o?void 0:null===(a=o[0])||void 0===a?void 0:a.revisions;if(!g)throw new s.a({type:"api",code:"noData"});const p=],[;g.forEach((e,i)=>{const o=e.slots.main.content,a=n.locateInCode(o,t[i]),s=o.slice(0,a.lineStartIndex).match(/\n/g)||[],r=o.slice(a.lineStartIndex,a.signatureEndIndex).match(/\n/g)||[],c=s.length+1,l=c+r.length;for(let e=c;e<=l;e++)p[i].push(e)});const b=null==f?void 0:null===(r=f.compare)||void 0===r?void 0:r.body;if(void 0===b)throw new s.a({type:"api",code:"noData"});const v=$(Object(u.Z)(b)),y=[];let w="";v.find("tr").each((e,t)=>{const n=$(t),i=n.children(".diff-lineno");for(let e=0;e").attr("href",n.getSourcePage().getUrl({oldid:c,diff:l})).attr("target","_blank").text(cd.a.s("comment-diff-full")),T=$("").attr("href",n.getSourcePage().getUrl({action:"history"})).attr("target","_blank").text(cd.a.s("comment-diff-history")),x=$("
").addClass("cd-commentDiffView-below").append(C,cd.a.sParse("dot-separator"),T),k=$("
").append(E,x);OO.ui.alert(k,{title:cd.a.s("comment-diff-title"),size:"larger"})}))()}markAsChanged(e,t,n,i){var r=this;let c,l,d;switch(e){case"changed":default:this.isChanged=!0;c="comment-changed";break;case"changedSince":this.isChangedSincePreviousVisit=!0;c="comment-changedsince";break;case"deleted":this.isDeleted=!0;c="comment-deleted"}if(!t){const t="deleted"===e?{}:{commentAnchor:this.anchor};l=new a.a({label:cd.a.s("comment-changed-refresh"),action:()=>{Object(g.k)(t)}})}if("deleted"!==e&&this.getSourcePage().name===cd.a.page.name)d=new a.a({label:cd.a.s("comment-diff"),action:(h=o()((function*(){d.setPending(!0);try{yield r.showDiff(n,i)}catch(e){let t=cd.a.sParse("comment-diff-error");if(e instanceof s.a){const{type:n,message:i}=e.data;if(i)t=i;else if("network"===n)t+=" "+cd.a.sParse("error-network")}mw.notify(Object(u.Y)(t),{type:"error"})}d.setPending(!1)})),function(){return h.apply(this,arguments)})});var h;let m,f;if(cd.a.settings.reformatComments){c+="-short";m=f=cd.a.sParse("dot-separator")}else{m=" ";f=l?cd.a.sParse("dot-separator"):" "}$(this.highlightables).find(".cd-changeMark").remove();const p=$("").addClass("cd-changeMark").text(cd.a.s(c));if(l)p.append(m,l.element);else p.addClass("cd-changeMark-newVersionRendered");if(d)p.append(f,d.element);if(cd.a.settings.reformatComments)this.$header.append(p);else{let e,t=$(this.highlightables).last();do{e=t;t=e.children().last()}while(t.length&&!Object(u.A)(t.get(0)));if(!e.find(".cd-beforeChangeMark").length){const t=$("").addClass("cd-beforeChangeMark");e.append(" ",t)}e.append(p)}if(t)this.flashChangedOnSight()}unmarkAsChanged(e){switch(e){case"changed":default:this.isChanged=!1;break;case"deleted":this.isDeleted=!1;this.updateLayersStyles()}this.$elements.last().find(".cd-changeMark").remove();if("changed"===e)if(this.willFlashChangedOnSight)this.willFlashChangedOnSight=!1;else{const e=Object(u.r)("seenRenderedChanges"),t=mw.config.get("wgArticleId");e[t]=e[t]||{};delete e[t][this.anchor];Object(u.R)("seenRenderedChanges",e);this.flashChangedOnSight()}}update(e,t){const n=Array.from(this.$elements).map(e=>e.tagName),i=t.hiddenElementsData.some(e=>"reference"===e.type),o=!t.hiddenElementsData.length||t.hiddenElementsData.every(e=>"templateStyles"!==e.type||"STYLE"===e.tagName)||e.hiddenElementsData.every(e=>"templateStyles"!==e.type||"STYLE"!==e.tagName);if(!i&&o&&Object(u.c)(n,t.elementNames)){const e=this.$elements.find(".autonumber").text().match(/\d+/);let i=e?e[0]:1;t.elementHtmls.forEach((e,i)=>{e=e.replace(/\x01(\d+)_\w+\x02/g,(e,n)=>t.hiddenElementsData[n-1].html);if(/^H[1-6]$/.test(n[i])){const t=this.$elements.eq(i).find(".mw-headline");if(t.length){const n=t.find(".mw-headline-number"),i=$(e);t.html(i.html()).prepend(n);const a=this.section;if(a){const e=a.headline;a.parseHeadline();if(a.isWatched&&a.headline!==e)a.watch(!0,e);if(cd.a.settings.modifyToc){var o;null===(o=a.getTocItem())||void 0===o||o.replaceText(i)}}}}else this.replaceElement(this.$elements.eq(i),e)});this.$elements.find(".autonumber").each((e,t)=>{$(t).text(`[${i}]`);i++});this.$elements.attr("data-comment-id",this.id);if(cd.a.settings.reformatComments){this.signatureElement=this.$elements.find(".cd-signature").get(0);this.replaceSignatureWithHeader();this.addMenu()}else{this.timestampElement=this.$elements.find(".cd-timestamp").get(-1);this.reformatTimestamp()}mw.hook("wikipage.content").fire(this.$elements);delete this.cachedText;return!0}else return!1}scrollIntoView(e){(this.editForm?this.editForm.$element:this.$elements).cdScrollIntoView(e)}scrollTo(e=!0,t=!1,n=!0,i){if(t)history.pushState(history.state,"","#"+this.anchor);if(this.isCollapsed){this.getVisibleExpandNote().cdScrollTo("top",e,i);mw.notify(cd.a.s("navpanel-firstunseen-hidden"),{title:cd.a.s("navpanel-firstunseen-hidden-title")})}else{const t=this.editForm?this.editForm.$element:this.$elements,o=this.isOpeningSection||this.editForm?"top":"center";if(i)i();t.cdScrollIntoView(o,e,i);if(n)this.flashTarget()}}goToParent(){const e=this.getParent();if(e){e.scrollTo();e.configureLayers();if(!e.goToChildButton)e.createGoToChildButton();e.goToChildButton.setAction(()=>{this.scrollTo()})}else console.error("This comment has no parent.")}generateDiffView(){var e=this;return o()((function*(){const t=yield e.findEditThatAdded(),n=yield e.getDiffLink(),i=$("").addClass("cd-diffView-nextDiffLink").attr("href",n.replace(/&diff=(\d+)/,"&oldid=$1&diff=next")).attr("target","_blank").text(cd.a.mws("nextdiff")),o=$("
").append(i);if(t.parsedcomment){const e=Object(u.Y)(t.parsedcomment,{targetBlank:!0}).addClass("comment");o.append(cd.a.sParse("cld-summary"),cd.a.mws("colon-separator"),e)}const a=Object(u.Z)(t.diffBody);return $("
").addClass("cd-diffView-diff").append(o,a)}))()}copyLink(e){var t=this;return o()((function*(){if(!t.isLinkBeingCopied){t.copyLinkButton.setPending(!0);yield Object(T.c)(t,e);t.copyLinkButton.setPending(!1)}}))()}findEditThatAdded(){var e=this;return o()((function*(){if(e.editThatAdded)return e.editThatAdded;const t=new Date(e.date.getTime()-10*cd.a.g.MILLISECONDS_IN_MINUTE).toISOString(),n=new Date(e.date.getTime()+3*cd.a.g.MILLISECONDS_IN_MINUTE).toISOString(),i=yield e.getSourcePage().getArchivedPage().getRevisions({rvprop:["ids","comment","parsedcomment","timestamp"],rvdir:"newer",rvstart:t,rvend:n,rvuser:e.author.name,rvlimit:500}),o=i.map(t=>cd.a.g.mwApi.post({action:"compare",fromtitle:e.getSourcePage().getArchivedPage().name,fromrev:t.revid,torelative:"prev",prop:["diff"]}).catch(u.w)),a=yield Promise.all(o),r=/]*class="[^"]*\bdiff-empty\b[^"]*"[^>]*>\s*<\/td>\s*]*class="[^"]*\bdiff-marker\b[^"]*"[^>]*>\s*<\/td>\s*]*class="[^"]*\bdiff-addedline\b[^"]*"[^>]*>\s*]*>(?!=)(.+?)<\/div>\s*<\/td>/g,c=cd.a.g.ARE_TIMESTAMPS_ALTERED?e.timestamp:e.$signature.get(0).innerText,l=e.getText(!1)+" "+c,d=[];for(let t=0;tb)b=t;p+=e+"\n";g+=c[1]+"\n"}if(!g.trim())continue;o.diffBody=n;const v=new Date(o.timestamp).getTime(),y=e.date.getTime()+3e4,w=Math.abs(y-v),E=Object(u.e)(p,l);let T=Math.max(E,b);if(T<1&&g.includes("{{")){try{const e=(yield Object(f.j)(g,{title:cd.a.page.name})).html;g=$("
").append(e).cdGetText()}catch(e){throw new s.a({type:"parse"})}T=Object(u.e)(g,l)}d.push({revision:o,wordOverlap:T,dateProximity:w})}const g=d.sort((e,t)=>e.wordOverlap===t.wordOverlap?t.dateProximity-e.dateProximity:t.wordOverlap-e.wordOverlap)[0];if(!g)throw new s.a({type:"parse"});e.editThatAdded=g.revision;return e.editThatAdded}))()}getDiffLink(e){var t=this;return o()((function*(){const n=yield t.findEditThatAdded();if(e)return`${cd.a.g.SERVER}/?diff=${n.revid}`;else{const e=decodeURI(cd.a.page.getArchivedPage().getUrl({diff:n.revid}));return`${cd.a.g.SERVER}${e}`}}))()}setThanked(){this.thankButton.setPending(!1).setDisabled(!0).setLabel(cd.a.s("cm-thanked")).setTooltip(cd.a.s("cm-thanked-tooltip"))}thankFail(e){const{type:t,code:n}=e.data;let i;switch(t){case"parse":{const e=this.getSourcePage().getArchivedPage().getUrl({action:"history"});i=cd.a.sParse("error-diffnotfound")+" "+cd.a.sParse("error-diffnotfound-history",e);break}case"api":default:if("noData"===n){const e=this.getSourcePage().getArchivedPage().getUrl({action:"history"});i=cd.a.sParse("error-diffnotfound")+" "+cd.a.sParse("error-diffnotfound-history",e)}else{i=cd.a.sParse("thank-error");console.warn(e)}break;case"network":i=cd.a.sParse("error-diffnotfound")+" "+cd.a.sParse("error-network")}mw.notify(Object(u.Y)(i,{targetBlank:!0}),{type:"error"});this.thankButton.setPending(!1)}thank(){var e=this;return o()((function*(){if(Object(u.g)("mediawiki.diff.styles"))return;e.thankButton.setPending(!0);let t,n;if(cd.a.g.GENDER_AFFECTS_USER_STRING&&e.author.isRegistered())t=Object(f.g)([e.author]);try{[n]=yield Promise.all([e.findEditThatAdded(),t,mw.loader.using("mediawiki.diff.styles")].filter(u.h))}catch(t){e.thankFail(t);return}const i=e.getSourcePage().getArchivedPage().getUrl({diff:n.revid}),o=cd.a.sParse("thank-confirm",e.author.name,e.author,i),a=Object(u.Y)(o,{tagName:"div",targetBlank:!0}),s=yield e.generateDiffView(),r=$("
").append(a,s);if(yield OO.ui.confirm(r,{size:"larger"})){try{yield cd.a.g.mwApi.postWithEditToken(cd.a.g.mwApi.assertCurrentUser({action:"thank",rev:n.revid,source:cd.a.config.scriptCodeName})).catch(u.w)}catch(t){e.thankFail(t);return}mw.notify(cd.a.s("thank-success"));e.setThanked();k[n.revid]={anchor:e.anchor,text:e.getText(),thankUnixTime:Date.now()};Object(u.R)("thanks",k)}else e.thankButton.setPending(!1)}))()}reply(e){if(!this.replyForm)this.replyForm=e instanceof c.a?e:new c.a({mode:"reply",target:this,dataToRestore:e})}edit(e){this.$elements.addClass("cd-hidden");this.removeLayers();if(!this.editForm)this.editForm=e instanceof c.a?e:new c.a({mode:"edit",target:this,dataToRestore:e})}getCode(){var e=this;return o()((function*(){try{let t=!1;if(e.section&&null!==e.section.liveSectionNumber)try{yield e.section.requestCode();t=!0}catch(t){if(t instanceof s.a&&"noSuchSection"===t.data.code)yield e.getSourcePage().getCode();else throw t}else yield e.getSourcePage().getCode();e.locateInCode(t)}catch(e){if(e instanceof s.a)throw new s.a(Object.assign({},{message:cd.a.sParse("cf-error-getpagecode")},e.data));else throw e}}))()}isInViewport(e=!1,t=this.getOffset()){if(!t)return null;const n=window.scrollY+cd.a.g.BODY_SCROLL_PADDING_TOP,i=n+window.innerHeight;return e?t.downplayedBottom>n&&t.top=n&&t.downplayedBottom<=i}registerSeen(e,t=!1){const n=!e||this.isInViewport();if(!1===this.isSeen&&n){this.isSeen=!0;if(t)this.flashTarget()}if(this.willFlashChangedOnSight&&n){this.willFlashChangedOnSight=!1;this.flashChanged()}const i=cd.a.comments.some(e=>e.isSeen||e.willFlashChangedOnSight);if(e&&i){const n="backward"===e?-1:1,i=cd.a.comments[this.id+n];if(i&&!1!==i.isInViewport())i.registerSeen(e,t)}}get $elements(){if(void 0===this.cached$elements)this.cached$elements=$(this.elements);return this.cached$elements}set $elements(e){this.cached$elements=e;this.elements=e.get()}replaceElement(e,t){const n=e instanceof $?e.get(0):e;let i;if("string"==typeof t){const e=Array.from(n.parentNode.children).indexOf(n),o=n.parentNode;n.outerHTML=t;i=o.children[e]}else{i=t;n.parentNode.replaceChild(i,e)}if(e instanceof $)this.$elements=this.$elements.not(n).add(i);else this.elements.splice(this.elements.indexOf(e),1,t);if(this.highlightables.includes(n)){this.highlightables.splice(this.highlightables.indexOf(n),1,i);this.bindEvents(i)}if(this.anchorHighlightable===n)this.anchorHighlightable=i}getText(e=!0){if(void 0===this.cachedText){const t=this.$elements.not("h1, h2, h3, h4, h5, h6").clone().removeClass("cd-hidden"),n=$("
").append(t),i=[".cd-signature",".cd-changeMark"];if(cd.a.settings.reformatComments)i.push(".cd-comment-header",".cd-comment-menu");if(cd.a.config.unsignedClass)i.push("."+cd.a.config.unsignedClass);const o=i.join(", ");n.find(o).remove();let a=n.cdGetText();if(e){if(cd.a.config.signatureEndingRegexp)a=a.replace(cd.a.config.signatureEndingRegexp,"");if(cd.a.config.signaturePrefixRegexp)a=a.replace(cd.a.config.signaturePrefixRegexp,"")}this.cachedText=a}return this.cachedText}codeToText(){if(!this.inCode){console.error("The Comment#inCode property should contain an object with the comment code data.");return}let e,{code:t,originalIndentationChars:n}=this.inCode;({code:t,hidden:e}=Object(C.h)(t));let i=t;if(0===this.level){const e=new RegExp("^(?:\\x01\\d+_block.*\\x02) *$","i"),t=new RegExp(`^\\[\\[${cd.a.g.FILE_PREFIX_PATTERN}.+\\]\\]$`,"i"),n=new RegExp(`(?:<${cd.a.g.PNIE_PATTERN}(?: [\\w ]+?=[^<>]+?| ?\\/?)>|<\\/${cd.a.g.PNIE_PATTERN}>|\\x04) *$`,"i"),o=new RegExp(`^(?:<\\/${cd.a.g.PNIE_PATTERN}>|<${cd.a.g.PNIE_PATTERN}|\\|)`,"i"),a=/^(=+).*\1[ \t]*$|^----/;i=i.replace(/^((?![:*#; ]).+)\n(?![\n:*#; \x03])(?=(.*))/gm,(i,s,r)=>s+(e.test(s)||e.test(r)||t.test(s)||t.test(r)||a.test(s)||a.test(r)||n.test(s)||o.test(r)?"\n":" "))}i=i.replace(/^(?![:*# ]).*.*$/gim,e=>e.replace(/(?![:*#;])\n? */gi,()=>"\n")).replace(/\n([:*#]*[:*])([ \t]*)/g,(e,t,i)=>{let o;if(t.length>=n.length){o=t.slice(n.length);if(t.length>n.length)o+=i}else o=t+i;return"\n"+o});i=Object(u.W)(i,e);if(cd.a.config.paragraphTemplates.length){const e=`\\{\\{(?:${cd.a.config.paragraphTemplates.map(u.m).join("|")})\\}\\}`,t=new RegExp(e,"g"),n=new RegExp("^(?![:*#]).*"+e,"gm");i=i.replace(n,e=>e.replace(t,"\n\n"))}if(0!==this.level)i=i.replace(/\n\n+/g,"\n\n");return i.trim()}adjustCommentBeginning({code:e,startIndex:t}){let n="",i="",o=t;const a=e.match(/(^[^]*(?:^|\n))((=+)(.*?)\3[ \t\x01\x02]*\n)/);let s,r,c,l;if(a){s=a[2];r=t+a[1].length;c=a[3].length;l=a[4].trim();t+=a[0].length;e=e.slice(a[0].length);o=this.isOpeningSection?r:t}else{[cd.a.config.signatureEndingRegexp,cd.a.g.TIMEZONE_REGEXP].filter(e=>null!==e).forEach(n=>{const i=new RegExp(n.source+"$","m"),a=/^(.+)\n/gm;let s,r;for(;s=a.exec(e);){const t=s[1].replace(/\[\[:?(?:[^|[\]<>\n]+\|)?(.+?)\]\]/g,"$1");if(i.test(t)){const t=s.index+s[0].length;if(t===e.length)break;else r=t}}if(r){e=e.slice(r);t+=r;o+=r}});cd.a.g.BAD_COMMENT_BEGINNINGS.forEach(n=>{if("^"!==n.source[0])console.debug('Regexps in cd.config.customBadCommentBeginnings should have "^" as the first character.');const i=e.match(n);if(i){e=e.slice(i[0].length);o=t+i[0].lastIndexOf("\n")+1;t+=i[0].length}})}if(this.level>0){const a=(a,s,r,c="")=>{if("number"==typeof c)c="";let l="",u=r,d=a.length;if(!s&&e.includes("\n")&&u.endsWith("#")){u=u.slice(0,-1);n=u;if(u.length{t.signatureDirtyCode=e+t.signatureDirtyCode;t.endIndex-=e.length;return""};if(this.isOwn&&cd.a.g.USER_SIGNATURE_PREFIX_REGEXP)t.code=t.code.replace(cd.a.g.USER_SIGNATURE_PREFIX_REGEXP,n);const i=new RegExp(`(<${cd.a.g.PIE_PATTERN}(?: [\\w ]+?=[^<>]+?)?> *)+$`,"i");t.code=((e,t)=>{t.forEach(t=>{e=e.replace(t,n)});return e})(t.code,[/'+$/,cd.a.config.signaturePrefixRegexp,i,cd.a.config.signaturePrefixRegexp,i,new RegExp(`.*$`),//g,(e,t)=>"\x01"+" ".repeat(t.length+5)+"\x02").replace(/[\u200e\u200f]/g,e=>" ".repeat(e.length)).replace(/(<\/?(?:br|p)\b.*)(\n+)(>)/g,(e,t,n,i)=>t+" ".repeat(n.length)+i)}function d(e){const t=g(e);return t.length?t[0].timestamp:null}function h(e){return e.replace(//g,"").replace(/\x01 *\x02/g,"").replace(/(\[\[:?(?:[^|[\]<>\n:]+:)?([^|[\]<>\n]+)\|)(\]\])/g,"$1$2$3").replace(a.a.g.FILE_EMBED_REGEXP,"$1").replace(/\[\[:?(?:[^|[\]<>\n]+\|)?(.+?)\]\]/g,"$1").replace(/\{\{:?(?:[^|{}<>\n]+)(?:\|(.+?))?\}\}/g,"$1").replace(/\[https?:\/\/[^[\]<>"\n ]+ *([^\]]*)\]/g,"$1").replace(/(.+?)/g,"$1").replace(/(.+?)/g,"$1").replace(/
/g," ").replace(/<\w+(?: [\w ]+(?:=[^<>]+?)?| *\/?)>/g,"").replace(/<\/\w+(?: [\w ]+)? *>/g,"").replace(/ {2,}/g," ").trim()}function m(e){return p(e).replace(/\s+/g," ").trim()}function f(e){return e.replace(/<(\w+(?: [\w ]+(?:=[^<>]+?)?| *\/?)|\/\w+(?: [\w ]+)? *)>/g,"%3C$1%3E").replace(/\[/g,"%5B").replace(/\]/g,"%5D").replace(/\{/g,"%7B").replace(/\|/g,"%7C").replace(/\}/g,"%7D").replace(/\s+/g," ")}function g(e){const t=u(e).replace(a.a.g.QUOTE_REGEXP,(e,t,n,i)=>t+" ".repeat(n.length)+i).replace(a.a.g.COMMENT_ANTIPATTERNS_REGEXP,e=>" ".repeat(e.length));let n=function(e,t){const n=new RegExp(`^((.*)(${a.a.g.CONTENT_TIMESTAMP_REGEXP.source})(?!["\xbb])(?:\\}\\}|
)?).*(?:\n*|$)`,"igm"),i=new RegExp(`^(((.*)${a.a.g.CAPTURE_USER_NAME_PATTERN}.{1,251})(${a.a.g.CONTENT_TIMESTAMP_REGEXP.source})(?:\\}\\}|)?.*)(?:\n*|$)`,"igm"),o=new RegExp(a.a.g.CAPTURE_USER_NAME_PATTERN,"ig");let r,c=[];for(;r=n.exec(e);){const e=r[0];i.lastIndex=0;const n=i.exec(e);let a,l,u,d,h,m;if(n){a=s.a.getUser(p(n[4]));const e=r.index+n[2].length,i=e+n[6].length;l=t.slice(e,i);u=r.index+n[3].length;d=r.index+n[1].length;m=t.slice(u,d);h=r.index+n[0].length;let c;o.lastIndex=0;let f=e-r.index-251;f=Math.max(0,f);const g=n[0].slice(f);for(;c=o.exec(g);){if(c[2])continue;if(s.a.getUser(p(c[1]))===a){u=r.index+f+c.index;m=t.slice(u,d);break}}}else{u=r.index+r[2].length;d=r.index+r[1].length;m=t.slice(u,d);const e=u+r[3].length;l=t.slice(u,e);h=r.index+r[0].length}c.push({author:a,timestamp:l,startIndex:u,endIndex:d,dirtyCode:m,nextCommentStartIndex:h})}return c}(t,e);const i=function(e,t,n){const i=[];if(a.a.g.UNSIGNED_TEMPLATES_REGEXP){let o;for(;o=a.a.g.UNSIGNED_TEMPLATES_REGEXP.exec(e);){let e,r;if(a.a.g.CONTENT_TIMESTAMP_NO_TZ_REGEXP.test(o[2])){r=o[2];e=o[3]}else if(a.a.g.CONTENT_TIMESTAMP_NO_TZ_REGEXP.test(o[3])){r=o[3];e=o[2]}else e=o[2];e=e&&s.a.getUser(p(e));if(r&&!a.a.g.CONTENT_TIMESTAMP_REGEXP.test(r)){r+=" (UTC)";if(!e)e=""}let c=o.index;const l=o.index+o[1].length;let u=t.slice(c,l);const d=o.index+o[0].length,h=n.findIndex(e=>e.nextCommentStartIndex===d);if(-1!==h)n.splice(h,1);i.push({author:e,timestamp:r,startIndex:c,endIndex:l,dirtyCode:u,nextCommentStartIndex:d})}}return i}(t,e,n);n.push(...i);const o=t.indexOf(a.a.g.SIGN_CODE);if(-1!==o){const e=o,i=t.slice(e).indexOf("\n")+1;n.push({author:a.a.user.name,startIndex:e,nextCommentStartIndex:e+i})}if(i.length||-1!==o)n.sort((e,t)=>e.startIndex>t.startIndex?1:-1);n=n.filter(e=>e.author);n.forEach((e,t)=>{e.commentStartIndex=0===t?0:n[t-1].nextCommentStartIndex});n.forEach((e,t)=>{const{date:n}=e.timestamp&&Object(c.l)(e.timestamp)||{};e.id=t;e.date=n;delete e.nextCommentStartIndex});return n}function p(e){if(-1===e.indexOf("&"))return e;else{let t=e;if(-1!==t.indexOf("&amp;"))t=t.replace(/&amp;/g,"&amp;");if(-1!==t.indexOf("&#"))t=t.replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(t));if(-1!==t.indexOf("&"))t=o()(t);return t}}function b(e,t,n){let i=0;const o=[];do{let a=e.indexOf("{{",i),s=e.indexOf("}}",i);if(-1===a&&-1===s&&!o.length)break;if(-1!==a&&(a{e=Object(r.x)(e,n,t,i)},i=(e,t)=>{e.forEach(e=>{n(new RegExp(`<${e}(?: [^>]+)?>[\\s\\S]+?<\\/${e}>`,"gi"),t)})};i(["pre","source","syntaxhighlight"],"block");i(["gallery"],"table");i(["nowiki"],"inline");(()=>{n(/\{\{(?:[^{]\{?)+?\}\}/g,"template");({code:e,hidden:t}=b(e,t))})();n(/^(:* *)(\{\|[^]*?\n\|\})/gm,"table");return{code:e,hidden:t}}function y(e){return e.replace(/([^\n])\n?$/,"$1\n\n")}},function(e,t,n){"use strict";n.d(t,"i",(function(){return g}));n.d(t,"j",(function(){return p}));n.d(t,"h",(function(){return b}));n.d(t,"b",(function(){return v}));n.d(t,"a",(function(){return w}));n.d(t,"l",(function(){return x}));n.d(t,"k",(function(){return S}));n.d(t,"g",(function(){return N}));n.d(t,"f",(function(){return A}));n.d(t,"d",(function(){return P}));n.d(t,"e",(function(){return I}));n.d(t,"c",(function(){return L}));var i=n(2),o=n.n(i),a=n(30),s=n.n(a),r=n(3),c=n(0),l=n(16),u=n(4),d=n(1),h=n(10);let m,f;function g(e,t="post"){return new Promise((n,i)=>{c.a.g.mwApi[t](e,{success:e=>{if(e.error)i(["api",e]);else n(e)},error:(e,t)=>{i(["http",t])}})})}function p(e,t){const n={action:"parse",text:e,contentmodel:"wikitext",prop:["text","modules","jsconfigvars"],pst:!0,disabletoc:!0,disablelimitreport:!0,disableeditsection:!0},i=Object.assign({},n,t);return c.a.g.mwApi.post(i).then(e=>{var n;const i=null===(n=e.parse)||void 0===n?void 0:n.text;if(i){mw.loader.load(e.parse.modules);mw.loader.load(e.parse.modulestyles)}else throw new r.a({type:"api",code:"noData"});const o=e.parse.parsedsummary;if(null!=t&&t.summary&&!o)throw new r.a({type:"api",code:"noData"});return{html:i,parsedSummary:o}},d.w)}function b(e=!1){if(e&&m)return m;Object(u.c)();m=c.a.g.mwApi.post({action:"query",meta:"userinfo",uiprop:["options","rights"]}).then(e=>{var t;const n=null===(t=e.query)||void 0===t?void 0:t.userinfo,i=null==n?void 0:n.options,o=null==n?void 0:n.rights;if(!i||!o)throw new r.a({type:"api",code:"noData"});const a=i[c.a.g.VISITS_OPTION_NAME],l=a?s.a.decompressFromEncodedURIComponent(a):"",u=Object(h.h)(l),d=i[c.a.g.WATCHED_SECTIONS_OPTION_NAME],m=d?s.a.decompressFromEncodedURIComponent(d):"",f=Object(h.i)(m);c.a.g.USER_RIGHTS=o;return{options:i,visits:u,watchedSections:f,rights:o}},d.w);return m}function v(e){return y.apply(this,arguments)}function y(){return(y=o()((function*(e){var t;const n=[],i=null!==(t=c.a.g.USER_RIGHTS)&&void 0!==t&&t.includes("apihighlimits")?500:50;let o;for(;o=e.splice(0,i).join("|");){const e=yield c.a.g.mwApi.post({action:"query",pageids:o}).catch(d.w);if(e.error)throw new r.a({type:"api",code:"error",apiData:e});const t=e.query,i=null==t?void 0:t.pages;if(!i)throw new r.a({type:"api",code:"noData"});n.push(...i)}return n}))).apply(this,arguments)}function w(e){return E.apply(this,arguments)}function E(){return(E=o()((function*(e){var t;const n=[],i=[],o=[],a=null!==(t=c.a.g.USER_RIGHTS)&&void 0!==t&&t.includes("apihighlimits")?500:50;let s;for(;s=e.splice(0,a).join("|");){const e=yield c.a.g.mwApi.post({action:"query",titles:s,redirects:!0}).catch(d.w);if(e.error)throw new r.a({type:"api",code:"error",apiData:e});const t=e.query,a=null==t?void 0:t.pages;if(!a)throw new r.a({type:"api",code:"noData"});n.push(...t.normalized||[]);i.push(...t.redirects||[]);o.push(...a)}return{normalized:n,redirects:i,pages:o}}))).apply(this,arguments)}function C(e,t,n){return T.apply(this,arguments)}function T(){return(T=o()((function*(e,t,n){if(t&&t.length>65535)throw new r.a({type:"internal",code:"sizeLimit",details:{action:n}});const i=yield g(c.a.g.mwApi.assertCurrentUser({action:n,optionname:e,optionvalue:void 0===t&&"globalpreferences"===n?"":t}),"postWithEditToken").catch(d.w);if(!i||"success"!==i[n])throw new r.a({type:"api",code:"noSuccess",details:{action:n}})}))).apply(this,arguments)}function x(e,t){return k.apply(this,arguments)}function k(){return(k=o()((function*(e,t){yield C(e,t,"options")}))).apply(this,arguments)}function S(e,t){return O.apply(this,arguments)}function O(){return(O=o()((function*(e,t){if(c.a.config.useGlobalPreferences)try{yield C(e,t,"globalpreferences")}catch(n){if(n instanceof r.a&&n.data.apiData&&"badvalue"===n.data.apiData.error.code)yield x(e,t);else throw n}else yield x(e,t)}))).apply(this,arguments)}function N(e){return _.apply(this,arguments)}function _(){return(_=o()((function*(e,t=!1){var n;const i=e.filter(e=>!e.getGender()&&e.isRegistered()).filter(d.X).map(e=>e.name),o=null!==(n=c.a.g.USER_RIGHTS)&&void 0!==n&&n.includes("apihighlimits")?500:50;let a;for(;a=i.splice(0,o).join("|");){var s;const e={action:"query",list:"users",ususers:a,usprop:"gender"},n=t?g(e):c.a.g.mwApi.post(e),i=null===(s=(yield n.catch(d.w)).query)||void 0===s?void 0:s.users;if(!i)throw new r.a({type:"api",code:"noData"});i.filter(e=>e.gender).forEach(e=>{l.a.getUser(e.name).setGender(e.gender)})}}))).apply(this,arguments)}function A(e){e=Object(d.j)(e);const t=new Promise((n,i)=>{setTimeout(o()((function*(){try{var o;if(t!==f)throw new r.a;const i=null===(o=(yield c.a.g.mwApi.get({action:"opensearch",search:e,namespace:3,redirects:"resolve",limit:10}).catch(d.w))[1])||void 0===o?void 0:o.map(e=>(e.match(c.a.g.USER_NAMESPACES_REGEXP)||[])[1]).filter(d.h).filter(e=>!e.includes("/"));if(!i)throw new r.a({type:"api",code:"noData"});if(i.length)n(i);else{var a,s;const t=yield c.a.g.mwApi.get({action:"query",list:"allusers",auprefix:e}).catch(d.w),i=null==t?void 0:null===(a=t.query)||void 0===a?void 0:null===(s=a.allusers)||void 0===s?void 0:s.map(e=>e.name);if(!i)throw new r.a({type:"api",code:"noData"});n(i)}}catch(e){i(e)}})),100)});f=t;return t}function P(e){let t=!1;if(c.a.g.COLON_NAMESPACES_PREFIX_REGEXP.test(e)){e=e.slice(1);t=!0}const n=new Promise((i,o)=>{setTimeout(()=>{try{if(n!==f)throw new r.a;c.a.g.mwApi.get({action:"opensearch",search:e,redirects:"return",limit:10}).then(n=>{var o;const a=new RegExp("^"+mw.util.escapeRegExp(e[0]),"i"),s=null===(o=n[1])||void 0===o?void 0:o.map(n=>n.replace(a,()=>e[0]).replace(/^/,t?":":""));if(!s)throw new r.a({type:"api",code:"noData"});i(s)},e=>{Object(d.w)(e)})}catch(e){o(e)}},100)});f=n;return n}function I(e){const t=new Promise((n,i)=>{setTimeout(()=>{try{if(t!==f)throw new r.a;c.a.g.mwApi.get({action:"opensearch",search:e.startsWith(":")?e.slice(1):"Template:"+e,redirects:"return",limit:10}).then(t=>{var i;const o=new RegExp("^"+mw.util.escapeRegExp(e[0]),"i"),a=null===(i=t[1])||void 0===i?void 0:i.filter(e=>!/(\/doc|\.css)$/.test(e)).map(t=>e.startsWith(":")?t:t.slice(t.indexOf(":")+1)).map(t=>t.replace(o,()=>e[0]));if(!a)throw new r.a({type:"api",code:"noData"});n(a)},e=>{Object(d.w)(e)})}catch(e){i(e)}},100)});f=t;return t}function L(e){return M.apply(this,arguments)}function M(){return(M=o()((function*(e){var t;const n={},i=[],o=[],a=e.slice(),s=null!==(t=c.a.g.USER_RIGHTS)&&void 0!==t&&t.includes("apihighlimits")?500:50;let l;for(;l=a.splice(0,s).join("|");){const e=yield c.a.g.mwApi.post({action:"query",titles:l}).catch(d.w);if(e.error)throw new r.a({type:"api",code:"error",apiData:e});const t=e.query,n=null==t?void 0:t.pages;if(!n)throw new r.a({type:"api",code:"noData"});i.push(...t.normalized||[]);o.push(...n)}const u={};i.forEach(e=>{u[e.to]=e.from});o.forEach(e=>{n[u[e.title]||e.title]={exists:!e.missing,normalized:e.title}});return n}))).apply(this,arguments)}},function(e,t,n){"use strict";n.d(t,"h",(function(){return m}));n.d(t,"i",(function(){return g}));n.d(t,"b",(function(){return p}));n.d(t,"a",(function(){return v}));n.d(t,"e",(function(){return y}));n.d(t,"c",(function(){return E}));n.d(t,"f",(function(){return x}));n.d(t,"d",(function(){return S}));n.d(t,"g",(function(){return N}));var i=n(2),o=n.n(i),a=n(30),s=n.n(a),r=n(3),c=n(0),l=n(1),u=n(9),d=n(4);function h(e){return Object.keys(e).map(t=>`${t},${e[t].join(",")}\n`).join("").trim()}function m(e){const t={},n=/^(\d+), *(.+)$/gm;let i;for(;i=n.exec(e);)t[i[1]]=i[2].split(",");return t}function f(e){return Object.keys(e).filter(t=>e[t].length).map(t=>` ${t} ${e[t].join("\n")}\n`).join("").trim()}function g(e){const t={},n=e.split(/(?:^|\n )(\d+) /).slice(1);let i;for(let e=0,o=!0;e{(d.p.aliases[e]||[]).concat(e).forEach(t=>{if(void 0!==i[t]&&(typeof i[t]==typeof d.p.default[e]||null===d.p.default[e]))a[e]=i[t];if(void 0!==o[t]&&(typeof o[t]==typeof d.p.default[e]||null===d.p.default[e]))a[e]=o[t]})});if(!t)Object.assign(a,v());return a}))).apply(this,arguments)}function v(){const e={};Object.keys(d.p.default).forEach(t=>{(d.p.aliases[t]||[]).concat(t).forEach(n=>{const i="cdLocal"+Object(l.j)(n);if(i in window&&(typeof window[i]==typeof d.p.default[t]||null===d.p.default[t]))e[t]=window[i]})});return e}function y(){return w.apply(this,arguments)}function w(){return(w=o()((function*(e=c.a.settings){if(""!==c.a.user.name)if(c.a.config.useGlobalPreferences){const t={},n={};Object.keys(e).forEach(i=>{if(d.p.local.includes(i))n[i]=e[i];else t[i]=e[i]});yield Promise.all([Object(u.l)(c.a.g.LOCAL_SETTINGS_OPTION_NAME,JSON.stringify(n)),Object(u.k)(c.a.g.SETTINGS_OPTION_NAME,JSON.stringify(t))])}else yield Object(u.l)(c.a.g.LOCAL_SETTINGS_OPTION_NAME,JSON.stringify(e))}))).apply(this,arguments)}function E(){return C.apply(this,arguments)}function C(){return(C=o()((function*(e=!1){let t,n;if(""===c.a.user.name){t=[];n=[]}else{const i=null!==mw.user.options.get(c.a.g.VISITS_OPTION_NAME),o=c.a.state.isPageFirstParsed&&!i?Promise.resolve({}):Object(u.h)(e).then(e=>e.visits);t=yield o;const a=mw.config.get("wgArticleId");if(a){t[a]=t[a]||[];n=t[a]}}c.a.g.visits=t;c.a.g.currentPageVisits=n;return{visits:t,currentPageVisits:n}}))).apply(this,arguments)}function T(e){const t=Object.assign({},e),n=Object.keys(t).reduce((e,n)=>e.concat(t[n]),[]);n.sort();const i=n[Math.floor(n.length/10)];Object.keys(t).forEach(e=>{t[e]=t[e].filter(e=>e>=i);if(!t[e].length)delete t[e]});return t}function x(e){return k.apply(this,arguments)}function k(){return(k=o()((function*(e){if(!e||""===c.a.user.name)return;const t=h(e),n=s.a.compressToEncodedURIComponent(t);try{yield Object(u.l)(c.a.g.VISITS_OPTION_NAME,n)}catch(t){if(t instanceof r.a){const{type:n,code:i}=t.data;if("internal"===n&&"sizeLimit"===i)x(T(e));else console.error(t)}else console.error(t)}}))).apply(this,arguments)}function S(){return O.apply(this,arguments)}function O(){return(O=o()((function*(e=!1,t={}){const n=null!==mw.user.options.get(c.a.g.WATCHED_SECTIONS_OPTION_NAME),i=c.a.state.isPageFirstParsed&&!n?Promise.resolve({}):Object(u.h)(e).then(e=>e.watchedSections),o=yield i,a=mw.config.get("wgArticleId");let s;if(a){o[a]=o[a]||[];s=o[a];Object(l.b)(s,t.justWatchedSection);Object(l.K)(s,t.justUnwatchedSection)}c.a.g.watchedSections=o;c.a.g.currentPageWatchedSections=s}))).apply(this,arguments)}function N(){return _.apply(this,arguments)}function _(){return(_=o()((function*(){const e=f(c.a.g.watchedSections),t=s.a.compressToEncodedURIComponent(e);yield Object(u.l)(c.a.g.WATCHED_SECTIONS_OPTION_NAME,t)}))).apply(this,arguments)}},function(e,t,n){"use strict";var i=n(12),o=n(7),a=n(0),s=n(26),r=n(1),c=n(5),l=n(4),u=n(8);let d,h,m;t.a={mount(){this.$element=$("
").attr("id","cd-navPanel").appendTo(document.body);this.refreshButton=new i.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-refreshButton",action:e=>{this.refreshClick(e.ctrlKey)}});this.updateRefreshButtonTooltip(0);this.previousButton=new i.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-previousButton",tooltip:`${a.a.s("navpanel-previous")} ${a.a.mws("parentheses","W")}`,action:()=>{this.goToPreviousNewComment()}}).hide();this.nextButton=new i.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-nextButton",tooltip:`${a.a.s("navpanel-next")} ${a.a.mws("parentheses","S")}`,action:()=>{this.goToNextNewComment()}}).hide();this.firstUnseenButton=new i.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-firstUnseenButton",tooltip:`${a.a.s("navpanel-firstunseen")} ${a.a.mws("parentheses","F")}`,action:()=>{this.goToFirstUnseenComment()}}).hide();this.commentFormButton=new i.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-commentFormButton",tooltip:`${a.a.s("navpanel-commentform")} ${a.a.mws("parentheses","C")}`,action:()=>{this.goToNextCommentForm()}}).hide();this.$element.append([this.refreshButton.element,this.previousButton.element,this.nextButton.element,this.firstUnseenButton.element,this.commentFormButton.element])},unmount(){this.$element.remove();this.$element=null},isMounted(){return Boolean(this.$element)},reset(){this.refreshButton.setLabel("");this.updateRefreshButtonTooltip(0);this.previousButton.hide();this.nextButton.hide();this.firstUnseenButton.hide();this.commentFormButton.hide();clearTimeout(d)},fill(){if(a.a.comments.some(e=>e.isNew)){this.updateRefreshButtonTooltip(0);this.previousButton.show();this.nextButton.show();this.updateFirstUnseenButton()}},refreshClick(e){Object(l.k)({commentAnchor:s.a.relevantNewCommentAnchor,markAsRead:e})},goToNewCommentInDirection(e){if(a.a.state.isAutoScrollInProgress)return;const t=o.a.findInViewport(e);if(!t)return;const n="backward"===e,i=Object(r.L)(a.a.comments,t.id,n).filter(e=>e.isNew&&!e.isInViewport()),s=i.find(e=>!1===e.isInViewport())||i[0];if(s)s.scrollTo(!0,!1,!1,()=>{s.registerSeen(e,!0);this.updateFirstUnseenButton()})},goToPreviousNewComment(){this.goToNewCommentInDirection("backward")},goToNextNewComment(){this.goToNewCommentInDirection("forward")},goToFirstUnseenComment(){if(a.a.state.isAutoScrollInProgress)return;const e=a.a.comments.filter(e=>!1===e.isSeen),t=e.find(e=>!1===e.isInViewport())||e[0];if(t)t.scrollTo(!0,!1,!1,()=>{t.registerSeen("forward",!0);this.updateFirstUnseenButton()})},goToNextCommentForm(e=!1){const t=a.a.commentForms.filter(t=>e||!t.$element.cdIsInViewport(!0)).sort((e,t)=>{let n=e.$element.get(0).getBoundingClientRect().top;if(n<0)n+=2*$(document).height();let i=t.$element.get(0).getBoundingClientRect().top;if(i<0)i+=2*$(document).height();return n-i})[0];if(t){t.$element.cdScrollIntoView("center");Object(r.l)(t.commentInput)}},updateRefreshButton(e,t,n){this.refreshButton.setLabel("");this.updateRefreshButtonTooltip(e,t);if(e)$("").attr("dir","ltr").text("+"+e).appendTo(this.refreshButton.element);this.refreshButton.element.classList.toggle("cd-navPanel-refreshButton-relevant",n)},updateRefreshButtonTooltip(e,t){clearTimeout(d);h=e;m=t;let n=null;const i=a.a.comments.some(e=>e.isNew);if(e){n=a.a.s("navpanel-newcomments-count",e)+" "+a.a.s("navpanel-newcomments-refresh")+" "+a.a.mws("parentheses","R");if(i)n+="\n"+a.a.s("navpanel-markasread");const o=Object(u.k)(a.a.s("bullet")),s=a.a.mws("comma-separator"),r="rtl"===a.a.g.CONTENT_DIR?"\u200f":"";t.forEach((e,t)=>{let i;if("string"==typeof t)i=e[0].section.headline;else if(null!==t)i=t.headline;n+=i?"\n\n"+i:"\n";e.forEach(e=>{var t;n+="\n";const i=null!==(t=e.parent)&&void 0!==t&&t.author&&e.level>1?a.a.s("navpanel-newcomments-names",e.author.name,e.parent.author.name):e.author.name,l=e.date?Object(c.b)(e.date):a.a.s("navpanel-newcomments-unknowndate");n+=o+" "+i+r+s+l})});if("relative"===a.a.settings.timestampFormat&&!a.a.settings.modifyToc)d=setTimeout(()=>{this.updateTimestampsInRefreshButtonTooltip()},a.a.g.MILLISECONDS_IN_MINUTE)}else{n=a.a.s("navpanel-refresh")+" "+a.a.mws("parentheses","R");if(i)n+="\n"+a.a.s("navpanel-markasread")}this.refreshButton.setTooltip(n)},updateTimestampsInRefreshButtonTooltip(){this.updateRefreshButtonTooltip(h,m)},updateFirstUnseenButton(){if(!this.isMounted())return;const e=a.a.comments.filter(e=>!1===e.isSeen).length;if(e)this.firstUnseenButton.show().setLabel(e);else this.firstUnseenButton.hide()},updateCommentFormButton(){if(a.a.state.isAutoScrollInProgress||!this.isMounted())return;const e=a.a.commentForms.some(e=>!e.$element.cdIsInViewport(!0));this.commentFormButton[e?"show":"hide"]()}}},function(e,t,n){"use strict";let i={};t.a=class{constructor({element:e,buttonElement:t,labelElement:n,tagName:o="a",classes:a=[],id:s,href:r,label:c,tooltip:l,action:u}={}){if(!e)e=function(e){if(!i[e]){const t=document.createElement(e);t.tabIndex=0;t.setAttribute("role","button");i[e]=t}return i[e]}(o).cloneNode(!0);if(s)e.id=s;if(a.length)e.classList.add(...a);this.element=e;this.buttonElement=t||e;this.labelElement=n||e;if(void 0!==r)this.setHref(r);if(void 0!==c)this.setLabel(c);if(void 0!==l)this.setTooltip(l);if(void 0!==u)this.setAction(u)}setDisabled(e){e=Boolean(e);this.element.classList.toggle("cd-button-disabled",e);this.buttonElement.ariaDisabled=e;this.buttonElement.tabIndex=e?-1:0;return this}setPending(e){e=Boolean(e);this.setDisabled(e);this.element.classList.toggle("cd-button-pending",e);return this}setHref(e){this.buttonElement.href=e;return this}setLabel(e){this.labelElement.textContent=e;return this}setTooltip(e){this.buttonElement.title=e;return this}setAction(e){this.buttonElement.onclick=e?t=>{if(!this.isDisabled()){t.preventDefault();e(t)}}:e;this.buttonElement.onkeydown=e?t=>{if(!this.isDisabled()&&[13,32].includes(t.keyCode)){t.preventDefault();e(t)}}:e;return this}isDisabled(){return this.element.classList.contains("cd-button-disabled")}isPending(){return this.element.classList.contains("cd-button-pending")}hide(){this.element.style.display="none";return this}show(){this.element.style.display="";return this}}},function(e,t,n){"use strict";var i=n(2),o=n.n(i),a=n(29),s=n(12),r=n(3),c=n(7),cd=n(0),l=n(1);function u(e,t){const n=e.lastFocused||new Date(0),i=t.lastFocused||new Date(0);if(i>n)return 1;else if(i({editIntro:void 0,commentTemplate:void 0,headline:void 0,summary:void 0,noHeadline:!1,omitSignature:!1}),modeToProperty:e=>"replyInSection"===e?"reply":e,getLastActive:()=>cd.a.commentForms.slice().sort(u)[0]||null,getLastActiveAltered:()=>cd.a.commentForms.slice().sort(u).find(e=>e.isAltered())||null,createAddSectionForm(e=T.getDefaultPreloadConfig(),t=!1,n){const i=cd.a.g.addSectionForm;if(i){if(!Object(l.c)(e,i.preloadConfig)){mw.notify(cd.a.s("cf-error-formconflict"),{type:"error"});return}i.$element.cdScrollIntoView("center");Object(l.l)(i.headlineInput||i.commentInput)}else cd.a.g.addSectionForm=new T({mode:"addSection",target:cd.a.page,preloadConfig:e,isNewTopicOnTop:t,dataToRestore:n})}},h=n(14),m=n(15),f=n(11),g=n(16),p=n(6),b=n(4),v=n(5),y=n(8),w=n(9),E=n(19);let C=0;class CommentForm_CommentForm{constructor({mode:e,target:t,dataToRestore:n,preloadConfig:i,isNewTopicOnTop:o}){var a,s;this.mode=e;this.setTargets(t);this.preloadConfig=i;this.didReplaceDtForm=null!==(a=null==n?void 0:n.didReplaceDtForm)&&void 0!==a?a:!1;this.isNewTopicOnTop=o;if(this.target instanceof c.a){var r;this.sectionHeadline=null===(r=this.target.section)||void 0===r?void 0:r.headline}else if(this.target instanceof m.a)this.sectionHeadline=this.target.headline;this.id=C++;this.isSummaryAltered=null!==(s=null==n?void 0:n.isSummaryAltered)&&void 0!==s?s:!1;this.isSectionOpeningCommentEdited="edit"===this.mode&&this.target.isOpeningSection;this.operations=[];if("addSection"===this.mode)this.addEditNotices();const u=cd.a.config.customCommentFormModules.filter(e=>!e.checkFunc||e.checkFunc()).map(e=>e.name);mw.loader.using(u).then(()=>{mw.hook("convenientDiscussions.commentFormModulesReady").fire(this,cd.a)});this.createContents(n,u);this.addEvents();this.initAutocomplete();this.addToPage();if("addSection"===this.mode){$("#ca-addsection").addClass("selected");$("#ca-view").removeClass("selected")}cd.a.commentForms.push(this);if(n){this.originalComment=n.originalComment;this.originalHeadline=n.originalHeadline;if(n.lastFocused)this.lastFocused=new Date(n.lastFocused);if(n.didReplaceDtForm)Object(l.l)(this.headlineInput||this.commentInput)}else{this.$element.cdScrollIntoView("center",!0,()=>{if("edit"!==this.mode)Object(l.l)(this.headlineInput||this.commentInput);f.a.updateCommentFormButton()});if("edit"===this.mode)this.loadComment();else{var d;if(null!==(d=this.preloadConfig)&&void 0!==d&&d.commentTemplate)this.preloadTemplate();else this.originalComment="";if(this.headlineInput){var g,p;this.headlineInput.setValue((null===(g=this.preloadConfig)||void 0===g?void 0:g.headline)||"");this.originalHeadline=(null===(p=this.preloadConfig)||void 0===p?void 0:p.headline)||""}if(!(this.target instanceof h.a))this.checkCode()}}mw.hook("convenientDiscussions.commentFormCreated").fire(this,cd.a)}setTargets(e){this.target=e;if(this.target instanceof c.a){this.targetSection=this.target.section;this.targetComment=this.target}else if(this.target instanceof m.a){var t;this.targetSection=this.target;if("replyInSection"===this.mode&&!this.target.replyButton)throw new r.a;if(null!==(t=this.target.comments[0])&&void 0!==t&&t.isOpeningSection)this.targetComment=this.target.comments[0]}this.targetPage=this.targetSection?this.targetSection.getSourcePage():cd.a.page}createInputs(e){var t,n,i;if(["addSection","addSubsection"].includes(this.mode)&&(null===(t=this.preloadConfig)||void 0===t||!t.noHeadline)||this.isSectionOpeningCommentEdited){var o,a;const t=null===(o=this.targetSection)||void 0===o?void 0:o.getParent();if("addSubsection"===this.mode)this.headlineInputPlaceholder=cd.a.s("cf-headline-subsection",this.targetSection.headline);else if("edit"===this.mode&&t)this.headlineInputPlaceholder=cd.a.s("cf-headline-subsection",t.headline);else this.headlineInputPlaceholder=cd.a.s("cf-headline-topic");this.headlineInput=new OO.ui.TextInputWidget({value:null!==(a=null==e?void 0:e.headline)&&void 0!==a?a:"",placeholder:this.headlineInputPlaceholder,classes:["cd-commentForm-headlineInput"],tabIndex:String(this.id)+"11"})}let s,r=this.headlineInput?5:3;if("firefox"===$.client.profile().name)r-=1;if("replyInSection"===this.mode||"reply"===this.mode&&this.target.isOpeningSection)s=cd.a.s("cf-comment-placeholder-replytosection",this.targetSection.headline);else if("reply"===this.mode)this.target.requestAuthorGenderIfNeeded(()=>{this.commentInput.$input.attr("placeholder",Object(l.J)(cd.a.s("cf-comment-placeholder-replytocomment",this.target.author.name,this.target.author)))},!0);this.commentInput=new OO.ui.MultilineTextInputWidget({value:null!==(n=null==e?void 0:e.comment)&&void 0!==n?n:"",placeholder:s,autosize:!0,rows:r,maxRows:30,classes:["cd-commentForm-commentInput"],tabIndex:String(this.id)+"12"});this.commentInput.$input.addClass("ime-position-inside");this.summaryInput=new OO.ui.TextInputWidget({value:null!==(i=null==e?void 0:e.summary)&&void 0!==i?i:"",maxLength:cd.a.g.SUMMARY_LENGTH_LIMIT,placeholder:cd.a.s("cf-summary-placeholder"),classes:["cd-commentForm-summaryInput"],tabIndex:String(this.id)+"13"});this.summaryInput.$input.codePointLimit(cd.a.g.SUMMARY_LENGTH_LIMIT);mw.widgets.visibleCodePointLimit(this.summaryInput,cd.a.g.SUMMARY_LENGTH_LIMIT);this.updateAutoSummary(!e)}createCheckboxes(e){var t;if("edit"===this.mode){var n;[this.minorField,this.minorCheckbox]=Object(p.b)({value:"minor",selected:null!==(n=null==e?void 0:e.minor)&&void 0!==n?n:!0,label:cd.a.s("cf-minor"),tabIndex:String(this.id)+"20"})}const i=cd.a.settings.watchOnReply&&"edit"!==this.mode||$("#ca-unwatch").length||mw.user.options.get(mw.config.get("wgArticleId")?"watchdefault":"watchcreations");[this.watchField,this.watchCheckbox]=Object(p.b)({value:"watch",selected:null!==(t=null==e?void 0:e.watch)&&void 0!==t?t:i,label:cd.a.s("cf-watch"),tabIndex:String(this.id)+"21"});if(this.targetSection||"addSection"===this.mode){var o,a;const t="addSubsection"!==this.mode&&(this.targetSection&&this.targetSection.level<=2||"addSection"===this.mode),n=cd.a.s("cf-watchsection-"+(t?"topic":"subsection")),i=cd.a.settings.watchSectionOnReply&&"edit"!==this.mode||(null===(o=this.targetSection)||void 0===o?void 0:o.isWatched);[this.watchSectionField,this.watchSectionCheckbox]=Object(p.b)({value:"watchSection",selected:null!==(a=null==e?void 0:e.watchSection)&&void 0!==a?a:i,label:n,tabIndex:String(this.id)+"22",title:cd.a.s("cf-watchsection-tooltip")})}if(["addSection","addSubsection"].includes(this.mode)){var s;[this.omitSignatureField,this.omitSignatureCheckbox]=Object(p.b)({value:"omitSignature",selected:null!==(s=null==e?void 0:e.omitSignature)&&void 0!==s?s:!1,label:cd.a.s("cf-omitsignature"),tabIndex:String(this.id)+"25"})}if("edit"===this.mode&&(this.target.isOpeningSection?1===this.targetSection.comments.length:!this.target.getChildren().length)){var r;const t=null!==(r=null==e?void 0:e.delete)&&void 0!==r?r:!1;[this.deleteField,this.deleteCheckbox]=Object(p.b)({value:"delete",selected:t,label:cd.a.s("cf-delete"),tabIndex:String(this.id)+"26"})}this.checkboxesLayout=new OO.ui.HorizontalLayout({classes:["cd-commentForm-checkboxes"],items:[this.minorField,this.watchField,this.watchSectionField,this.omitSignatureField,this.deleteField].filter(l.h)})}createButtons(){const e={edit:"save",addSection:"addtopic",addSubsection:"addsubsection"}[this.mode]||"reply";this.submitButtonLabelStandard=cd.a.s("cf-"+e);this.submitButtonLabelShort=cd.a.s(`cf-${e}-short`);this.advancedButton=new OO.ui.ButtonWidget({label:cd.a.s("cf-advanced"),framed:!1,classes:["cd-button-ooui","cd-commentForm-advancedButton"],tabIndex:String(this.id)+"30"});if(!cd.a.g.$popupsOverlay)cd.a.g.$popupsOverlay=$("
").addClass("cd-popupsOverlay").appendTo(document.body);this.helpPopupButton=new OO.ui.PopupButtonWidget({label:cd.a.s("cf-help"),framed:!1,classes:["cd-button-ooui"],popup:{head:!1,$content:Object(l.Y)(cd.a.sParse("cf-help-content",cd.a.config.mentionCharacter),{tagName:"div",targetBlank:!0}),padded:!0,align:"center",width:400},$overlay:cd.a.g.$popupsOverlay,tabIndex:String(this.id)+"31"});this.settingsButton=new OO.ui.ButtonWidget({framed:!1,icon:"settings",label:cd.a.s("cf-settings-tooltip"),invisibleLabel:!0,title:cd.a.s("cf-settings-tooltip"),classes:["cd-button-ooui","cd-commentForm-settingsButton"],tabIndex:String(this.id)+"32"});this.cancelButton=new OO.ui.ButtonWidget({label:cd.a.s("cf-cancel"),flags:"destructive",framed:!1,classes:["cd-button-ooui","cd-commentForm-cancelButton"],tabIndex:String(this.id)+"33"});this.viewChangesButton=new OO.ui.ButtonWidget({label:cd.a.s("cf-viewchanges"),classes:["cd-commentForm-viewChangesButton"],tabIndex:String(this.id)+"34"});this.previewButton=new OO.ui.ButtonWidget({label:cd.a.s("cf-preview"),classes:["cd-commentForm-previewButton"],tabIndex:String(this.id)+"35"});if(cd.a.settings.autopreview)this.previewButton.$element.hide();this.submitButton=new OO.ui.ButtonWidget({label:this.submitButtonLabelStandard,flags:["progressive","primary"],classes:["cd-commentForm-submitButton"],tabIndex:String(this.id)+"36"})}createElements(){var e;if(!["addSection","addSubsection"].includes(this.mode))if("reply"===this.mode)this.containerListType="dl";else if("edit"===this.mode)this.containerListType=this.target.containerListType;else if("replyInSection"===this.mode)this.containerListType=this.target.$replyContainer.prop("tagName").toLowerCase();this.$element=$("
").addClass("cd-commentForm cd-commentForm-"+this.mode);if("ol"===this.containerListType)this.$element.addClass("cd-commentForm-inNumberedList");if(this.isSectionOpeningCommentEdited)this.$element.addClass("cd-commentForm-sectionOpeningComment");if("addSubsection"===this.mode)this.$element.addClass("cd-commentForm-addSubsection-"+this.target.level);this.$messageArea=$("
").addClass("cd-messageArea");this.$summaryPreview=$("
").addClass("cd-summaryPreview");this.$advanced=$("
").addClass("cd-commentForm-advanced").append([this.summaryInput.$element,this.$summaryPreview,this.checkboxesLayout.$element]);this.$buttonsStart=$("
").addClass("cd-commentForm-buttons-start").append([this.advancedButton.$element,this.helpPopupButton.$element,this.settingsButton.$element]);this.$buttonsEnd=$("
").addClass("cd-commentForm-buttons-end").append([this.cancelButton.$element,this.viewChangesButton.$element,this.previewButton.$element,this.submitButton.$element]);this.$buttons=$("
").addClass("cd-commentForm-buttons").append(this.$buttonsStart,this.$buttonsEnd);this.$element.append([this.$messageArea,null===(e=this.headlineInput)||void 0===e?void 0:e.$element,this.commentInput.$element,this.$advanced,this.$buttons]);if("edit"!==this.mode&&!cd.a.settings.alwaysExpandAdvanced)this.$advanced.hide();this.$previewArea=$("
").addClass("cd-previewArea");if(cd.a.settings.autopreview)this.$previewArea.addClass("cd-previewArea-below").appendTo(this.$element);else this.$previewArea.addClass("cd-previewArea-above").prependTo(this.$element);if("ol"===this.containerListType&&"webkit"!==$.client.profile().layout)$("
").html(" ").addClass("cd-commentForm-dummyElement").prependTo(this.$element)}addToolbar(e){if(!cd.a.settings.showToolbar)return;const t=$("
").addClass("cd-toolbarPlaceholder").insertBefore(this.commentInput.$element);mw.loader.using(["ext.wikiEditor",...e]).then(()=>{t.remove();if(this.didReplaceDtForm)$(".cd-dummyTextareaContainer").remove();const e=this.commentInput.$input,n=mw.loader.moduleRegistry["ext.wikiEditor"],i=n.packageExports["jquery.wikiEditor.toolbar.config.js"];e.wikiEditor("addModule",i);const o=n.packageExports["jquery.wikiEditor.dialogs.config.js"];o.replaceIcons(e);e.wikiEditor("addModule",o.getDefaultConfig());this.commentInput.$element.find('.tool[rel="redirect"], .tool[rel="signature"], .tool[rel="newline"], .tool[rel="gallery"], .tool[rel="reference"], .option[rel="heading-2"]').remove();if(!["addSection","addSubsection"].includes(this.mode))this.commentInput.$element.find(".group-heading").remove();e.textSelection("register",{encapsulateSelection:e=>{CommentForm_CommentForm.getLastActive().encapsulateSelection(e)},setContents:e=>{const t=CommentForm_CommentForm.getLastActive();t.commentInput.select();Object(l.y)(t.commentInput,e)}});const a=cd.a.g.USER_LANGUAGE;e.wikiEditor("addToToolbar",{section:"main",group:"format",tools:{smaller:{label:cd.a.mws("wikieditor-toolbar-tool-small"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-styling&image=smaller&lang=${a}&skin=vector`,action:{type:"encapsulate",options:{pre:"",peri:cd.a.mws("wikieditor-toolbar-tool-small-example"),post:""}}},quote:{label:`${cd.a.s("cf-quote-tooltip")} ${cd.a.mws("parentheses",`Q${cd.a.mws("comma-separator")}Ctrl+Alt+Q`)}`,type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-advanced&image=quotes&lang=${a}&skin=vector`,action:{type:"callback",execute:()=>{this.quote()}}}}});e.wikiEditor("addToToolbar",{section:"advanced",group:"format",tools:{code:{label:cd.a.s("cf-code-tooltip"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-advanced&image=code&lang=${a}&skin=vector`,action:{type:"encapsulate",options:{pre:"",peri:cd.a.s("cf-code-placeholder"),post:"")}}},codeBlock:{label:cd.a.s("cf-codeblock-tooltip"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-advanced&image=markup&lang=${a}&skin=vector`,action:{type:"encapsulate",options:{pre:'\n',peri:cd.a.s("cf-codeblock-placeholder"),post:"\n"}}},underline:{label:cd.a.s("cf-underline-tooltip"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-styling&image=underline&lang=${a}&skin=vector`,action:{type:"encapsulate",options:{pre:"",peri:cd.a.s("cf-underline-placeholder"),post:""}}},strikethrough:{label:cd.a.s("cf-strikethrough-tooltip"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-styling&image=strikethrough&lang=${a}&skin=vector`,action:{type:"encapsulate",options:{pre:"",peri:cd.a.s("cf-strikethrough-placeholder"),post:""}}}}});e.wikiEditor("addToToolbar",{section:"main",groups:{"convenient-discussions":{tools:{mention:{label:cd.a.s("cf-mention-tooltip"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-user&image=userAvatar&lang=${a}&skin=vector`,action:{type:"callback",execute:()=>{}}}}}}});this.$element.find('.tool-button[rel="mention"]').off("click").on("click",e=>{this.mention(e.ctrlKey)});this.$element.find('.tool[rel="link"] a, .tool[rel="file"] a').on("click",e=>{const t=e.currentTarget.parentNode.getAttribute("rel"),n=$(`#wikieditor-toolbar-${t}-dialog`);if(n.length){const e=n.data("context");if(e)e.$textarea=e.$focusedElem=this.commentInput.$input;n.parent().data("dialogaction",!1)}});if(e.is(":focus")){e.blur();Object(l.l)(this.commentInput)}e.data("wikiEditor-context").instance=5;$.wikiEditor.instances=Array(5);mw.hook("convenientDiscussions.commentFormToolbarReady").fire(this,cd.a)})}addInsertButton(e,t){const n=[];e=Object(l.x)(e,/\\[+;\\]/g,n);let[,i,o]=e.match(/^(.*?)(?:\+(.*))?$/)||[];if(!i)return;o=o||"";const a=e=>e.replace(/\\([+;\\])/g,"$1");i=a(Object(l.W)(i,n));o=a(Object(l.W)(o,n));t=t?a(t):i+o;const r=new s.a({label:t,classes:["cd-insertButtons-button"],action:()=>{this.encapsulateSelection({pre:i,post:o})}});this.$insertButtons.append(r.element," ")}addInsertButtons(){if(cd.a.settings.insertButtons.length){this.$insertButtons=$("
").addClass("cd-insertButtons").insertAfter(this.commentInput.$element);cd.a.settings.insertButtons.forEach(e=>{let t,n;if(Array.isArray(e)){t=e[0];n=e[1]}else t=e;this.addInsertButton(t,n)})}}createContents(e,t){var n;this.createInputs(e);this.createCheckboxes(e);this.createButtons();if(null!==(n=this.deleteCheckbox)&&void 0!==n&&n.isSelected())this.updateFormOnDeleteCheckboxChange(!0);this.createElements();this.addToolbar(t);this.addInsertButtons()}loadComment(){const e=this.registerOperation("load");this.target.getCode(!0).then(()=>{let t=this.target.codeToText();if(this.target.inCode.inSmallFont)t=`${t}`;const n=this.target.inCode.headlineCode;this.commentInput.setValue(t);this.originalComment=t;if(this.headlineInput){this.headlineInput.setValue(n);this.originalHeadline=n}this.closeOperation(e);Object(l.l)(this.commentInput);this.preview()},t=>{if(t instanceof r.a){const n=Object.assign({},t.data,{cancel:!0,currentOperation:e});this.handleError(n)}else this.handleError({type:"javascript",logMessage:t,cancel:!0,currentOperation:e})})}checkCode(){if(!this.checkCodeRequest)this.checkCodeRequest=this.target.getCode(this).catch(e=>{if(e instanceof r.a){const t=Object.assign({},e.data);this.handleError(t)}else this.handleError({type:"javascript",logMessage:e})});return this.checkCodeRequest}addEditNotices(){var e=this;return o()((function*(){var t;const n=cd.a.page.title.replace(/\//g,"-");let i,o=`
{{MediaWiki:Editnotice-${cd.a.g.NAMESPACE_NUMBER}}}
\n
{{MediaWiki:Editnotice-${cd.a.g.NAMESPACE_NUMBER}-${n}}}
\n`;if(null!==(t=e.preloadConfig)&&void 0!==t&&t.editIntro)o=`
{{${e.preloadConfig.editIntro}}}
\n`+o;try{i=yield Object(w.j)(o,{title:cd.a.page.name})}catch(e){return}const a=mw.config.get("wgFormattedNamespaces")[8];e.$messageArea.append(i.html).cdAddCloseButton().find(`.cd-editnotice > a.new[title^="${a}:Editnotice-"]`).parent().remove();e.$messageArea.find(".mw-charinsert-item").each((t,n)=>{const i=$(n),o=i.data("mw-charinsert-start"),a=i.data("mw-charinsert-end");i.on("click",()=>{e.encapsulateSelection({pre:o,post:a})}).data("mw-charinsert-done",!0)});mw.hook("wikipage.content").fire(e.$messageArea)}))()}preloadTemplate(){const e=this.registerOperation("load",{affectHeadline:!1}),t=new h.a(this.preloadConfig.commentTemplate);t.getCode().then(()=>{let n=t.code;const i=Object(y.f)(["onlyinclude"]);let o,a;for(;o=i.exec(n);){if(void 0===a)a="";a+=o[2]}if(void 0!==a)n=a;n=n.replace(Object(y.f)(["includeonly"]),"$2").replace(Object(y.f)(["noinclude"]),"");n=n.trim();if(n.includes(cd.a.g.SIGN_CODE)||this.preloadConfig.omitSignature)this.omitSignatureCheckbox.setSelected(!0);this.commentInput.setValue(n);this.originalComment=n;this.closeOperation(e);Object(l.l)(this.headlineInput||this.commentInput);this.preview()},t=>{if(t instanceof r.a){const n=Object.assign({},t.data,{cancel:!0,currentOperation:e});this.handleError(n)}else this.handleError({type:"javascript",logMessage:t,cancel:!0,currentOperation:e})})}addToPage(){if("replyInSection"===this.mode)this.target.replyButton.hide();else if("addSubsection"===this.mode&&this.target.$addSubsectionButtonContainer)this.target.$addSubsectionButtonContainer.hide();else if("addSection"===this.mode&&cd.a.g.$addSectionButtonContainer)cd.a.g.$addSectionButtonContainer.hide();if(!mw.config.get("wgArticleId"))cd.a.g.$content.children(".noarticletext, .warningbox").hide();let e,t,n;if("reply"===this.mode)({$wrappingItem:e,$wrappingList:t,$outerWrapper:n}=this.target.addSublevelItem("replyForm","top"));else if("edit"===this.mode){const e=this.target.$elements.last();if(e.is("dd, li")){const t=e.prop("tagName").toLowerCase();n=$(`<${t}>`);this.$element.appendTo(n)}}this.$outermostElement=n||t||e||this.$element;switch(this.mode){case"reply":this.$element.appendTo(e||n);break;case"edit":if(this.target.isOpeningSection)this.$outermostElement.insertAfter(this.target.$elements.last());else this.$outermostElement.insertBefore(this.target.$elements.first());break;case"replyInSection":this.$element.appendTo(this.target.$replyWrapper);this.target.$replyWrapper.addClass("cd-replyWrapper-hasCommentForm");break;case"addSection":if(this.isNewTopicOnTop&&cd.a.sections[0])this.$element.insertBefore(cd.a.sections[0].$heading);else this.$element.appendTo(cd.a.g.$content);break;case"addSubsection":{const e=this.target.level,t=new RegExp(`\\bcd-commentForm-addSubsection-[${e}-6]\\b`);let n,o=this.target.$elements.last();const a=".cd-section-button-container, .cd-commentForm-reply";do{var i;n=o;o=o.next()}while(o.is(a)||null!==(i=o.get(0))&&void 0!==i&&i.className.match(t));this.$element.insertAfter(n);break}}this.adjustLabels()}addEvents(){const e=()=>{Object(b.m)()},t=()=>{this.preview()},n=[{pattern:new RegExp(cd.a.g.SIGN_CODE+"\\s*$"),message:cd.a.sParse("cf-reaction-signature",cd.a.g.SIGN_CODE),name:"signatureNotNeeded",type:"notice",checkFunc:()=>{var e;return!(null!==(e=this.omitSignatureCheckbox)&&void 0!==e&&e.isSelected())}},{pattern:/
{if(Object(l.G)(e,13,["ctrl"]))this.submit();if(Object(l.G)(e,27))this.cancel()}).on("focusin",()=>{this.lastFocused=new Date});if(this.headlineInput){this.headlineInput.on("change",e=>{var t;this.updateAutoSummary(!0,!0);if(e.includes("{{")&&(null===(t=this.preloadConfig)||void 0===t||!t.headline))this.showMessage(cd.a.sParse("cf-reaction-templateinheadline"),{type:"warning",name:"templateInHeadline"});else this.hideMessage("templateInHeadline")}).on("change",t).on("change",e);this.headlineInput.$input.on("keydown",e=>{if(13===e.keyCode&&!cd.a.g.activeAutocompleteMenu)this.submit()})}this.commentInput.on("change",e=>{this.updateAutoSummary(!0,!0);n.forEach(({pattern:t,checkFunc:n,message:i,type:o,name:a})=>{if(t.test(e)&&("function"!=typeof n||n(this)))this.showMessage(i,{type:o,name:a});else this.hideMessage(a)})}).on("change",t).on("change",e);this.commentInput.$input.get(0).addEventListener("tribute-replaced",e=>{if(e.detail.instance.trigger===cd.a.config.mentionCharacter){var t;if("edit"===this.mode){const e=Object(l.Y)(cd.a.sParse("cf-reaction-mention-edit"),{targetBlank:!0});this.showMessage(e,{type:"notice",name:"mentionEdit"})}if(null!==(t=this.omitSignatureCheckbox)&&void 0!==t&&t.isSelected()){const e=Object(l.Y)(cd.a.sParse("cf-reaction-mention-nosignature"),{targetBlank:!0});this.showMessage(e,{type:"notice",name:"mentionNoSignature"})}}});this.summaryInput.on("change",()=>{if(this.summaryInput.$input.is(":focus")){this.isSummaryAltered=!0;this.dontAutopreviewOnSummaryChange=!1}if(!this.dontAutopreviewOnSummaryChange)t()}).on("change",e);this.summaryInput.$input.on("keydown",e=>{if(13===e.keyCode&&!cd.a.g.activeAutocompleteMenu)this.submit()});if(this.minorCheckbox)this.minorCheckbox.on("change",e);this.watchCheckbox.on("change",e);if(this.watchSectionCheckbox)this.watchSectionCheckbox.on("change",e);if(this.omitSignatureCheckbox)this.omitSignatureCheckbox.on("change",()=>{this.preview(!1)}).on("change",e);if(this.deleteCheckbox)this.deleteCheckbox.on("change",e=>{this.updateAutoSummary(!0,!0);this.updateFormOnDeleteCheckboxChange(e)}).on("change",t).on("change",e);this.advancedButton.on("click",()=>{this.toggleAdvanced()});this.settingsButton.on("click",()=>{Object(E.d)()});this.cancelButton.on("click",()=>{this.cancel()});this.viewChangesButton.on("click",()=>{this.viewChanges()});this.previewButton.on("click",()=>{this.preview(!0,!1)});this.submitButton.on("click",()=>{this.submit()})}initAutocomplete(){let e,t=[];if(this.targetSection)t=this.targetSection.getBase().comments;else if("addSection"!==this.mode)cd.a.comments.some(e=>{if(e.section)return!0;else{t.push(e);return!1}});if("edit"===this.mode)t=t.filter(e=>e!==this.target);if(3===cd.a.g.NAMESPACE_NUMBER){const t=(cd.a.page.title.match(/^([^/]+)/)||[])[0];if(t)e=g.a.getUser(t)}let n=t.map(e=>e.author).concat(e).filter(l.h).sort((e,t)=>t.isRegistered()-e.isRegistered()||(t.name>e.name?-1:1)).map(e=>e.name);if(this.targetComment&&"edit"!==this.mode)for(let e=this.targetComment;e;e=e.getParent())if(e.author!==cd.a.user){if(!e.author.isRegistered())break;n.unshift(e.author.name);break}n=n.filter(l.X);this.autocomplete=new a.a({types:["mentions","wikilinks","templates","tags","commentLinks"],inputs:[this.commentInput],comments:t,defaultUserNames:n});if(this.headlineInput)this.headlineAutocomplete=new a.a({types:["mentions","wikilinks","tags"],inputs:[this.headlineInput],comments:t,defaultUserNames:n});this.summaryAutocomplete=new a.a({types:["mentions","wikilinks"],inputs:[this.summaryInput],comments:t,defaultUserNames:n})}toggleAdvanced(){if(this.$advanced.is(":hidden")){this.$advanced.show();const e=this.summaryInput.getValue(),t=e.match(/^.+?\*\/ */);Object(l.l)(this.summaryInput);this.summaryInput.selectRange(t?t[0].length:0,e.length)}else{this.$advanced.hide();Object(l.l)(this.commentInput)}}adjustLabels(){let e=this.$element.width();if(this.$element.hasClass("cd-commentForm-short")){if(e>=this.buttonsTotalWidthStandard+7){this.$element.removeClass("cd-commentForm-short");this.submitButton.setLabel(this.submitButtonLabelStandard);this.previewButton.setLabel(cd.a.s("cf-preview"));this.viewChangesButton.setLabel(cd.a.s("cf-viewchanges"));this.cancelButton.setLabel(cd.a.s("cf-cancel"))}}else{this.buttonsTotalWidthStandard=this.submitButton.$element.outerWidth(!0)+(this.previewButton.$element.is(":visible")?this.previewButton.$element.outerWidth(!0):0)+(this.viewChangesButton.$element.is(":visible")?this.viewChangesButton.$element.outerWidth(!0):0)+this.advancedButton.$element.outerWidth(!0)+this.helpPopupButton.$element.outerWidth(!0)+this.cancelButton.$element.outerWidth(!0);if(e{const e=c.match(new RegExp("<([a-z]+)>[^]*?","ig"))||[],t=c.match(cd.a.g.QUOTE_REGEXP)||[],n=e.concat(t);return[n.some(e=>e.includes("\n")),n.some(e=>/\n[:*#;]/.test(e))]})();let u;({code:c,hidden:u}=Object(y.h)(c));let d,h=!1;if(!this.headlineInput)c=c.replace(/^([^]*)<\/small>$/i,(e,t)=>{h=!0;return t});c=c.replace(/^(?:[ \t\xa0\ufeff]*\n)+(?! )/gm,e=>e.replace(/^[ \t\ufeff\xa0]+/gm,""));if(null!==(t=this.omitSignatureCheckbox)&&void 0!==t&&t.isSelected())d="";else d="edit"===this.mode?this.target.inCode.signatureCode:cd.a.g.USER_SIGNATURE;if(d&&("edit"!==this.mode||!/^[ \t]*\n/.test(d))&&/(^|\n)[:*#;].*$/.test(c))c+="\n";if(this.willCommentBeIndented){c=c.replace(/^ +/gm,"");if(!cd.a.config.paragraphTemplates.length)c=c.replace(/^\n/gm,"");if(/^[:*#;]/m.test(c)&&s)c=function(e){const t=(e,t,i,o=!1)=>{if(o){const n=t-i.items.length-1;if(n>=0){const t={type:e[n].type,items:[e[n],i]};e.splice(n,i.items.length+1,t)}else{const n={type:e[0].type,items:[i]};e.splice(t-i.items.length,i.items.length,n)}}else e.splice(t-i.items.length,i.items.length,i);n(i.items,!0)},n=(e,n=!1)=>{let i={items:[]};for(let s=0;s<=e.length;s++)if(s===e.length){if(i.type)t(e,s,i,n)}else{const r=e[s].text,c=r[0]||"",l=o[c];if(i.type&&l!==i.type){const o=i.items.length;t(e,s,i,n);s-=o-1;i={items:[]}}if(l){i.type=l;i.items.push({type:a[c],text:r.slice(1)})}}return e},i=(e,t=!1)=>{let n="";e.forEach((o,a)=>{if(void 0===o.text){const e=o.items.map(e=>{const t=void 0===e.text?i(e.items,!0):e.text.trim();return e.type?`<${e.type}>${t}`:t}).join("");n+=`<${o.type}>${e}`}else n+=t?o.text.trim():o.text;if(a!==e.length-1)n+="\n"});return n},o={":":"dl",";":"dl","*":"ul","#":"ol"},a={":":"dd",";":"dt","*":"li","#":"li"};let s=e.split("\n").map(e=>({type:"",text:e}));n(s);return i(s)}(c);c=c.replace(/(\n+)([:*#;\x03])/g,(e,t,n)=>(t.length>1?"\n\n\n":"\n")+o+n);if(/^[:*#;]/m.test(c)||c.includes("\x03")){if("#"===o)throw new r.a({type:"parse",code:"numberedList-list"});if(o.includes("#")&&c.includes("\x03"))throw new r.a({type:"parse",code:"numberedList-table"});const e=cd.a.config.spaceAfterIndentationChars?" ":"";c=c.replace(/^([:*#;\x03].+)(\n+)(?!:)/gm,(t,n,i)=>{const a=i.length>1?"\n\n":"";return n+"\n"+o+e+a})}let e;if(cd.a.config.paragraphTemplates.length)e=`$1{{${cd.a.config.paragraphTemplates[0]}}}`;else if(a)e="$1
";else{const t=cd.a.config.spaceAfterIndentationChars?" ":"";e=`$1\n${o}${t}`}c=c.replace(/^(.*)\n\n+(?!:)/gm,e)}const m=new RegExp("^(?:\\x01\\d+_block.*\\x02) *$","i"),f=new RegExp(`^\\[\\[${cd.a.g.FILE_PREFIX_PATTERN}.+\\]\\]$`,"i"),g=new RegExp(`(?:<${cd.a.g.PNIE_PATTERN}(?: [\\w ]+?=[^<>]+?| ?\\/?)>|<\\/${cd.a.g.PNIE_PATTERN}>|\\x04) *$`,"i"),p=new RegExp(`^(?:<\\/${cd.a.g.PNIE_PATTERN}>|<${cd.a.g.PNIE_PATTERN}|\\|)`,"i"),b=/^(=+).*\1[ \t]*$|^----/,v=this.willCommentBeIndented?/^(.+)\n(?!:)(?=(.*))/gm:/^((?![:*#; ]).+)\n(?![\n:*#; \x03])(?=(.*))/gm;c=c.replace(v,(e,t,n)=>{const i=cd.a.config.spaceAfterIndentationChars&&!/^[:*#;]/.test(n)?" ":"",s=this.willCommentBeIndented&&!cd.a.config.paragraphTemplates.length&&!a?`\n${o}${i}`:"
";return t+(m.test(t)||m.test(n)||!this.willCommentBeIndented&&(b.test(t)||b.test(n))||f.test(t)||!this.willCommentBeIndented&&f.test(n)||g.test(t)||p.test(n)?"":s)+(this.willCommentBeIndented?"":"\n")});if(null===(n=this.omitSignatureCheckbox)||void 0===n||!n.isSelected())c=c.replace(/\s*~{3,}$/,"");if(this.willCommentBeIndented&&"preview"!==e&&/^[*#;\x03]/.test(c))i=o;if(this.headlineInput&&("addSection"!==this.mode||!this.submitSection||"submit"!==e)){const e=this.headlineInput.getValue().trim();if(e){let t;if("addSection"===this.mode)t=2;else if("addSubsection"===this.mode)t=this.target.level+1;else t=this.target.inCode.headingLevel;const n="=".repeat(t);if(this.isSectionOpeningCommentEdited&&/^\n/.test(this.target.inCode.code))c="\n"+c;c=`${n} ${e} ${n}\n${c}`}}if("preview"===e&&d)d=`${d}`;if(!this.willCommentBeIndented&&/(^|\n)[ =].*$/.test(c))c+="\n";if(!c||c.endsWith("\n")||c.endsWith(" "))d=d.trimLeft();if(h){let e;if(/^[:*#; ]/.test(c)){e="\n"+(this.willCommentBeIndented?o:"")}else e="";if(cd.a.config.smallDivTemplates.length&&!/^[:*#;]/m.test(c)){const e=[];c=Object(l.x)(c.trim(),/\[\^\]+)/g,n=[];let i;for(;i=t.exec(e);)n.push(i[1]);return n}(t.commentInput.getValue());t.submitSection=Boolean("addSection"===t.mode&&!t.isNewTopicOnTop&&(null===(n=t.headlineInput)||void 0===n?void 0:n.getValue().trim()));try{if(t.targetSection&&null!==t.targetSection.liveSectionNumber&&!i.length)yield t.targetSection.getCode(t);else yield t.targetPage.getCode(0===mw.config.get("wgArticleId"))}catch(e){if(e instanceof r.a){const n=Object.assign({},{message:cd.a.sParse("cf-error-getpagecode")},e.data);t.handleError(n)}else t.handleError({type:"javascript",logMessage:e});return}let o;try{var a;if(!(t.target instanceof h.a||t.target instanceof m.a&&t.submitSection))t.target.locateInCode(t.submitSection);if("replyInSection"===t.mode)t.target.setLastCommentIndentationChars(t);o=t.target.modifyWholeCode({commentCode:t.commentTextToCode(e),action:t.mode,doDelete:null===(a=t.deleteCheckbox)||void 0===a?void 0:a.isSelected(),commentForm:t});o=t.addAnchorsToComments(o,i)}catch(e){if(e instanceof r.a)t.handleError(e.data);else t.handleError({type:"javascript",logMessage:e});return}return o}))()}registerOperation(e,t={},n=!0){const i=Object.assign(t,{type:e});this.operations.push(i);i.isClosed=!1;if("preview"!==i.type||!i.isAuto){if(n)this.$messageArea.empty();this.pushPending(["load","submit"].includes(i.type),i.affectHeadline)}return i}closeOperation(e){if(!e.isClosed){e.isClosed=!0;if("preview"!==e.type||!e.isAuto)this.popPending(["load","submit"].includes(e.type),e.affectHeadline)}}closeOperationIfNecessary(e){if(e.isClosed)return!0;const t=Object(l.i)(this.operations,t=>e!==t&&["preview","viewChanges"].includes(t.type)&&!t.isDelayed);if(null!==t&&t>this.operations.indexOf(e)){this.closeOperation(e);return!0}else return!1}unregisterOperation(e){Object(l.K)(this.operations,e);if("preview"!==e.type||!e.isAuto)this.popPending("submit"===e.type,e.affectHeadline)}isBeingSubmitted(){return this.operations.some(e=>"submit"===e.type&&!e.isClosed)}isContentBeingLoaded(){return this.operations.some(e=>"load"===e.type&&!e.isClosed)}preview(e=!0,t=!0,n){var i=this;return o()((function*(){var o;if(i.isContentBeingLoaded()||!(i.target instanceof h.a)&&!i.target.inCode&&i.checkCodeRequest&&"resolved"===(yield Object(l.s)(i.checkCodeRequest))||i.isBeingSubmitted()||t&&!cd.a.settings.autopreview){if(n)i.closeOperation(n);return}const a=n||i.registerOperation("preview",{isAuto:t});if(t){const t=Date.now()-i.lastPreviewTimestamp<1e3;if(t||i.operations.some(e=>!e.isClosed&&"preview"===e.type&&e!==a)){if(i.previewTimeout)i.unregisterOperation(a);else{a.isDelayed=!0;i.previewTimeout=setTimeout(()=>{i.previewTimeout=null;i.preview(e,!0,a)},t?1e3-(Date.now()-i.lastPreviewTimestamp):100)}return}i.lastPreviewTimestamp=Date.now()}if(i.closeOperationIfNecessary(a))return;if(!(i.target instanceof h.a||i.target.inCode)){yield i.checkCode();if(!i.target.inCode)i.closeOperation(a);if(a.isClosed)return}const s=!(i.commentInput.getValue().trim()||null!==(o=i.headlineInput)&&void 0!==o&&o.getValue().trim());if(s&&!e){i.closeOperation(a);return}const c=i.commentTextToCode("preview");let u,d;try{({html:u,parsedSummary:d}=yield Object(w.j)(c,{title:i.targetPage.name,summary:Object(l.d)({text:i.summaryInput.getValue()})}))}catch(e){if(e instanceof r.a){const t=Object.assign({},e.data,{message:cd.a.sParse("cf-error-preview"),currentOperation:a});i.handleError(t)}else i.handleError({type:"javascript",logMessage:e,currentOperation:a});return}if(!i.closeOperationIfNecessary(a)){if(u){var m;if(t&&s||null!==(m=i.deleteCheckbox)&&void 0!==m&&m.isSelected())i.$previewArea.empty();else{const e=$("
").addClass("cd-previewArea-label").text(cd.a.s("cf-block-preview"));i.$previewArea.html(u).prepend(e).cdAddCloseButton();i.$previewArea.toggleClass("cd-previewArea-indentedComment",i.willCommentBeIndented);mw.hook("convenientDiscussions.previewReady").fire(i.$previewArea,cd.a);if(!t)mw.hook("wikipage.content").fire(i.$previewArea)}const e=$("").addClass("comment").append(d);i.$summaryPreview.empty();if(d){const t=$("").text(cd.a.mws("colon-separator")),n=$("").text(cd.a.s("cf-summary-preview"));i.$summaryPreview.append(n,t,e)}}if(cd.a.settings.autopreview&&i.previewButton.$element.is(":visible")){i.previewButton.$element.hide();i.viewChangesButton.$element.show();i.adjustLabels()}i.closeOperation(a);if(!t){const e=i.$previewArea.hasClass("cd-previewArea-above")?"top":"bottom";i.$previewArea.cdScrollIntoView(e);Object(l.l)(i.commentInput)}}}))()}viewChanges(){var e=this;return o()((function*(){var t;if(e.isBeingSubmitted())return;const n=e.registerOperation("viewChanges"),i=yield e.prepareWholeCode("viewChanges");if(void 0===i)e.closeOperation(n);if(n.isClosed)return;mw.loader.load("mediawiki.diff.styles");let o;try{const t={action:"compare",totitle:e.targetPage.name,toslots:"main","totext-main":i,topst:!0,prop:"diff",errorformat:"html",errorlang:cd.a.g.USER_LANGUAGE,errorsuselocal:!0};if(e.submitSection||!mw.config.get("wgArticleId")){t.fromslots="main";t["fromtext-main"]="addSection"===e.mode?"":e.targetSection.code}else t.fromrev=e.targetPage.revisionId;o=yield cd.a.g.mwApi.post(t,{contentType:"multipart/form-data"}).catch(l.w)}catch(t){if(t instanceof r.a){const i=Object.assign({},t.data,{message:cd.a.sParse("cf-error-viewchanges"),currentOperation:n});e.handleError(i)}else e.handleError({type:"javascript",logMessage:t,currentOperation:n});return}if(e.closeOperationIfNecessary(n))return;let a=null===(t=o.compare)||void 0===t?void 0:t.body;if(a){a=Object(l.Z)(a);const t=$("
").addClass("cd-previewArea-label").text(cd.a.s("cf-block-viewchanges"));e.$previewArea.html(a).prepend(t).cdAddCloseButton()}else{e.$previewArea.empty();if(void 0!==a)e.showMessage(cd.a.sParse("cf-notice-nochanges"))}if(cd.a.settings.autopreview){e.viewChangesButton.$element.hide();e.previewButton.$element.show();e.adjustLabels()}e.closeOperation(n);const s=e.$previewArea.hasClass("cd-previewArea-above")?"top":"bottom";e.$previewArea.cdScrollIntoView(s);Object(l.l)(e.commentInput)}))()}reloadPage(e,t){var n=this;return o()((function*(){n.forget();try{yield Object(b.k)(e)}catch(e){if(e instanceof r.a){const i=Object.assign({},e.data,{message:cd.a.sParse("error-reloadpage-saved"),cancel:!0,currentOperation:t});n.handleError(i)}else n.handleError({type:"javascript",logMessage:e,cancel:!0,currentOperation:t});Object(b.d)()}}))()}runChecks({doDelete:e}){var t,n,i;const o=[{condition:!e&&""===(null===(t=this.headlineInput)||void 0===t?void 0:t.getValue()),confirmation:()=>{const e=this.headlineInputPlaceholder===cd.a.s("cf-headline-topic")?"topic":"subsection";return confirm(cd.a.s("cf-confirm-noheadline-"+e)+" "+cd.a.s("cf-confirm-noheadline-question"))}},{condition:!(e||this.commentInput.getValue().trim()||null!==(n=cd.a.config.noConfirmPostEmptyCommentPageRegexp)&&void 0!==n&&n.test(cd.a.page.name)),confirmation:()=>confirm(cd.a.s("cf-confirm-empty"))},{condition:!e&&this.commentInput.getValue().trim().length>cd.a.config.longCommentThreshold,confirmation:()=>confirm(cd.a.s("cf-confirm-long",cd.a.config.longCommentThreshold))},{condition:!e&&/^==[^=]/m.test(this.commentInput.getValue())&&"edit"!==this.mode&&!(null!==(i=this.preloadConfig)&&void 0!==i&&i.commentTemplate),confirmation:()=>confirm(cd.a.s("cf-confirm-secondlevelheading"))},{condition:e,confirmation:()=>confirm(cd.a.s("cf-confirm-delete"))}];for(const e of o)if(e.condition&&!e.confirmation()){Object(l.l)(this.commentInput);return!1}return!0}editPage(e,t){var n=this;return o()((function*(){let i;try{var o,a,s;let t,r,c;if(n.submitSection){if("addSection"===n.mode){c=n.headlineInput.getValue().trim();t="new"}else t=n.targetSection.liveSectionNumber;r=n.targetSection}else r=n.targetPage;i=yield n.targetPage.edit({section:t,sectiontitle:c,text:e,summary:Object(l.d)({text:n.summaryInput.getValue()}),minor:null===(o=n.minorCheckbox)||void 0===o?void 0:o.isSelected(),baserevid:null===(a=r)||void 0===a?void 0:a.revisionId,starttimestamp:null===(s=r)||void 0===s?void 0:s.queryTimestamp,watchlist:n.watchCheckbox.isSelected()?"watch":"unwatch"})}catch(e){if(e instanceof r.a){const{type:i,details:o}=e.data;if("network"===i)n.handleError({type:i,message:cd.a.sParse("cf-error-couldntedit"),currentOperation:t});else{let e,{code:a,message:s,isRawMessage:r,logMessage:c}=o;if("editconflict"===a){s+=" "+cd.a.sParse("cf-notice-editconflict-retrying");e="notice"}n.handleError({type:i,message:s,messageType:e,isRawMessage:r,logMessage:c,currentOperation:t});if("editconflict"===a)n.submit(!0)}}else n.handleError({type:"javascript",logMessage:e,currentOperation:t});return null}return i}))()}generateFutureCommentAnchor(e){const t=new Date(e);t.setSeconds(0);let n;if(this.target instanceof c.a){const e=this.target.getChildren(!0);n=e[e.length-1]||this.target}else if(this.target instanceof m.a){const e="addSubsection"===this.mode&&this.target.getChildren(!0).slice(-1)[0]||this.target;cd.a.sections.slice(0,e.id+1).reverse().some(e=>{if(e.commentsInFirstChunk.length)n=e.commentsInFirstChunk[e.commentsInFirstChunk.length-1];return n})}else n=this.isNewTopicOnTop?null:cd.a.comments[cd.a.comments.length-1];Object(v.o)();if(n)cd.a.comments.slice(0,n.id+1).filter(e=>{var n;return e.author===cd.a.user&&(null===(n=e.date)||void 0===n?void 0:n.getTime())===t.getTime()}).map(e=>e.anchor).forEach(v.m);return Object(v.f)(t,cd.a.user.name,!0)}submit(e=!1){var t=this;return o()((function*(){var n;if(t.isBeingSubmitted()||t.isContentBeingLoaded())return;const i=null===(n=t.deleteCheckbox)||void 0===n?void 0:n.isSelected();if(!t.runChecks({doDelete:i}))return;const o=t.registerOperation("submit",void 0,!e);if(cd.a.commentForms.some(e=>e!==t&&e.isBeingSubmitted())){t.handleError({type:"ui",message:cd.a.sParse("cf-error-othersubmitted"),currentOperation:o});return}const a=yield t.prepareWholeCode("submit");if(void 0===a){t.closeOperation(o);return}const s=yield t.editPage(a,o);if(!s)return;const r={wasCommentFormSubmitted:!0};if(!mw.config.get("wgArticleId")){mw.config.set("wgArticleId",t.targetPage.pageId);r.wasPageCreated=!0}if(t.watchSectionCheckbox)if(t.watchSectionCheckbox.isSelected()){const e=t.isSectionOpeningCommentEdited&&t.headlineInput.getValue()!==t.originalHeadline;if("addSection"===t.mode&&t.headlineinput||"addSubsection"===t.mode||e){const n=Object(y.k)(t.headlineInput.getValue());r.justWatchedSection=n;let i;if(e){i=Object(y.k)(t.originalHeadline);r.justUnwatchedSection=i}m.a.watch(n,i).catch(()=>{})}else{const e=t.targetSection;if(e&&!e.isWatched){e.watch(!0);r.justWatchedSection=e.headline}}}else{const e=t.targetSection;if(null!=e&&e.isWatched){e.unwatch(!0);r.justUnwatchedSection=e.headline}}if(t.watchCheckbox.isSelected()&&$("#ca-watch").length)$("#ca-watch").attr("id","ca-unwatch").find("a").attr("href",cd.a.page.getUrl({action:"unwatch"}));if(!t.watchCheckbox.isSelected()&&$("#ca-unwatch").length)$("#ca-unwatch").attr("id","ca-watch").find("a").attr("href",cd.a.page.getUrl({action:"watch"}));if(!i)r.commentAnchor="edit"===t.mode?t.target.anchor:t.generateFutureCommentAnchor(s);if(t.targetPage!==cd.a.page)yield cd.a.page.purge();t.reloadPage(r,o)}))()}confirmClose(){return!this.isAltered()||confirm(cd.a.s("cf-confirm-close"))}cancel(e=!0){var t=this;return o()((function*(){if(!Object(l.C)()&&!t.isBeingSubmitted())if(!e||t.confirmClose()){t.destroy();if("reply"===t.mode)t.target.scrollIntoView("top");else if("replyInSection"===t.mode){t.target.replyButton.show();t.target.$replyWrapper.removeClass("cd-replyWrapper-hasCommentForm")}else if("edit"===t.mode){t.target.$elements.removeClass("cd-hidden");t.target.scrollIntoView("top");t.target.configureLayers()}else if("addSection"===t.mode&&cd.a.g.$addSectionButtonContainer)cd.a.g.$addSectionButtonContainer.show()}else Object(l.l)(t.commentInput)}))()}destroy(){if("reply"===this.mode)this.target.subitemList.remove("replyForm");else{this.$outermostElement.remove();if("addSection"===this.mode)if(!mw.config.get("wgArticleId"))cd.a.g.$content.removeClass("ext-discussiontools-init-replylink-open").children(".noarticletext, .warningbox").show()}this.operations.filter(e=>!e.isClosed).forEach(this.closeOperation.bind(this));this.forget();this.isDestroyed=!0}forget(){if("addSection"===this.mode){delete cd.a.g.addSectionForm;$("#ca-addsection").removeClass("selected");$("#ca-view").addClass("selected")}else delete this.target[CommentForm_CommentForm.modeToProperty(this.mode)+"Form"];Object(l.K)(cd.a.commentForms,this);Object(b.m)();f.a.updateCommentFormButton();this.autocomplete.cleanUp()}isAltered(){return void 0!==this.originalComment&&this.originalComment!==this.commentInput.getValue()||this.autoSummary!==this.summaryInput.getValue()||this.headlineInput&&void 0!==this.originalHeadline&&this.originalHeadline!==this.headlineInput.getValue()}updateAutoSummary(e=!0,t=!1){if(this.isSummaryAltered)return;this.dontAutopreviewOnSummaryChange=t;const n=this.autoText(),i=this.headlineInput&&"addSubsection"!==this.mode?Object(y.k)(this.headlineInput.getValue()):this.sectionHeadline;let o;if(["reply","replyInSection"].includes(this.mode)){const e=this.commentInput.getValue().trim().replace(/\s+/g," ").replace(/\[\[:?(?:([^|[\]<>\n]+)\|)?(.+?)\]\]/g,(e,t,n)=>cd.a.g.USER_LINK_REGEXP.test(t)?n:e);if(e&&e.length<=cd.a.config.summaryCommentTextLengthLimit)o=`: ${e} (-)`}else if("addSubsection"===this.mode){const e=Object(y.k)(this.headlineInput.getValue());if(e)o=`: /* ${e} */`}this.autoSummary=Object(l.d)({text:n,section:i,optionalText:o,addPostfix:!1});if(e)this.summaryInput.setValue(this.autoSummary)}autoText(){this.updateAutoSummaryBound=this.updateAutoSummaryBound||this.updateAutoSummary.bind(this);switch(this.mode){case"reply":if(this.target.isOpeningSection)return cd.a.s("es-reply");else{this.target.requestAuthorGenderIfNeeded(this.updateAutoSummaryBound);return this.target.isOwn?cd.a.s("es-addition"):Object(l.J)(cd.a.s("es-reply-to",this.target.author.name,this.target.author))}case"edit":var e;return(e=>{let t,n=this.target;if(this.target.isOwn){const e=this.target.getParent();if(e)if(0===e.level)t="reply";else{e.requestAuthorGenderIfNeeded(this.updateAutoSummaryBound);t=e.isOwn?"addition":"reply-to";n=e}else if(this.target.isOpeningSection)t=this.targetSection.getParent()?"subsection":"topic";else t="comment"}else if(this.target.isOpeningSection)t=this.targetSection.getParent()?"subsection":"topic";else{this.target.requestAuthorGenderIfNeeded(this.updateAutoSummaryBound);t="comment-by"}return Object(l.J)(cd.a.s(`es-${e}-${t}`,n.author.name,n.author))})(null!==(e=this.deleteCheckbox)&&void 0!==e&&e.isSelected()?"delete":"edit");case"replyInSection":return cd.a.s("es-reply");case"addSection":var t;return(null===(t=this.preloadConfig)||void 0===t?void 0:t.summary)||cd.a.s("es-new-topic");case"addSubsection":return cd.a.s("es-new-subsection")}}updateFormOnDeleteCheckboxChange(e){if(e){var t,n;this.initialMinorCheckboxSelected=this.minorCheckbox.isSelected();this.minorCheckbox.setSelected(!1);this.commentInput.setDisabled(!0);null===(t=this.headlineInput)||void 0===t||t.setDisabled(!0);this.minorCheckbox.setDisabled(!0);null===(n=this.omitSignatureCheckbox)||void 0===n||n.setDisabled(!0);this.submitButtonLabelStandard=cd.a.s("cf-delete-button");this.submitButtonLabelShort=cd.a.s("cf-delete-button-short");this.submitButton.clearFlags().setFlags(["destructive","primary"]).setLabel(this.$element.hasClass("cd-commentForm-short")?this.submitButtonLabelStandard:this.submitButtonLabelShort)}else{var i,o;this.minorCheckbox.setSelected(this.initialMinorCheckboxSelected);this.commentInput.setDisabled(!1);null===(i=this.headlineInput)||void 0===i||i.setDisabled(!1);this.minorCheckbox.setDisabled(!1);null===(o=this.omitSignatureCheckbox)||void 0===o||o.setDisabled(!1);this.submitButtonLabelStandard=cd.a.s("cf-save");this.submitButtonLabelShort=cd.a.s("cf-save-short");this.submitButton.clearFlags().setFlags(["progressive","primary"]).setLabel(this.$element.hasClass("cd-commentForm-short")?this.submitButtonLabelStandard:this.submitButtonLabelShort)}}mention(e){if(e&&this.targetComment){let e=a.a.getConfig("mentions").transform(this.targetComment.author.name);e=e.ctrlModify(e);const t=e.start+e.content+e.end,n=this.commentInput.getRange();this.commentInput.selectRange(0);Object(l.y)(this.commentInput,t);this.commentInput.selectRange(n.from+t.length,n.to+t.length);return}const t=this.commentInput.getRange().to;if(this.commentInput.getRange().from!==t)this.commentInput.selectRange(t);const n=t&&this.commentInput.getValue().substr(t-1,1);if(t&&!/\s/.test(n))Object(l.y)(this.commentInput," ");this.autocomplete.tribute.showMenuForCollection(this.commentInput.$input.get(0),this.autocomplete.tribute.collection.findIndex(e=>e.trigger===cd.a.config.mentionCharacter))}quote(e=!0){let t=Object(l.B)()?document.activeElement.value.substring(document.activeElement.selectionStart,document.activeElement.selectionEnd):window.getSelection().toString();t=t.trim();if(t||e){const e=this.commentInput.$input.is(":focus"),n=this.commentInput.getRange(),i=n.to;let o=Math.min(n.to,n.from),a=Math.max(n.to,n.from);if(!e&&o!==a){this.commentInput.selectRange(i);o=a=i}this.encapsulateSelection({pre:cd.a.config.quoteFormatting[0],peri:cd.a.s("cf-quote-placeholder"),post:cd.a.config.quoteFormatting[1],selection:t,ownline:!0})}}encapsulateSelection({pre:e="",peri:t="",post:n="",selection:i,replace:o=!1,ownline:a=!1}){const s=this.commentInput.getRange(),r=Math.min(s.from,s.to),c=Math.max(s.from,s.to),u=this.commentInput.getValue(),d=a&&!/(^|\n)$/.test(u.slice(0,r))&&!/^\n/.test(t)?"\n":"",h=a&&!/^\n/.test(u.slice(c))&&!/\n$/.test(n)?"\n":"";let m;if(!i&&!o){m=r+d.length+e.length;i=u.substring(s.from,s.to)}else i=i||"";const[f]=i.match(/^ */),[g]=i.match(/ *$/),p=i||t,b=d+f+e+p.slice(f.length,p.length-g.length)+n+g+h;Object(l.y)(this.commentInput,b);if(!i&&!o)this.commentInput.selectRange(m,m+t.length)}}Object.assign(CommentForm_CommentForm,d);var T=t.a=CommentForm_CommentForm},function(e,t,n){"use strict";var i=n(2),o=n.n(i),a=n(3),s=n(0),r=n(8),c=n(1),l=n(9),u=n(5);class Page{constructor(e,t=!0){const n=e instanceof mw.Title?e:new mw.Title(e);this.title=n.getMainText();this.canonicalName=n.getPrefixedText();this.name=e instanceof mw.Title||t?this.canonicalName:e;this.namespaceId=n.getNamespaceId()}getUrl(e){return mw.util.getUrl(this.name,e)}isProbablyTalkPage(){return Object(c.D)(this.realName||this.name,this.namespaceId)}isArchivePage(){let e;if(this===s.a.page)e=s.a.g.$root.find(".cd-archivingInfo").data("isArchivePage");if(void 0===e){e=!1;const t=this.realName||this.name,n=s.a.g.SOURCE_PAGES_MAP.keys();for(const i of n)if(i.test(t)){e=!0;break}}return Boolean(e)}canHaveArchives(){if(this.isArchivePage())return!1;let e;if(this===s.a.page)e=s.a.g.$root.find(".cd-archivingInfo").data("canHaveArchives");if(void 0===e){var t;const n=this.realName||this.name;e=!(null!==(t=s.a.g.PAGES_WITHOUT_ARCHIVES_REGEXP)&&void 0!==t&&t.test(n))}return Boolean(e)}getArchivePrefix(){if(!this.canHaveArchives())return null;let e;if(this===s.a.page)e=s.a.g.$root.find(".cd-archivingInfo").data("archivePrefix");const t=this.realName||this.name;if(!e){const n=s.a.g.ARCHIVE_PAGES_MAP.entries();for(const[i,o]of n)if(i.test(t)){e=t.replace(i,o);break}}return e?String(e):t+"/"}getArchivedPage(){let e;if(this===s.a.page)e=s.a.g.$root.find(".cd-archivingInfo").data("archivedPage");if(!e){const t=this.realName||this.name,n=s.a.g.SOURCE_PAGES_MAP.entries();for(const[i,o]of n)if(i.test(t)){e=t.replace(i,o);break}}return e?new Page(String(e)):this}getCode(e=!0){var t=this;return o()((function*(){var n,i,o,r,l,u;const d=yield s.a.g.mwApi.post({action:"query",titles:t.name,prop:"revisions",rvslots:"main",rvprop:["ids","content"],redirects:!(t===s.a.page&&mw.config.get("wgIsRedirect")),curtimestamp:!0}).catch(c.w),h=d.query,m=null==h?void 0:null===(n=h.pages)||void 0===n?void 0:n[0],f=null==m?void 0:null===(i=m.revisions)||void 0===i?void 0:i[0],g=null==f?void 0:null===(o=f.slots)||void 0===o?void 0:null===(r=o.main)||void 0===r?void 0:r.content;if(!h||!m)throw new a.a({type:"api",code:"noData"});if(m.missing)if(e){Object.assign(t,{code:"",realName:t.name,queryTimestamp:d.curtimestamp});return}else throw new a.a({type:"api",code:"missing"});if(m.invalid)throw new a.a({type:"api",code:"invalid"});if(!f||void 0===g)throw new a.a({type:"api",code:"noData"});const p=(null===(l=h.redirects)||void 0===l?void 0:null===(u=l[0])||void 0===u?void 0:u.to)||null;Object.assign(t,{pageId:m.pageid,code:g+"\n",revisionId:f.revid,redirectTarget:p,realName:p||t.name,queryTimestamp:d.curtimestamp})}))()}parse(e,t=!1,n=!1){var i=this;return o()((function*(){const o={action:"parse",page:i.realName||i.name,redirects:!0,prop:["text","revid","modules","jsconfigvars"]};if(s.a.g.isDtTopicSubscriptionEnabled)o.useskin=mw.config.get("skin");const r=Object.assign({},o,e);if(null!=e&&e.oldid)delete r.page;let u=t?Object(l.i)(r):s.a.g.mwApi.post(r);u=u.catch(c.w);const d=(yield u).parse;if(void 0===(null==d?void 0:d.text))throw new a.a({type:"api",code:"noData"});if(n)i.markAsRead(d.revid);return d}))()}getRevisions(e={},t=!1){var n=this;return o()((function*(){var i,o,r;const u={action:"query",titles:n.name,rvslots:"main",prop:"revisions",redirects:!(n===s.a.page&&mw.config.get("wgIsRedirect"))},d=Object.assign({},u,e);let h=t?Object(l.i)(d):s.a.g.mwApi.post(d);h=h.catch(c.w);const m=null===(i=(yield h).query)||void 0===i?void 0:null===(o=i.pages)||void 0===o?void 0:null===(r=o[0])||void 0===r?void 0:r.revisions;if(!m)throw new a.a({type:"api",code:"noData"});return m}))()}modifyWholeCode({commentCode:e,commentForm:t}){const n=this.code;let i;if(t.isNewTopicOnTop){const t=Object(r.g)(n).search(/^(=+).*\1[ \t\x01\x02]*$/m);let o;if(-1===t)o=n?n+"\n":"";else o=n.slice(0,t);i=o+e+"\n"+n.slice(t)}else{i=(t.submitSection?"":(n+"\n").trimLeft())+e}return i}edit(e){var t=this;return o()((function*(){const n={action:"edit",title:t.realName||t.name,notminor:!e.minor,tags:s.a.user.isRegistered()?s.a.config.tagName||void 0:void 0,errorformat:"html",errorlang:s.a.g.USER_LANGUAGE,errorsuselocal:!0},i=s.a.g.mwApi.assertCurrentUser(Object.assign({},n,e));let o;try{o=yield s.a.g.mwApi.postWithEditToken(i,{contentType:"multipart/form-data"}).catch(c.w)}catch(e){if(e instanceof a.a){const{type:t,apiData:n}=e.data;if("network"===t)throw e;else{const e=null==n?void 0:n.errors[0];let t,i,r,c=!1;if(e){r=e.code;switch(r){case"editconflict":t=s.a.sParse("error-editconflict");break;case"missingtitle":t=s.a.sParse("error-pagedeleted");break;default:t=e.html;c=t.includes("e?-1:1;e=i}}n=0===t?this.namespaceId%2==0:t>0}Object.assign(this,{areNewTopicsOnTop:n,firstSectionStartIndex:c})}purge(){var e=this;return o()((function*(){yield s.a.g.mwApi.post({action:"purge",titles:e.name}).catch(()=>{mw.notify(s.a.s("error-purgecache"),{type:"warn"})})}))()}markAsRead(e){var t=this;return o()((function*(){yield s.a.g.mwApi.postWithEditToken({action:"setnotificationtimestamp",titles:t.name,newerthanrevid:e})}))()}}t.a=Page},function(e,t,n){"use strict";var i=n(2),o=n.n(i),a=n(12),s=n(3),r=n(13),c=n(14);class SectionMenuButton_SectionMenuButton extends a.a{constructor(e){super(e);const t=document.createElement("span");t.className="cd-section-menu-button-wrapper cd-section-menu-button-wrapper-"+e.name;t.appendChild(this.element);this.wrapperElement=t;if(!e.visible)this.hide()}hide(){this.wrapperElement.style.display="none";return this}show(){this.wrapperElement.style.display="";return this}}var l=SectionMenuButton_SectionMenuButton,cd=n(0),u=n(18),d=n(1);var h=class{constructor(e,t,n){this.parser=e;this.headingElement=t;this.headlineElement=this.parser.context.getElementByClassName(t,"mw-headline");if(!this.headlineElement)throw new s.a;this.anchor=this.headlineElement.getAttribute("id");this.parseHeadline();const i=t.tagName.match(/^H([1-6])$/);this.level=i&&Number(i[1]);this.sectionNumber=null;let o=this.parser.context.getElementByClassName(t,"mw-editsection");if(!o)o=this.createSectionMenu();const a=Array.from(o.getElementsByTagName("a")).find(e=>{var t;return null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("action=edit")});if(a){const e=cd.a.g.SERVER+a.getAttribute("href");this.editUrl=new URL(e);if(this.editUrl){const e=this.editUrl.searchParams.get("section");if(e.startsWith("T-")){this.sourcePageName=this.editUrl.searchParams.get("title");this.sectionNumber=Number(e.match(/\d+/)[0])}else this.sectionNumber=Number(e);this.editUrl=this.editUrl.href}}this.setContentProperties(n);this.id=cd.a.sections.length}createSectionMenu(){const e=this.parser.context.document.createElement("span");e.setAttribute("class","mw-editsection-bracket");e.textContent="[";const t=this.parser.context.document.createElement("span");t.setAttribute("class","mw-editsection-bracket");t.textContent="]";const n=this.parser.context.document.createElement("span");n.setAttribute("class","mw-editsection");n.appendChild(e);n.appendChild(t);this.headingElement.appendChild(n);return n}setContentProperties(e){const t=new u.c(cd.a.g.rootElement,e=>!["STYLE","LINK"].includes(e.tagName)&&!e.classList.contains("cd-section-button-container"),!0,this.headingElement);this.headingNestingLevel=0;for(;t.parentNode();)this.headingNestingLevel++;let n;if(e){n=Object(d.p)(this.headingElement,e);n.pop()}else{let e=cd.a.g.rootElement.lastElementChild;for(;e.contains(this.headingElement)&&e!==this.headingElement;)e=e.lastElementChild;n=Object(d.p)(this.headingElement,e)}let i,o,a=!1;n.slice(1).some((e,t)=>{if(void 0===this.lastElementInFirstChunk&&/^H[2-6]$/.test(e.tagName)){a=!0;this.lastElementInFirstChunk=n[t];return!0}else return!1});this.lastElementInFirstChunk=this.lastElementInFirstChunk||n[n.length-1];if(n[1]){t.currentNode=n[n.length-1];for(;t.lastChild(););const e=t.currentNode;t.currentNode=n[1];do{if(t.currentNode.classList.contains("cd-comment-part"))i=t.currentNode}while(!i&&t.currentNode!==e&&t.nextNode());t.currentNode=e;do{if(t.currentNode.classList.contains("cd-comment-part"))o=t.currentNode}while(!o&&t.currentNode!==n[1]&&t.previousNode())}if(i){const e=Number(i.getAttribute("data-comment-id")),t=Number(o.getAttribute("data-comment-id"));this.comments=cd.a.comments.slice(e,t+1);if(a){const e=this.comments.findIndex(e=>!(this.parser.context.follows(this.lastElementInFirstChunk,e.elements[0])||this.lastElementInFirstChunk.contains(e.elements[0])));this.commentsInFirstChunk=this.comments.slice(0,e||0)}this.comments.forEach(e=>{if(!this.oldestComment||e.date&&(!this.oldestComment.date||this.oldestComment.date>e.date))this.oldestComment=e});this.comments[0].followsHeading=!0}this.comments=this.comments||[];this.commentsInFirstChunk=this.commentsInFirstChunk||this.comments;this.commentsInFirstChunk.forEach(e=>{e.section=this});this.elements=n}parseHeadline(){const e=["mw-headline-number",...cd.a.config.foreignElementInHeadlineClasses],t=Array.from(this.headlineElement.childNodes).filter(t=>t.nodeType!==Node.ELEMENT_NODE||!e.some(e=>t.classList.contains(e)));this.headline=t.map(e=>e.textContent).join("").trim()}getParent(e=!0){if(e&&this.level<=2)return null;else return cd.a.sections.slice(0,this.id).reverse().find(e=>e.level{Object(m.a)()}}}).$wrapper;mw.notify(e,{type:"error",autoHideSeconds:"long"})}else mw.notify(cd.a.s("error-settings-save"),{type:"error"})}else mw.notify(cd.a.s("error-settings-save"),{type:"error"});throw e}}));return function(){return n.apply(this,arguments)}}();g=g.then(n,n);return g},unwatch(e){const t=function(){var t=o()((function*(){try{yield Object(f.d)()}catch(e){mw.notify(cd.a.s("error-settings-load"),{type:"error"});throw e}Object(d.K)(cd.a.g.currentPageWatchedSections,e);if(!cd.a.g.currentPageWatchedSections.length)delete cd.a.g.watchedSections[mw.config.get("wgArticleId")];try{yield Object(f.g)()}catch(e){mw.notify(cd.a.s("error-settings-save"),{type:"error"});throw e}}));return function(){return t.apply(this,arguments)}}();g=g.then(t,t);return g},getByAnchor(e){if(!cd.a.sections||!e)return null;else return cd.a.sections.find(t=>t.anchor===e)||null},getByHeadline:e=>cd.a.sections.filter(t=>t.headline===e),search({id:e,headline:t,anchor:n,ancestors:i,oldestCommentAnchor:o},a){const s=[];cd.a.sections.some(a=>{var r;const c=a.id===e,l=a.headline===t,u=a.anchor===n;let h;if(i){const e=a.getAncestors().map(e=>e.headline);h=Object(d.c)(e,i)}else h=!1;const m=1*l+1*h+1*((null===(r=a.oldestComment)||void 0===r?void 0:r.anchor)===o)+.5*u+.001*c;if(m>=2)s.push({section:a,score:m});return m>=3.5});let r;s.forEach(e=>{if(!r||e.score>r.score)r=e});if(a)return r||null;else return r?r.section:null},adjust(){cd.a.sections.forEach((e,t)=>{e.isLastSection=t===cd.a.sections.length-1;if(e.isActionable){var n,i;const a=cd.a.sections.slice(t+1).find(t=>t.level===e.level);if(2===e.elements.length&&(null===(n=cd.a.config.closedDiscussionClasses)||void 0===n?void 0:n.some(t=>{var n;return null===(n=e.elements[1].classList)||void 0===n?void 0:n.contains(t)}))||a&&a.headingNestingLevel!==e.headingNestingLevel){const t=e.menu;if(t){var o;null===(o=t.addSubsection)||void 0===o||o.wrapperElement.remove();delete t.addSubsection}}else e.addAddSubsectionButton();const s=e.elements[1]===e.lastElementInFirstChunk&&(null===(i=cd.a.config.closedDiscussionClasses)||void 0===i?void 0:i.some(t=>{var n;return null===(n=e.lastElementInFirstChunk.classList)||void 0===n?void 0:n.contains(t)})),r=e.$elements.get(1);if(!(r&&/^H[1-6]$/.test(r.tagName)||s||cd.a.sections[t+1]&&cd.a.sections[t+1].headingNestingLevel!==e.headingNestingLevel))e.addReplyButton()}});cd.a.sections.filter(e=>e.isActionable&&2===e.level).forEach(e=>{const t=e.getChildren(!0),n=t.length?t[t.length-1]:e;if(n.replyButton)$(n.replyButton.buttonElement).on("mouseenter",e.replyButtonHoverHandler).on("mouseleave",e.replyButtonUnhoverHandler)})},cleanUpWatched(){if(!cd.a.sections)return;const e=cd.a.g.currentPageWatchedSections.length;cd.a.g.originalThisPageWatchedSections=cd.a.g.currentPageWatchedSections.slice();cd.a.g.currentPageWatchedSections=cd.a.g.currentPageWatchedSections.filter(e=>cd.a.sections.some(t=>t.headline===e));cd.a.g.watchedSections[mw.config.get("wgArticleId")]=cd.a.g.currentPageWatchedSections;if(cd.a.g.currentPageWatchedSections.length!==e)Object(f.g)()}},b=n(23),v=n(8);let y;class Section_Section extends h{constructor(e,t,n,i){super(e,t,i);y=cd.a.g.SECTION_ELEMENT_PROTOTYPES;this.editSectionElement=t.querySelector(".mw-editsection");if(this.editSectionElement)this.closingBracketElement=this.editSectionElement.getElementsByClassName("mw-editsection-bracket")[1];this.liveSectionNumber=this.sectionNumber;this.liveSectionNumberRevisionId=mw.config.get("wgRevisionId");this.sourcePage=this.sourcePageName?new c.a(this.sourcePageName):cd.a.page;this.isActionable=cd.a.state.isPageActive&&!cd.a.g.closedDiscussionElements.some(e=>e.contains(t))&&!(this.sourcePageName&&10===this.sourcePage.namespaceId);if(!this.isActionable)this.comments.forEach(e=>{e.isActionable=!1});delete this.sourcePageName;this.extendSectionMenu(n);this.$headline=$(this.headlineElement);this.$heading=$(t)}addMenuItem({name:e,label:t,href:n,tooltip:i,action:o,visible:a=!0}){if(this.closingBracketElement){this.menu[e]=new l({name:e,label:t,href:n,tooltip:i,visible:a,classes:["cd-section-menu-button"],action:o});this.editSectionElement.insertBefore(this.menu[e].wrapperElement,this.closingBracketElement)}}addReplyButton(){const e=y.replyButton.cloneNode(!0),t=new a.a({element:e,action:()=>{this.reply()}}),n=this.lastElementInFirstChunk,i="OL"===n.tagName&&1===n.childElementCount&&n.children[0].classList.contains("mw-empty-elt");let o,s=!1;const r=n.tagName;if(n.classList.contains("cd-commentLevel")||i)if("UL"===r||"OL"===r&&(i||1===n.querySelectorAll("ol > li").length||n.querySelectorAll("ol > li > .cd-signature").length>1))o="li";else if("DL"===r)o="dd";else{o="li";s=!0}else{o="dd";if(!i)s=!0}const c=document.createElement(o);c.className="cd-replyWrapper";c.appendChild(t.element);let l;if(s){l=document.createElement("dl");l.className="cd-commentLevel cd-commentLevel-1 cd-section-button-container";n.parentNode.insertBefore(l,n.nextElementSibling)}else{l=n;l.classList.add("cd-section-button-container")}l.appendChild(c);this.replyButton=t;this.$replyWrapper=$(c);this.$replyContainer=$(l)}addAddSubsectionButton(){if(2!==this.level)return;const e=y.addSubsectionButton.cloneNode(!0),t=new a.a({element:e,labelElement:e.querySelector(".oo-ui-labelElement-label"),label:cd.a.s("section-addsubsection-to",this.headline),action:()=>{this.addSubsection()}}),n=document.createElement("div");n.className="cd-section-button-container cd-addSubsectionButton-container";n.style.display="none";n.appendChild(t.element);const i=this.elements[this.elements.length-1];i.parentNode.insertBefore(n,i.nextElementSibling);let o;const s=()=>{if(!o)o=setTimeout(()=>{this.$addSubsectionButtonContainer.hide()},1e3)};t.buttonElement.firstChild.onmouseenter=()=>{clearTimeout(o);o=null};t.buttonElement.firstChild.onmouseleave=()=>{s()};this.replyButtonHoverHandler=()=>{if(!this.addSubsectionForm){clearTimeout(o);o=null;if(!this.showAddSubsectionButtonTimeout)this.showAddSubsectionButtonTimeout=setTimeout(()=>{this.$addSubsectionButtonContainer.show()},1e3)}};this.replyButtonUnhoverHandler=()=>{if(!this.addSubsectionForm){clearTimeout(this.showAddSubsectionButtonTimeout);this.showAddSubsectionButtonTimeout=null;s()}};this.addSubsectionButton=t;this.$addSubsectionButtonContainer=$(n)}extendSectionMenu(e){if(!this.closingBracketElement)return;this.menu={};if(this.isActionable){if(this.comments.length&&this.comments[0].isOpeningSection&&this.comments[0].openingSectionOfLevel===this.level&&(this.comments[0].isOwn||cd.a.settings.allowEditOthersComments)&&this.comments[0].isActionable)this.addMenuItem({name:"editOpeningComment",label:cd.a.s("sm-editopeningcomment"),tooltip:cd.a.s("sm-editopeningcomment-tooltip"),action:()=>{this.comments[0].edit()}});if(this.level>=2&&6!==this.level)this.addMenuItem({name:"addSubsection",label:cd.a.s("sm-addsubsection"),tooltip:cd.a.s("sm-addsubsection-tooltip"),action:()=>{this.addSubsection()}});if(2===this.level)this.addMenuItem({name:"moveSection",label:cd.a.s("sm-move"),tooltip:cd.a.s("sm-move-tooltip"),action:()=>{this.move()}})}const t=()=>{if(this.headline)this.addMenuItem({name:"copyLink",label:cd.a.s("sm-copylink"),action:this.copyLink.bind(this),tooltip:cd.a.s("sm-copylink-tooltip"),href:`${cd.a.page.getUrl()}#${this.anchor}`});mw.hook("convenientDiscussions.sectionMenuExtended").fire(this)};if(this.isActionable)e.then(()=>{this.isWatched=cd.a.g.currentPageWatchedSections.includes(this.headline);this.addMenuItem({name:"unwatch",label:cd.a.s("sm-unwatch"),tooltip:cd.a.s("sm-unwatch-tooltip"),action:()=>{this.unwatch()},visible:this.isWatched});this.addMenuItem({name:"watch",label:cd.a.s("sm-watch"),tooltip:cd.a.s("sm-watch-tooltip"),action:()=>{this.watch()},visible:!this.isWatched})},()=>{}).then(t,t);else t()}reply(e){if(!this.replyForm)this.replyForm=e instanceof r.a?e:new r.a({mode:"replyInSection",target:this,dataToRestore:e});const t=this.getBase();if(t.$addSubsectionButtonContainer){t.$addSubsectionButtonContainer.hide();clearTimeout(t.showAddSubsectionButtonTimeout);t.showAddSubsectionButtonTimeout=null}}addSubsection(e){if(!this.menu.addSubsection)throw new s.a;if(this.addSubsectionForm){this.addSubsectionForm.$element.cdScrollIntoView("center");Object(d.l)(this.addSubsectionForm.headlineInput)}else this.addSubsectionForm=e instanceof r.a?e:new r.a({mode:"addSubsection",target:this,dataToRestore:e})}move(){if(Object(d.g)("mediawiki.widgets"))return;const e=new(0,n(47).default)(this);cd.a.g.windowManager.addWindows([e]);cd.a.g.windowManager.openWindow(e)}updateWatchMenuItems(){if(this.menu){this.menu.unwatch[this.isWatched?"show":"hide"]();this.menu.watch[this.isWatched?"hide":"show"]()}}watch(e=!1,t){const n=Section_Section.getByHeadline(this.headline);let i,o;if(!e){const e=n.map(e=>{var t;return null===(t=e.menu)||void 0===t?void 0:t.watch}).filter(d.h);e.forEach(e=>{e.setPending(!0)});i=()=>{e.forEach(e=>{e.setPending(!1)})}}if(t&&!Section_Section.getByHeadline(t).length)o=t;Section_Section.watch(this.headline,o).then(i,i).then(()=>{n.forEach(e=>{e.isWatched=!0;e.updateWatchMenuItems();e.updateTocLink()});if(!e){let e,t=cd.a.sParse("section-watch-success",this.headline);if($("#ca-watch").length){t+=" "+cd.a.sParse("section-watch-pagenotwatched");e="long"}mw.notify(Object(d.Y)(t),{autoHideSeconds:e})}},()=>{})}unwatch(e=!1){const t=Section_Section.getByHeadline(this.headline);let n;if(!e){const e=t.map(e=>{var t;return null===(t=e.menu)||void 0===t?void 0:t.unwatch}).filter(d.h);e.forEach(e=>{e.setPending(!0)});n=()=>{e.forEach(e=>{e.setPending(!1)})}}Section_Section.unwatch(this.headline).then(n,n).then(()=>{var n;t.forEach(e=>{e.isWatched=!1;e.updateWatchMenuItems();e.updateTocLink()});const i=null===(n=this.getClosestWatchedSection())||void 0===n?void 0:n.headline;if(!e||i){let e,t=cd.a.sParse("section-unwatch-success",this.headline);if(i){t+=" "+cd.a.sParse("section-unwatch-stillwatched",i);e="long"}mw.notify(Object(d.Y)(t),{autoHideSeconds:e})}},()=>{})}copyLink(e){e.preventDefault();Object(m.c)(this,e)}get $elements(){if(void 0===this.cached$elements)this.cached$elements=$(this.elements);return this.cached$elements}set $elements(e){this.cached$elements=e;this.elements=e.get()}setLastCommentIndentationChars(e){const[,t]=this.inCode.firstChunkCode.match(/\n([#*]) *\n+$/)||[];if(t)this.inCode.lastCommentIndentationChars=t;else{const t=this.commentsInFirstChunk[this.commentsInFirstChunk.length-1];if(t&&("ol"===e.containerListType||"mimic"===cd.a.config.indentationCharMode)){try{t.locateInCode(e.submitSection)}catch(e){return}if(!t.inCode.indentationChars.startsWith("#")||"ol"===e.containerListType)this.inCode.lastCommentIndentationChars=t.inCode.indentationChars}}}modifyWholeCode({action:e,commentCode:t}){const n=this.inCode.isSectionCodeUsed?this.code:this.getSourcePage().code;let i;switch(e){case"replyInSection":i=n.slice(0,this.inCode.firstChunkContentEndIndex)+t+n.slice(this.inCode.firstChunkContentEndIndex);break;case"addSubsection":i=Object(v.c)(n.slice(0,this.inCode.contentEndIndex))+t+n.slice(this.inCode.contentEndIndex).trim();break}return i}requestCode(){var e=this;return o()((function*(){var t,n,i,o,a;const r=yield cd.a.g.mwApi.post({action:"query",titles:e.getSourcePage().name,prop:"revisions",rvsection:e.liveSectionNumber,rvslots:"main",rvprop:["ids","content"],redirects:!mw.config.get("wgIsRedirect"),curtimestamp:!0}).catch(d.w),c=r.query,l=null==c?void 0:null===(t=c.pages)||void 0===t?void 0:t[0],u=null==l?void 0:null===(n=l.revisions)||void 0===n?void 0:n[0],h=null==u?void 0:null===(i=u.slots)||void 0===i?void 0:i.main,m=null==h?void 0:h.content;if(!c||!l)throw new s.a({type:"api",code:"noData"});if(l.missing)throw new s.a({type:"api",code:"missing"});if(l.invalid)throw new s.a({type:"api",code:"invalid"});if(h.nosuchsection)throw new s.a({type:"api",code:"noSuchSection"});if(!u||void 0===m)throw new s.a({type:"api",code:"noData"});const f=(null===(o=c.redirects)||void 0===o?void 0:null===(a=o[0])||void 0===a?void 0:a.to)||null;Object.assign(e,{code:m+"\n",revisionId:u.revid,queryTimestamp:r.curtimestamp});Object.assign(cd.a.page,{pageId:l.pageid,redirectTarget:f,realName:f||e.name})}))()}getCode(e){var t=this;return o()((function*(){try{if(null!==t.liveSectionNumber)try{yield t.requestCode();t.locateInCode(!0);if(e)e.submitSection=!0}catch(e){if(e instanceof s.a&&["noSuchSection","locateSection"].includes(e.data.code)){yield t.getSourcePage().getCode();t.locateInCode(!1)}else throw e}else{yield t.getSourcePage().getCode();t.locateInCode(!1)}}catch(e){if(e instanceof s.a)throw new s.a(Object.assign({},{message:cd.a.sParse("cf-error-getpagecode")},e.data));else throw e}}))()}searchInCode(e){const t=Object(v.j)(this.headline),n=Object(v.g)(e),i=/^((=+)(.*)\2[ \t\x01\x02]*)\n/gm,o=[],a=[];let s,r=0;for(;s=i.exec(n);){const i=Object(v.j)(Object(v.k)(s[3])),c=i===t;let l=3;const u=a.slice(-l).reverse(),h=cd.a.sections.slice(Math.max(0,this.id-l),this.id).reverse().map(e=>e.headline).every((e,t)=>Object(v.j)(e)===u[t]);a.push(i);const m=this.id===r;r++;const f=s[1],g=`={1,${s[2].length}}`,p=e.slice(s.index),b=n.slice(s.index),y=b.match(new RegExp("("+mw.util.escapeRegExp(f)+"[^]*?\\n)"+g+"[^=].*=+[ \\t\\x01\\x02]*\\n"))||p.match(new RegExp("("+mw.util.escapeRegExp(f)+"[^]*$)")),w=b.match(new RegExp("("+mw.util.escapeRegExp(f)+"[^]*?\\n)\\n*={1,6}[^=].*=+[ \\t\\x01\\x02]*\n"))||p.match(new RegExp("("+mw.util.escapeRegExp(f)+"[^]*$)")),E=y&&p.substr(y.index,y[1].length),C=w&&p.substr(w.index,w[1].length);if(!E||!C){console.log(`Couldn't read the "${i}" section contents.`);continue}let T;Object(v.d)(E).forEach(e=>{if(!T||!T.date&&e.date||T.date>e.date)T=e});const x=T?Boolean(this.oldestComment&&(T.timestamp===this.oldestComment.timestamp||T.author===this.oldestComment.author)):!this.oldestComment;let k=Number(!this.oldestComment&&!T);if(this.oldestComment&&T){const e=E.slice(T.commentStartIndex,T.startIndex);k=Object(d.e)(this.oldestComment.getText(),Object(v.k)(e))}const S=1*x+k+1*c+.5*m+.25*h;if(S<=1)continue;const O=s.index,N=O+E.length,_=s.index+s[0].length,A=O+C.length,P=_-O;let I=A,L=N;cd.a.g.KEEP_IN_SECTION_ENDING.forEach(e=>{const t=C.match(e);if(t)I-=t[0].length-1;const n=E.match(e);if(n)L-=n[0].length-1});const M=C.match(/\n([#*] *\n+)$/);if(M)I-=M[1].length;o.push({doesHeadlineMatch:c,doesOldestCommentMatch:x,doesSectionIndexMatch:m,doPreviousHeadlinesMatch:h,score:S,startIndex:O,endIndex:N,code:E,contentStartIndex:_,contentEndIndex:L,relativeContentStartIndex:P,firstChunkEndIndex:A,firstChunkContentEndIndex:I,firstChunkCode:C});if(2.75===S)break}return o}locateInCode(e){this.inCode=null;const t=e?this.code:this.getSourcePage().code;if(void 0===t)throw new s.a({type:"parse",code:"noCode"});const n=this.searchInCode(t).sort((e,t)=>t.score-e.score)[0];if(!n)throw new s.a({type:"parse",code:"locateSection"});n.isSectionCodeUsed=e;this.inCode=n}getSourcePage(){return this.sourcePage}getBase(){if(this.level<=2)return this;else return cd.a.sections.slice(0,this.id).reverse().find(e=>2===e.level)||this}getChildren(e=!1){const t=[];let n=!1;cd.a.sections.slice(this.id+1).some(i=>{if(i.level>this.level){if(i.level===this.level+1)n=!0;if(e||i.level===this.level+1||!n)t.push(i)}else return!0});return t}getClosestWatchedSection(e=!1){for(let t=e?this:this.getParent();t;t=t.getParent())if(t.isWatched)return t;return null}getTocItem(){return b.a.getItem(this.anchor)||null}updateTocLink(){if(!cd.a.settings.modifyToc)return;const e=this.getTocItem();if(e)if(this.isWatched)e.$link.addClass("cd-toc-watched").attr("title",cd.a.s("toc-watched"));else e.$link.removeClass("cd-toc-watched").removeAttr("title")}getUrl(e){if(e)return Object(d.u)(this.anchor,!0);else{if(!this.cachedUrl)this.cachedUrl=Object(d.u)(this.anchor);return this.cachedUrl}}}Object.assign(Section_Section,p);t.a=Section_Section},function(e,t,n){"use strict";var i=n(0),o=n(1);t.a={users:{},getUser(e){if(e.includes("#"))e=e.slice(0,e.indexOf("#"));if(mw.util.isIPv6Address(e))e=e.toUpperCase().trim();else e=Object(o.V)(Object(o.j)(e)).trim();if(!this.users[e]){const t=e===i.a.g.USER_NAME?{gender:mw.user.options.get("gender")}:{};this.users[e]=new User(e,t)}return this.users[e]}};class User{constructor(e,t={}){this.name=e;this.options=new mw.Map;Object.keys(t).forEach(e=>{this.options.set(e,t[e])})}isRegistered(){if(""===this.name)return!1;if(void 0===this.cachedIsRegistered)this.cachedIsRegistered=!mw.util.isIPAddress(this.name);return this.cachedIsRegistered}setGender(e){this.options.set("gender",e)}getGender(){return this.options.get("gender")}}},function(e,t,n){"use strict";n.d(t,"e",(function(){return m}));n.d(t,"a",(function(){return f}));n.d(t,"f",(function(){return g}));n.d(t,"b",(function(){return p}));n.d(t,"d",(function(){return b}));n.d(t,"c",(function(){return v}));var i=n(7),o=n(13),a=n(28),s=n(0),r=n(11),c=n(31),l=n(5),u=n(1),d=n(4);const h={};function m(){setTimeout(()=>{Object(d.n)(!0);i.a.redrawLayersIfNecessary(!0);a.a.updateLines();c.a.updateWidth()});r.a.updateCommentFormButton();s.a.commentForms.forEach(e=>{e.adjustLabels()});b()}function f(e,t){h[e]=e=>{if(t()){e.preventDefault();e.returnValue="";return""}};$(window).on("beforeunload",h[e])}function g(e){if(h[e]){$(window).off("beforeunload",h[e]);delete h[e]}}function p(e){if(!Object(u.C)()){if(Object(u.G)(e,81,["ctrl","alt"])||Object(u.G)(e,81)&&!Object(u.B)()){const t=o.a.getLastActive();if(t){e.preventDefault();t.quote(e.ctrlKey)}}if(r.a.isMounted()){if(Object(u.G)(e,82)&&!Object(u.B)())r.a.refreshClick();if(Object(u.G)(e,87)&&!Object(u.B)())r.a.goToPreviousNewComment();if(Object(u.G)(e,83)&&!Object(u.B)())r.a.goToNextNewComment();if(Object(u.G)(e,70)&&!Object(u.B)())r.a.goToFirstUnseenComment();if(Object(u.G)(e,67)&&!Object(u.B)()){e.preventDefault();r.a.goToNextCommentForm()}}}}function b(){if(!s.a.state.dontHandleScroll&&!s.a.state.isAutoScrollInProgress){s.a.state.dontHandleScroll=!0;setTimeout(()=>{s.a.state.dontHandleScroll=!1;if(!s.a.state.isAutoScrollInProgress){if(s.a.state.isPageActive){i.a.registerSeen();r.a.updateCommentFormButton()}c.a.update()}},300)}}function v(){let e=location.hash.slice(1);if(Object(l.i)(e)){var t;try{e=decodeURIComponent(e)}catch(e){console.error(e)}null===(t=i.a.getByAnchor(e,!0))||void 0===t||t.scrollTo(!0)}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return TreeWalker}));n.d(t,"b",(function(){return ElementsTreeWalker}));n.d(t,"a",(function(){return ElementsAndTextTreeWalker}));var i=n(0);class TreeWalker{constructor(e,t,n=!1,i=e){this.acceptNode=t;this.root=e;this.currentNode=i;if(n){this.firstChildProp="firstElementChild";this.lastChildProp="lastElementChild";this.previousSiblingProp="previousElementSibling";this.nextSiblingProp="nextElementSibling"}else{this.firstChildProp="firstChild";this.lastChildProp="lastChild";this.previousSiblingProp="previousSibling";this.nextSiblingProp="nextSibling"}}tryMove(e){let t=this.currentNode;if(t===this.root&&!e.includes("Child"))return null;do{t=t[e]}while(t&&this.acceptNode&&!this.acceptNode(t));if(t)this.currentNode=t;return t||null}parentNode(){return this.tryMove("parentNode")}firstChild(){return this.tryMove(this.firstChildProp)}lastChild(){return this.tryMove(this.lastChildProp)}previousSibling(){return this.tryMove(this.previousSiblingProp)}nextSibling(){return this.tryMove(this.nextSiblingProp)}nextNode(){let e=this.currentNode;do{if(e[this.firstChildProp])e=e[this.firstChildProp];else{for(;e&&!e[this.nextSiblingProp]&&e.parentNode!==this.root;)e=e.parentNode;if(e)e=e[this.nextSiblingProp]}}while(e&&this.acceptNode&&!this.acceptNode(e));if(e)this.currentNode=e;return e}previousNode(){let e=this.currentNode;if(e!==this.root){do{if(e[this.previousSiblingProp]){e=e[this.previousSiblingProp];for(;e[this.lastChildProp];)e=e[this.lastChildProp]}else e=e.parentNode}while(e&&this.acceptNode&&!this.acceptNode(e));if(e)this.currentNode=e;return e}}}class ElementsTreeWalker extends TreeWalker{constructor(e,t=i.a.g.rootElement){super(t,null,!0);if(e)this.currentNode=e}}class ElementsAndTextTreeWalker extends TreeWalker{constructor(e,t=i.a.g.rootElement){super(t,e=>e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE);if(e)this.currentNode=e}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return d}));n.d(t,"a",(function(){return m}));n.d(t,"c",(function(){return p}));n.d(t,"b",(function(){return v}));var i=n(2),o=n.n(i),a=n(3),s=n(7),r=n(0),c=n(6),l=n(1),u=n(8);function d(){return h.apply(this,arguments)}function h(){return(h=o()((function*(){if(Object(l.C)()||Object(l.g)("mediawiki.widgets.UsersMultiselectWidget"))return;const e=n(46).default;Object(c.e)();const t=new e;r.a.g.windowManager.addWindows([t]);r.a.g.windowManager.openWindow(t);r.a.g.settingsDialog=t}))).apply(this,arguments)}function m(){return f.apply(this,arguments)}function f(){return(f=o()((function*(){if(Object(l.C)())return;const e=n(50).default;Object(c.e)();const t=new e;r.a.g.windowManager.addWindows([t]);r.a.g.windowManager.openWindow(t)}))).apply(this,arguments)}function g(e){const t=$("