{"version":3,"sources":["/w/extensions/Popups/index.js","/w/extensions/Popups/webpack/bootstrap 559a69158db01869dc11","/w/extensions/Popups/./~/redux-thunk/dist/redux-thunk.min.js","/w/extensions/Popups/./~/redux/dist/redux.min.js","/w/extensions/Popups/./src/actionTypes.js","/w/extensions/Popups/./src/actions.js","/w/extensions/Popups/./src/changeListener.js","/w/extensions/Popups/./src/changeListeners/eventLogging.js","/w/extensions/Popups/./src/changeListeners/footerLink.js","/w/extensions/Popups/./src/changeListeners/index.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/changeListeners/syncUserSettings.js","/w/extensions/Popups/./src/constants.js","/w/extensions/Popups/./src/counts.js","/w/extensions/Popups/./src/experiments.js","/w/extensions/Popups/./src/formatter.js","/w/extensions/Popups/./src/gateway/index.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/getUserBucket.js","/w/extensions/Popups/./src/index.js","/w/extensions/Popups/./src/instrumentation/eventLogging.js","/w/extensions/Popups/./src/instrumentation/statsv.js","/w/extensions/Popups/./src/integrations/mwpopups.js","/w/extensions/Popups/./src/isEnabled.js","/w/extensions/Popups/./src/preview/model.js","/w/extensions/Popups/./src/previewBehavior.js","/w/extensions/Popups/./src/reducers/eventLogging.js","/w/extensions/Popups/./src/reducers/index.js","/w/extensions/Popups/./src/reducers/nextState.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/title.js","/w/extensions/Popups/./src/ui/renderer.js","/w/extensions/Popups/./src/ui/settingsDialog.js","/w/extensions/Popups/./src/userSettings.js","/w/extensions/Popups/./src/wait.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","./node_modules/redux-thunk/dist/redux-thunk.min.js","t","e","this","r","id","loaded","dispatch","getState","withExtraArgument","default","./node_modules/redux/dist/redux.min.js","compose","applyMiddleware","bindActionCreators","combineReducers","createStore","u","a","f","arguments","length","Array","slice","reduceRight","apply","b","h","v","Error","push","indexOf","splice","type","y","INIT","subscribe","next","TypeError","unsubscribe","replaceReducer","ActionTypes","console","error","constructor","Function","toString","map","assign","keys","forEach","Math","random","substring","split","join","getPrototypeOf","window","Symbol","observable","./src/actionTypes.js","__webpack_exports__","BOOT","LINK_DWELL","ABANDON_START","ABANDON_END","LINK_CLICK","FETCH_START","FETCH_END","FETCH_COMPLETE","FETCH_FAILED","PAGEVIEW_LOGGED","PREVIEW_DWELL","PREVIEW_SHOW","PREVIEW_CLICK","PREVIEW_SEEN","SETTINGS_SHOW","SETTINGS_HIDE","SETTINGS_CHANGE","EVENT_LOGGED","STATSV_LOGGED","./src/actions.js","timedAction","baseAction","timestamp","mw","now","boot","isEnabled","user","userSettings","generateToken","config","url","editCount","previewCount","getPreviewCount","__WEBPACK_IMPORTED_MODULE_0__actionTypes__","isNavPopupsEnabled","sessionToken","sessionId","pageToken","page","title","namespaceId","isAnon","fetch","gateway","el","token","titleText","getPrefixedDb","namespace","request","getPageSummary","then","result","catch","err","$","when","__WEBPACK_IMPORTED_MODULE_1__wait__","FETCH_COMPLETE_TARGET_DELAY","FETCH_START_DELAY","data","xhr","readyState","textStatus","exception","__WEBPACK_IMPORTED_MODULE_2__preview_model__","getUrl","linkDwell","event","isNewInteraction","preview","activeToken","action","enabled","Deferred","resolve","promise","abandon","ABANDON_END_DELAY","linkClick","previewDwell","previewShow","PREVIEW_SEEN_DURATION","state","fetchResponse","currentToken","pageId","pageviewLogged","showSettings","hideSettings","saveSettings","wasEnabled","eventLogged","statsvLogged","jQuery","mediaWiki","./src/changeListener.js","registerChangeListener","store","callback","prevState","./src/changeListeners/eventLogging.js","eventLogging","boundActions","eventLoggingTracker","getCurrentTimestamp","_","extend","baseData","./src/changeListeners/footerLink.js","createFooterLink","$footer","$link","append","attr","text","message","hide","parent","footerLink","$footerLink","undefined","click","preventDefault","settings","shouldShowFooterLink","show","./src/changeListeners/index.js","__WEBPACK_IMPORTED_MODULE_0__footerLink__","__WEBPACK_IMPORTED_MODULE_1__eventLogging__","__WEBPACK_IMPORTED_MODULE_2__linkTitle__","__WEBPACK_IMPORTED_MODULE_3__pageviews__","__WEBPACK_IMPORTED_MODULE_4__render__","__WEBPACK_IMPORTED_MODULE_5__settings__","__WEBPACK_IMPORTED_MODULE_6__statsv__","__WEBPACK_IMPORTED_MODULE_7__syncUserSettings__","linkTitle","pageviews","render","statsv","syncUserSettings","./src/changeListeners/linkTitle.js","destroyTitleAttr","$el","restoreTitleAttr","hasPrevActiveLink","activeLink","./src/changeListeners/pageviews.js","pageviewTracker","pageview","source_page_id","source_namespace","source_title","source_url","./src/changeListeners/render.js","previewBehavior","shouldShow","__WEBPACK_IMPORTED_MODULE_0__ui_renderer__","activeEvent","./src/changeListeners/settings.js","appendTo","document","body","setEnabled","showHelp","toggleHelp","./src/changeListeners/statsv.js","track","./src/changeListeners/syncUserSettings.js","syncIfChanged","setPreviewCount","setIsEnabled","reducer","prop","sync","current","./src/constants.js","BUCKETS","pixelRatio","bracketedDevicePixelRatio","off","on","control","THUMBNAIL_SIZE","EXTRACT_LENGTH","./src/counts.js","getEditCountBucket","count","bucket","getPreviewCountBucket","./src/experiments.js","createExperiments","mwExperiments","weightedBoolean","trueWeight","getBucket","buckets","true","false","./src/formatter.js","formatPlainTextExtract","plainTextExtract","extract","makeTitleInExtractBold","regExp","escapedTitle","elements","boldIdentifier","snip","replace","trim","RegExp","escape","each","index","part","createTextNode","./src/gateway/index.js","createGateway","restConfig","__WEBPACK_IMPORTED_MODULE_0__constants__","endpoint","__WEBPACK_IMPORTED_MODULE_1__mediawiki__","Api","__WEBPACK_IMPORTED_MODULE_2__rest__","ajax","__WEBPACK_IMPORTED_MODULE_3__restFormatters__","./src/gateway/mediawiki.js","createMediaWikiApiGateway","api","formatversion","redirects","exintro","exchars","explaintext","piprop","pithumbsize","pilicense","rvprop","inprop","titles","smaxage","CACHE_LIFETIME","maxage","uselang","headers","X-Analytics","extractPageFromResponse","convertPageToModel","query","pages","__WEBPACK_IMPORTED_MODULE_1__formatter__","__WEBPACK_IMPORTED_MODULE_0__preview_model__","canonicalurl","pagelanguagehtmlcode","pagelanguagedir","thumbnail","pageid","./src/gateway/rest.js","createRESTBaseGateway","extractParser","encodeURIComponent","Accept","RESTBASE_PROFILE","jqXHR","errorThrown","status","Title","reject","generateThumbnailData","original","thumbSize","filename","filenamePxIndex","width","height","parts","source","lastPart","substr","floor","lang","dir","originalimage","./src/gateway/restFormatters.js","parseHTMLResponse","extract_html","parseHTML","parsePlainTextResponse","__WEBPACK_IMPORTED_MODULE_0__formatter__","./src/getUserBucket.js","getUserBucket","experiments","experimentGroupSize","./src/index.js","getStatsvTracker","__WEBPACK_IMPORTED_MODULE_11__instrumentation_statsv__","noop","getPageViewTracker","getEventLoggingTracker","__WEBPACK_IMPORTED_MODULE_12__instrumentation_eventLogging__","performance","round","registerChangeListeners","actions","settingsDialog","statsvTracker","__WEBPACK_IMPORTED_MODULE_6__changeListener__","__WEBPACK_IMPORTED_MODULE_13__changeListeners__","__WEBPACK_IMPORTED_MODULE_0_redux__","__WEBPACK_IMPORTED_MODULE_1_redux_thunk__","__WEBPACK_IMPORTED_MODULE_2__gateway__","__WEBPACK_IMPORTED_MODULE_3__userSettings__","__WEBPACK_IMPORTED_MODULE_4__previewBehavior__","__WEBPACK_IMPORTED_MODULE_5__ui_settingsDialog__","__WEBPACK_IMPORTED_MODULE_7__isEnabled__","__WEBPACK_IMPORTED_MODULE_8__title__","__WEBPACK_IMPORTED_MODULE_9__ui_renderer__","__WEBPACK_IMPORTED_MODULE_10__experiments__","__WEBPACK_IMPORTED_MODULE_14__actions__","__WEBPACK_IMPORTED_MODULE_15__reducers__","__WEBPACK_IMPORTED_MODULE_16__integrations_mwpopups__","__WEBPACK_IMPORTED_MODULE_17__getUserBucket__","BLACKLISTED_LINKS","requestIdleCallback","userBucket","generateRandomSessionId","storage","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","location","href","popups","hook","add","$container","invalidLinksSelector","validLinkSelector","mwTitle","Redux","ReduxThunk","./src/instrumentation/eventLogging.js","navigator","isFunction","sendBeacon","./src/instrumentation/statsv.js","bucketingRate","./src/integrations/mwpopups.js","createMwPopups","./src/isEnabled.js","hasIsEnabled","getIsEnabled","./src/preview/model.js","createModel","languageCode","languageDirection","processedExtract","processExtract","TYPE_GENERIC","TYPE_PAGE","createNullModel","./src/previewBehavior.js","createPreviewBehavior","rawTitle","settingsUrl","isBetaFeature","newFromText","previewAbandon","./src/reducers/eventLogging.js","getBaseData","bootAction","pageTitleSource","namespaceIdSource","pageIdSource","popupEnabled","previewCountBucket","__WEBPACK_IMPORTED_MODULE_2__counts__","hovercardsSuppressedByGadget","editCountBucket","createEvent","interaction","actionData","linkInteractionToken","pageTitleHover","namespaceIdHover","timeToPreviewShow","previewType","perceivedWait","createClosingEvent","totalInteractionTime","finished","started","finalized","nextCount","newState","actionTypesWithTokens","__WEBPACK_IMPORTED_MODULE_1__nextState__","link","isUserDwelling","./src/reducers/index.js","__WEBPACK_IMPORTED_MODULE_0__eventLogging__","__WEBPACK_IMPORTED_MODULE_1__pageviews__","__WEBPACK_IMPORTED_MODULE_2__preview__","__WEBPACK_IMPORTED_MODULE_3__settings__","__WEBPACK_IMPORTED_MODULE_4__statsv__","./src/reducers/nextState.js","nextState","updates","key","./src/reducers/pageviews.js","page_title","page_id","page_namespace","./src/reducers/preview.js","./src/reducers/settings.js","./src/reducers/statsv.js","fetchStartedAt","linkDwellStartedAt","./src/title.js","getTitle","linkHref","matches","queryLength","titleRegex","Uri","host","hostname","exec","path","decodeURIComponent","isValid","contentNamespaces","inArray","fromElement","./src/ui/renderer.js","createPokeyMasks","container","html","init","model","createEmptyPreview","createPreview","target","templateData","createThumbnail","hasThumbnail","template","find","isTall","extractMsg","msg","readMsg","behavior","layout","createLayout","pageX","pageY","clientY","clientRects","getClientRects","offset","scrollTop","$window","SIZES","pokeySize","layoutPreview","getClasses","landscapeImage","__WEBPACK_IMPORTED_MODULE_0__wait__","bindBehavior","stopPropagation","fadeInClass","fadeOutClass","hasClass","removeClass","addClass","remove","rawThumbnail","tall","thumbWidth","thumbHeight","x","clipPath","devicePixelRatio","w","portraitImage","createThumbnailElement","className","thumbnailWidth","thumbnailHeight","$thumbnailSVGImage","nsSvg","createElementNS","setAttributeNS","clip-path","xmlns","isPreviewTall","eventData","linkData","windowData","flippedX","flippedY","offsetTop","getClosestYPosition","top","clientTop","offsetLeft","left","landscapePopupWidth","portraitPopupWidth","classes","predefinedLandscapeImageHeight","popup","css","outerHeight","removeAttribute","setAttribute","rects","isTop","deltaY","minY","rect","abs","bottom","ceil","./src/ui/settingsDialog.js","createSettingsDialogRenderer","$dialog","$overlay","createSettingsDialog","selected","getSelectedSetting","visible","choices","description","image","isChecked","heading","closeLabel","saveLabel","helpText","okLabel","descriptionText","val","pg","fn","disablePopups","./src/userSettings.js","createUserSettings","IS_ENABLED_KEY","set","Boolean","PREVIEW_COUNT_KEY","parseInt","isNaN","./src/wait.js","wait","delay","setTimeout"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,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A8N,IAAAD,EAAA5gB,EAAA,UAWAqU,aAAA,WACA,GAAA/a,GAAAyZ,EAAAhZ,IAAA6mB,EAEA,YAAAE,QAAAxnB,IAcAkH,gBAAA,WACA,GAAA2J,GAAAvI,EAAAmR,EAAAhZ,IAAAgnB,EAEA,YAAAnf,GACA,EACI,OAAAA,EACJ,GAEAuI,EAAA6W,SAAApf,EAAA,IAGAqf,MAAA9W,KACAA,EAAA,EACAxP,KAAAuO,gBAAAiB,IAEAA,IAUAjB,gBAAA,SAAAiB,GACA4I,EAAA8N,IAAAE,EAAA5W,EAAA7M,cArGAe,EAAA,EAAAsiB,CAUA,IAAAC,GAAA,qBACAG,EAAA,gC1CsuIMG,gBACA,SAAUloB,EAAQqF,EAAqBzF,GAE7C,Y2ChuIA,SAAAuoB,GAAAC,GACA,GAAAxf,GAAAG,EAAAmB,UAMA,OAJAme,YAAA,WACAzf,EAAAuB,WACEie,GAEFxf,EAAAwB,UA3BA/E,EAAA,EAAA8iB,CAIA,IAAApf,GAAAuC","file":"index.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \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// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\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, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\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/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ \"./node_modules/redux-thunk/dist/redux-thunk.min.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n!function(t,e){ true?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}])});\n\n/***/ }),\n\n/***/ \"./node_modules/redux/dist/redux.min.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n!function(t,e){ true?module.exports=e():\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?exports.Redux=e():t.Redux=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p=\"\",e(0)}([function(t,e,n){\"use strict\";function r(t){return t&&t.__esModule?t:{\"default\":t}}e.__esModule=!0,e.compose=e.applyMiddleware=e.bindActionCreators=e.combineReducers=e.createStore=void 0;var o=n(2),u=r(o),i=n(7),c=r(i),a=n(6),f=r(a),s=n(5),d=r(s),l=n(1),p=r(l),y=n(3);r(y);e.createStore=u[\"default\"],e.combineReducers=c[\"default\"],e.bindActionCreators=f[\"default\"],e.applyMiddleware=d[\"default\"],e.compose=p[\"default\"]},function(t,e){\"use strict\";function n(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];if(0===e.length)return function(t){return t};if(1===e.length)return e[0];var r=e[e.length-1],o=e.slice(0,-1);return function(){return o.reduceRight(function(t,e){return e(t)},r.apply(void 0,arguments))}}e.__esModule=!0,e[\"default\"]=n},function(t,e,n){\"use strict\";function r(t){return t&&t.__esModule?t:{\"default\":t}}function o(t,e,n){function r(){b===h&&(b=h.slice())}function u(){return v}function c(t){if(\"function\"!=typeof t)throw Error(\"Expected listener to be a function.\");var e=!0;return r(),b.push(t),function(){if(e){e=!1,r();var n=b.indexOf(t);b.splice(n,1)}}}function s(t){if(!(0,i[\"default\"])(t))throw Error(\"Actions must be plain objects. Use custom middleware for async actions.\");if(void 0===t.type)throw Error('Actions may not have an undefined \"type\" property. Have you misspelled a constant?');if(m)throw Error(\"Reducers may not dispatch actions.\");try{m=!0,v=y(v,t)}finally{m=!1}for(var e=h=b,n=0;e.length>n;n++)e[n]();return t}function d(t){if(\"function\"!=typeof t)throw Error(\"Expected the nextReducer to be a function.\");y=t,s({type:f.INIT})}function l(){var t,e=c;return t={subscribe:function(t){function n(){t.next&&t.next(u())}if(\"object\"!=typeof t)throw new TypeError(\"Expected the observer to be an object.\");n();var r=e(n);return{unsubscribe:r}}},t[a[\"default\"]]=function(){return this},t}var p;if(\"function\"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if(\"function\"!=typeof n)throw Error(\"Expected the enhancer to be a function.\");return n(o)(t,e)}if(\"function\"!=typeof t)throw Error(\"Expected the reducer to be a function.\");var y=t,v=e,h=[],b=h,m=!1;return s({type:f.INIT}),p={dispatch:s,subscribe:c,getState:u,replaceReducer:d},p[a[\"default\"]]=l,p}e.__esModule=!0,e.ActionTypes=void 0,e[\"default\"]=o;var u=n(4),i=r(u),c=n(12),a=r(c),f=e.ActionTypes={INIT:\"@@redux/INIT\"}},function(t,e){\"use strict\";function n(t){\"undefined\"!=typeof console&&\"function\"==typeof console.error&&console.error(t);try{throw Error(t)}catch(e){}}e.__esModule=!0,e[\"default\"]=n},function(t,e,n){function r(t){if(!i(t)||p.call(t)!=c||u(t))return!1;var e=o(t);if(null===e)return!0;var n=d.call(e,\"constructor\")&&e.constructor;return\"function\"==typeof n&&n instanceof n&&s.call(n)==l}var o=n(8),u=n(9),i=n(11),c=\"[object Object]\",a=Function.prototype,f=Object.prototype,s=a.toString,d=f.hasOwnProperty,l=s.call(Object),p=f.toString;t.exports=r},function(t,e,n){\"use strict\";function r(t){return t&&t.__esModule?t:{\"default\":t}}function o(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return function(t){return function(n,r,o){var i=t(n,r,o),a=i.dispatch,f=[],s={getState:i.getState,dispatch:function(t){return a(t)}};return f=e.map(function(t){return t(s)}),a=c[\"default\"].apply(void 0,f)(i.dispatch),u({},i,{dispatch:a})}}}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;eu;u++){var i=r[u],c=t[i];\"function\"==typeof c&&(o[i]=n(c,e))}return o}e.__esModule=!0,e[\"default\"]=r},function(t,e,n){\"use strict\";function r(t){return t&&t.__esModule?t:{\"default\":t}}function o(t,e){var n=e&&e.type,r=n&&'\"'+n+'\"'||\"an action\";return\"Given action \"+r+', reducer \"'+t+'\" returned undefined. To ignore an action, you must explicitly return the previous state.'}function u(t){Object.keys(t).forEach(function(e){var n=t[e],r=n(void 0,{type:c.ActionTypes.INIT});if(void 0===r)throw Error('Reducer \"'+e+'\" 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.');var o=\"@@redux/PROBE_UNKNOWN_ACTION_\"+Math.random().toString(36).substring(7).split(\"\").join(\".\");if(void 0===n(void 0,{type:o}))throw Error('Reducer \"'+e+'\" returned undefined when probed with a random type. '+(\"Don't try to handle \"+c.ActionTypes.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.\")})}function i(t){for(var e=Object.keys(t),n={},r=0;e.length>r;r++){var i=e[r];\"function\"==typeof t[i]&&(n[i]=t[i])}var c,a=Object.keys(n);try{u(n)}catch(f){c=f}return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];if(c)throw c;for(var r=!1,u={},i=0;a.length>i;i++){var f=a[i],s=n[f],d=t[f],l=s(d,e);if(void 0===l){var p=o(f,e);throw Error(p)}u[f]=l,r=r||l!==d}return r?u:t}}e.__esModule=!0,e[\"default\"]=i;var c=n(2),a=n(4),f=(r(a),n(3));r(f)},function(t,e,n){var r=n(10),o=r(Object.getPrototypeOf,Object);t.exports=o},function(t,e){function n(t){var e=!1;if(null!=t&&\"function\"!=typeof t.toString)try{e=!!(t+\"\")}catch(n){}return e}t.exports=n},function(t,e){function n(t,e){return function(n){return t(e(n))}}t.exports=n},function(t,e){function n(t){return!!t&&\"object\"==typeof t}t.exports=n},function(t,e,n){t.exports=n(13)},function(t,e,n){(function(t){\"use strict\";function r(t){return t&&t.__esModule?t:{\"default\":t}}Object.defineProperty(e,\"__esModule\",{value:!0});var o=n(14),u=r(o),i=void 0;void 0!==t?i=t:\"undefined\"!=typeof window&&(i=window);var c=(0,u[\"default\"])(i);e[\"default\"]=c}).call(e,function(){return this}())},function(t,e){\"use strict\";function n(t){var e,n=t.Symbol;return\"function\"==typeof n?n.observable?e=n.observable:(e=n(\"observable\"),n.observable=e):e=\"@@observable\",e}Object.defineProperty(e,\"__esModule\",{value:!0}),e[\"default\"]=n}])});\n\n/***/ }),\n\n/***/ \"./src/actionTypes.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * @module actionTypes\n */\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n\tBOOT: 'BOOT',\n\tLINK_DWELL: 'LINK_DWELL',\n\tABANDON_START: 'ABANDON_START',\n\tABANDON_END: 'ABANDON_END',\n\tLINK_CLICK: 'LINK_CLICK',\n\t/** Precedes a fetch. */\n\tFETCH_START: 'FETCH_START',\n\t/** Follows a successful fetch. */\n\tFETCH_END: 'FETCH_END',\n\t/** Follows a fetch regardless of whether it was successful. */\n\tFETCH_COMPLETE: 'FETCH_COMPLETE',\n\t/** Follows an unsuccessful fetch. */\n\tFETCH_FAILED: 'FETCH_FAILED',\n\tPAGEVIEW_LOGGED: 'PAGEVIEW_LOGGED',\n\tPREVIEW_DWELL: 'PREVIEW_DWELL',\n\tPREVIEW_SHOW: 'PREVIEW_SHOW',\n\tPREVIEW_CLICK: 'PREVIEW_CLICK',\n\t/* Occurs when a preview has been opened for a significant amount of\n\ttime and can be assumed to have been 'seen' */\n\tPREVIEW_SEEN: 'PREVIEW_SEEN',\n\tSETTINGS_SHOW: 'SETTINGS_SHOW',\n\tSETTINGS_HIDE: 'SETTINGS_HIDE',\n\tSETTINGS_CHANGE: 'SETTINGS_CHANGE',\n\tEVENT_LOGGED: 'EVENT_LOGGED',\n\tSTATSV_LOGGED: 'STATSV_LOGGED'\n});\n\n\n/***/ }),\n\n/***/ \"./src/actions.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony export (immutable) */ __webpack_exports__[\"boot\"] = boot;\n/* harmony export (immutable) */ __webpack_exports__[\"fetch\"] = fetch;\n/* harmony export (immutable) */ __webpack_exports__[\"linkDwell\"] = linkDwell;\n/* harmony export (immutable) */ __webpack_exports__[\"abandon\"] = abandon;\n/* harmony export (immutable) */ __webpack_exports__[\"linkClick\"] = linkClick;\n/* harmony export (immutable) */ __webpack_exports__[\"previewDwell\"] = previewDwell;\n/* harmony export (immutable) */ __webpack_exports__[\"previewShow\"] = previewShow;\n/* harmony export (immutable) */ __webpack_exports__[\"pageviewLogged\"] = pageviewLogged;\n/* harmony export (immutable) */ __webpack_exports__[\"showSettings\"] = showSettings;\n/* harmony export (immutable) */ __webpack_exports__[\"hideSettings\"] = hideSettings;\n/* harmony export (immutable) */ __webpack_exports__[\"saveSettings\"] = saveSettings;\n/* harmony export (immutable) */ __webpack_exports__[\"eventLogged\"] = eventLogged;\n/* harmony export (immutable) */ __webpack_exports__[\"statsvLogged\"] = statsvLogged;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(\"./src/actionTypes.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__wait__ = __webpack_require__(\"./src/wait.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__preview_model__ = __webpack_require__(\"./src/preview/model.js\");\n/**\n * @module actions\n */\n\n\n\n\n\nvar $ = jQuery,\n\tmw = window.mediaWiki,\n\n\t// See the following for context around this value.\n\t//\n\t// * https://phabricator.wikimedia.org/T161284\n\t// * https://phabricator.wikimedia.org/T70861#3129780\n\tFETCH_START_DELAY = 150, // ms.\n\n\t// The minimum time a preview must be open before we judge it\n\t// has been seen.\n\t// See https://phabricator.wikimedia.org/T184793\n\tPREVIEW_SEEN_DURATION = 1000, // ms\n\n\t// The delay after which a FETCH_COMPLETE action should be dispatched.\n\t//\n\t// If the API endpoint responds faster than 500 ms (or, say, the API\n\t// response is served from the UA's cache), then we introduce a delay of\n\t// 500 - t to make the preview delay consistent to the user.\n\tFETCH_COMPLETE_TARGET_DELAY = 500, // ms.\n\n\tABANDON_END_DELAY = 300; // ms.\n\n/**\n * Mixes in timing information to an action.\n *\n * Warning: the `baseAction` parameter is modified and returned.\n *\n * @param {Object} baseAction\n * @return {Object}\n */\nfunction timedAction( baseAction ) {\n\tbaseAction.timestamp = mw.now();\n\n\treturn baseAction;\n}\n\n/**\n * Represents Page Previews booting.\n *\n * When a Redux store is created, the `@@INIT` action is immediately\n * dispatched to it. To avoid overriding the term, we refer to booting rather\n * than initializing.\n *\n * Page Previews persists critical pieces of information to local storage.\n * Since reading from and writing to local storage are synchronous, Page\n * Previews is booted when the browser is idle (using\n * [`mw.requestIdleCallback`](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback))\n * so as not to impact latency-critical events.\n *\n * @param {Boolean} isEnabled See `isEnabled.js`\n * @param {mw.user} user\n * @param {ext.popups.UserSettings} userSettings\n * @param {Function} generateToken\n * @param {mw.Map} config The config of the MediaWiki client-side application,\n * i.e. `mw.config`\n * @param {String} url url\n * @return {Object}\n */\nfunction boot(\n\tisEnabled,\n\tuser,\n\tuserSettings,\n\tgenerateToken,\n\tconfig,\n\turl\n) {\n\tvar editCount = config.get( 'wgUserEditCount' ),\n\t\tpreviewCount = userSettings.getPreviewCount();\n\n\treturn {\n\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].BOOT,\n\t\tisEnabled: isEnabled,\n\t\tisNavPopupsEnabled: config.get( 'wgPopupsConflictsWithNavPopupGadget' ),\n\t\tsessionToken: user.sessionId(),\n\t\tpageToken: generateToken(),\n\t\tpage: {\n\t\t\turl: url,\n\t\t\ttitle: config.get( 'wgTitle' ),\n\t\t\tnamespaceId: config.get( 'wgNamespaceNumber' ),\n\t\t\tid: config.get( 'wgArticleId' )\n\t\t},\n\t\tuser: {\n\t\t\tisAnon: user.isAnon(),\n\t\t\teditCount: editCount,\n\t\t\tpreviewCount: previewCount\n\t\t}\n\t};\n}\n\n/**\n * Represents Page Previews fetching data via the gateway.\n *\n * @param {Gateway} gateway\n * @param {mw.Title} title\n * @param {Element} el\n * @param {String} token The unique token representing the link interaction that\n * triggered the fetch\n * @return {Redux.Thunk}\n */\nfunction fetch( gateway, title, el, token ) {\n\tvar titleText = title.getPrefixedDb(),\n\t\tnamespaceId = title.namespace;\n\n\treturn function ( dispatch ) {\n\t\tvar request;\n\n\t\tdispatch( timedAction( {\n\t\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].FETCH_START,\n\t\t\tel: el,\n\t\t\ttitle: titleText,\n\t\t\tnamespaceId: namespaceId\n\t\t} ) );\n\n\t\trequest = gateway.getPageSummary( titleText )\n\t\t\t.then( function ( result ) {\n\t\t\t\tdispatch( timedAction( {\n\t\t\t\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].FETCH_END,\n\t\t\t\t\tel: el\n\t\t\t\t} ) );\n\n\t\t\t\treturn result;\n\t\t\t} )\n\t\t\t.catch( function ( err ) {\n\t\t\t\tdispatch( {\n\t\t\t\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].FETCH_FAILED,\n\t\t\t\t\tel: el\n\t\t\t\t} );\n\t\t\t\t// Keep the request promise in a rejected status since it failed.\n\t\t\t\tthrow err;\n\t\t\t} );\n\n\t\treturn $.when(\n\t\t\trequest,\n\t\t\t__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__wait__[\"a\" /* default */])( FETCH_COMPLETE_TARGET_DELAY - FETCH_START_DELAY )\n\t\t)\n\t\t\t.then( function ( result ) {\n\t\t\t\tdispatch( {\n\t\t\t\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].FETCH_COMPLETE,\n\t\t\t\t\tel: el,\n\t\t\t\t\tresult: result,\n\t\t\t\t\ttoken: token\n\t\t\t\t} );\n\t\t\t} )\n\t\t\t.catch( function ( data, result ) {\n\t\t\t\t// All failures, except those due to being offline or network error,\n\t\t\t\t// should present \"There was an issue displaying this preview\".\n\t\t\t\t// e.g.:\n\t\t\t\t// - Show (timeout): data=\"http\" {xhr: {…}, textStatus: \"timeout\",\n\t\t\t\t// exception: \"timeout\"}\n\t\t\t\t// - Show (bad MW request): data=\"unknown_action\" {error: {…}}\n\t\t\t\t// - Show (RB 4xx): data=\"http\" {xhr: {…}, textStatus: \"error\",\n\t\t\t\t// exception: \"Bad Request\"}\n\t\t\t\t// - Show (RB 5xx): data=\"http\" {xhr: {…}, textStatus: \"error\",\n\t\t\t\t// exception: \"Service Unavailable\"}\n\t\t\t\t// - Suppress (offline or network error): data=\"http\"\n\t\t\t\t// result={xhr: {…}, textStatus: \"error\", exception: \"\"}\n\t\t\t\tvar networkError = result && result.xhr &&\n\t\t\t\t\tresult.xhr.readyState === 0 && result.textStatus === 'error' &&\n\t\t\t\t\tresult.exception === '';\n\t\t\t\tif ( !networkError ) {\n\t\t\t\t\tdispatch( {\n\t\t\t\t\t\t// Both FETCH_FAILED and FETCH_END conclude with FETCH_COMPLETE.\n\t\t\t\t\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].FETCH_COMPLETE,\n\t\t\t\t\t\tel: el,\n\t\t\t\t\t\tresult: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__preview_model__[\"a\" /* createNullModel */])( titleText, title.getUrl() ),\n\t\t\t\t\t\ttoken: token\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t};\n}\n\n/**\n * Represents the user dwelling on a link, either by hovering over it with\n * their mouse or by focussing it using their keyboard or an assistive device.\n *\n * @param {mw.Title} title\n * @param {Element} el\n * @param {Event} event\n * @param {Gateway} gateway\n * @param {Function} generateToken\n * @return {Redux.Thunk}\n */\nfunction linkDwell( title, el, event, gateway, generateToken ) {\n\tvar token = generateToken(),\n\t\ttitleText = title.getPrefixedDb(),\n\t\tnamespaceId = title.namespace;\n\n\treturn function ( dispatch, getState ) {\n\t\tvar action = timedAction( {\n\t\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].LINK_DWELL,\n\t\t\tel: el,\n\t\t\tevent: event,\n\t\t\ttoken: token,\n\t\t\ttitle: titleText,\n\t\t\tnamespaceId: namespaceId\n\t\t} );\n\n\t\t// Has the new generated token been accepted?\n\t\tfunction isNewInteraction() {\n\t\t\treturn getState().preview.activeToken === token;\n\t\t}\n\n\t\tdispatch( action );\n\n\t\tif ( !isNewInteraction() ) {\n\t\t\treturn $.Deferred().resolve().promise();\n\t\t}\n\n\t\treturn __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__wait__[\"a\" /* default */])( FETCH_START_DELAY )\n\t\t\t.then( function () {\n\t\t\t\tvar previewState = getState().preview;\n\n\t\t\t\tif ( previewState.enabled && isNewInteraction() ) {\n\t\t\t\t\treturn dispatch( fetch( gateway, title, el, token ) );\n\t\t\t\t}\n\t\t\t} );\n\t};\n}\n\n/**\n * Represents the user abandoning a link, either by moving their mouse away\n * from it or by shifting focus to another UI element using their keyboard or\n * an assistive device, or abandoning a preview by moving their mouse away\n * from it.\n *\n * @return {Redux.Thunk}\n */\nfunction abandon() {\n\treturn function ( dispatch, getState ) {\n\t\tvar token = getState().preview.activeToken;\n\n\t\tif ( !token ) {\n\t\t\treturn $.Deferred().resolve().promise();\n\t\t}\n\n\t\tdispatch( timedAction( {\n\t\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].ABANDON_START,\n\t\t\ttoken: token\n\t\t} ) );\n\n\t\treturn __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__wait__[\"a\" /* default */])( ABANDON_END_DELAY )\n\t\t\t.then( function () {\n\t\t\t\tdispatch( {\n\t\t\t\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].ABANDON_END,\n\t\t\t\t\ttoken: token\n\t\t\t\t} );\n\t\t\t} );\n\t};\n}\n\n/**\n * Represents the user clicking on a link with their mouse, keyboard, or an\n * assistive device.\n *\n * @param {Element} el\n * @return {Object}\n */\nfunction linkClick( el ) {\n\treturn timedAction( {\n\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].LINK_CLICK,\n\t\tel: el\n\t} );\n}\n\n/**\n * Represents the user dwelling on a preview with their mouse.\n *\n * @return {Object}\n */\nfunction previewDwell() {\n\treturn {\n\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].PREVIEW_DWELL\n\t};\n}\n\n/**\n * Represents a preview being shown to the user.\n *\n * This action is dispatched by the `./changeListeners/render.js` change\n * listener.\n *\n * @param {String} token\n * @return {Object}\n */\nfunction previewShow( token ) {\n\treturn function ( dispatch, getState ) {\n\t\tdispatch(\n\t\t\ttimedAction( {\n\t\t\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].PREVIEW_SHOW,\n\t\t\t\ttoken: token\n\t\t\t} )\n\t\t);\n\n\t\treturn __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__wait__[\"a\" /* default */])( PREVIEW_SEEN_DURATION )\n\t\t\t.then( function () {\n\t\t\t\tvar state = getState(),\n\t\t\t\t\tpreview = state.preview,\n\t\t\t\t\tfetchResponse = preview && preview.fetchResponse,\n\t\t\t\t\tcurrentToken = preview && preview.activeToken;\n\n\t\t\t\tif (\n\t\t\t\t\t// Check the pageview can still be associated with original event\n\t\t\t\t\tcurrentToken && currentToken === token &&\n\t\t\t\t\t// and the preview is still active and of type `page`\n\t\t\t\t\tfetchResponse && fetchResponse.type === 'page'\n\t\t\t\t) {\n\t\t\t\t\tdispatch( {\n\t\t\t\t\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].PREVIEW_SEEN,\n\t\t\t\t\t\ttitle: fetchResponse.title,\n\t\t\t\t\t\tpageId: fetchResponse.pageId,\n\t\t\t\t\t\t// The existing version of summary endpoint does not\n\t\t\t\t\t\t// provide namespace information, but new version\n\t\t\t\t\t\t// will. Given we only show pageviews for main namespace\n\t\t\t\t\t\t// this is hardcoded until the newer version is available.\n\t\t\t\t\t\tnamespace: 0\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t};\n}\n\n/**\n * Represents the situation when a pageview has been logged\n * (see previewShow and PREVIEW_SEEN action type)\n *\n * @return {Object}\n */\nfunction pageviewLogged() {\n\treturn {\n\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].PAGEVIEW_LOGGED\n\t};\n}\n\n/**\n * Represents the user clicking either the \"Enable previews\" footer menu link,\n * or the \"cog\" icon that's present on each preview.\n *\n * @return {Object}\n */\nfunction showSettings() {\n\treturn {\n\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].SETTINGS_SHOW\n\t};\n}\n\n/**\n * Represents the user closing the settings dialog and saving their settings.\n *\n * @return {Object}\n */\nfunction hideSettings() {\n\treturn {\n\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].SETTINGS_HIDE\n\t};\n}\n\n/**\n * Represents the user saving their settings.\n *\n * N.B. This action returns a Redux.Thunk not because it needs to perform\n * asynchronous work, but because it needs to query the global state for the\n * current enabled state. In order to keep the enabled state in a single\n * place (the preview reducer), we query it and dispatch it as `wasEnabled`\n * so that other reducers (like settings) can act on it without having to\n * duplicate the `enabled` state locally.\n * See doc/adr/0003-keep-enabled-state-only-in-preview-reducer.md for more\n * details.\n *\n * @param {Boolean} enabled if previews are enabled or not\n * @return {Redux.Thunk}\n */\nfunction saveSettings( enabled ) {\n\treturn function ( dispatch, getState ) {\n\t\tdispatch( {\n\t\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].SETTINGS_CHANGE,\n\t\t\twasEnabled: getState().preview.enabled,\n\t\t\tenabled: enabled\n\t\t} );\n\t};\n}\n\n/**\n * Represents the queued event being logged `changeListeners/eventLogging.js`\n * change listener.\n *\n * @param {Object} event\n * @return {Object}\n */\nfunction eventLogged( event ) {\n\treturn {\n\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].EVENT_LOGGED,\n\t\tevent: event\n\t};\n}\n\n/**\n * Represents the queued statsv event being logged.\n * See `mw.popups.changeListeners.statsv` change listener.\n *\n * @return {Object}\n */\nfunction statsvLogged() {\n\treturn {\n\t\ttype: __WEBPACK_IMPORTED_MODULE_0__actionTypes__[\"a\" /* default */].STATSV_LOGGED\n\t};\n}\n\n\n/***/ }),\n\n/***/ \"./src/changeListener.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = registerChangeListener;\n/**\n * @module changeListener\n */\n\n/**\n * @typedef {Function} ext.popups.ChangeListener\n * @param {Object} prevState The previous state\n * @param {Object} state The current state\n */\n\n/**\n * Registers a change listener, which is bound to the\n * [store](http://redux.js.org/docs/api/Store.html).\n *\n * A change listener is a function that is only invoked when the state in the\n * [store](http://redux.js.org/docs/api/Store.html) changes. N.B. that there\n * may not be a 1:1 correspondence with actions being dispatched to the store\n * and the state in the store changing.\n *\n * See [Store#subscribe](http://redux.js.org/docs/api/Store.html#subscribe)\n * for more information about what change listeners may and may not do.\n *\n * @param {Redux.Store} store\n * @param {ext.popups.ChangeListener} callback\n */\nfunction registerChangeListener( store, callback ) {\n\t// This function is based on the example in [the documentation for\n\t// Store#subscribe](http://redux.js.org/docs/api/Store.html#subscribe),\n\t// which was written by Dan Abramov.\n\n\tvar state;\n\n\tstore.subscribe( function () {\n\t\tvar prevState = state;\n\n\t\tstate = store.getState();\n\n\t\tif ( prevState !== state ) {\n\t\t\tcallback( prevState, state );\n\t\t}\n\t} );\n}\n\n\n/***/ }),\n\n/***/ \"./src/changeListeners/eventLogging.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = eventLogging;\n/**\n * @module changeListeners/eventLogging\n */\n\nvar $ = jQuery;\n\n/**\n * Creates an instance of the event logging change listener.\n *\n * When an event is enqueued it'll be logged using the schema. Since it's the\n * responsibility of Event Logging (and the UA) to deliver logged events,\n * `EVENT_LOGGED` is immediately dispatched rather than waiting for some\n * indicator of completion.\n *\n * @param {Object} boundActions\n * @param {EventTracker} eventLoggingTracker\n * @param {Function} getCurrentTimestamp\n * @return {ext.popups.ChangeListener}\n */\nfunction eventLogging(\n\tboundActions, eventLoggingTracker, getCurrentTimestamp\n) {\n\treturn function ( _, state ) {\n\t\tvar eventLogging = state.eventLogging,\n\t\t\tevent = eventLogging.event;\n\n\t\tif ( !event ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Per https://meta.wikimedia.org/wiki/Schema:Popups, the timestamp\n\t\t// property should be the time at which the event is logged and not the\n\t\t// time at which the interaction started.\n\t\t//\n\t\t// Rightly or wrongly, it's left as an exercise for the analyst to\n\t\t// calculate the time at which the interaction started as part of their\n\t\t// analyses, e.g. https://phabricator.wikimedia.org/T186016#4002923.\n\t\tevent = $.extend( true, {}, eventLogging.baseData, event, {\n\t\t\ttimestamp: getCurrentTimestamp()\n\t\t} );\n\n\t\teventLoggingTracker( 'event.Popups', event );\n\t\t// Dispatch the eventLogged action so that the state tree can be\n\t\t// cleared/updated.\n\t\tboundActions.eventLogged( event );\n\t};\n}\n\n\n/***/ }),\n\n/***/ \"./src/changeListeners/footerLink.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = footerLink;\n/**\n * @module changeListeners/footerLink\n */\n\nvar mw = window.mediaWiki,\n\t$ = jQuery;\n\n/**\n * Creates the link element and appends it to the footer element.\n *\n * The following elements are considered to be the footer element (highest\n * priority to lowest):\n *\n * # `#footer-places`\n * # `#f-list`\n * # The parent element of `#footer li`, which is either an `ol` or `ul`.\n *\n * @return {jQuery} The link element\n */\nfunction createFooterLink() {\n\tvar $link = $( '
  • ' ).append(\n\t\t\t$( '' )\n\t\t\t\t.attr( 'href', '#' )\n\t\t\t\t.text( mw.message( 'popups-settings-enable' ).text() )\n\t\t),\n\t\t$footer;\n\n\t// As yet, we don't know whether the link should be visible.\n\t$link.hide();\n\n\t// From https://en.wikipedia.org/wiki/MediaWiki:Gadget-ReferenceTooltips.js,\n\t// which was written by Yair rand .\n\t$footer = $( '#footer-places, #f-list' );\n\n\tif ( $footer.length === 0 ) {\n\t\t$footer = $( '#footer li' ).parent();\n\t}\n\n\t$footer.append( $link );\n\n\treturn $link;\n}\n\n/**\n * Creates an instance of the footer link change listener.\n *\n * The change listener covers the following behaviour:\n *\n * * The \"Enable previews\" link (the \"link\") is appended to the footer menu\n * (see `createFooterLink` above).\n * * When Page Previews are disabled, then the link is shown; otherwise, the\n * link is hidden.\n * * When the user clicks the link, then the `showSettings` bound action\n * creator is called.\n *\n * @param {Object} boundActions\n * @return {ext.popups.ChangeListener}\n */\nfunction footerLink( boundActions ) {\n\tvar $footerLink;\n\n\treturn function ( prevState, state ) {\n\t\tif ( $footerLink === undefined ) {\n\t\t\t$footerLink = createFooterLink();\n\t\t\t$footerLink.click( function ( e ) {\n\t\t\t\te.preventDefault();\n\t\t\t\tboundActions.showSettings();\n\t\t\t} );\n\t\t}\n\n\t\tif ( state.settings.shouldShowFooterLink ) {\n\t\t\t$footerLink.show();\n\t\t} else {\n\t\t\t$footerLink.hide();\n\t\t}\n\t};\n}\n\n\n/***/ }),\n\n/***/ \"./src/changeListeners/index.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__footerLink__ = __webpack_require__(\"./src/changeListeners/footerLink.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eventLogging__ = __webpack_require__(\"./src/changeListeners/eventLogging.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__linkTitle__ = __webpack_require__(\"./src/changeListeners/linkTitle.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__pageviews__ = __webpack_require__(\"./src/changeListeners/pageviews.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__render__ = __webpack_require__(\"./src/changeListeners/render.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__settings__ = __webpack_require__(\"./src/changeListeners/settings.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__statsv__ = __webpack_require__(\"./src/changeListeners/statsv.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__syncUserSettings__ = __webpack_require__(\"./src/changeListeners/syncUserSettings.js\");\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n\tfooterLink: __WEBPACK_IMPORTED_MODULE_0__footerLink__[\"a\" /* default */],\n\teventLogging: __WEBPACK_IMPORTED_MODULE_1__eventLogging__[\"a\" /* default */],\n\tlinkTitle: __WEBPACK_IMPORTED_MODULE_2__linkTitle__[\"a\" /* default */],\n\tpageviews: __WEBPACK_IMPORTED_MODULE_3__pageviews__[\"a\" /* default */],\n\trender: __WEBPACK_IMPORTED_MODULE_4__render__[\"a\" /* default */],\n\tsettings: __WEBPACK_IMPORTED_MODULE_5__settings__[\"a\" /* default */],\n\tstatsv: __WEBPACK_IMPORTED_MODULE_6__statsv__[\"a\" /* default */],\n\tsyncUserSettings: __WEBPACK_IMPORTED_MODULE_7__syncUserSettings__[\"a\" /* default */]\n});\n\n\n/***/ }),\n\n/***/ \"./src/changeListeners/linkTitle.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = linkTitle;\nvar $ = jQuery;\n\n/**\n * Creates an instance of the link title change listener.\n *\n * While the user dwells on a link, then it becomes the active link. The\n * change listener will remove a link's `title` attribute while it's the\n * active link.\n *\n * @return {ext.popups.ChangeListener}\n */\nfunction linkTitle() {\n\tvar title;\n\n\t/**\n\t * Destroys the title attribute of the element, storing its value in local\n\t * state so that it can be restored later (see `restoreTitleAttr`).\n\t *\n\t * @param {Element} el\n\t */\n\tfunction destroyTitleAttr( el ) {\n\t\tvar $el = $( el );\n\n\t\t// Has the user dwelled on a link? If we've already removed its title\n\t\t// attribute, then NOOP.\n\t\tif ( title ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttitle = $el.attr( 'title' );\n\n\t\t$el.attr( 'title', '' );\n\t}\n\n\t/**\n\t * Restores the title attribute of the element.\n\t *\n\t * @param {Element} el\n\t */\n\tfunction restoreTitleAttr( el ) {\n\t\t$( el ).attr( 'title', title );\n\n\t\ttitle = undefined;\n\t}\n\n\treturn function ( prevState, state ) {\n\t\tvar hasPrevActiveLink = prevState && prevState.preview.activeLink;\n\n\t\tif ( !state.preview.enabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( hasPrevActiveLink ) {\n\n\t\t\t// Has the user dwelled on a link immediately after abandoning another\n\t\t\t// (remembering that the ABANDON_END action is delayed by\n\t\t\t// ~10e2 ms).\n\t\t\tif ( prevState.preview.activeLink !== state.preview.activeLink ) {\n\t\t\t\trestoreTitleAttr( prevState.preview.activeLink );\n\t\t\t}\n\t\t}\n\n\t\tif ( state.preview.activeLink ) {\n\t\t\tdestroyTitleAttr( state.preview.activeLink );\n\t\t}\n\t};\n}\n\n\n/***/ }),\n\n/***/ \"./src/changeListeners/pageviews.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = pageviews;\n/**\n * @module changeListeners/pageviews\n */\n\n/**\n * Creates an instance of the pageviews change listener.\n *\n * When a pageview enqueued it'll be logged using the VirtualPageView schema.\n * Note, it's the responsibility of Event Logging (and the UA) to\n * deliver logged events.\n *\n * @param {Object} boundActions\n * @param {EventTracker} pageviewTracker\n * @return {ext.popups.ChangeListener}\n */\nfunction pageviews(\n\tboundActions, pageviewTracker\n) {\n\treturn function ( _, state ) {\n\t\tvar page;\n\t\tif ( state.pageviews && state.pageviews.pageview && state.pageviews.page ) {\n\t\t\tpage = state.pageviews.page;\n\t\t\tpageviewTracker( 'event.VirtualPageView', $.extend( {},\n\t\t\t\t{\n\t\t\t\t\t/* eslint-disable camelcase */\n\t\t\t\t\tsource_page_id: page.id,\n\t\t\t\t\tsource_namespace: page.namespaceId,\n\t\t\t\t\tsource_title: page.title,\n\t\t\t\t\tsource_url: page.url\n\t\t\t\t\t/* eslint-enable camelcase */\n\t\t\t\t},\n\t\t\t\tstate.pageviews.pageview )\n\t\t\t);\n\t\t\t// Clear the pageview now its been logged.\n\t\t\tboundActions.pageviewLogged();\n\t\t}\n\t};\n}\n\n\n/***/ }),\n\n/***/ \"./src/changeListeners/render.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = render;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ui_renderer__ = __webpack_require__(\"./src/ui/renderer.js\");\n\n\n/**\n * Creates an instance of the render change listener.\n *\n * FIXME: Remove hard coupling with renderer, inject it as a parameter\n * * Wire it up in index.js\n * * Fix tests to remove require mocking\n *\n * @param {ext.popups.PreviewBehavior} previewBehavior\n * @return {ext.popups.ChangeListener}\n */\nfunction render( previewBehavior ) {\n\tvar preview;\n\n\treturn function ( prevState, state ) {\n\t\tif ( state.preview.shouldShow && !preview ) {\n\t\t\tpreview = __WEBPACK_IMPORTED_MODULE_0__ui_renderer__[\"b\" /* render */]( state.preview.fetchResponse );\n\t\t\tpreview.show(\n\t\t\t\tstate.preview.activeEvent,\n\t\t\t\tpreviewBehavior,\n\t\t\t\tstate.preview.activeToken\n\t\t\t);\n\t\t} else if ( !state.preview.shouldShow && preview ) {\n\t\t\tpreview.hide();\n\t\t\tpreview = undefined;\n\t\t}\n\t};\n}\n\n\n/***/ }),\n\n/***/ \"./src/changeListeners/settings.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = settings;\n/**\n * Creates an instance of the settings change listener.\n *\n * @param {Object} boundActions\n * @param {Object} render function that renders a jQuery el with the settings\n * @return {ext.popups.ChangeListener}\n */\nfunction settings( boundActions, render ) {\n\tvar settings;\n\n\treturn function ( prevState, state ) {\n\t\tif ( !prevState ) {\n\t\t\t// Nothing to do on initialization\n\t\t\treturn;\n\t\t}\n\n\t\t// Update global modal visibility\n\t\tif (\n\t\t\tprevState.settings.shouldShow === false &&\n\t\t\tstate.settings.shouldShow === true\n\t\t) {\n\t\t\t// Lazily instantiate the settings UI\n\t\t\tif ( !settings ) {\n\t\t\t\tsettings = render( boundActions );\n\t\t\t\tsettings.appendTo( document.body );\n\t\t\t}\n\n\t\t\t// Update the UI settings with the current settings\n\t\t\tsettings.setEnabled( state.preview.enabled );\n\n\t\t\tsettings.show();\n\t\t} else if (\n\t\t\tprevState.settings.shouldShow === true &&\n\t\t\tstate.settings.shouldShow === false\n\t\t) {\n\t\t\tsettings.hide();\n\t\t}\n\n\t\t// Update help visibility\n\t\tif ( prevState.settings.showHelp !== state.settings.showHelp ) {\n\t\t\tsettings.toggleHelp( state.settings.showHelp );\n\t\t}\n\t};\n}\n\n\n/***/ }),\n\n/***/ \"./src/changeListeners/statsv.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = statsv;\n/**\n * Creates an instance of the statsv change listener.\n *\n * The listener will log events to StatsD via the [the \"StatsD timers and\n * counters\" analytics event protocol][0].\n *\n * [0]: https://github.com/wikimedia/mediawiki-extensions-WikimediaEvents/blob/29c864a0/modules/ext.wikimediaEvents.statsd.js\n *\n * @param {Object} boundActions\n * @param {EventTracker} track\n * @return {ext.popups.ChangeListener}\n */\nfunction statsv( boundActions, track ) {\n\treturn function ( _, state ) {\n\t\tvar statsv = state.statsv;\n\n\t\tif ( statsv.action ) {\n\t\t\ttrack( statsv.action, statsv.data );\n\n\t\t\tboundActions.statsvLogged();\n\t\t}\n\t};\n}\n\n\n/***/ }),\n\n/***/ \"./src/changeListeners/syncUserSettings.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = syncUserSettings;\n/**\n * @module changeListeners/syncUserSettings\n */\n\n/**\n * Creates an instance of the user settings sync change listener.\n *\n * This change listener syncs certain parts of the state tree to user\n * settings when they change.\n *\n * Used for:\n *\n * * Enabled state: If the previews are enabled or disabled.\n * * Preview count: When the user dwells on a link for long enough that\n * a preview is shown, then their preview count will be incremented (see\n * `reducers/eventLogging.js`, and is persisted to local storage.\n *\n * @param {ext.popups.UserSettings} userSettings\n * @return {ext.popups.ChangeListener}\n */\nfunction syncUserSettings( userSettings ) {\n\n\treturn function ( prevState, state ) {\n\n\t\tsyncIfChanged(\n\t\t\tprevState, state, 'eventLogging', 'previewCount',\n\t\t\tuserSettings.setPreviewCount\n\t\t);\n\t\tsyncIfChanged(\n\t\t\tprevState, state, 'preview', 'enabled',\n\t\t\tuserSettings.setIsEnabled\n\t\t);\n\n\t};\n}\n\n/**\n * Given a state tree, reducer and property, safely return the value of the\n * property if the reducer and property exist\n * @param {Object} state tree\n * @param {String} reducer key to access on the state tree\n * @param {String} prop key to access on the reducer key of the state tree\n * @return {*}\n */\nfunction get( state, reducer, prop ) {\n\treturn state[ reducer ] && state[ reducer ][ prop ];\n}\n\n/**\n * Calls a sync function if the property prop on the property reducer on\n * the state trees has changed value.\n * @param {Object} prevState\n * @param {Object} state\n * @param {String} reducer key to access on the state tree\n * @param {String} prop key to access on the reducer key of the state tree\n * @param {Function} sync function to be called with the newest value if\n * changed\n */\nfunction syncIfChanged( prevState, state, reducer, prop, sync ) {\n\tvar current = get( state, reducer, prop );\n\tif ( prevState && ( get( prevState, reducer, prop ) !== current ) ) {\n\t\tsync( current );\n\t}\n}\n\n\n/***/ }),\n\n/***/ \"./src/constants.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BUCKETS; });\n/**\n * @module constants\n */\nvar $ = jQuery,\n\t// If bracketedDevicePixelRatio is not available default to 1 (in tests for\n\t// example)\n\tpixelRatio = $.bracketedDevicePixelRatio &&\n\t\t$.bracketedDevicePixelRatio() || 1,\n\tBUCKETS = {\n\t\toff: 'off',\n\t\ton: 'on',\n\t\tcontrol: 'control'\n\t};\n\n\n\n/* harmony default export */ __webpack_exports__[\"b\"] = ({\n\tTHUMBNAIL_SIZE: 320 * pixelRatio,\n\tEXTRACT_LENGTH: 525\n});\n\n\n/***/ }),\n\n/***/ \"./src/counts.js\":\n/***/ (function(module, exports) {\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\tvar 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 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} count\n * @return {String}\n */\nexports.getPreviewCountBucket = function getPreviewCountBucket( count ) {\n\tvar 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\n\n/***/ }),\n\n/***/ \"./src/experiments.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = createExperiments;\n/**\n * @module experiments\n */\n\n/**\n * @interface Experiments\n *\n * @global\n */\n\n/**\n * Creates a helper wrapper for the MediaWiki-provided\n * `mw.experiments#getBucket` bucketing function.\n *\n * @param {mw.experiments} mwExperiments The `mw.experiments` singleton instance\n * @return {Experiments}\n */\nfunction createExperiments( mwExperiments ) {\n\treturn {\n\n\t\t/**\n\t\t * Gets whether something is true given a name and a token.\n\t\t *\n\t\t * @example\n\t\t * import createExperiments from './src/experiments';\n\t\t * const experiments = createExperiments( mw.experiments );\n\t\t * const isFooEnabled = experiments.weightedBoolean(\n\t\t * 'foo',\n\t\t * 10 / 100, // 10% of all unique tokens should have foo enabled.\n\t\t * token\n\t\t * );\n\t\t *\n\t\t * @function\n\t\t * @name Experiments#weightedBoolean\n\t\t * @param {String} name The name of the thing. Since this is used as the\n\t\t * name of the underlying experiment it should be unique to reduce the\n\t\t * likelihood of collisions with other enabled experiments\n\t\t * @param {Number} trueWeight A number between 0 and 1, representing the\n\t\t * probability of the thing being true\n\t\t * @param {String} token A token associated with the user for the duration\n\t\t * of the experiment\n\t\t * @return {Boolean}\n\t\t */\n\t\tweightedBoolean: function ( name, trueWeight, token ) {\n\t\t\treturn mwExperiments.getBucket( {\n\t\t\t\tenabled: true,\n\n\t\t\t\tname: name,\n\t\t\t\tbuckets: {\n\t\t\t\t\t'true': trueWeight,\n\t\t\t\t\t'false': 1 - trueWeight\n\t\t\t\t}\n\t\t\t}, token ) === 'true';\n\t\t}\n\t};\n}\n\n\n/***/ }),\n\n/***/ \"./src/formatter.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = formatPlainTextExtract;\nvar $ = jQuery,\n\tmw = window.mediaWiki;\n\n/**\n * Improves the plain text extracts\n * @param {String} plainTextExtract\n * @param {String} title\n * @return {Array}\n */\nfunction formatPlainTextExtract( plainTextExtract, title ) {\n\tvar 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\tvar regExp, escapedTitle,\n\t\telements = [],\n\t\tboldIdentifier = '',\n\t\tsnip = '';\n\n\ttitle = title.replace( /\\s+/g, ' ' ).trim(); // Remove extra white spaces\n\tescapedTitle = mw.RegExp.escape( title ); // Escape RegExp elements\n\tregExp = 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\t$.each( extract, function ( index, 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\n/***/ }),\n\n/***/ \"./src/gateway/index.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = createGateway;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__(\"./src/constants.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mediawiki__ = __webpack_require__(\"./src/gateway/mediawiki.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__rest__ = __webpack_require__(\"./src/gateway/rest.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__restFormatters__ = __webpack_require__(\"./src/gateway/restFormatters.js\");\n\n\n\n\n\nvar mw = mediaWiki,\n\t$ = jQuery;\n\n// Note that this interface definition is in the global scope.\n/**\n * The interface implemented by all preview gateways.\n *\n * @interface Gateway\n */\n\n/**\n * Fetches a preview for a page.\n *\n * If the underlying request is successful and contains data about the page,\n * then the resulting promise will resolve. If not, then it will reject.\n *\n * @function\n * @name Gateway#getPageSummary\n * @param {String} title The title of the page\n * @return {jQuery.Promise}\n */\n\n/**\n * Creates a gateway with sensible values for the dependencies.\n *\n * @param {mw.Map} config\n * @return {Gateway}\n */\nfunction createGateway( config ) {\n\tvar restConfig = $.extend( {}, __WEBPACK_IMPORTED_MODULE_0__constants__[\"b\" /* default */],\n\t\t{\n\t\t\tendpoint: config.get( 'wgPopupsRestGatewayEndpoint' )\n\t\t}\n\t);\n\tswitch ( config.get( 'wgPopupsGateway' ) ) {\n\t\tcase 'mwApiPlain':\n\t\t\treturn __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__mediawiki__[\"a\" /* default */])( new mw.Api(), __WEBPACK_IMPORTED_MODULE_0__constants__[\"b\" /* default */] );\n\t\tcase 'restbasePlain':\n\t\t\treturn __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__rest__[\"a\" /* default */])(\n\t\t\t\t$.ajax, restConfig, __WEBPACK_IMPORTED_MODULE_3__restFormatters__[\"a\" /* parsePlainTextResponse */] );\n\t\tcase 'restbaseHTML':\n\t\t\treturn __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__rest__[\"a\" /* default */])(\n\t\t\t\t$.ajax, restConfig, __WEBPACK_IMPORTED_MODULE_3__restFormatters__[\"b\" /* parseHTMLResponse */] );\n\t\tdefault:\n\t\t\tthrow new Error( 'Unknown gateway' );\n\t}\n}\n\n\n/***/ }),\n\n/***/ \"./src/gateway/mediawiki.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = createMediaWikiApiGateway;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__preview_model__ = __webpack_require__(\"./src/preview/model.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__formatter__ = __webpack_require__(\"./src/formatter.js\");\n/**\n * @module gateway/mediawiki\n */\n\n/**\n * @interface MediaWikiGateway\n * @extends Gateway\n *\n * @global\n */\n\n\n\n\n// Public and private cache lifetime (5 minutes)\n//\n// FIXME: Move this to src/constants.js.\nvar CACHE_LIFETIME = 300,\n\t$ = jQuery;\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 * @return {MediaWikiGateway}\n */\nfunction createMediaWikiApiGateway( api, config ) {\n\n\t/**\n\t * Fetches page data from the API.\n\t *\n\t * @function\n\t * @name MediaWikiGateway#fetch\n\t * @param {String} title\n\t * @return {jQuery.Promise}\n\t */\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: 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\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}\n\t\t} );\n\t}\n\n\tfunction getPageSummary( title ) {\n\t\treturn fetch( title )\n\t\t\t.then( extractPageFromResponse )\n\t\t\t.then( formatPlainTextExtract )\n\t\t\t.then( convertPageToModel );\n\t}\n\n\treturn {\n\t\tfetch: fetch,\n\t\textractPageFromResponse: extractPageFromResponse,\n\t\tconvertPageToModel: convertPageToModel,\n\t\tgetPageSummary: getPageSummary,\n\t\tformatPlainTextExtract: formatPlainTextExtract\n\t};\n}\n\n/**\n * Extracts page data from the API response.\n *\n * @function\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 * @function\n * @name MediaWikiGateway#formatPlainTextExtract\n * @param {Object} data The response\n * @return {Object}\n */\nfunction formatPlainTextExtract( data ) {\n\tvar result = $.extend( {}, data );\n\tresult.extract = __WEBPACK_IMPORTED_MODULE_1__formatter__[\"a\" /* formatPlainTextExtract */]( data.extract, data.title );\n\treturn result;\n}\n\n/**\n * Converts the API response to a preview model.\n *\n * @function\n * @name MediaWikiGateway#convertPageToModel\n * @param {Object} page\n * @return {PreviewModel}\n */\nfunction convertPageToModel( page ) {\n\treturn __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__preview_model__[\"b\" /* createModel */])(\n\t\tpage.title,\n\t\tpage.canonicalurl,\n\t\tpage.pagelanguagehtmlcode,\n\t\tpage.pagelanguagedir,\n\t\tpage.extract,\n\t\tpage.thumbnail,\n\t\tpage.pageid\n\t);\n}\n\n\n/***/ }),\n\n/***/ \"./src/gateway/rest.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = createRESTBaseGateway;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__preview_model__ = __webpack_require__(\"./src/preview/model.js\");\n/**\n * @module gateway/rest\n */\n\n\n\nvar RESTBASE_PROFILE = 'https://www.mediawiki.org/wiki/Specs/Summary/1.2.0',\n\tmw = window.mediaWiki,\n\t$ = jQuery;\n/**\n * @interface RESTBaseGateway\n * @extends Gateway\n *\n * @global\n */\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 {Function} 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 {RESTBaseGateway}\n */\nfunction 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 * @function\n\t * @name MediaWikiGateway#fetch\n\t * @param {String} title\n\t * @return {jQuery.Promise}\n\t */\n\tfunction fetch( title ) {\n\t\tvar 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; ' +\n\t\t\t\t\t'profile=\"' + RESTBASE_PROFILE + '\"'\n\t\t\t}\n\t\t} );\n\t}\n\n\tfunction getPageSummary( title ) {\n\t\tvar result = $.Deferred();\n\n\t\tfetch( title )\n\t\t\t.then(\n\t\t\t\tfunction ( page ) {\n\t\t\t\t\t// Endpoint response may be empty or simply missing a title.\n\t\t\t\t\tif ( !page || !page.title ) {\n\t\t\t\t\t\tpage = $.extend( true, page || {}, { title: title } );\n\t\t\t\t\t}\n\t\t\t\t\t// And extract may be omitted if empty string\n\t\t\t\t\tif ( page.extract === undefined ) {\n\t\t\t\t\t\tpage.extract = '';\n\t\t\t\t\t}\n\t\t\t\t\tresult.resolve(\n\t\t\t\t\t\tconvertPageToModel( page, config.THUMBNAIL_SIZE, extractParser ) );\n\t\t\t\t},\n\t\t\t\tfunction ( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\t// Adapt the response to the ideal API.\n\t\t\t\t\t// TODO: should we just let the client handle this too?\n\t\t\t\t\tif ( jqXHR.status === 404 ) {\n\t\t\t\t\t\tresult.resolve(\n\t\t\t\t\t\t\t__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__preview_model__[\"a\" /* createNullModel */])( title, new mw.Title( title ).getUrl() )\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// The client will choose how to handle these errors which may\n\t\t\t\t\t\t// include those due to HTTP 5xx status. The rejection typing\n\t\t\t\t\t\t// matches Fetch failures.\n\t\t\t\t\t\tresult.reject( 'http', {\n\t\t\t\t\t\t\txhr: jqXHR,\n\t\t\t\t\t\t\ttextStatus: textStatus,\n\t\t\t\t\t\t\texception: errorThrown\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\treturn result.promise();\n\t}\n\n\treturn {\n\t\tfetch: fetch,\n\t\tconvertPageToModel: convertPageToModel,\n\t\tgetPageSummary: getPageSummary\n\t};\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 {Object}\n */\nfunction generateThumbnailData( thumbnail, original, thumbSize ) {\n\tvar parts = thumbnail.source.split( '/' ),\n\t\tlastPart = parts[ parts.length - 1 ],\n\t\tfilename,\n\t\tfilenamePxIndex,\n\t\twidth,\n\t\theight;\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\tfilenamePxIndex = 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.\n\t\treturn original;\n\t}\n\tfilename = lastPart.substr( filenamePxIndex + 3 );\n\n\t// Scale the thumbnail's largest dimension.\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\treturn original;\n\t}\n\n\tparts[ parts.length - 1 ] = width + 'px-' + filename;\n\n\treturn {\n\t\tsource: parts.join( '/' ),\n\t\twidth: width,\n\t\theight: height\n\t};\n}\n\n/**\n * Converts the API response to a preview model.\n *\n * @function\n * @name RESTBaseGateway#convertPageToModel\n * @param {Object} page\n * @param {Number} thumbSize\n * @param {Function} extractParser\n * @return {PreviewModel}\n */\nfunction convertPageToModel( page, thumbSize, extractParser ) {\n\treturn __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__preview_model__[\"b\" /* 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.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\n\n/***/ }),\n\n/***/ \"./src/gateway/restFormatters.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = parseHTMLResponse;\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = parsePlainTextResponse;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__formatter__ = __webpack_require__(\"./src/formatter.js\");\n\n\n/**\n * Prepare extract\n * @param {Object} page Rest response\n * @return {Array} An array of DOM Elements\n */\nfunction parseHTMLResponse( page ) {\n\tvar extract = page.extract_html;\n\n\treturn extract.length === 0 ? [] : $.parseHTML( extract );\n}\n\n/**\n * Prepare extract\n * @param {Object} page Rest response\n * @return {Array} An array of DOM Elements\n */\nfunction parsePlainTextResponse( page ) {\n\treturn __WEBPACK_IMPORTED_MODULE_0__formatter__[\"a\" /* formatPlainTextExtract */]( page.extract, page.title );\n}\n\n\n/***/ }),\n\n/***/ \"./src/getUserBucket.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * What is the bucket for the given user given the enabled sampling rate?\n *\n * @param {mw.experiments} experiments The `mw.experiments` singleton instance\n * @param {Number} experimentGroupSize [0,1] of users of which should be\n * subjected to an A/B test. The remaining users will be put in the 'off'\n * bucket.\n * @param {string} sessionId a unique session token\n *\n * @return {string} bucket that the user belongs to (off/control/on)\n */\nfunction getUserBucket( experiments, experimentGroupSize, sessionId ) {\n\tvar control = experimentGroupSize / 2;\n\tif ( !experimentGroupSize ) {\n\t\t// no users are subject to experiment\n\t\treturn 'on';\n\t}\n\n\treturn experiments.getBucket( {\n\t\tname: 'ext.Popups.visibility',\n\t\tenabled: true,\n\t\tbuckets: {\n\t\t\toff: 1 - experimentGroupSize,\n\t\t\tcontrol: control,\n\t\t\ton: control\n\t\t}\n\t}, sessionId );\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (getUserBucket);\n\n\n/***/ }),\n\n/***/ \"./src/index.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(\"./node_modules/redux/dist/redux.min.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_redux__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux_thunk__ = __webpack_require__(\"./node_modules/redux-thunk/dist/redux-thunk.min.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux_thunk___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_redux_thunk__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__gateway__ = __webpack_require__(\"./src/gateway/index.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__userSettings__ = __webpack_require__(\"./src/userSettings.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__previewBehavior__ = __webpack_require__(\"./src/previewBehavior.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ui_settingsDialog__ = __webpack_require__(\"./src/ui/settingsDialog.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__changeListener__ = __webpack_require__(\"./src/changeListener.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isEnabled__ = __webpack_require__(\"./src/isEnabled.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__title__ = __webpack_require__(\"./src/title.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__ui_renderer__ = __webpack_require__(\"./src/ui/renderer.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__experiments__ = __webpack_require__(\"./src/experiments.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__instrumentation_statsv__ = __webpack_require__(\"./src/instrumentation/statsv.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__instrumentation_eventLogging__ = __webpack_require__(\"./src/instrumentation/eventLogging.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__changeListeners__ = __webpack_require__(\"./src/changeListeners/index.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__actions__ = __webpack_require__(\"./src/actions.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__reducers__ = __webpack_require__(\"./src/reducers/index.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__integrations_mwpopups__ = __webpack_require__(\"./src/integrations/mwpopups.js\");\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__getUserBucket__ = __webpack_require__(\"./src/getUserBucket.js\");\n/**\n * @module popups\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar mw = mediaWiki,\n\t$ = jQuery,\n\n\tBLACKLISTED_LINKS = [\n\t\t'.extiw',\n\t\t'.image',\n\t\t'.new',\n\t\t'.internal',\n\t\t'.external',\n\t\t'.oo-ui-buttonedElement-button',\n\t\t'.cancelLink a'\n\t];\n\n/**\n * @typedef {Function} EventTracker\n *\n * An analytics event tracker, i.e. `mw.track`.\n *\n * @param {String} topic\n * @param {Object} data\n *\n * @global\n */\n\n/**\n * Gets the appropriate analytics event tracker for logging metrics to StatsD\n * via [the \"StatsD timers and counters\" analytics event protocol][0].\n *\n * If logging metrics to StatsD is enabled for the duration of the user's\n * session, then the appriopriate function is `mw.track`; otherwise it's\n * `$.noop`.\n *\n * [0]: https://github.com/wikimedia/mediawiki-extensions-WikimediaEvents/blob/29c864a0/modules/ext.wikimediaEvents.statsd.js\n *\n * @param {Object} user\n * @param {Object} config\n * @param {Experiments} experiments\n * @return {EventTracker}\n */\nfunction getStatsvTracker( user, config, experiments ) {\n\treturn __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__instrumentation_statsv__[\"a\" /* isEnabled */])( user, config, experiments ) ? mw.track : $.noop;\n}\n\n/**\n * Gets the appropriate analytics event tracker for logging virtual pageviews.\n *\n * @param {Object} config\n * @return {EventTracker}\n */\nfunction getPageViewTracker( config ) {\n\treturn config.get( 'wgPopupsVirtualPageViews' ) ? mw.track : $.noop;\n}\n\n/**\n * Gets the appropriate analytics event tracker for logging EventLogging events\n * via [the \"EventLogging subscriber\" analytics event protocol][0].\n *\n * If logging EventLogging events is enabled for the duration of the user's\n * session, then the appriopriate function is `mw.track`; otherwise it's\n * `$.noop`.\n *\n * [0]: https://github.com/wikimedia/mediawiki-extensions-EventLogging/blob/d1409759/modules/ext.eventLogging.subscriber.js\n *\n * @param {Object} user\n * @param {Object} config\n * @param {String} bucket for user\n * @param {Window} window\n * @return {EventTracker}\n */\nfunction getEventLoggingTracker( user, config, bucket, window ) {\n\treturn __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__instrumentation_eventLogging__[\"a\" /* isEnabled */])(\n\t\tuser,\n\t\tconfig,\n\t\tbucket,\n\t\twindow\n\t) ? mw.track : $.noop;\n}\n\n/**\n * Returns timestamp since the beginning of the current document's origin\n * as reported by `window.performance.now()`. See\n * https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp#The_time_origin\n * for a detailed explanation of the time origin.\n *\n * The value returned by this function is used for [the `timestamp` property\n * of the Schema:Popups events sent by the EventLogging\n * instrumentation](./src/changeListeners/eventLogging.js).\n *\n * @return {number|null}\n */\nfunction getCurrentTimestamp() {\n\tif ( window.performance && window.performance.now ) {\n\t\t// return an integer; see T182000\n\t\treturn Math.round( window.performance.now() );\n\t}\n\treturn null;\n}\n\n/**\n * Subscribes the registered change listeners to the\n * [store](http://redux.js.org/docs/api/Store.html#store).\n *\n * @param {Redux.Store} store\n * @param {Object} actions\n * @param {UserSettings} userSettings\n * @param {Function} settingsDialog\n * @param {PreviewBehavior} previewBehavior\n * @param {EventTracker} statsvTracker\n * @param {EventTracker} eventLoggingTracker\n * @param {EventTracker} pageviewTracker\n * @param {Function} getCurrentTimestamp\n */\nfunction registerChangeListeners(\n\tstore, actions, userSettings, settingsDialog, previewBehavior,\n\tstatsvTracker, eventLoggingTracker, pageviewTracker, getCurrentTimestamp\n) {\n\t__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__changeListener__[\"a\" /* default */])( store, __WEBPACK_IMPORTED_MODULE_13__changeListeners__[\"a\" /* default */].footerLink( actions ) );\n\t__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__changeListener__[\"a\" /* default */])( store, __WEBPACK_IMPORTED_MODULE_13__changeListeners__[\"a\" /* default */].linkTitle() );\n\t__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__changeListener__[\"a\" /* default */])( store, __WEBPACK_IMPORTED_MODULE_13__changeListeners__[\"a\" /* default */].render( previewBehavior ) );\n\t__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__changeListener__[\"a\" /* default */])(\n\t\tstore, __WEBPACK_IMPORTED_MODULE_13__changeListeners__[\"a\" /* default */].statsv( actions, statsvTracker ) );\n\t__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__changeListener__[\"a\" /* default */])(\n\t\tstore, __WEBPACK_IMPORTED_MODULE_13__changeListeners__[\"a\" /* default */].syncUserSettings( userSettings ) );\n\t__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__changeListener__[\"a\" /* default */])(\n\t\tstore, __WEBPACK_IMPORTED_MODULE_13__changeListeners__[\"a\" /* default */].settings( actions, settingsDialog ) );\n\t__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__changeListener__[\"a\" /* default */])(\n\t\tstore,\n\t\t__WEBPACK_IMPORTED_MODULE_13__changeListeners__[\"a\" /* default */].eventLogging(\n\t\t\tactions, eventLoggingTracker, getCurrentTimestamp\n\t\t) );\n\t__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__changeListener__[\"a\" /* default */])( store,\n\t\t__WEBPACK_IMPORTED_MODULE_13__changeListeners__[\"a\" /* default */].pageviews( actions, pageviewTracker )\n\t);\n}\n\n/*\n * Initialize the application by:\n * 1. Creating the state store\n * 2. Binding the actions to such store\n * 3. Trigger the boot action to bootstrap the system\n * 4. When the page content is ready:\n * - Process the eligible links for page previews\n * - Initialize the renderer\n * - Bind hover and click events to the eligible links to trigger actions\n */\nmw.requestIdleCallback( function () {\n\tvar compose = __WEBPACK_IMPORTED_MODULE_0_redux__[\"compose\"],\n\t\tuserBucket,\n\t\tstore,\n\t\tboundActions,\n\t\tpageviewTracker,\n\n\t\t// So-called \"services\".\n\t\tgenerateToken = mw.user.generateRandomSessionId,\n\t\tgateway = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__gateway__[\"a\" /* default */])( mw.config ),\n\t\tuserSettings,\n\t\tsettingsDialog,\n\t\texperiments,\n\t\tstatsvTracker,\n\t\teventLoggingTracker,\n\t\tisEnabled,\n\t\tpreviewBehavior;\n\n\tuserBucket = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_17__getUserBucket__[\"a\" /* default */])(\n\t\tmw.experiments,\n\t\tmw.config.get( 'wgPopupsAnonsExperimentalGroupSize' ),\n\t\tmw.user.sessionId() );\n\tuserSettings = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__userSettings__[\"a\" /* default */])( mw.storage );\n\tsettingsDialog = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__ui_settingsDialog__[\"a\" /* default */])();\n\texperiments = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__experiments__[\"a\" /* default */])( mw.experiments );\n\tstatsvTracker = getStatsvTracker( mw.user, mw.config, experiments );\n\t// Virtual pageviews are always tracked.\n\tpageviewTracker = getPageViewTracker( mw.config );\n\teventLoggingTracker = getEventLoggingTracker(\n\t\tmw.user,\n\t\tmw.config,\n\t\tuserBucket,\n\t\twindow\n\t);\n\n\tisEnabled = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__isEnabled__[\"a\" /* default */])( mw.user, userSettings, mw.config, userBucket );\n\n\t// If debug mode is enabled, then enable Redux DevTools.\n\tif ( mw.config.get( 'debug' ) === true ) {\n\t\t// eslint-disable-next-line no-underscore-dangle\n\t\tcompose = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n\t}\n\n\tstore = __WEBPACK_IMPORTED_MODULE_0_redux__[\"createStore\"](\n\t\t__WEBPACK_IMPORTED_MODULE_0_redux__[\"combineReducers\"]( __WEBPACK_IMPORTED_MODULE_15__reducers__[\"a\" /* default */] ),\n\t\tcompose( __WEBPACK_IMPORTED_MODULE_0_redux__[\"applyMiddleware\"](\n\t\t\t__WEBPACK_IMPORTED_MODULE_1_redux_thunk__[\"default\"]\n\t\t) )\n\t);\n\tboundActions = __WEBPACK_IMPORTED_MODULE_0_redux__[\"bindActionCreators\"]( __WEBPACK_IMPORTED_MODULE_14__actions__, store.dispatch );\n\n\tpreviewBehavior = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__previewBehavior__[\"a\" /* default */])( mw.config, mw.user, boundActions );\n\n\tregisterChangeListeners(\n\t\tstore, boundActions, userSettings, settingsDialog,\n\t\tpreviewBehavior, statsvTracker, eventLoggingTracker,\n\t\tpageviewTracker,\n\t\tgetCurrentTimestamp\n\t);\n\n\tboundActions.boot(\n\t\tisEnabled,\n\t\tmw.user,\n\t\tuserSettings,\n\t\tgenerateToken,\n\t\tmw.config,\n\t\twindow.location.href\n\t);\n\n\t/*\n\t * Register external interface exposing popups internals so that other\n\t * extensions can query it (T171287)\n\t */\n\tmw.popups = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_16__integrations_mwpopups__[\"a\" /* default */])( store );\n\n\tmw.hook( 'wikipage.content' ).add( function ( $container ) {\n\t\tvar invalidLinksSelector = BLACKLISTED_LINKS.join( ', ' ),\n\t\t\tvalidLinkSelector = 'a[href][title]:not(' + invalidLinksSelector + ')';\n\n\t\t__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__ui_renderer__[\"a\" /* init */])();\n\n\t\t$container\n\t\t\t.on( 'mouseover keyup', validLinkSelector, function ( event ) {\n\t\t\t\tvar mwTitle = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__title__[\"a\" /* fromElement */])( this, mw.config );\n\n\t\t\t\tif ( mwTitle ) {\n\t\t\t\t\tboundActions.linkDwell(\n\t\t\t\t\t\tmwTitle, this, event, gateway, generateToken\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.on( 'mouseout blur', validLinkSelector, function () {\n\t\t\t\tvar mwTitle = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__title__[\"a\" /* fromElement */])( this, mw.config );\n\n\t\t\t\tif ( mwTitle ) {\n\t\t\t\t\tboundActions.abandon( this );\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.on( 'click', validLinkSelector, function () {\n\t\t\t\tvar mwTitle = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__title__[\"a\" /* fromElement */])( this, mw.config );\n\n\t\t\t\tif ( mwTitle ) {\n\t\t\t\t\tboundActions.linkClick( this );\n\t\t\t\t}\n\t\t\t} );\n\n\t} );\n} );\n\nwindow.Redux = __WEBPACK_IMPORTED_MODULE_0_redux__;\nwindow.ReduxThunk = __WEBPACK_IMPORTED_MODULE_1_redux_thunk__;\n\n\n/***/ }),\n\n/***/ \"./src/instrumentation/eventLogging.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = isEnabled;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__(\"./src/constants.js\");\n/**\n * @module instrumentation/eventLogging\n */\n\n\n/**\n * Gets whether EventLogging logging is enabled for the duration of the user's\n * session.\n * If wgPopupsEventLogging is false this will return false unless debug=true has\n * been enabled.\n * If an experiment is being run (ie. wgPopupsAnonsExperimentalGroupSize has\n * been defined) then event logging will only be enabled for those in the `on`\n * or `control` groups.\n * However, if the UA doesn't support [the Beacon API][1], then bucketing is\n * disabled.\n *\n * [1]: https://w3c.github.io/beacon/\n *\n * @param {mw.user} user The `mw.user` singleton instance\n * @param {mw.Map} config The `mw.config` singleton instance\n * @param {String} bucket that the user is in (see constants.js)\n * @param {Window} window\n * @return {Boolean}\n */\nfunction isEnabled( user, config, bucket, window ) {\n\t// if debug mode is on, always enable event logging. @see T168847\n\tif ( config.get( 'debug' ) === true ) {\n\t\treturn true;\n\t}\n\n\tif ( !config.get( 'wgPopupsEventLogging' ) ) {\n\t\treturn false;\n\t}\n\n\tif (\n\t\t!window.navigator ||\n\t\t!$.isFunction( window.navigator.sendBeacon )\n\t) {\n\t\treturn false;\n\t}\n\n\treturn user.isAnon() && bucket !== __WEBPACK_IMPORTED_MODULE_0__constants__[\"a\" /* BUCKETS */].off;\n}\n\n\n/***/ }),\n\n/***/ \"./src/instrumentation/statsv.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = isEnabled;\n/**\n * @module instrumentation/statsv\n */\n\n/**\n * Gets whether Graphite logging (via [the statsv HTTP endpoint][0]) is enabled\n * for the duration of the user's session. The bucketing rate is controlled by\n * `wgPopupsStatsvSamplingRate`.\n *\n * [0]: https://wikitech.wikimedia.org/wiki/Graphite#statsv\n *\n * @param {mw.user} user The `mw.user` singleton instance\n * @param {mw.Map} config The `mw.config` singleton instance\n * @param {Experiments} experiments\n * @return {Boolean}\n */\nfunction isEnabled( user, config, experiments ) {\n\tvar bucketingRate = config.get( 'wgPopupsStatsvSamplingRate', 0 );\n\n\treturn experiments.weightedBoolean(\n\t\t'ext.Popups.statsv',\n\t\tbucketingRate,\n\t\tuser.sessionId()\n\t);\n}\n\n\n/***/ }),\n\n/***/ \"./src/integrations/mwpopups.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = createMwPopups;\n/**\n * @module MediaWiki-Popups Integration\n */\n\n/**\n * This function provides a mw.popups object which can be used by 3rd party\n * to interact with Popups. Currently it allows only to read isEnabled flag.\n *\n * @param {Redux.Store} store Popups store\n * @return {Object} external Popups interface\n */\nfunction createMwPopups( store ) {\n\treturn {\n\t\tisEnabled: function isEnabled() {\n\t\t\treturn store.getState().preview.enabled;\n\t\t}\n\t};\n\n}\n\n\n/***/ }),\n\n/***/ \"./src/isEnabled.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = isEnabled;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__(\"./src/constants.js\");\n/**\n * @module isEnabled\n */\n\n\n/**\n * Given the global state of the application, creates a function that gets\n * whether or not the user should have Page Previews enabled.\n *\n * Page Previews is disabled when the Navigation Popups gadget is enabled.\n *\n * If Page Previews is configured as a beta feature (see\n * `$wgPopupsBetaFeature`), the user must be logged in and have enabled the\n * beta feature in order to see previews. Logged out users won't be able\n * to see the feature.\n *\n * If Page Previews is configured as a user preference, then the user must\n * either be logged in and have enabled the preference or be logged out and have\n * not disabled previews via the settings modal. Logged out users who have not\n * disabled or enabled the previews via the settings modal will be subject to\n * wgPopupsAnonsExperimentalGroupSize if defined.\n *\n * @param {mw.user} user The `mw.user` singleton instance\n * @param {Object} userSettings An object returned by `userSettings.js`\n * @param {mw.Map} config\n * @param {String} bucket the user belongs to (off, on or control)\n *\n * @return {Boolean}\n */\nfunction isEnabled( user, userSettings, config, bucket ) {\n\tif ( config.get( 'wgPopupsConflictsWithNavPopupGadget' ) ) {\n\t\treturn false;\n\t}\n\n\tif ( !user.isAnon() ) {\n\t\treturn config.get( 'wgPopupsShouldSendModuleToUser' );\n\t}\n\n\tif ( config.get( 'wgPopupsBetaFeature' ) ) {\n\t\treturn false;\n\t}\n\n\tif ( !userSettings.hasIsEnabled() ) {\n\t\treturn bucket === __WEBPACK_IMPORTED_MODULE_0__constants__[\"a\" /* BUCKETS */].on;\n\t}\n\n\treturn userSettings.getIsEnabled();\n}\n\n\n/***/ }),\n\n/***/ \"./src/preview/model.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export TYPE_GENERIC */\n/* unused harmony export TYPE_PAGE */\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = createModel;\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = createNullModel;\n/**\n * @module preview/model\n */\n\n/**\n * @constant {String}\n */\nvar TYPE_GENERIC = 'generic';\n\n/**\n * @constant {String}\n */\nvar TYPE_PAGE = 'page'; // eslint-disable-line one-var\n\n/**\n * @typedef {Object} PreviewModel\n * @property {String} title\n * @property {String} url The canonical URL of the page being previewed\n * @property {String} languageCode\n * @property {String} languageDirection Either \"ltr\" or \"rtl\"\n * @property {?Array} 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} type Either \"extract\" or \"generic\"\n * @property {?Object} thumbnail\n *\n * @global\n */\n\n/**\n * Creates a 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} extract\n * @param {?Object} thumbnail\n * @param {?Number} pageId\n * @return {PreviewModel}\n */\nfunction createModel(\n\ttitle,\n\turl,\n\tlanguageCode,\n\tlanguageDirection,\n\textract,\n\tthumbnail,\n\tpageId\n) {\n\tvar processedExtract = processExtract( extract );\n\n\treturn {\n\t\ttitle: title,\n\t\turl: url,\n\t\tlanguageCode: languageCode,\n\t\tlanguageDirection: languageDirection,\n\t\textract: processedExtract,\n\t\ttype: processedExtract === undefined ? TYPE_GENERIC : TYPE_PAGE,\n\t\tthumbnail: thumbnail,\n\t\tpageId: pageId\n\t};\n}\n\n/**\n * Creates an empty preview model.\n *\n * @param {!String} title\n * @param {!String} url\n * @return {!PreviewModel}\n */\nfunction createNullModel( title, url ) {\n\treturn createModel( title, url, '', '', [], '' );\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/***/ }),\n\n/***/ \"./src/previewBehavior.js\":\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = createPreviewBehavior;\n/**\n * @module previewBehaviour\n */\n\nvar mw = window.mediaWiki,\n\t$ = jQuery;\n\n/**\n * A collection of event handlers specific to how the user interacts with all\n * previews. The event handlers are are agnostic to how/when they are bound\n * //but not to what they are bound//, i.e. the showSettings event handler is\n * written to be bound to either an `` or `