!function(){var e={"./node_modules/redux-thunk/dist/redux-thunk.min.js":function(e){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t){"use strict";function n(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i)}}}}t.__esModule=!0;var r=n();r.withExtraArgument=n,t.default=r}])},"./node_modules/redux/dist/redux.min.js":function(e,t,n){e=n.nmd(e),function(t){"use strict";var r=function(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:e),i=function(){return Math.random().toString(36).substring(7).split("").join(".")},o={INIT:"@@redux/INIT"+i(),REPLACE:"@@redux/REPLACE"+i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i()}};function a(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+n+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function s(e,t){return function(){return t(e.apply(this,arguments))}}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}t.createStore=function e(t,n,i){var a;if("function"==typeof n&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function");if("function"==typeof n&&void 0===i&&(i=n,n=void 0),void 0!==i){if("function"!=typeof i)throw Error("Expected the enhancer to be a function.");return i(e)(t,n)}if("function"!=typeof t)throw Error("Expected the reducer to be a function.");var s=t,u=n,c=[],p=c,l=!1;function d(){p===c&&(p=c.slice())}function f(){if(l)throw Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return u}function w(e){if("function"!=typeof e)throw Error("Expected the listener to be a function.");if(l)throw Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var t=!0;return d(),p.push(e),function(){if(t){if(l)throw Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,d();var n=p.indexOf(e);p.splice(n,1)}}}function m(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw Error("Reducers may not dispatch actions.");try{l=!0,u=s(u,e)}finally{l=!1}for(var t=c=p,n=0;t.length>n;n++)(0,t[n])();return e}return m({type:o.INIT}),(a={dispatch:m,subscribe:w,getState:f,replaceReducer:function(e){if("function"!=typeof e)throw Error("Expected the nextReducer to be a function.");s=e,m({type:o.REPLACE})}})[r]=function(){var e,t=w;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(f())}return n(),{unsubscribe:t(n)}}})[r]=function(){return this},e},a},t.combineReducers=function(e){for(var t=Object.keys(e),n={},r=0;t.length>r;r++){var i=t[r];"function"==typeof e[i]&&(n[i]=e[i])}var s,u=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:o.INIT}))throw Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:o.PROBE_UNKNOWN_ACTION()}))throw Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+o.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(e){s=e}return function(e,t){if(void 0===e&&(e={}),s)throw s;for(var r=!1,i={},o=0;u.length>o;o++){var c=u[o],p=e[c],l=(0,n[c])(p,t);if(void 0===l){var d=a(c,t);throw Error(d)}i[c]=l,r=r||l!==p}return r?i:e}},t.bindActionCreators=function(e,t){if("function"==typeof e)return s(e,t);if("object"!=typeof e||null===e)throw Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(e),r={},i=0;n.length>i;i++){var o=n[i],a=e[o];"function"==typeof a&&(r[o]=s(a,t))}return r},t.applyMiddleware=function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=t.map((function(e){return e(i)}));return function(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}({},n,{dispatch:r=c.apply(void 0,o)(n.dispatch)})}}},t.compose=c,t.__DO_NOT_USE__ActionTypes=o,Object.defineProperty(t,"__esModule",{value:!0})}(t)},"./src/ui/pointer-mask.svg":function(e){e.exports=''}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";var e={};function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(e),n.d(e,{abandon:function(){return fe},boot:function(){return pe},fetch:function(){return le},hideSettings:function(){return Ee},linkClick:function(){return we},linkDwell:function(){return de},pageviewLogged:function(){return ge},previewDwell:function(){return me},previewShow:function(){return he},saveSettings:function(){return Te},showSettings:function(){return ve},statsvLogged:function(){return be}});var r=n("./node_modules/redux/dist/redux.min.js"),i=n("./node_modules/redux-thunk/dist/redux-thunk.min.js"),o=n.n(i),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.devicePixelRatio;return e?e>1.5?2:e>1?1.5:1:1}(),s={BRACKETED_DEVICE_PIXEL_RATIO:a,THUMBNAIL_SIZE:320*Math.max(a,1.5),EXTRACT_LENGTH:525},u={TYPE_GENERIC:"generic",TYPE_PAGE:"page",TYPE_DISAMBIGUATION:"disambiguation",TYPE_REFERENCE:"reference"};function c(e,t,n,r,i,o,a,s){var c=function(e){if(null!=e&&0!==e.length)return e}(i),p=function(e,t){if(void 0===t)return u.TYPE_GENERIC;switch(e){case u.TYPE_GENERIC:case u.TYPE_DISAMBIGUATION:case u.TYPE_PAGE:return e;default:return u.TYPE_PAGE}}(o,c);return{title:e,url:t,languageCode:n,languageDirection:r,extract:c,type:p,thumbnail:a,pageId:s}}function p(e,t){return c(e,t,"","",[],"")}function l(e,t,n){return function(e,t){return e.getNamespaceId()===t.get("wgNamespaceNumber")&&e.getMainText()===t.get("wgTitle")}(n,t)?n.getFragment()&&t.get("wgPopupsReferencePreviews")&&$(e).parent().hasClass("reference")?u.TYPE_REFERENCE:null:u.TYPE_PAGE}function d(e,t){var n=e;return void 0===e||0===n.length?[]:(n=function(e,t){var n=[],r=""),i="");t=t.replace(/\s+/g," ").trim();var o=mw.util.escapeRegExp(t),a=new RegExp("(^|\\s)(".concat(o,")(|$)"),"i");return(e=(e=(e=e.replace(/\s+/," ")).replace(a,"$1".concat(i).concat(r,"$2").concat(i,"$3"))).split(i)).forEach((function(e){0===e.indexOf(r)?n.push($("").text(e.slice(r.length))):n.push(document.createTextNode(e))})),n}(n,t),n)}function f(e){if(e.query&&e.query.pages&&e.query.pages.length)return e.query.pages[0];throw new Error("API response `query.pages` is empty.")}function w(e){var t=$.extend({},e);return t.extract=d(e.extract,e.title),t}function m(e){return c(e.title,e.canonicalurl,e.pagelanguagehtmlcode,e.pagelanguagedir,e.extract,e.type,e.thumbnail,e.pageid)}var h="https://www.mediawiki.org/wiki/Specs/Summary/1.2.0";function g(e,t,n){function r(n){var r=t.endpoint;return e({url:r+encodeURIComponent(n),headers:{Accept:'application/json; charset=utf-8; profile="'.concat(h,'"'),"Accept-Language":t.acceptLanguage}})}return{fetch:r,convertPageToModel:v,fetchPreviewForTitle:function(e){var i=e.getPrefixedDb(),o=r(i);return o.then((function(e){return(e=e||{}).title=e.title||i,e.extract=e.extract||"",v(e,t.THUMBNAIL_SIZE,n)})).catch((function(e,t,n){return $.Deferred().reject("http",{xhr:e,textStatus:t,exception:n})})).promise({abort:function(){o.abort()}})}}}function v(e,t,n){return c(e.title,new mw.Title(e.title).getUrl(),e.lang,e.dir,n(e),e.type,e.thumbnail?function(e,t,n){var r=e.source.split("/"),i=r[r.length-1],o=function(e){return new RegExp(/\.(jpg|jpeg|png|gif)$/i).test(e)}(t.source)||void 0,a=i.indexOf("px-");if(-1===a)return o&&t;var s,u,c=i.slice(a+3);return e.width>e.height?(s=n,u=Math.floor(n/e.width*e.height)):(s=Math.floor(n/e.height*e.width),u=n),s>=t.width&&-1===c.indexOf(".svg")?o&&t:(r[r.length-1]="".concat(s,"px-").concat(c),{source:r.join("/"),width:s,height:u})}(e.thumbnail,e.originalimage,t):void 0,e.pageid)}function E(e){var t=e.extract_html;return 0===t.length?[]:$.parseHTML(t)}function T(e){return d(e.extract,e.title)}var b="mwe-popups-enabled",y="mwe-popups-referencePreviews-enabled";function P(e){return mw.html.escape(e)}var x={};function _(e){if(!x[e]){var t=document.createElement("div");t.innerHTML=e,x[e]=t.firstElementChild}return x[e].cloneNode(!0)}function S(e){var t,n;return function(r){return t||(t=function(e){var t=[{id:u.TYPE_PAGE,name:mw.msg("popups-settings-option-page"),description:mw.msg("popups-settings-option-page-description")},{id:u.TYPE_REFERENCE,name:mw.msg("popups-settings-option-reference"),description:mw.msg("popups-settings-option-reference-description")}];return e||t.splice(1,1),function(e){var t=P(e.heading),n=P(e.saveLabel),r=P(e.closeLabel),i=P(e.helpText),o=P(e.okLabel),a=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(e){var t=e.id,n=e.name,r=e.description,i=e.isChecked;return{id:P(t),name:P(n),description:r?P(r):"",isChecked:i}}))}(e.choices);return $($.parseHTML("\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
".concat(r,"
\n\t\t\t\t
\n\t\t\t\t

").concat(t,"

\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t").concat(a.map((function(e){var t=e.id,n=e.name,r=e.description,i=e.isChecked;return'\n\t\t\t\t\t

\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t

")})).join(""),"\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t
\n\t").trim()))}({heading:mw.msg("popups-settings-title"),closeLabel:mw.msg("popups-settings-cancel"),saveLabel:mw.msg("popups-settings-save"),helpText:mw.msg("popups-settings-help"),okLabel:mw.msg("popups-settings-help-ok"),choices:t})}(e),n=$("
").addClass("mwe-popups-overlay"),t.find(".save").on("click",(function(){var e={};t.find("input").each((function(t,n){e[n.value]=$(n).is(":checked")})),r.saveSettings(e)})),t.find(".close, .okay").on("click",r.hideSettings)),{appendTo:function(e){n.appendTo(e),t.appendTo(n)},show:function(){n.show()},hide:function(){n.hide()},toggleHelp:function(e){!function(e,t){var n=$("#mwe-popups-settings"),r="main, .save, .close",i=".mwe-popups-settings-help, .okay";t?(n.find(r).hide(),n.find(i).show()):(n.find(r).show(),n.find(i).hide())}(0,e)},setEnabled:function(e){Object.keys(e).forEach((function(n){t.find("#mwe-popups-settings-"+n).prop("checked",e[n])}))}}}}function I(e,t){var n;e.subscribe((function(){var r=e.getState();n!==r&&(t(n,r),n=r)}))}function k(e,t){if(function(e){return e.hash&&e.host===location.host&&e.pathname===location.pathname&&e.search===location.search}(e))try{return mw.Title.newFromText(t.get("wgPageName")+decodeURIComponent(e.hash))}catch(e){return null}return function(e,t){if(!e)return null;var n=mw.Title.newFromText(e);return n&&t.indexOf(n.namespace)>=0?n:null}(function(e,t){var n;try{n=new mw.Uri(e)}catch(e){return}if(n.host===location.hostname){var r,i=Object.keys(n.query).length;if(i)1===i&&"title"in n.query&&(r=n.query.title);else{var o=mw.util.escapeRegExp(t.get("wgArticlePath")).replace("\\$1","([^?#]+)"),a=new RegExp(o).exec(n.path);try{r=a&&decodeURIComponent(a[1])}catch(e){}}return r?"".concat(r).concat(n.fragment?"#".concat(n.fragment):""):void 0}}(e.href,t),t.get("wgContentNamespaces"))}function A(e){var t=$.Deferred();return setTimeout((function(){return t.resolve()}),e),t.promise()}var C=n("./src/ui/pointer-mask.svg"),N=n.n(C),O={portraitImage:{h:250,w:203},landscapeImage:{h:200,w:320}};var R='\n\t
\n';function L(e,t){var n=_(R);return n.className="mwe-popups mwe-popups-type-".concat(e),t.className="mwe-popups-container",n.appendChild(t),$(n)}var D='\n\t
\n\t\t
\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t
\n\t\t\t\n\t\t
\n\t
\n';function H(e,t,n,r){var i=L(e.type,_(D));return i.find(".mw-ui-icon ").addClass("mw-ui-icon-preview-".concat(e.type)),i.find(".mwe-popups-extract").attr("href",e.url),i.find(".mwe-popups-message").html(P(n)),i.find(".mwe-popups-read-link").html(P(r)).attr("href",e.url),t?i.find(".mwe-popups-title").html(P(e.title)):i.find(".mwe-popups-title").remove(),i}var G='\n
\n
\n
\n \n \n \n \n
\n
\n
\n
\n\t
\n\t\t
\n\t
\n
',F="event.ReferencePreviewsPopups",j=!1;function Y(e){var t=e.referenceType||"generic",n=mw.message("popups-refpreview-".concat(t));n.exists()||(n=mw.message("popups-refpreview-reference"));var r=L(e.type,_(G));return r.find(".mwe-popups-title-placeholder").replaceWith(P(n.text())),r.find(".mwe-popups-title .mw-ui-icon").addClass("mw-ui-icon-reference-".concat(t)),r.find(".mw-parser-output").html(e.extract),r.find('.mwe-popups-extract a[href][class~="external"]:not([target])').each((function(e,t){t.target="_blank",t.rel="".concat(t.rel?"".concat(t.rel," "):"","noopener")})),r.find(".mw-collapsible").replaceWith($("
").addClass("mwe-collapsible-placeholder").append($("").addClass("mw-ui-icon mw-ui-icon-element mw-ui-icon-infoFilled"),$("
").addClass("mwe-collapsible-placeholder-label").text(mw.msg("popups-refpreview-collapsible-placeholder")))),r.find("table.sortable").removeClass("sortable jquery-tablesorter").find(".headerSort").removeClass("headerSort").attr({tabindex:null,title:null}),mw.config.get("wgPopupsReferencePreviewsBetaFeature")?r.find(".mwe-popups-container").addClass("footer-empty"):r.find(".mwe-popups-settings").append($("").addClass("mwe-popups-settings-icon").append($("").addClass("mw-ui-icon mw-ui-icon-element mw-ui-icon-small mw-ui-icon-settings"))),j&&r.find(".mw-parser-output").on("click","a",(function(){mw.track(F,{action:"clickedReferencePreviewsContentLink"})})),r.find(".mwe-popups-scroll").on("scroll",(function(e){var t=e.target,n=t.scrollTop>=t.scrollHeight-t.clientHeight-1;if(j&&(t.isOpenRecorded||(mw.track(F,{action:"poppedOpen",scrollbarsPresent:t.scrollHeight>t.clientHeight}),t.isOpenRecorded=!0),t.scrollTop>0&&!t.isScrollRecorded&&(mw.track(F,{action:"scrolled"}),t.isScrollRecorded=!0)),n||!t.isScrolling){var r=$(t).parent(),i=t.scrollWidth>t.clientWidth,o=t.offsetHeight-t.clientHeight,a=t.scrollHeight>t.clientHeight,s=t.offsetWidth-t.clientWidth;r.find(".mwe-popups-fade").css({bottom:i?"".concat(o,"px"):0,right:a?"".concat(s,"px"):0}),t.isScrolling=!n,r.toggleClass("mwe-popups-fade-out",t.isScrolling)}})),r}$((function(){mw.config.get("wgPopupsReferencePreviews")&&navigator.sendBeacon&&mw.config.get("wgIsArticle")&&!j&&(j=!0,mw.track(F,{action:"pageview"}))}));var W=215,M='\n
\n \n \n \n
\n\t';function V(e,t,n,r){var i=L(e.type,_(M));i.find(".mwe-popups-discreet, .mwe-popups-extract").attr("href",e.url),i.find(".mwe-popups-extract").attr("dir",e.languageDirection).attr("lang",e.languageCode),i.find(".mwe-popups-settings-icon").attr("title",r),t?i.find(".mwe-popups-discreet").append(t.el):i.find(".mwe-popups-discreet").remove();var o=i.find(".mwe-popups-extract");if(e.extract){o.append(e.extract);var a=function(e){return e&&e.isNarrow?"".concat(W+e.offset,"px"):""}(t);n||(o.css("width",a),i.find("footer").css("width",a))}return i}function B(e){var t=function(e){switch(e.type){case u.TYPE_PAGE:return function(e){var t=function(e,t){var n=s.BRACKETED_DEVICE_PIXEL_RATIO;if(!e)return null;var r=e.width/n,i=e.height/n,o=e.height>e.width||r-1||e.source.indexOf("'")>-1||e.source.indexOf('"')>-1)return null;var a,u,c,p,l=r/i,d=l>.7&&l<1.3;o?(a=r>O.portraitImage.w?(r-O.portraitImage.w)/-2:O.portraitImage.w-r,u=i>O.portraitImage.h?(i-O.portraitImage.h)/-2:0,c=O.portraitImage.w,p=O.portraitImage.h,rO.landscapeImage.h?(i-O.landscapeImage.h)/-2:0,c=O.landscapeImage.w,p=i>O.landscapeImage.h?O.landscapeImage.h:i);var f,w,m=o&&r28?t.pageX:t.offset.left+t.width/2:t.offset.left)>t.windowWidth/2&&(i+=t.pageX?0:t.width,i-=e?450:320,o=!0),t.pageX&&(i+=o?18:-18),u>t.windowHeight/2&&(a=!0,s=t.offset.top,t.pageY&&(s=X(t.pageY-t.scrollTop,t.clientRects,!0)+t.scrollTop),s-=8),{offset:{top:s,left:i},flippedX:"rtl"===r?!o:o,flippedY:a,dir:r}}(e.isTall,t,0,a);return e.el.appendTo(o),function(e,t,n,r,i,o){var a=e.el,s=e.isTall,u=e.hasThumbnail,c=e.thumbnail,p=t.flippedY;!p&&!s&&u&&c.heighto)&&(i=o,r=n?Math.floor(t.top):Math.ceil(t.bottom))})),r}function K(e,t){return t.split(".").reduce((function(e,t){return e&&e[t]}),e)}function q(e,t,n,r){var i=K(t,n);e&&K(e,n)!==i&&r(i)}var z=function(e){var t;return function(n,r){void 0===t&&(t=function(){var e=$("
  • ").append($("").attr("href","#").text(mw.message("popups-settings-enable").text()));e.hide();var t=$("#footer-places, #f-list");return 0===t.length&&(t=$("#footer li").parent()),t.append(e),e}()).on("click",(function(t){t.preventDefault(),e.showSettings()})),r.settings.shouldShowFooterLink?t.show():t.hide()}},Z=function(){var e;return function(t,n){var r,i=t&&t.preview.activeLink;i!==n.preview.activeLink&&((r=i)&&e&&($(r).attr("title",e),e=void 0),n.preview.enabled[n.preview.previewType]&&function(t){if(t&&!e){var n=$(t);e=n.attr("title"),n.attr("title","")}}(n.preview.activeLink))}},J=function(e,t){return function(n,r){var i,o;r.pageviews&&r.pageviews.pageview&&r.pageviews.page&&(i=r.pageviews.page,o=r.pageviews.pageview,t("event.VirtualPageView",{source_page_id:i.id,source_namespace:i.namespaceId,source_title:mw.Title.newFromText(i.title).getPrefixedDb(),source_url:i.url,page_id:o.page_id,page_namespace:o.page_namespace,page_title:mw.Title.newFromText(o.page_title).getPrefixedDb()}),e.pageviewLogged())}},Q=function(e){var t;return function(n,r){r.preview.shouldShow&&!t?(t=B(r.preview.fetchResponse)).show(r.preview.measures,e,r.preview.activeToken):!r.preview.shouldShow&&t&&(t.hide(),t=void 0)}},ee=function(e,t){var n;return function(r,i){r&&(!1===r.settings.shouldShow&&i.settings.shouldShow?(n||(n=t(e)).appendTo(document.body),n.setEnabled(i.preview.enabled),n.show()):r.settings.shouldShow&&!1===i.settings.shouldShow&&n.hide(),r.settings.showHelp!==i.settings.showHelp&&n.toggleHelp(i.settings.showHelp))}},te=function(e,t){return function(n,r){var i=r.statsv;i.action&&(t(i.action,i.data),e.statsvLogged())}},ne=function(e){return function(t,n){q(t,n,"eventLogging.previewCount",e.storePreviewCount),q(t,n,"preview.enabled."+u.TYPE_PAGE,e.storePagePreviewsEnabled),q(t,n,"preview.enabled."+u.TYPE_REFERENCE,e.storeReferencePreviewsEnabled)}},re={BOOT:"BOOT",LINK_DWELL:"LINK_DWELL",ABANDON_START:"ABANDON_START",ABANDON_END:"ABANDON_END",LINK_CLICK:"LINK_CLICK",FETCH_START:"FETCH_START",FETCH_END:"FETCH_END",FETCH_COMPLETE:"FETCH_COMPLETE",FETCH_FAILED:"FETCH_FAILED",FETCH_ABORTED:"FETCH_ABORTED",PAGEVIEW_LOGGED:"PAGEVIEW_LOGGED",PREVIEW_DWELL:"PREVIEW_DWELL",PREVIEW_SHOW:"PREVIEW_SHOW",PREVIEW_CLICK:"PREVIEW_CLICK",PREVIEW_SEEN:"PREVIEW_SEEN",SETTINGS_SHOW:"SETTINGS_SHOW",SETTINGS_HIDE:"SETTINGS_HIDE",SETTINGS_CHANGE:"SETTINGS_CHANGE",STATSV_LOGGED:"STATSV_LOGGED"},ie=150,oe=1e3,ae=350+ie,se=150,ue=300;function ce(e){return e.timestamp=mw.now(),e}function pe(e,t,n,r,i){var o=r.get("wgUserEditCount");return{type:re.BOOT,initiallyEnabled:e,isNavPopupsEnabled:r.get("wgPopupsConflictsWithNavPopupGadget"),sessionToken:t.sessionId(),pageToken:t.getPageviewToken(),page:{url:i,title:r.get("wgTitle"),namespaceId:r.get("wgNamespaceNumber"),id:r.get("wgArticleId")},user:{isAnon:t.isAnon(),editCount:o}}}function le(e,t,n,r,i){var o=t.getPrefixedDb(),a=t.namespace;return function(s){var c=e.fetchPreviewForTitle(t,n);s(ce({type:re.FETCH_START,el:n,title:o,namespaceId:a,promise:c}));var l=c.then((function(e){return s(ce({type:re.FETCH_END,el:n})),e})).catch((function(e,t){var i=new Error(e),o=t&&t.textStatus&&"abort"===t.textStatus?re.FETCH_ABORTED:re.FETCH_FAILED;throw i.data=t,s({type:o,el:n,token:r}),i}));return $.when(l,A(function(e){switch(e){case u.TYPE_PAGE:return ae-ie;case u.TYPE_REFERENCE:return se;default:return 0}}(i))).then((function(e){s({type:re.FETCH_COMPLETE,el:n,result:e,token:r})})).catch((function(e){var i=e.data,a=!0;i&&i.xhr&&0===i.xhr.readyState&&(a=!("error"===i.textStatus&&""===i.exception||"abort"===i.textStatus)),a&&s({type:re.FETCH_COMPLETE,el:n,result:p(o,t.getUrl()),token:r})}))}}function de(e,t,n,r,i,o){var a=i(),s=e.getPrefixedDb(),u=e.namespace;return function(i,c){var p=A(ie),l=ce({type:re.LINK_DWELL,el:t,previewType:o,measures:n,token:a,title:s,namespaceId:u,promise:p});function d(){return c().preview.activeToken===a}return i(l),d()?p.then((function(){if(c().preview.enabled[o]&&d())return i(le(r,e,t,a,o))})):$.Deferred().resolve().promise()}}function fe(){return function(e,t){var n=t().preview,r=n.activeToken,i=n.promise;return r?(e(ce({type:re.ABANDON_START,token:r})),"abort"in i&&i.abort(),A(ue).then((function(){e({type:re.ABANDON_END,token:r})}))):$.Deferred().resolve().promise()}}function we(e){return ce({type:re.LINK_CLICK,el:e})}function me(){return{type:re.PREVIEW_DWELL}}function he(e){return function(t,n){return t(ce({type:re.PREVIEW_SHOW,token:e})),A(oe).then((function(){var r=n().preview,i=r&&r.fetchResponse,o=r&&r.activeToken,a=i&&[u.TYPE_PAGE,u.TYPE_DISAMBIGUATION].indexOf(i.type)>-1;o&&o===e&&i&&a&&t({type:re.PREVIEW_SEEN,title:i.title,pageId:i.pageId,namespace:0})}))}}function ge(){return{type:re.PAGEVIEW_LOGGED}}function ve(){return{type:re.SETTINGS_SHOW}}function Ee(){return{type:re.SETTINGS_HIDE}}function Te(e){return function(t,n){t({type:re.SETTINGS_CHANGE,oldValue:n().preview.enabled,newValue:e})}}function be(){return{type:re.STATSV_LOGGED}}function ye(e,t){var n,r=Object.prototype.hasOwnProperty,i={};for(var o in e)r.call(e,o)&&!r.call(t,o)&&(i[o]=e[o]);for(var a in t)if(r.call(t,a))if((n=t[a])&&n.constructor===Object){var s=e[a]?ye({},e[a]):{};i[a]=ye(s,t[a])}else i[a]=t[a];return i}var Pe={pageviews:function(e,t){switch(void 0===e&&(e={pageview:void 0}),t.type){case re.BOOT:return ye(e,{page:t.page});case re.PAGEVIEW_LOGGED:return ye(e,{pageview:void 0});case re.PREVIEW_SEEN:return ye(e,{pageview:{page_title:t.title,page_id:t.pageId,page_namespace:t.namespace}});default:return e}},preview:function(e,t){switch(void 0===e&&(e={enabled:{},activeLink:void 0,previewType:void 0,measures:void 0,activeToken:"",shouldShow:!1,isUserDwelling:!1,wasClicked:!1}),t.type){case re.BOOT:return ye(e,{enabled:t.initiallyEnabled});case re.SETTINGS_CHANGE:return ye(e,{enabled:t.newValue});case re.LINK_DWELL:return t.el!==e.activeLink?ye(e,{activeLink:t.el,previewType:t.previewType,measures:t.measures,activeToken:t.token,shouldShow:!1,isUserDwelling:!0,promise:t.promise}):ye(e,{isUserDwelling:!0});case re.FETCH_ABORTED:case re.ABANDON_END:return t.token!==e.activeToken||e.isUserDwelling?e:ye(e,{activeLink:void 0,previewType:void 0,activeToken:void 0,measures:void 0,fetchResponse:void 0,shouldShow:!1});case re.PREVIEW_DWELL:return ye(e,{isUserDwelling:!0});case re.ABANDON_START:return ye(e,{isUserDwelling:!1,wasClicked:!1});case re.FETCH_START:return ye(e,{fetchResponse:void 0,promise:t.promise});case re.FETCH_COMPLETE:if(t.token===e.activeToken)return ye(e,{fetchResponse:t.result,shouldShow:e.isUserDwelling});default:return e}},settings:function(e,t){switch(void 0===e&&(e={shouldShow:!1,showHelp:!1,shouldShowFooterLink:!1}),t.type){case re.SETTINGS_SHOW:return ye(e,{shouldShow:!0,showHelp:!1});case re.SETTINGS_HIDE:return ye(e,{shouldShow:!1,showHelp:!1});case re.SETTINGS_CHANGE:var n=Object.keys(t.newValue),r=n.every((function(e){return t.oldValue[e]===t.newValue[e]})),i=n.some((function(e){return t.oldValue[e]&&!t.newValue[e]})),o=n.some((function(e){return!1===t.newValue[e]}));return ye(e,r?{shouldShow:!1}:{shouldShow:i,showHelp:i,shouldShowFooterLink:o});case re.BOOT:var a=Object.keys(t.initiallyEnabled).some((function(e){return!1===t.initiallyEnabled[e]}));return ye(e,{shouldShowFooterLink:t.user.isAnon&&a});default:return e}},statsv:function(e,t){switch(e=e||{},t.type){case re.FETCH_START:return ye(e,{fetchStartedAt:t.timestamp});case re.FETCH_END:return ye(e,{action:"timing.PagePreviewsApiResponse",data:t.timestamp-e.fetchStartedAt});case re.FETCH_FAILED:return ye(e,{action:"counter.PagePreviewsApiFailure",data:1});case re.LINK_DWELL:return ye(e,{linkDwellStartedAt:t.timestamp});case re.PREVIEW_SHOW:return ye(e,{action:"timing.PagePreviewsPreviewShow",data:t.timestamp-e.linkDwellStartedAt});case re.STATSV_LOGGED:return ye(e,{action:null,data:null});default:return e}}},xe=[".extiw",".image",".new",".internal",".external",".mw-cite-backlink a",".oo-ui-buttonedElement-button",".ve-ce-surface a",".cancelLink a"];!function(n){var i,a;i=mw.config,a=parseInt(i.get("wgPopupsFlags"),10),i.set("wgPopupsConflictsWithNavPopupGadget",!!(1&a)),i.set("wgPopupsConflictsWithRefTooltipsGadget",!!(2&a)),i.set("wgPopupsReferencePreviews",!!(4&a)),i.set("wgPopupsReferencePreviewsBetaFeature",!!(8&a));var c,p,d=r.compose,h=mw.user.generateRandomSessionId,v=function(e){var t=$.extend({},s,{acceptLanguage:e.get("wgPageContentLanguage")}),n=$.extend({},t,{endpoint:e.get("wgPopupsRestGatewayEndpoint")});switch(e.get("wgPopupsGateway")){case"mwApiPlain":return function(e,t){function n(n){return e.get({action:"query",prop:"info|extracts|pageimages|revisions|info",formatversion:2,redirects:!0,exintro:mw.config.get("wgPopupsTextExtractsIntroOnly",!0),exchars:t.EXTRACT_LENGTH,explaintext:!0,exsectionformat:"plain",piprop:"thumbnail",pithumbsize:t.THUMBNAIL_SIZE,pilicense:"any",rvprop:"timestamp",inprop:"url",titles:n,smaxage:300,maxage:300,uselang:"content"},{headers:{"X-Analytics":"preview=1","Accept-Language":t.acceptLanguage}})}return{fetch:n,extractPageFromResponse:f,convertPageToModel:m,fetchPreviewForTitle:function(e){var t=n(e.getPrefixedDb());return t.then((function(e){return m(w(f(e)))})).promise({abort:function(){t.abort()}})},formatPlainTextExtract:w}}(new mw.Api,t);case"restbasePlain":return g($.ajax,n,T);case"restbaseHTML":return g($.ajax,n,E);default:throw new Error("Unknown gateway")}}(mw.config),P=function(){function e(e){var t=["book","journal","news","note","web"],n=null;return e.find("cite[class]").each((function(e,r){for(var i=r.className.split(/\s+/),o=i.length;o--;)if(-1!==t.indexOf(i[o]))return n=i[o],!1})),n}return{fetchPreviewForTitle:function(t,n){var r=t.getFragment().replace(/ /g,"_"),i=function(e){var t="#".concat($.escapeSelector(e));return $("".concat(t," .mw-reference-text, ").concat(t," .reference-text"))}(r);if(!i.length||!i.text().trim()&&!i.children().length)return $.Deferred().reject("Footnote not found or empty",{textStatus:"abort",xhr:{readyState:0}}).promise({abort:function(){}});var o={url:"#".concat(r),extract:i.html(),type:u.TYPE_REFERENCE,referenceType:e(i),sourceElementId:n.parentNode.id};return $.Deferred().resolve(o).promise({abort:function(){}})}}}(),x=(p=mw.storage,{isPagePreviewsEnabled:function(){return"0"!==p.get(b)},storePagePreviewsEnabled:function(e){e?p.remove(b):p.set(b,"0")},isReferencePreviewsEnabled:function(){return"0"!==p.get(y)},storeReferencePreviewsEnabled:function(e){e?p.remove(y):p.set(y,"0"),mw.track("event.ReferencePreviewsPopups",{action:e?"anonymousEnabled":"anonymousDisabled"})}}),_=function(e,t,n){return n.get("wgPopupsReferencePreviews")?n.get("wgPopupsConflictsWithRefTooltipsGadget")||"minerva"===n.get("skin")?null:e.isAnon()?t.isReferencePreviewsEnabled():!!n.get("wgPopupsReferencePreviews")||"1"===mw.user.options.get("popups-reference-previews")||null:null}(mw.user,x,mw.config),A=S(null!==_),C=(c=mw.experiments,{weightedBoolean:function(e,t,n){return"true"===c.getBucket({enabled:!0,name:e,buckets:{true:t,false:1-t}},n)}}),O=function(e,t,n){return function(e,t,n){var r=t.get("wgPopupsStatsvSamplingRate",0);return n.weightedBoolean("ext.Popups.statsv",r,e.sessionId())}(e,t,n)?mw.track:function(){}}(mw.user,mw.config,C),R=mw.config.get("wgPopupsVirtualPageViews")?mw.track:function(){},L=(t(n={},u.TYPE_PAGE,function(e,t,n){return mw.config.get("wgPopupsConflictsWithNavPopupGadget")?null:e.isAnon()?t.isPagePreviewsEnabled():"1"===mw.user.options.get("popups")||null}(mw.user,x)),t(n,u.TYPE_REFERENCE,_),n);mw.config.get("debug")&&(d=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||d);var D=r.createStore(r.combineReducers(Pe),d(r.applyMiddleware(o()))),H=r.bindActionCreators(e,D.dispatch),G=function(e,t){var n,r=function(){};return e.isAnon()?r=function(e){e.preventDefault(),t.showSettings()}:n=mw.Title.newFromText("Special:Preferences#mw-prefsection-rendering").getUrl(),{settingsUrl:n,showSettings:r,previewDwell:t.previewDwell,previewAbandon:t.abandon,previewShow:t.previewShow,click:t.linkClick}}(mw.user,H);!function(e,t,n,r,i,o,a){I(e,z(t)),I(e,Z()),I(e,Q(i)),I(e,te(t,o)),I(e,ne(n)),I(e,ee(t,r)),I(e,J(t,a))}(D,H,x,A,G,O,R),H.boot(L,mw.user,x,mw.config,window.location.href),mw.popups=function(e){return{isEnabled:function(){return e.getState().preview.enabled[u.TYPE_PAGE]}}}(D);var F,j=[];if(null!==L[u.TYPE_PAGE]){var Y=xe.join(", ");j.push("#mw-content-text a[href][title]:not(".concat(Y,")"))}if(null!==L[u.TYPE_REFERENCE]&&j.push('#mw-content-text .reference a[ href*="#" ]'),j.length){var W=j.join(", ");U()||(F=document.body,$("
    ").attr("id","mwe-popups-svg").html(N()).appendTo(F)),$(document).on("mouseover keyup",W,(function(e){var t=k(this,mw.config);if(t){var n,r=l(this,mw.config,t);switch(r){case u.TYPE_PAGE:n=v;break;case u.TYPE_REFERENCE:n=P;break;default:return}var i=$(this),o=$(window),a={pageX:e.pageX,pageY:e.pageY,clientY:e.clientY,width:i.width(),height:i.height(),offset:i.offset(),clientRects:this.getClientRects(),windowWidth:o.width(),windowHeight:o.height(),scrollTop:o.scrollTop()};H.linkDwell(t,this,a,n,h,r)}})).on("mouseout blur",W,(function(){k(this,mw.config)&&H.abandon()})).on("click",W,(function(){var e=k(this,mw.config);e&&u.TYPE_PAGE===l(this,mw.config,e)&&H.linkClick(this)}))}else mw.log.warn("ext.popups was loaded but everything is disabled")}(),window.Redux=r,window.ReduxThunk=i}()}(); //# sourceMappingURL=index.js.map.json