{"version":3,"sources":["/w/extensions/Popups/webpack/bootstrap","/w/extensions/Popups/./node_modules/redux-thunk/dist/redux-thunk.min.js","/w/extensions/Popups/./node_modules/redux/dist/redux.min.js","/w/extensions/Popups/(webpack)/buildin/global.js","/w/extensions/Popups/(webpack)/buildin/module.js","/w/extensions/Popups/./src/counts.js","/w/extensions/Popups/./src/constants.js","/w/extensions/Popups/./src/bracketedPixelRatio.js","/w/extensions/Popups/./src/preview/model.js","/w/extensions/Popups/./src/formatter.js","/w/extensions/Popups/./src/gateway/mediawiki.js","/w/extensions/Popups/./src/gateway/rest.js","/w/extensions/Popups/./src/gateway/restFormatters.js","/w/extensions/Popups/./src/gateway/page.js","/w/extensions/Popups/./src/gateway/reference.js","/w/extensions/Popups/./src/userSettings.js","/w/extensions/Popups/./src/ui/templates/templateUtil.js","/w/extensions/Popups/./src/ui/templates/settingsDialog/settingsDialog.js","/w/extensions/Popups/./src/ui/settingsDialogRenderer.js","/w/extensions/Popups/./src/ui/settingsDialog.js","/w/extensions/Popups/./src/changeListener.js","/w/extensions/Popups/./src/title.js","/w/extensions/Popups/./src/wait.js","/w/extensions/Popups/./src/ui/thumbnail.js","/w/extensions/Popups/./src/ui/templates/popup/popup.js","/w/extensions/Popups/./src/ui/templates/preview/preview.js","/w/extensions/Popups/./src/ui/templates/referencePreview/referencePreview.js","/w/extensions/Popups/./src/ui/templates/pagePreview/pagePreview.js","/w/extensions/Popups/./src/ui/renderer.js","/w/extensions/Popups/./src/changeListeners/syncUserSettings.js","/w/extensions/Popups/./src/changeListeners/index.js","/w/extensions/Popups/./src/changeListeners/footerLink.js","/w/extensions/Popups/./src/changeListeners/eventLogging.js","/w/extensions/Popups/./src/changeListeners/linkTitle.js","/w/extensions/Popups/./src/changeListeners/pageviews.js","/w/extensions/Popups/./src/changeListeners/render.js","/w/extensions/Popups/./src/changeListeners/settings.js","/w/extensions/Popups/./src/changeListeners/statsv.js","/w/extensions/Popups/./src/actionTypes.js","/w/extensions/Popups/./src/actions.js","/w/extensions/Popups/./src/reducers/nextState.js","/w/extensions/Popups/./src/reducers/eventLogging.js","/w/extensions/Popups/./src/reducers/index.js","/w/extensions/Popups/./src/reducers/pageviews.js","/w/extensions/Popups/./src/reducers/preview.js","/w/extensions/Popups/./src/reducers/settings.js","/w/extensions/Popups/./src/reducers/statsv.js","/w/extensions/Popups/./src/getPageviewTracker.js","/w/extensions/Popups/./src/isReferencePreviewsEnabled.js","/w/extensions/Popups/./src/setUserConfigFlags.js","/w/extensions/Popups/./src/index.js","/w/extensions/Popups/./src/experiments.js","/w/extensions/Popups/./src/instrumentation/statsv.js","/w/extensions/Popups/./src/instrumentation/eventLogging.js","/w/extensions/Popups/./src/isPagePreviewsEnabled.js","/w/extensions/Popups/./src/previewBehavior.js","/w/extensions/Popups/./src/integrations/mwpopups.js","/w/extensions/Popups/./src/ui/pointer-mask.svg"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","e","id","loaded","dispatch","getState","withExtraArgument","default","global","observable","self","window","Math","random","toString","substring","split","join","INIT","REPLACE","PROBE_UNKNOWN_ACTION","type","apply","this","arguments","u","configurable","writable","a","length","Array","reduce","createStore","Error","f","slice","h","push","indexOf","splice","y","getPrototypeOf","subscribe","replaceReducer","TypeError","next","unsubscribe","combineReducers","keys","forEach","bindActionCreators","applyMiddleware","map","getOwnPropertySymbols","concat","filter","getOwnPropertyDescriptor","compose","__DO_NOT_USE__ActionTypes","g","Function","webpackPolyfill","deprecate","paths","children","getEditCountBucket","count","bucket","getPreviewCountBucket","undefined","bpr","dpr","devicePixelRatio","bracketedPixelRatio","constants","BRACKETED_DEVICE_PIXEL_RATIO","THUMBNAIL_SIZE","max","EXTRACT_LENGTH","previewTypes","TYPE_GENERIC","TYPE_PAGE","TYPE_DISAMBIGUATION","TYPE_REFERENCE","createModel","title","url","languageCode","languageDirection","extract","thumbnail","pageId","processedExtract","processExtract","getPagePreviewType","createNullModel","getPreviewType","el","config","getNamespaceId","getMainText","isSelfLink","getFragment","$","parent","hasClass","formatPlainTextExtract","plainTextExtract","elements","boldIdentifier","snip","replace","trim","escapedTitle","mw","util","escapeRegExp","regExp","RegExp","part","text","document","createTextNode","makeTitleInExtractBold","CACHE_LIFETIME","extractPageFromResponse","data","query","pages","result","extend","formatter","convertPageToModel","page","canonicalurl","pagelanguagehtmlcode","pagelanguagedir","pageid","RESTBASE_PROFILE","createRESTBaseGateway","ajax","extractParser","fetch","endpoint","encodeURIComponent","headers","Accept","Accept-Language","acceptLanguage","fetchPreviewForTitle","titleText","getPrefixedDb","xhr","then","catch","jqXHR","textStatus","errorThrown","Deferred","reject","exception","promise","abort","generateThumbnailData","original","thumbSize","parts","source","lastPart","originalIsSafe","filename","test","isSafeImgFormat","filenamePxIndex","width","height","substr","floor","Title","getUrl","lang","dir","originalimage","parseHTMLResponse","extract_html","parseHTML","parsePlainTextResponse","createPagePreviewGateway","gatewayConfig","restConfig","api","action","prop","formatversion","redirects","exintro","exchars","explaintext","exsectionformat","piprop","pithumbsize","pilicense","rvprop","inprop","titles","smaxage","maxage","uselang","X-Analytics","createMediaWikiApiGateway","Api","formatters","createReferenceGateway","scrapeReferenceType","$referenceText","KNOWN_TYPES","find","each","index","element","classNames","className","idSelector","escapeSelector","scrapeReferenceText","readyState","model","html","referenceType","sourceElementId","parentNode","resolve","PAGE_PREVIEWS_ENABLED_KEY","REFERENCE_PREVIEWS_ENABLED_KEY","REFERENCE_PREVIEWS_LOGGING_SCHEMA","PREVIEW_COUNT_KEY","escapeHTML","str","escape","templates","createNodeFromTemplate","div","createElement","innerHTML","firstElementChild","cloneNode","renderSettingsDialog","heading","saveLabel","closeLabel","helpText","okLabel","choices","_ref","description","isChecked","escapeChoices","_ref2","createSettingsDialogRenderer","$dialog","$overlay","boundActions","msg","addClass","on","enabled","is","saveSettings","hideSettings","appendTo","show","hide","toggleHelp","visible","$el","setEnabled","registerChangeListener","store","callback","previousState","state","fromElement","hash","host","location","pathname","search","isOwnPageAnchorLink","newFromText","decodeURIComponent","contentNamespaces","mwTitle","namespace","isValid","href","linkHref","Uri","hostname","queryLength","pattern","matches","exec","path","fragment","getTitle","wait","delay","deferred","setTimeout","SIZES","portraitImage","w","landscapeImage","createThumbnail","rawThumbnail","useCSSClipPath","x","tall","thumbWidth","thumbHeight","img","isNarrow","src","thumbnailWidth","thumbnailHeight","nsSvg","line","createElementNS","points","setAttribute","$thumbnailSVGImage","setAttributeNS","attr","$thumbnail","xmlns","append","createThumbnailSVG","isTall","offset","templateHTML","renderPopup","container","appendChild","renderPreview","showTitle","extractMsg","linkMsg","$popup","remove","LOGGING_SCHEMA","isTracking","renderReferencePreview","titleMsg","message","exists","replaceWith","target","rel","removeClass","tabindex","track","scrolledToBottom","scrollTop","scrollHeight","clientHeight","isOpenRecorded","scrollbarsPresent","isScrollRecorded","isScrolling","$extract","hasHorizontalScroll","scrollWidth","clientWidth","scrollbarHeight","offsetHeight","hasVerticalScroll","scrollbarWidth","offsetWidth","css","bottom","right","toggleClass","navigator","sendBeacon","defaultExtractWidth","renderPagePreview","withCSSClipPath","linkTitle","extractWidth","getExtractWidth","landscapePopupWidth","portraitPopupWidth","pointerSize","maxLinkWidthForCenteredPointer","init","supportsCSSClipPath","body","pointerMaskSVG","render","preview","hasThumbnail","createPagePreview","createDisambiguationPreview","createReferencePreview","createEmptyPreview","createPreviewWithType","event","token","measures","$link","behavior","layout","isPreviewTall","pointerSpaceSize","offsetLeft","flippedX","flippedY","offsetTop","pageY","getClosestYPosition","clientRects","top","clientTop","clientY","pageX","left","windowWidth","windowHeight","createLayout","classes","predefinedLandscapeImageHeight","popup","maskID","getThumbnailClipPathID","matrix","scaleX","translateX","min","mask","getElementById","setThumbnailClipPath","layoutPreview","getClasses","first","trigger","previewDwell","previewAbandon","click","settingsUrl","stopPropagation","showSettings","bindBehavior","previewShow","documentElement","getAttribute","fadeInClass","fadeOutClass","CSS","supports","rects","isTop","minY","rect","deltaY","abs","ceil","syncIfChanged","oldState","newState","sync","current","changeListeners","footerLink","$footerLink","$footer","createFooterLink","preventDefault","settings","shouldShowFooterLink","eventLogging","eventLoggingTracker","getCurrentTimestamp","eventLoggingObj","baseData","timestamp","eventLogged","hasPrevActiveLink","activeLink","previewType","destroyTitleAttr","pageviews","pageviewTracker","pageview","source_page_id","source_namespace","namespaceId","source_title","source_url","pageviewLogged","previewBehavior","shouldShow","renderer","fetchResponse","activeToken","settingsObj","showHelp","statsv","statsvObj","statsvLogged","syncUserSettings","userSettings","storePreviewCount","storePagePreviewsEnabled","storeReferencePreviewsEnabled","actionTypes","BOOT","LINK_DWELL","ABANDON_START","ABANDON_END","LINK_CLICK","FETCH_START","FETCH_END","FETCH_COMPLETE","FETCH_FAILED","FETCH_ABORTED","PAGEVIEW_LOGGED","PREVIEW_DWELL","PREVIEW_SHOW","PREVIEW_CLICK","PREVIEW_SEEN","SETTINGS_SHOW","SETTINGS_HIDE","SETTINGS_CHANGE","EVENT_LOGGED","STATSV_LOGGED","FETCH_START_DELAY","PREVIEW_SEEN_DURATION","FETCH_COMPLETE_TARGET_DELAY","FETCH_DELAY_REFERENCE_TYPE","ABANDON_END_DELAY","timedAction","baseAction","now","boot","initiallyEnabled","user","editCount","previewCount","getPreviewCount","types","isNavPopupsEnabled","sessionToken","sessionId","pageToken","getPageviewToken","isAnon","gateway","chain","err","fetchType","when","getDwellDelay","ex","showNullPreview","linkDwell","generateToken","isNewInteraction","abandon","_getState$preview","linkClick","currentToken","validType","oldValue","newValue","nextState","updates","obj","hasOwn","constructor","clone","createEvent","interaction","actionData","linkInteractionToken","pageTitleHover","namespaceIdHover","timeToPreviewShow","perceivedWait","createClosingEvent","totalInteractionTime","round","finished","started","finalized","reducers","nextCount","bootAction","pageTitleSource","namespaceIdSource","pageIdSource","popupEnabled","previewCountBucket","counts","hovercardsSuppressedByGadget","editCountBucket","link","isUserDwelling","page_title","page_id","page_namespace","wasClicked","allEnabled","every","fetchStartedAt","linkDwellStartedAt","prepareEventData","eventData","sourceUrl","maxLength","truncatedUrl","char","getPageviewTracker","loader","trackerGetter","topic","word","schema","toUpperCase","evLog","payload","prepare","makeBeaconUrl","isReferencePreviewsEnabled","NAV_POPUPS_ENABLED","REF_TOOLTIPS_ENABLED","REFERENCE_PREVIEWS_ENABLED","REFERENCE_PREVIEWS_BETA","EXCLUDED_LINK_SELECTORS","performance","_boundActions$boot","popupsFlags","parseInt","set","navigatorObj","mwExperiments","storage","Redux","generateRandomSessionId","pagePreviewGateway","referenceGateway","isPagePreviewsEnabled","isNaN","settingsDialog","experiments","weightedBoolean","trueWeight","getBucket","buckets","true","false","statsvTracker","bucketingRate","isStatsvEnabled","getStatsvTracker","using","eventLog","isEventLoggingEnabled","getEventLoggingTracker","createIsPagePreviewsEnabled","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","ReduxThunk","actions","createPreviewBehavior","registerActions","callbackCurrentTimestamp","registerChangeListeners","src_defineProperty","popups","isEnabled","createMediaWikiPopupsObject","selectors","options","excludedLinksSelector","validLinkSelector","rendererInit","titleFromElement","$target","$window","getClientRects","log","error"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eA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,iBAClBtQ,YAAaqQ,EAAQjgB,QACrB6P,aAAcoQ,EAAQhgB,SACtB2L,UAAWqU,EAAQrU,aAGpBrG,EAAa+S,UAAWjR,EAAS5Q,KAAMiY,EAAUoJ,EAASS,EAAehiB,MAEzEmP,GAAI,gBAAiBma,EAAmB,WACxBE,EAAkBtpB,KAAM2F,GAAGhB,SAG1CmK,EAAakT,YAGd/S,GAAI,QAASma,EAAmB,WAChC,IAAMxY,EAAU0Y,EAAkBtpB,KAAM2F,GAAGhB,QACtCiM,GACCpN,EAAaE,YAAce,EAAgBzE,KAAM2F,GAAGhB,OAAQiM,IAChE9B,EAAaoT,UAAWliB,aA3D3B2F,GAAG+jB,IAAIC,MAAO,yCA5Ed,GA6IFvqB,OAAO2nB,MAAQA,EACf3nB,OAAOmpB,WAAaA,6COhTpB9rB,EAAAD,QAAA","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?exports.ReduxThunk=e():t.ReduxThunk=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return t[o].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p=\"\",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e){\"use strict\";function n(t){return function(e){var n=e.dispatch,o=e.getState;return function(e){return function(r){return\"function\"==typeof r?r(n,o,t):e(r)}}}}e.__esModule=!0;var o=n();o.withExtraArgument=n,e.default=o}])});","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],t):t(e.Redux={})}(this,function(e){\"use strict\";var t=function(e){var t,r=e.Symbol;return\"function\"==typeof r?r.observable?t=r.observable:(t=r(\"observable\"),r.observable=t):t=\"@@observable\",t}(\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof module?module:Function(\"return this\")()),r=function(){return Math.random().toString(36).substring(7).split(\"\").join(\".\")},n={INIT:\"@@redux/INIT\"+r(),REPLACE:\"@@redux/REPLACE\"+r(),PROBE_UNKNOWN_ACTION:function(){return\"@@redux/PROBE_UNKNOWN_ACTION\"+r()}};function o(e,t){var r=t&&t.type;return\"Given \"+(r&&'action \"'+r+'\"'||\"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 i(e,t){return function(){return t(e.apply(this,arguments))}}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];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))}})}e.createStore=function e(r,o,i){var u;if(\"function\"==typeof o&&\"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 o&&void 0===i&&(i=o,o=void 0),void 0!==i){if(\"function\"!=typeof i)throw Error(\"Expected the enhancer to be a function.\");return i(e)(r,o)}if(\"function\"!=typeof r)throw Error(\"Expected the reducer to be a function.\");var a=r,c=o,f=[],s=f,d=!1;function l(){s===f&&(s=f.slice())}function p(){if(d)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 c}function h(e){if(\"function\"!=typeof e)throw Error(\"Expected the listener to be a function.\");if(d)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 l(),s.push(e),function(){if(t){if(d)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,l();var r=s.indexOf(e);s.splice(r,1)}}}function y(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(d)throw Error(\"Reducers may not dispatch actions.\");try{d=!0,c=a(c,e)}finally{d=!1}for(var t=f=s,r=0;t.length>r;r++)(0,t[r])();return e}return y({type:n.INIT}),(u={dispatch:y,subscribe:h,getState:p,replaceReducer:function(e){if(\"function\"!=typeof e)throw Error(\"Expected the nextReducer to be a function.\");a=e,y({type:n.REPLACE})}})[t]=function(){var e,r=h;return(e={subscribe:function(e){if(\"object\"!=typeof e||null===e)throw new TypeError(\"Expected the observer to be an object.\");function t(){e.next&&e.next(p())}return t(),{unsubscribe:r(t)}}})[t]=function(){return this},e},u},e.combineReducers=function(e){for(var t=Object.keys(e),r={},i=0;t.length>i;i++){var u=t[i];\"function\"==typeof e[u]&&(r[u]=e[u])}var a,c=Object.keys(r);try{!function(e){Object.keys(e).forEach(function(t){var r=e[t];if(void 0===r(void 0,{type:n.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===r(void 0,{type:n.PROBE_UNKNOWN_ACTION()}))throw Error('Reducer \"'+t+\"\\\" returned undefined when probed with a random type. Don't try to handle \"+n.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.')})}(r)}catch(e){a=e}return function(e,t){if(void 0===e&&(e={}),a)throw a;for(var n=!1,i={},u=0;c.length>u;u++){var f=c[u],s=e[f],d=(0,r[f])(s,t);if(void 0===d){var l=o(f,t);throw Error(l)}i[f]=d,n=n||d!==s}return n?i:e}},e.bindActionCreators=function(e,t){if(\"function\"==typeof e)return i(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 r=Object.keys(e),n={},o=0;r.length>o;o++){var u=r[o],a=e[u];\"function\"==typeof a&&(n[u]=i(a,t))}return n},e.applyMiddleware=function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return function(e){return function(){var r=e.apply(void 0,arguments),n=function(){throw Error(\"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.\")},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=t.map(function(e){return e(o)});return function(e){for(var t=1;arguments.length>t;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);\"function\"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){u(e,t,r[t])})}return e}({},r,{dispatch:n=a.apply(void 0,i)(r.dispatch)})}}},e.compose=a,e.__DO_NOT_USE__ActionTypes=n,Object.defineProperty(e,\"__esModule\",{value:!0})});\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","/**\n * @module counts\n */\n\n/**\n * Gets the count bucket for the number of edits a user has made.\n *\n * The buckets are defined as part of\n * [the Popups schema](https://meta.wikimedia.org/wiki/Schema:Popups).\n *\n * Extracted from `mw.popups.schemaPopups.getEditCountBucket`.\n *\n * @param {number} count\n * @return {string}\n */\nexports.getEditCountBucket = function getEditCountBucket( count ) {\n\tlet bucket;\n\n\tif ( count === 0 ) {\n\t\tbucket = '0';\n\t} else if ( count >= 1 && count <= 4 ) {\n\t\tbucket = '1-4';\n\t} else if ( count >= 5 && count <= 99 ) {\n\t\tbucket = '5-99';\n\t} else if ( count >= 100 && count <= 999 ) {\n\t\tbucket = '100-999';\n\t} else if ( count >= 1000 ) {\n\t\tbucket = '1000+';\n\t}\n\n\treturn `${bucket} edits`;\n};\n\n/**\n * Gets the count bucket for the number of previews a user has seen.\n *\n * If local storage isn't available - because the user has disabled it\n * or the browser doesn't support it - then \"unknown\" is returned.\n *\n * The buckets are defined as part of\n * [the Popups schema](https://meta.wikimedia.org/wiki/Schema:Popups).\n *\n * Extracted from `mw.popups.getPreviewCountBucket`.\n *\n * @param {number|null|string|boolean} [count]\n * @return {string}\n */\nexports.getPreviewCountBucket = function getPreviewCountBucket( count ) {\n\tlet bucket;\n\n\tif ( count === 0 ) {\n\t\tbucket = '0';\n\t} else if ( count >= 1 && count <= 4 ) {\n\t\tbucket = '1-4';\n\t} else if ( count >= 5 && count <= 20 ) {\n\t\tbucket = '5-20';\n\t} else if ( count >= 21 ) {\n\t\tbucket = '21+';\n\t}\n\n\treturn bucket !== undefined ? ( `${bucket} previews` ) : 'unknown';\n};\n","import bracketedPixelRatio from './bracketedPixelRatio';\n\nconst bpr = bracketedPixelRatio();\n\nexport default {\n\tBRACKETED_DEVICE_PIXEL_RATIO: bpr,\n\t// See https://phabricator.wikimedia.org/T272169: requesting a larger thumbnail to avoid bluriness\n\tTHUMBNAIL_SIZE: 320 * Math.max( bpr, 1.5 ),\n\tEXTRACT_LENGTH: 525\n};\n","/**\n * @module bracketedPixelRatio\n */\n\n/**\n * Normalizes a user's device pixel ratio to either 1, 1.5, or 2.\n *\n * This is important when the server resizes images on the fly in order to\n * reduce the work it has to do for device pixel ratios that deviate from a\n * set of common ratios.\n *\n * Adapted from mediawiki/core /resources/src/jquery/jquery.hidpi.js\n *\n * @param {number} [dpr=window.devicePixelRatio]\n * @return {number} The bracketed device pixel ratio\n */\nexport default function ( dpr = window.devicePixelRatio ) {\n\tif ( !dpr ) {\n\t\t// Probably legacy browser so assume 1\n\t\treturn 1;\n\t}\n\n\tif ( dpr > 1.5 ) {\n\t\treturn 2;\n\t}\n\n\tif ( dpr > 1 ) {\n\t\treturn 1.5;\n\t}\n\n\treturn 1;\n}\n","/**\n * @module preview/model\n */\n\n/**\n * Page Preview types as defined in Schema:Popups\n * https://meta.wikimedia.org/wiki/Schema:Popups\n *\n * @constant {Object}\n */\nconst previewTypes = {\n\t/** Empty preview used in error situations */\n\tTYPE_GENERIC: 'generic',\n\t/** Standard page preview with or without thumbnail */\n\tTYPE_PAGE: 'page',\n\t/** Disambiguation page preview */\n\tTYPE_DISAMBIGUATION: 'disambiguation',\n\t/** Reference preview **/\n\tTYPE_REFERENCE: 'reference'\n};\n\nexport { previewTypes };\n\n/**\n * Preview Model\n *\n * @typedef {Object} PreviewModel\n * @property {string} url The canonical URL of the page being previewed\n * @property {string} type One of the previewTypes.TYPE_… constants.\n *\n * @global\n */\n\n/**\n * @typedef {Object} PagePreviewModel\n * @extends PreviewModel\n * @property {string} title\n * @property {Array|undefined} extract `undefined` if the extract isn't\n * viable, e.g. if it's empty after having ellipsis and parentheticals\n * removed; this can be used to present default or error states\n * @property {string} languageCode\n * @property {string} languageDirection Either \"ltr\" or \"rtl\", or an empty string if undefined.\n * @property {{source: string, width: number, height: number}|undefined} thumbnail\n * @property {number} pageId Currently not used by any known popup type.\n *\n * @global\n */\n\n/**\n * @typedef {Object} ReferencePreviewModel\n * @extends PreviewModel\n * @property {string} extract An HTML snippet, not necessarily with a single top-level node\n * @property {string} referenceType A type identifier, e.g. \"web\"\n * @property {string} sourceElementId ID of the parent element that triggered the preview\n *\n * @global\n */\n\n/**\n * Creates a page preview model.\n *\n * @param {string} title\n * @param {string} url The canonical URL of the page being previewed\n * @param {string} languageCode\n * @param {string} languageDirection Either \"ltr\" or \"rtl\"\n * @param {Array|undefined|null} extract\n * @param {string} type\n * @param {{source: string, width: number, height: number}|undefined} [thumbnail]\n * @param {number} [pageId]\n * @return {PagePreviewModel}\n */\nexport function createModel(\n\ttitle,\n\turl,\n\tlanguageCode,\n\tlanguageDirection,\n\textract,\n\ttype,\n\tthumbnail,\n\tpageId\n) {\n\tconst processedExtract = processExtract( extract ),\n\t\tpreviewType = getPagePreviewType( type, processedExtract );\n\n\treturn {\n\t\ttitle,\n\t\turl,\n\t\tlanguageCode,\n\t\tlanguageDirection,\n\t\textract: processedExtract,\n\t\ttype: previewType,\n\t\tthumbnail,\n\t\tpageId\n\t};\n}\n\n/**\n * Creates an empty page preview model.\n *\n * @param {string} title\n * @param {string} url\n * @return {PagePreviewModel}\n */\nexport function createNullModel( title, url ) {\n\treturn createModel( title, url, '', '', [], '' );\n}\n\n/**\n * Determines the applicable popup type based on title and link element.\n *\n * @param {Element} el\n * @param {mw.Map} config\n * @param {mw.Title} title\n * @return {string|null} One of the previewTypes.TYPE_… constants\n */\nexport function getPreviewType( el, config, title ) {\n\tif ( !isSelfLink( title, config ) ) {\n\t\treturn previewTypes.TYPE_PAGE;\n\t}\n\n\t// The other selector can potentially pick up self-links with a class=\"reference\"\n\t// parent, but no fragment\n\tif ( title.getFragment() &&\n\t\tconfig.get( 'wgPopupsReferencePreviews' ) &&\n\t\t// eslint-disable-next-line no-jquery/no-class-state\n\t\t$( el ).parent().hasClass( 'reference' )\n\t) {\n\t\treturn previewTypes.TYPE_REFERENCE;\n\t}\n\n\treturn null;\n}\n\n/**\n * @param {mw.Title} title\n * @param {mw.Map} config\n * @return {boolean} True when the link points to the current page.\n */\nfunction isSelfLink( title, config ) {\n\treturn title.getNamespaceId() === config.get( 'wgNamespaceNumber' ) &&\n\t\ttitle.getMainText() === config.get( 'wgTitle' );\n}\n\n/**\n * Processes the extract returned by the TextExtracts MediaWiki API query\n * module.\n *\n * If the extract is `undefined`, `null`, or empty, then `undefined` is\n * returned.\n *\n * @param {Array|undefined|null} extract\n * @return {Array|undefined} Array when extract is an not empty array, undefined\n * otherwise\n */\nfunction processExtract( extract ) {\n\tif ( extract === undefined || extract === null || extract.length === 0 ) {\n\t\treturn undefined;\n\t}\n\treturn extract;\n}\n\n/**\n * Determines the page preview type based on whether or not:\n * a. Is the preview empty.\n * b. The preview type matches one of previewTypes.\n * c. Assume standard page preview if both above are false\n *\n * @param {string} type\n * @param {Array|undefined} [processedExtract]\n * @return {string} One of the previewTypes.TYPE_… constants.\n */\n\nfunction getPagePreviewType( type, processedExtract ) {\n\tif ( processedExtract === undefined ) {\n\t\treturn previewTypes.TYPE_GENERIC;\n\t}\n\n\tswitch ( type ) {\n\t\tcase previewTypes.TYPE_GENERIC:\n\t\tcase previewTypes.TYPE_DISAMBIGUATION:\n\t\tcase previewTypes.TYPE_PAGE:\n\t\t\treturn type;\n\t\tdefault:\n\t\t\t/**\n\t\t\t * Assume type=\"page\" if extract exists & not one of previewTypes.\n\t\t\t * Note:\n\t\t\t * - Restbase response includes \"type\" prop but other gateways don't.\n\t\t\t * - event-logging Schema:Popups requires type=\"page\" but restbase\n\t\t\t * provides type=\"standard\". Model must conform to event-logging schema.\n\t\t\t */\n\t\t\treturn previewTypes.TYPE_PAGE;\n\t}\n}\n","/**\n * Improves the plain text extracts\n *\n * @param {string} plainTextExtract\n * @param {string} title\n * @return {Array}\n */\nexport function formatPlainTextExtract( plainTextExtract, title ) {\n\tlet extract = plainTextExtract;\n\tif ( plainTextExtract === undefined ) {\n\t\treturn [];\n\t}\n\n\t// After cleaning the extract it may have been blanked\n\tif ( extract.length === 0 ) {\n\t\treturn [];\n\t}\n\n\textract = makeTitleInExtractBold( extract, title );\n\treturn extract;\n}\n\n/**\n * Converts the extract into a list of elements, which correspond to fragments\n * of the extract. Fragments that match the title verbatim are wrapped in a\n * `` element.\n *\n * Using the bolded elements of the extract of the page directly is covered by\n * [T141651](https://phabricator.wikimedia.org/T141651).\n *\n * Extracted from `mw.popups.renderer.article.getProcessedElements`.\n *\n * @param {string} extract\n * @param {string} title\n * @return {Array} A set of HTML Elements\n */\nfunction makeTitleInExtractBold( extract, title ) {\n\tconst elements = [],\n\t\tboldIdentifier = ``,\n\t\tsnip = ``;\n\n\ttitle = title.replace( /\\s+/g, ' ' ).trim(); // Remove extra white spaces\n\tconst escapedTitle = mw.util.escapeRegExp( title );\n\tconst regExp = new RegExp( `(^|\\\\s)(${escapedTitle})(|$)`, 'i' );\n\n\t// Remove text in parentheses along with the parentheses\n\textract = extract.replace( /\\s+/, ' ' ); // Remove extra white spaces\n\n\t// Make title bold in the extract text\n\t// As the extract is html escaped there can be no such string in it\n\t// Also, the title is escaped of RegExp elements thus can't have \"*\"\n\textract = extract.replace(\n\t\tregExp,\n\t\t`$1${snip}${boldIdentifier}$2${snip}$3`\n\t);\n\textract = extract.split( snip );\n\n\textract.forEach( ( part ) => {\n\t\tif ( part.indexOf( boldIdentifier ) === 0 ) {\n\t\t\telements.push( $( '' )\n\t\t\t\t.text( part.substring( boldIdentifier.length ) ) );\n\t\t} else {\n\t\t\telements.push( document.createTextNode( part ) );\n\t\t}\n\t} );\n\n\treturn elements;\n}\n","/**\n * @module gateway/mediawiki\n */\n\nimport { createModel } from '../preview/model';\nimport * as formatter from '../formatter';\n\n// Public and private cache lifetime (5 minutes)\n//\n// FIXME: Move this to src/constants.js.\nconst CACHE_LIFETIME = 300;\n\n/**\n * @typedef {Gateway} MediaWikiGateway\n * @property {function(Object): Object} extractPageFromResponse\n * @property {function(Object): Object} formatPlainTextExtract\n */\n\n/**\n * Creates an instance of the MediaWiki API gateway.\n *\n * @param {mw.Api} api\n * @param {Object} config Configuration that affects the major behavior of the\n * gateway.\n * @param {number} config.THUMBNAIL_SIZE The length of the major dimension of\n * the thumbnail.\n * @param {number} config.EXTRACT_LENGTH The maximum length, in characters,\n * of the extract.\n * @param {string} config.acceptLanguage The accepted language sent in the\n * header\n * @return {MediaWikiGateway}\n */\nexport default function createMediaWikiApiGateway( api, config ) {\n\tfunction fetch( title ) {\n\t\treturn api.get( {\n\t\t\taction: 'query',\n\t\t\tprop: 'info|extracts|pageimages|revisions|info',\n\t\t\tformatversion: 2,\n\t\t\tredirects: true,\n\t\t\texintro: mw.config.get( 'wgPopupsTextExtractsIntroOnly', true ),\n\t\t\texchars: config.EXTRACT_LENGTH,\n\n\t\t\t// There is an added geometric limit on .mwe-popups-extract\n\t\t\t// so that text does not overflow from the card.\n\t\t\texplaintext: true,\n\t\t\texsectionformat: 'plain',\n\n\t\t\tpiprop: 'thumbnail',\n\t\t\tpithumbsize: config.THUMBNAIL_SIZE,\n\t\t\tpilicense: 'any',\n\t\t\trvprop: 'timestamp',\n\t\t\tinprop: 'url',\n\t\t\ttitles: title,\n\t\t\tsmaxage: CACHE_LIFETIME,\n\t\t\tmaxage: CACHE_LIFETIME,\n\t\t\tuselang: 'content'\n\t\t}, {\n\t\t\theaders: {\n\t\t\t\t'X-Analytics': 'preview=1',\n\t\t\t\t'Accept-Language': config.acceptLanguage\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @param {mw.Title} title\n\t * @return {AbortPromise}\n\t */\n\tfunction fetchPreviewForTitle( title ) {\n\t\tconst xhr = fetch( title.getPrefixedDb() );\n\t\treturn xhr.then( ( data ) => {\n\t\t\tconst page = extractPageFromResponse( data );\n\t\t\tconst plainTextExtract = formatPlainTextExtract( page );\n\t\t\treturn convertPageToModel( plainTextExtract );\n\t\t} ).promise( {\n\t\t\tabort() {\n\t\t\t\txhr.abort();\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn {\n\t\tfetch,\n\t\textractPageFromResponse,\n\t\tconvertPageToModel,\n\t\tfetchPreviewForTitle,\n\t\tformatPlainTextExtract\n\t};\n}\n\n/**\n * Extracts page data from the API response.\n *\n * @method\n * @name MediaWikiGateway#extractPageFromResponse\n * @param {Object} data The response\n * @throws {Error} If the response is empty or doesn't contain data about the\n * page\n * @return {Object}\n */\nfunction extractPageFromResponse( data ) {\n\tif (\n\t\tdata.query &&\n\t\tdata.query.pages &&\n\t\tdata.query.pages.length\n\t) {\n\t\treturn data.query.pages[ 0 ];\n\t}\n\n\tthrow new Error( 'API response `query.pages` is empty.' );\n}\n\n/**\n * Make plain text nicer by applying formatter.\n *\n * @method\n * @name MediaWikiGateway#formatPlainTextExtract\n * @param {Object} data The response\n * @return {Object}\n */\nfunction formatPlainTextExtract( data ) {\n\tconst result = $.extend( {}, data );\n\tresult.extract = formatter.formatPlainTextExtract( data.extract, data.title );\n\treturn result;\n}\n\n/**\n * Converts the API response to a preview model.\n *\n * @method\n * @name MediaWikiGateway#convertPageToModel\n * @param {Object} page\n * @return {PagePreviewModel}\n */\nfunction convertPageToModel( page ) {\n\treturn createModel(\n\t\tpage.title,\n\t\tpage.canonicalurl,\n\t\tpage.pagelanguagehtmlcode,\n\t\tpage.pagelanguagedir,\n\t\tpage.extract,\n\t\tpage.type,\n\t\tpage.thumbnail,\n\t\tpage.pageid\n\t);\n}\n","/**\n * @module gateway/rest\n */\n\nimport { createModel } from '../preview/model';\n\nconst RESTBASE_PROFILE = 'https://www.mediawiki.org/wiki/Specs/Summary/1.2.0';\n\n/** @typedef {function(JQuery.AjaxSettings=): JQuery.jqXHR} Ajax */\n\n/**\n * Creates an instance of the RESTBase gateway.\n *\n * This gateway differs from the {@link MediaWikiGateway MediaWiki gateway} in\n * that it fetches page data from [the RESTBase page summary endpoint][0].\n *\n * [0]: https://en.wikipedia.org/api/rest_v1/#!/Page_content/get_page_summary_title\n *\n * @param {Ajax} ajax A function with the same signature as `jQuery.ajax`\n * @param {Object} config Configuration that affects the major behavior of the\n * gateway.\n * @param {Function} extractParser A function that takes response and returns\n * parsed extract\n * @return {Gateway}\n */\nexport default function createRESTBaseGateway( ajax, config, extractParser ) {\n\t/**\n\t * Fetches page data from [the RESTBase page summary endpoint][0].\n\t *\n\t * [0]: https://en.wikipedia.org/api/rest_v1/#!/Page_content/get_page_summary_title\n\t *\n\t * @method\n\t * @name RESTBaseGateway#fetch\n\t * @param {string} title\n\t * @return {JQuery.jqXHR}\n\t */\n\tfunction fetch( title ) {\n\t\tconst endpoint = config.endpoint;\n\n\t\treturn ajax( {\n\t\t\turl: endpoint + encodeURIComponent( title ),\n\t\t\theaders: {\n\t\t\t\tAccept: `application/json; charset=utf-8; profile=\"${RESTBASE_PROFILE}\"`,\n\t\t\t\t'Accept-Language': config.acceptLanguage\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @param {mw.Title} title\n\t * @return {AbortPromise}\n\t */\n\tfunction fetchPreviewForTitle( title ) {\n\t\tconst titleText = title.getPrefixedDb(),\n\t\t\txhr = fetch( titleText );\n\t\treturn xhr.then( ( page ) => {\n\t\t\t// Endpoint response may be empty or simply missing a title.\n\t\t\tpage = page || {};\n\t\t\tpage.title = page.title || titleText;\n\t\t\t// And extract may be omitted if empty string\n\t\t\tpage.extract = page.extract || '';\n\t\t\treturn convertPageToModel(\n\t\t\t\tpage, config.THUMBNAIL_SIZE, extractParser\n\t\t\t);\n\t\t} ).catch( ( jqXHR, textStatus, errorThrown ) => {\n\t\t\t// The client will choose how to handle these errors which may include\n\t\t\t// those due to HTTP 4xx and 5xx status. The rejection typing matches\n\t\t\t// fetch failures.\n\t\t\treturn $.Deferred().reject( 'http', {\n\t\t\t\txhr: jqXHR,\n\t\t\t\ttextStatus,\n\t\t\t\texception: errorThrown\n\t\t\t} );\n\t\t} ).promise( { abort() { xhr.abort(); } } );\n\t}\n\n\treturn {\n\t\tfetch,\n\t\tconvertPageToModel,\n\t\tfetchPreviewForTitle\n\t};\n}\n\n/**\n * Checks whether the `originalImage` property contains an image\n * format that's safe to render.\n * https://www.mediawiki.org/wiki/Help:Images#Supported_media_types_for_images\n *\n * @param {string} filename\n *\n * @return {boolean}\n */\nfunction isSafeImgFormat( filename ) {\n\tconst safeImage = new RegExp( /\\.(jpg|jpeg|png|gif)$/i );\n\treturn safeImage.test( filename );\n}\n\n/**\n * Resizes the thumbnail to the requested width, preserving its aspect ratio.\n *\n * The requested width is limited to that of the original image unless the image\n * is an SVG, which can be scaled infinitely.\n *\n * This function is only intended to mangle the pretty thumbnail URLs used on\n * Wikimedia Commons. Once [an official thumb API](https://phabricator.wikimedia.org/T66214)\n * is fully specified and implemented, this function can be made more general.\n *\n * @param {Object} thumbnail The thumbnail image\n * @param {Object} original The original image\n * @param {number} thumbSize The requested size\n * @return {{source: string, width: number, height: number}|undefined}\n */\nfunction generateThumbnailData( thumbnail, original, thumbSize ) {\n\tconst parts = thumbnail.source.split( '/' ),\n\t\tlastPart = parts[ parts.length - 1 ],\n\t\toriginalIsSafe = isSafeImgFormat( original.source ) || undefined;\n\n\t// The last part, the thumbnail's full filename, is in the following form:\n\t// ${width}px-${filename}.${extension}. Splitting the thumbnail's filename\n\t// makes this function resilient to the thumbnail not having the same\n\t// extension as the original image, which is definitely the case for SVG's\n\t// where the thumbnail's extension is .svg.png.\n\tconst filenamePxIndex = lastPart.indexOf( 'px-' );\n\tif ( filenamePxIndex === -1 ) {\n\t\t// The thumbnail size is not customizable. Presumably, RESTBase requested a\n\t\t// width greater than the original and so MediaWiki returned the original's\n\t\t// URL instead of a thumbnail compatible URL. An original URL does not have\n\t\t// a \"thumb\" path, e.g.:\n\t\t//\n\t\t// https://upload.wikimedia.org/wikipedia/commons/a/aa/Red_Giant_Earth_warm.jpg\n\t\t//\n\t\t// Instead of:\n\t\t//\n\t\t// https://upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Red_Giant_Earth_warm.jpg/512px-Red_Giant_Earth_warm.jpg\n\t\t//\n\t\t// Use the original if it's a supported image format.\n\t\treturn originalIsSafe && original;\n\t}\n\tconst filename = lastPart.substr( filenamePxIndex + 3 );\n\n\t// Scale the thumbnail's largest dimension.\n\tlet width, height;\n\tif ( thumbnail.width > thumbnail.height ) {\n\t\twidth = thumbSize;\n\t\theight = Math.floor( ( thumbSize / thumbnail.width ) * thumbnail.height );\n\t} else {\n\t\twidth = Math.floor( ( thumbSize / thumbnail.height ) * thumbnail.width );\n\t\theight = thumbSize;\n\t}\n\n\t// If the image isn't an SVG, then it shouldn't be scaled past its original\n\t// dimensions.\n\tif ( width >= original.width && filename.indexOf( '.svg' ) === -1 ) {\n\t\t// if the image format is not supported, it shouldn't be rendered.\n\t\treturn originalIsSafe && original;\n\t}\n\n\tparts[ parts.length - 1 ] = `${width}px-${filename}`;\n\n\treturn {\n\t\tsource: parts.join( '/' ),\n\t\twidth,\n\t\theight\n\t};\n}\n\n/**\n * Converts the API response to a preview model.\n *\n * @method\n * @name RESTBaseGateway#convertPageToModel\n * @param {Object} page\n * @param {number} thumbSize\n * @param {Function} extractParser\n * @return {PagePreviewModel}\n */\nexport function convertPageToModel( page, thumbSize, extractParser ) {\n\treturn createModel(\n\t\tpage.title,\n\t\tnew mw.Title( page.title ).getUrl(),\n\t\tpage.lang,\n\t\tpage.dir,\n\t\textractParser( page ),\n\t\tpage.type,\n\t\tpage.thumbnail ?\n\t\t\tgenerateThumbnailData(\n\t\t\t\tpage.thumbnail, page.originalimage, thumbSize\n\t\t\t) : undefined,\n\t\tpage.pageid\n\t);\n}\n","import * as formatter from '../formatter';\n\n/**\n * Prepare extract\n *\n * @param {Object} page Rest response\n * @return {Array} An array of DOM Elements\n */\nexport function parseHTMLResponse( page ) {\n\tconst extract = page.extract_html;\n\n\treturn extract.length === 0 ? [] : $.parseHTML( extract );\n}\n\n/**\n * Prepare extract\n *\n * @param {Object} page Rest response\n * @return {Array} An array of DOM Elements\n */\nexport function parsePlainTextResponse( page ) {\n\treturn formatter.formatPlainTextExtract( page.extract, page.title );\n}\n","/**\n * @module gateway/page\n */\n\nimport constants from '../constants';\nimport createMediaWikiApiGateway from './mediawiki';\nimport createRESTBaseGateway from './rest';\nimport * as formatters from './restFormatters';\n\n/**\n * Creates a page preview gateway with sensible values for the dependencies.\n *\n * @param {mw.Map} config\n * @return {Gateway}\n */\nexport default function createPagePreviewGateway( config ) {\n\tconst gatewayConfig = $.extend( {}, constants, {\n\t\tacceptLanguage: config.get( 'wgPageContentLanguage' )\n\t} );\n\tconst restConfig = $.extend( {}, gatewayConfig, {\n\t\tendpoint: config.get( 'wgPopupsRestGatewayEndpoint' )\n\t} );\n\tswitch ( config.get( 'wgPopupsGateway' ) ) {\n\t\tcase 'mwApiPlain':\n\t\t\treturn createMediaWikiApiGateway( new mw.Api(), gatewayConfig );\n\t\tcase 'restbasePlain':\n\t\t\treturn createRESTBaseGateway(\n\t\t\t\t$.ajax, restConfig, formatters.parsePlainTextResponse );\n\t\tcase 'restbaseHTML':\n\t\t\treturn createRESTBaseGateway(\n\t\t\t\t$.ajax, restConfig, formatters.parseHTMLResponse );\n\t\tdefault:\n\t\t\tthrow new Error( 'Unknown gateway' );\n\t}\n}\n","/**\n * @module gateway/reference\n */\n\nimport { previewTypes } from '../preview/model';\n\n/**\n * @return {Gateway}\n */\nexport default function createReferenceGateway() {\n\n\tfunction scrapeReferenceText( id ) {\n\t\tconst idSelector = `#${$.escapeSelector( id )}`;\n\n\t\t/**\n\t\t * Same alternative selectors with and without mw-… as in the RESTbased endpoint.\n\t\t *\n\t\t * @see https://phabricator.wikimedia.org/diffusion/GMOA/browse/master/lib/transformations/references/structureReferenceListContent.js$138\n\t\t */\n\t\treturn $( `${idSelector} .mw-reference-text, ${idSelector} .reference-text` );\n\t}\n\n\t/**\n\t * Attempts to find a single reference type identifier, limited to a list of known types.\n\t * - When a `class=\"…\"` attribute mentions multiple known types, the last one is used, following\n\t * CSS semantics.\n\t * - When there are multiple tags, the first with a known type is used.\n\t *\n\t * @param {JQuery} $referenceText\n\t * @return {string|null}\n\t */\n\tfunction scrapeReferenceType( $referenceText ) {\n\t\tconst KNOWN_TYPES = [ 'book', 'journal', 'news', 'note', 'web' ];\n\t\tlet type = null;\n\t\t$referenceText.find( 'cite[class]' ).each( ( index, element ) => {\n\t\t\tconst classNames = element.className.split( /\\s+/ );\n\t\t\tfor ( let i = classNames.length; i--; ) {\n\t\t\t\tif ( KNOWN_TYPES.indexOf( classNames[ i ] ) !== -1 ) {\n\t\t\t\t\ttype = classNames[ i ];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t\treturn type;\n\t}\n\n\t/**\n\t * @param {mw.Title} title\n\t * @param {Element} el\n\t * @return {AbortPromise}\n\t */\n\tfunction fetchPreviewForTitle( title, el ) {\n\t\t// Need to encode the fragment again as mw.Title returns it as decoded text\n\t\tconst id = title.getFragment().replace( / /g, '_' ),\n\t\t\t$referenceText = scrapeReferenceText( id );\n\n\t\tif ( !$referenceText.length ||\n\t\t\t// Skip references that don't contain anything but whitespace, e.g. a single  \n\t\t\t( !$referenceText.text().trim() && !$referenceText.children().length )\n\t\t) {\n\t\t\treturn $.Deferred().reject(\n\t\t\t\t'Footnote not found',\n\t\t\t\t// Required to set `showNullPreview` to false and not open an error popup\n\t\t\t\t{ textStatus: 'abort', xhr: { readyState: 0 } }\n\t\t\t).promise( { abort() {} } );\n\t\t}\n\n\t\tconst model = {\n\t\t\turl: `#${id}`,\n\t\t\textract: $referenceText.html(),\n\t\t\ttype: previewTypes.TYPE_REFERENCE,\n\t\t\treferenceType: scrapeReferenceType( $referenceText ),\n\t\t\tsourceElementId: el && el.parentNode && el.parentNode.id\n\t\t};\n\n\t\treturn $.Deferred().resolve( model ).promise( { abort() {} } );\n\t}\n\n\treturn {\n\t\tfetchPreviewForTitle\n\t};\n}\n","/**\n * @module userSettings\n */\n\n/**\n * @interface UserSettings\n *\n * @global\n */\n\nconst PAGE_PREVIEWS_ENABLED_KEY = 'mwe-popups-enabled',\n\tREFERENCE_PREVIEWS_ENABLED_KEY = 'mwe-popups-referencePreviews-enabled',\n\tREFERENCE_PREVIEWS_LOGGING_SCHEMA = 'event.ReferencePreviewsPopups',\n\tPREVIEW_COUNT_KEY = 'ext.popups.core.previewCount';\n\n/**\n * Creates an object whose methods encapsulate all interactions with the UA's\n * storage.\n *\n * @param {mw.storage} storage The `mw.storage` singleton instance\n *\n * @return {UserSettings}\n */\nexport default function createUserSettings( storage ) {\n\treturn {\n\t\t/**\n\t\t * Gets whether the user has previously enabled Page Previews.\n\t\t *\n\t\t * N.B. that if the user hasn't previously enabled or disabled Page\n\t\t * Previews, i.e. userSettings.storePagePreviewsEnabled(true), then they are treated as\n\t\t * if they have enabled them.\n\t\t *\n\t\t * @method\n\t\t * @name UserSettings#isPagePreviewsEnabled\n\t\t * @return {boolean}\n\t\t */\n\t\tisPagePreviewsEnabled() {\n\t\t\treturn storage.get( PAGE_PREVIEWS_ENABLED_KEY ) !== '0';\n\t\t},\n\n\t\t/**\n\t\t * Permanently persists (typically in localStorage) whether the user has enabled Page\n\t\t * Previews.\n\t\t *\n\t\t * @method\n\t\t * @name UserSettings#storePagePreviewsEnabled\n\t\t * @param {boolean} enabled\n\t\t */\n\t\tstorePagePreviewsEnabled( enabled ) {\n\t\t\tif ( enabled ) {\n\t\t\t\tstorage.remove( PAGE_PREVIEWS_ENABLED_KEY );\n\t\t\t} else {\n\t\t\t\tstorage.set( PAGE_PREVIEWS_ENABLED_KEY, '0' );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @method\n\t\t * @name UserSettings#isReferencePreviewsEnabled\n\t\t * @return {boolean}\n\t\t */\n\t\tisReferencePreviewsEnabled() {\n\t\t\treturn storage.get( REFERENCE_PREVIEWS_ENABLED_KEY ) !== '0';\n\t\t},\n\n\t\t/**\n\t\t * @method\n\t\t * @name UserSettings#storeReferencePreviewsEnabled\n\t\t * @param {boolean} enabled\n\t\t */\n\t\tstoreReferencePreviewsEnabled( enabled ) {\n\t\t\tif ( enabled ) {\n\t\t\t\tstorage.remove( REFERENCE_PREVIEWS_ENABLED_KEY );\n\t\t\t} else {\n\t\t\t\tstorage.set( REFERENCE_PREVIEWS_ENABLED_KEY, '0' );\n\t\t\t}\n\n\t\t\tmw.track( REFERENCE_PREVIEWS_LOGGING_SCHEMA, {\n\t\t\t\taction: enabled ? 'anonymousEnabled' : 'anonymousDisabled'\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Gets the number of previews that the user has seen.\n\t\t *\n\t\t * - If the storage isn't available, then -1 is returned.\n\t\t * - If the value in storage is not a number it will override stored value\n\t\t * to 0\n\t\t *\n\t\t * @method\n\t\t * @name UserSettings#getPreviewCount\n\t\t * @return {number}\n\t\t */\n\t\tgetPreviewCount() {\n\t\t\tconst result = storage.get( PREVIEW_COUNT_KEY );\n\n\t\t\tif ( result === false ) {\n\t\t\t\treturn -1;\n\t\t\t} else if ( result === null ) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tlet count = parseInt( result, 10 );\n\n\t\t\t// stored number is not a zero, override it to zero and store new value\n\t\t\tif ( isNaN( count ) ) {\n\t\t\t\tcount = 0;\n\t\t\t\tthis.storePreviewCount( count );\n\t\t\t}\n\t\t\treturn count;\n\t\t},\n\n\t\t/**\n\t\t * Sets the number of previews that the user has seen.\n\t\t *\n\t\t * @method\n\t\t * @name UserSettings#storePreviewCount\n\t\t * @param {number} count\n\t\t */\n\t\tstorePreviewCount( count ) {\n\t\t\tstorage.set( PREVIEW_COUNT_KEY, count.toString() );\n\t\t}\n\t};\n}\n","/**\n * @module templateUtil\n */\n\n/**\n * @param {string} str\n * @return {string} The string with any HTML entities escaped.\n */\nexport function escapeHTML( str ) {\n\treturn mw.html.escape( str );\n}\n\nconst templates = {};\n/**\n * @param {string} html markup of the template\n * @return {Element} a cloned root element of the template\n */\nexport function createNodeFromTemplate( html ) {\n\tif ( !templates[ html ] ) {\n\t\t// TODO: use