Commit b80bb9ba authored by Robert Nix's avatar Robert Nix

That sure was a lot of files

parent 4264ad8f
......@@ -14,6 +14,5 @@ dev-scripts/remotes
.DS_Store
tests/report
.bundle/
resources/dist/
/.nyc_output/
/.eslintcache
this.mfModules=this.mfModules||{},this.mfModules["mediawiki.template.hogan"]=(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"./node_modules/hogan.js/lib/compiler.js":function(n,t,e){!function(n){var t=/\S/,e=/\"/g,r=/\n/g,i=/\r/g,o=/\\/g,u={"#":1,"^":2,"/":3,"!":4,">":5,"<":6,"=":7,_v:8,"{":9,"&":10};function s(n){"}"===n.n.substr(n.n.length-1)&&(n.n=n.n.substring(0,n.n.length-1))}function c(n){return n.trim?n.trim():n.replace(/^\s*|\s*$/g,"")}function l(n,t,e){if(t.charAt(e)!=n.charAt(0))return!1;for(var r=1,i=n.length;r<i;r++)if(t.charAt(e+r)!=n.charAt(r))return!1;return!0}function a(n,t){for(var e=0,r=t.length;e<r;e++)if(t[e].o==n.n)return n.tag="#",!0}function h(n,t,e){for(var r=0,i=e.length;r<i;r++)if(e[r].c==n&&e[r].o==t)return!0}function f(n){return n.replace(o,"\\\\").replace(e,'\\"').replace(r,"\\n").replace(i,"\\r")}function g(n){return~n.indexOf(".")?"d":"f"}function p(n){for(var t="",e=0,r=n.length;e<r;e++){var i=n[e].tag;"#"==i?t+=m(n[e].nodes,n[e].n,g(n[e].n),n[e].i,n[e].end,n[e].otag+" "+n[e].ctag):"^"==i?t+=d(n[e].nodes,n[e].n,g(n[e].n)):"<"==i||">"==i?t+=v(n[e]):"{"==i||"&"==i?t+=b(n[e].n,g(n[e].n)):"\n"==i?t+=w('"\\n"'+(n.length-1==e?"":" + i")):"_v"==i?t+=_(n[e].n,g(n[e].n)):void 0===i&&(t+=w('"'+f(n[e])+'"'))}return t}function m(n,t,e,r,i,o){return"if(_.s(_."+e+'("'+f(t)+'",c,p,1),c,p,0,'+r+","+i+',"'+o+'")){_.rs(c,p,function(c,p,_){'+p(n)+"});c.pop();}"}function d(n,t,e){return"if(!_.s(_."+e+'("'+f(t)+'",c,p,1),c,p,1,0,0,"")){'+p(n)+"};"}function v(n){return'_.b(_.rp("'+f(n.n)+'",c,p,"'+(n.indent||"")+'"));'}function b(n,t){return"_.b(_.t(_."+t+'("'+f(n)+'",c,p,0)));'}function _(n,t){return"_.b(_.v(_."+t+'("'+f(n)+'",c,p,0)));'}function w(n){return"_.b("+n+");"}n.scan=function(n,e){var r=n.length,i=0,o=null,a=null,h="",f=[],g=!1,p=0,m=0,d="{{",v="}}";function b(){h.length>0&&(f.push(new String(h)),h="")}function _(n,e){if(b(),n&&function(){for(var n=!0,e=m;e<f.length;e++)if(!(n=f[e].tag&&u[f[e].tag]<u._v||!f[e].tag&&null===f[e].match(t)))return!1;return n}())for(var r,i=m;i<f.length;i++)f[i].tag||((r=f[i+1])&&">"==r.tag&&(r.indent=f[i].toString()),f.splice(i,1));else e||f.push({tag:"\n"});g=!1,m=f.length}function w(n,t){var e="="+v,r=n.indexOf(e,t),i=c(n.substring(n.indexOf("=",t)+1,r)).split(" ");return d=i[0],v=i[1],r+e.length-1}for(e&&(e=e.split(" "),d=e[0],v=e[1]),p=0;p<r;p++)0==i?l(d,n,p)?(--p,b(),i=1):"\n"==n.charAt(p)?_(g):h+=n.charAt(p):1==i?(p+=d.length-1,"="==(o=(a=u[n.charAt(p+1)])?n.charAt(p+1):"_v")?(p=w(n,p),i=0):(a&&p++,i=2),g=p):l(v,n,p)?(f.push({tag:o,n:c(h),otag:d,ctag:v,i:"/"==o?g-v.length:p+d.length}),h="",p+=v.length-1,i=0,"{"==o&&("}}"==v?p++:s(f[f.length-1]))):h+=n.charAt(p);return _(g,!0),f},n.generate=function(t,e,r){var i='var _=this;_.b(i=i||"");'+p(t)+"return _.fl();";return r.asString?"function(c,p,i){"+i+";}":new n.Template(new Function("c","p","i",i),e,n,r)},n.parse=function(n,t,e){return function n(t,e,r,i){for(var o=[],u=null,s=null;t.length>0;)if("#"==(s=t.shift()).tag||"^"==s.tag||a(s,i))r.push(s),s.nodes=n(t,s.tag,r,i),o.push(s);else{if("/"==s.tag){if(0===r.length)throw new Error("Closing tag without opener: /"+s.n);if(u=r.pop(),s.n!=u.n&&!h(s.n,u.n,i))throw new Error("Nesting error: "+u.n+" vs. "+s.n);return u.end=s.i,o}o.push(s)}if(r.length>0)throw new Error("missing closing tag: "+r.pop().n);return o}(n,0,[],(e=e||{}).sectionTags||[])},n.cache={},n.compile=function(n,t){var e=n+"||"+!!(t=t||{}).asString,r=this.cache[e];return r||(r=this.generate(this.parse(this.scan(n,t.delimiters),n,t),n,t),this.cache[e]=r)}}(t)},"./node_modules/hogan.js/lib/hogan.js":function(n,t,e){var r=e("./node_modules/hogan.js/lib/compiler.js");r.Template=e("./node_modules/hogan.js/lib/template.js").Template,n.exports=r},"./node_modules/hogan.js/lib/template.js":function(n,t,e){!function(n,t){n.Template=function(n,t,e,r){this.r=n||this.r,this.c=e,this.options=r,this.text=t||"",this.buf=""},n.Template.prototype={r:function(n,t,e){return""},v:function(n){return n=c(n),s.test(n)?n.replace(e,"&amp;").replace(r,"&lt;").replace(i,"&gt;").replace(o,"&#39;").replace(u,"&quot;"):n},t:c,render:function(n,t,e){return this.ri([n],t||{},e)},ri:function(n,t,e){return this.r(n,t,e)},rp:function(n,t,e,r){var i=e[n];return i?(this.c&&"string"==typeof i&&(i=this.c.compile(i,this.options)),i.ri(t,e,r)):""},rs:function(n,t,e){var r=n[n.length-1];if(l(r))for(var i=0;i<r.length;i++)n.push(r[i]),e(n,t,this),n.pop();else e(n,t,this)},s:function(n,t,e,r,i,o,u){var s;return(!l(n)||0!==n.length)&&("function"==typeof n&&(n=this.ls(n,t,e,r,i,o,u)),s=""===n||!!n,!r&&s&&t&&t.push("object"==typeof n?n:t[t.length-1]),s)},d:function(n,t,e,r){var i=n.split("."),o=this.f(i[0],t,e,r),u=null;if("."===n&&l(t[t.length-2]))return t[t.length-1];for(var s=1;s<i.length;s++)o&&"object"==typeof o&&i[s]in o?(u=o,o=o[i[s]]):o="";return!(r&&!o)&&(r||"function"!=typeof o||(t.push(u),o=this.lv(o,t,e),t.pop()),o)},f:function(n,t,e,r){for(var i=!1,o=null,u=!1,s=t.length-1;s>=0;s--)if((o=t[s])&&"object"==typeof o&&n in o){i=o[n],u=!0;break}return u?(r||"function"!=typeof i||(i=this.lv(i,t,e)),i):!r&&""},ho:function(n,t,e,r,i){var o=this.c,u=this.options;return u.delimiters=i,r=null==(r=n.call(t,r))?String(r):r.toString(),this.b(o.compile(r,u).render(t,e)),!1},b:function(n){this.buf+=n},fl:function(){var n=this.buf;return this.buf="",n},ls:function(n,t,e,r,i,o,u){var s,c=t[t.length-1];if(!r&&this.c&&n.length>0)return this.ho(n,c,e,this.text.substring(i,o),u);if("function"==typeof(s=n.call(c))){if(r)return!0;if(this.c)return this.ho(s,c,e,this.text.substring(i,o),u)}return s},lv:function(n,t,e){var r=t[t.length-1],i=n.call(r);return"function"==typeof i&&(i=c(i.call(r)),this.c&&~i.indexOf("{{"))?this.c.compile(i,this.options).render(r,e):c(i)}};var e=/&/g,r=/</g,i=/>/g,o=/\'/g,u=/\"/g,s=/[&<>\"\']/;function c(n){return String(null===n||void 0===n?"":n)}var l=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)}}(t)},"./src/mediawiki.template.hogan/mediawiki.template.hogan.js":function(n,t,e){var r=e("./node_modules/hogan.js/lib/hogan.js");mw.template.registerCompiler("hogan",{compile:r.compile.bind(r)})}},[["./src/mediawiki.template.hogan/mediawiki.template.hogan.js",0]]]);
//# sourceMappingURL=mediawiki.template.hogan.js.map.json
\ No newline at end of file
this.mfModules=this.mfModules||{},this.mfModules["mobile.categories.overlays"]=(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{"./src/mobile.categories.overlays/CategoryAddOverlay.js":function(e,t,i){var s=i("./src/mobile.startup/Overlay.js"),a=i("./src/mobile.startup/mfExtend.js"),o=i("./src/mobile.startup/util.js"),n=i("./src/mobile.categories.overlays/CategoryGateway.js"),r=i("./src/mobile.categories.overlays/CategoryLookupInputWidget.js"),l=i("./src/mobile.startup/icons.js"),c=i("./src/mobile.startup/toast.js"),g=mw.loader.require("mediawiki.router");function d(e){e.heading=mw.msg("mobile-frontend-categories-add-heading",e.title),this.eventBus=e.eventBus,s.call(this,o.extend(!0,{className:"category-overlay overlay",events:{"click .save":"onSaveClick","click .suggestion":"onCategoryClick"}},e))}a(d,s,{defaults:o.extend({},s.prototype.defaults,{waitMsg:mw.msg("mobile-frontend-categories-add-wait"),waitIcon:l.spinner().toHtmlString()}),template:mw.template.get("mobile.categories.overlays","CategoryAddOverlay.hogan"),templatePartials:o.extend({},s.prototype.templatePartials,{header:mw.template.get("mobile.categories.overlays","CategoryAddOverlayHeader.hogan"),saveHeader:mw.template.get("mobile.editor.overlay","saveHeader.hogan")}),postRender:function(){var e;s.prototype.postRender.apply(this),this.$suggestions=this.$el.find(".category-suggestions"),this.$saveButton=this.$el.find(".save"),this.wgCategories=this.options.categories,this.title=this.options.title,this.gateway=new n(this.options.api),e=new r({gateway:this.gateway,suggestions:this.$suggestions,categories:this.wgCategories,saveButton:this.$saveButton}),this.$el.find(".category-add-input").append(e.$element)},onCategoryClick:function(e){this.$el.find(e.target).closest(".suggestion").detach(),this.$el.find(".suggestion").length>0?this.$saveButton.prop("disabled",!1):this.$saveButton.prop("disabled",!0)},onSaveClick:function(){var e="",t=this;this.showHidden(".saving-header"),this.$el.find(".suggestion").each(function(){var i=t.$el.find(this).data("title");i&&(e+="\n[["+i+"]] ")}),0===e.length?c.show(mw.msg("mobile-frontend-categories-nodata"),{type:"error"}):this.gateway.save(this.title,e).then(function(){g.navigate("#"),mw.notify(mw.msg("mobile-frontend-categories-notification"))},function(){t.showHidden(".initial-header"),t.$safeButton.prop("disabled",!1),c.show(mw.msg("mobile-frontend-categories-nodata"),{type:"error"})})}}),e.exports=d},"./src/mobile.categories.overlays/CategoryGateway.js":function(e,t,i){var s,a=i("./src/mobile.startup/actionParams.js"),o=i("./src/mobile.startup/util.js"),n=i("./src/mobile.startup/search/SearchGateway.js");function r(){r.parent.apply(this,arguments)}s={continueParams:{},canContinue:!0,searchNamespace:14,save:function(e,t){return this.api.postWithToken("csrf",{action:"edit",title:e,appendtext:t,summary:mw.msg("mobile-frontend-categories-summary")})},getCategories:function(e){var t,i=this;return!1!==this.canContinue&&(t=o.extend({},{prop:"categories",titles:e,clprop:"hidden",cllimit:50},this.continueParams),this.api.get(a(t)).then(function(e){return void 0!==e.continue?i.continueParams=e.continue:i.canContinue=!1,e}))}},OO.inheritClass(r,n),o.extend(r.prototype,s),e.exports=r},"./src/mobile.categories.overlays/CategoryLookupInputWidget.js":function(e,t){function i(e){this.gateway=e.gateway,this.$suggestions=e.suggestions,this.categories=e.categories||[],this.$saveButton=e.saveButton,e.placeholder=mw.msg("mobile-frontend-categories-search"),OO.ui.TextInputWidget.call(this,e),OO.ui.mixin.LookupElement.call(this,e)}OO.inheritClass(i,OO.ui.TextInputWidget),OO.mixinClass(i,OO.ui.mixin.LookupElement),i.prototype.onLookupMenuItemChoose=function(e){var t=new OO.ui.ButtonWidget({icon:"check",label:e.label,classes:["suggestion","suggested"],flags:["progressive","primary"]});t.$element.attr("data-title",e.data),this.$suggestions.append(t.$element),this.$saveButton.prop("disabled",!1)},i.prototype.getLookupRequest=function(){return this.gateway.search(this.value)},i.prototype.getLookupCacheDataFromResponse=function(e){var t=new mw.Title(this.value,14);return e.results.unshift({title:t.toString(),displayTitle:t.getNameText()}),e},i.prototype.getLookupMenuOptionsFromData=function(e){var t=[],i=this.$element,s=this;return e.results.forEach(function(e){i.find('div[data-title="'+e.title+'"]').length||-1!==s.categories.indexOf(e.displayTitle)||t.push(new OO.ui.MenuOptionWidget({data:e.title,label:e.displayTitle}))}),t},e.exports=i},"./src/mobile.categories.overlays/CategoryTabs.js":function(e,t,i){var s=i("./src/mobile.startup/mfExtend.js"),a=i("./src/mobile.startup/util.js"),o=i("./src/mobile.startup/View.js"),n=i("./src/mobile.startup/ScrollEndEventEmitter.js"),r=i("./src/mobile.categories.overlays/CategoryGateway.js");function l(e){this.scrollEndEventEmitter=new n(e.eventBus),this.scrollEndEventEmitter.on(n.EVENT_SCROLL_END,this._loadCategories.bind(this)),this.gateway=new r(e.api),o.call(this,a.extend(!0,{events:{"click .catlink":"onCatlinkClick"}},e))}s(l,o,{isTemplateMode:!0,defaults:{normalcatlink:mw.msg("mobile-frontend-categories-normal"),hiddencatlink:mw.msg("mobile-frontend-categories-hidden")},template:mw.template.get("mobile.categories.overlays","CategoryTabs.hogan"),templatePartials:{item:mw.template.get("mobile.categories.overlays","CategoryTab.hogan")},postRender:function(){o.prototype.postRender.apply(this),this._loadCategories()},hideSpinner:function(){this.$el.find(".spinner").hide()},showSpinner:function(){this.$el.find(".spinner").show()},_loadCategories:function(){var e,t=this,i=this.$el.find(".normal-catlist"),s=this.$el.find(".hidden-catlist");this.scrollEndEventEmitter.setElement(this.$el),this.scrollEndEventEmitter.disable(),!1!==(e=this.gateway.getCategories(this.options.title))?e.then(function(e){e.query&&e.query.pages?(e.query.pages.forEach(function(e){e.categories&&e.categories.forEach(function(e){var a=mw.Title.newFromText(e.title,e.ns);e.hidden?s.append(t.templatePartials.item.render({url:a.getUrl(),title:a.getNameText()})):i.append(t.templatePartials.item.render({url:a.getUrl(),title:a.getNameText()}))})}),0===i.length&&0===i.length?t.$el.find(".content-header").text(mw.msg("mobile-frontend-categories-nocat")):0===i.length&&i.length>0&&this._changeView()):t.$el.find(".content-header").text(mw.msg("mobile-frontend-categories-nocat")),t.hideSpinner(),t.scrollEndEventEmitter.enable()}):t.hideSpinner()},onCatlinkClick:function(e){e.preventDefault(),this.$el.find(e.target).parent().hasClass("selected")||this._changeView()},_changeView:function(){this.$el.find(".category-header li").toggleClass("selected"),this.$el.find(".topic-title-list").toggleClass("hidden")}}),e.exports=l},"./src/mobile.categories.overlays/categoryOverlay.js":function(e,t,i){var s=i("./src/mobile.startup/Overlay.js"),a=i("./src/mobile.categories.overlays/CategoryTabs.js");e.exports=function(e){var t,i,o=e.isAnon?[]:[{href:"#/categories/add",className:"add continue",msg:mw.msg("mobile-frontend-categories-add")}];return t=new s({className:"category-overlay overlay",heading:mw.msg("mobile-frontend-categories-heading"),headerButtons:o}),i=new a({eventBus:e.eventBus,api:e.api,title:e.title,subheading:mw.msg("mobile-frontend-categories-subheading")}),t.$el.find(".overlay-content").append(i.$el),t}},"./src/mobile.categories.overlays/mobile.categories.overlays.js":function(e,t,i){var s=i("./src/mobile.startup/moduleLoaderSingleton.js"),a=i("./src/mobile.categories.overlays/CategoryAddOverlay.js"),o=i("./src/mobile.categories.overlays/categoryOverlay.js");s.define("mobile.categories.overlays/CategoryAddOverlay",a),s.define("mobile.categories.overlays/categoryOverlay",o)}},[["./src/mobile.categories.overlays/mobile.categories.overlays.js",0,1]]]);
//# sourceMappingURL=mobile.categories.overlays.js.map.json
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
this.mfModules=this.mfModules||{},this.mfModules["mobile.editor.ve"]=(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{"./src/mobile.editor.ve/mobile.editor.ve.js":function(e,t,i){var o=i("./src/mobile.editor.ve/schemaVisualEditorFeatureUse.js");ve.init.mw.MobileArticleTarget.static.parseSaveError=i("./src/mobile.editor.overlay/parseSaveError.js"),o(),ve.trackSubscribe("activity.",function(e,t){mw.track("mf.schemaVisualEditorFeatureUse",ve.extendObject(t,{feature:e.split(".")[1],editing_session_id:ve.init.target.overlay.sessionId}))})},"./src/mobile.editor.ve/schemaVisualEditorFeatureUse.js":function(e,t){e.exports=function(){var e=!!mw.util.getParamValue("trackdebug");(null!==mw.loader.getState("schema.VisualEditorFeatureUse")||e)&&mw.loader.using(["ext.eventLogging.subscriber"]).then(function(){var t=mw.eventLog.Schema,i=mw.config.get("wgWMESchemaEditAttemptStepSamplingRate"),o=new t("VisualEditorFeatureUse",i);mw.trackSubscribe("mf.schemaVisualEditorFeatureUse",function(t,s){var a={feature:s.feature,action:s.action,editingSessionId:s.editing_session_id};e?function(){console.log.apply(console,arguments)}(t,a):o.log(a,mw.config.get("wgWMESchemaEditAttemptStepOversample")||"visualeditor"===mw.config.get("wgMFSchemaEditAttemptStepOversample")||"all"===mw.config.get("wgMFSchemaEditAttemptStepOversample")?1:i)})})}}},[["./src/mobile.editor.ve/mobile.editor.ve.js",0,1]]]);
//# sourceMappingURL=mobile.editor.ve.js.map.json
\ No newline at end of file
{"version":3,"sources":["webpack://mfModules.[name]/./src/mobile.editor.ve/mobile.editor.ve.js","webpack://mfModules.[name]/./src/mobile.editor.ve/schemaVisualEditorFeatureUse.js"],"names":["schemaVisualEditorFeatureUse","require","ve","init","mw","MobileArticleTarget","static","parseSaveError","trackSubscribe","topic","data","track","extendObject","feature","split","editing_session_id","target","overlay","sessionId","module","exports","trackdebug","util","getParamValue","loader","getState","using","then","Schema","eventLog","sampleRate","config","get","event","action","editingSessionId","console","log","apply","arguments"],"mappings":"2LACA,IAAIA,EAA+BC,EAAS,0DAI5CC,GAAGC,KAAKC,GAAGC,oBAAoBC,OAAOC,eACrCN,EAAS,iDAEVD,IAEAE,GAAGM,eAAgB,YAAa,SAAWC,EAAOC,GACjDN,GAAGO,MAAO,kCAAmCT,GAAGU,aAAcF,GAC7DG,QAASJ,EAAMK,MAAO,KAAO,GAE7BC,mBAAoBb,GAAGC,KAAKa,OAAOC,QAAQC,uFCd7CC,EAAOC,QAAU,WAChB,IAAIC,IAAejB,GAAGkB,KAAKC,cAAe,eAEqB,OAA1DnB,GAAGoB,OAAOC,SAAU,kCAA+CJ,IAQxEjB,GAAGoB,OAAOE,OAAS,gCAAkCC,KAAM,WAC1D,IACCC,EAASxB,GAAGyB,SAASD,OACrBE,EAAa1B,GAAG2B,OAAOC,IAAK,0CAK5BhC,EAA+B,IAAI4B,EAClC,yBACAE,GAUF1B,GAAGI,eAAgB,kCAAmC,SAAWC,EAAOC,GACvE,IAAIuB,GACHpB,QAASH,EAAKG,QACdqB,OAAQxB,EAAKwB,OACbC,iBAAkBzB,EAAKK,oBAGnBM,EAdN,WAICe,QAAQC,IAAIC,MAAOF,QAASG,WAW3BF,CAAK5B,EAAOwB,GAEZjC,EAA6BqC,IAAKJ,EACjC7B,GAAG2B,OAAOC,IAAK,yCAC4C,iBAA3D5B,GAAG2B,OAAOC,IAAK,wCAC4C,QAA3D5B,GAAG2B,OAAOC,IAAK,uCACZ,EAAIF","file":"mobile.editor.ve.js","sourcesContent":["/* global ve */\nvar schemaVisualEditorFeatureUse = require( './schemaVisualEditorFeatureUse' );\n\n// FIXME Figure out a way to make this method public on some other class,\n// so that VisualEditor can call it without us overriding it like this\nve.init.mw.MobileArticleTarget.static.parseSaveError =\n\trequire( '../mobile.editor.overlay/parseSaveError' );\n\nschemaVisualEditorFeatureUse();\n// Hook up activity-tracking from VE's system to mobilefrontend's system\nve.trackSubscribe( 'activity.', function ( topic, data ) {\n\tmw.track( 'mf.schemaVisualEditorFeatureUse', ve.extendObject( data, {\n\t\tfeature: topic.split( '.' )[ 1 ],\n\t\t// eslint-disable-next-line camelcase\n\t\tediting_session_id: ve.init.target.overlay.sessionId\n\t} ) );\n} );\n","module.exports = function () {\n\tvar trackdebug = !!mw.util.getParamValue( 'trackdebug' );\n\n\tif ( mw.loader.getState( 'schema.VisualEditorFeatureUse' ) === null && !trackdebug ) {\n\t\treturn;\n\t}\n\n\t// VisualEditorFeatureUse is intended to log whenever EditAttemptStep\n\t// does, so this file references its config for sampling rates and\n\t// oversampling.\n\n\tmw.loader.using( [ 'ext.eventLogging.subscriber' ] ).then( function () {\n\t\tvar // Schema provided by ext.eventLogging.subscriber class\n\t\t\tSchema = mw.eventLog.Schema, // resource-modules-disable-line\n\t\t\tsampleRate = mw.config.get( 'wgWMESchemaEditAttemptStepSamplingRate' ),\n\t\t\t/**\n\t\t\t * Feature use schema\n\t\t\t * https://meta.wikimedia.org/wiki/Schema:VisualEditorFeatureUse\n\t\t\t */\n\t\t\tschemaVisualEditorFeatureUse = new Schema(\n\t\t\t\t'VisualEditorFeatureUse',\n\t\t\t\tsampleRate\n\t\t\t);\n\n\t\tfunction log() {\n\t\t\t// mw.log is a no-op unless resource loader is in debug mode, so\n\t\t\t// this allows trackdebug to work independently (T211698)\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.log.apply( console, arguments );\n\t\t}\n\n\t\tmw.trackSubscribe( 'mf.schemaVisualEditorFeatureUse', function ( topic, data ) {\n\t\t\tvar event = {\n\t\t\t\tfeature: data.feature,\n\t\t\t\taction: data.action,\n\t\t\t\teditingSessionId: data.editing_session_id\n\t\t\t};\n\n\t\t\tif ( trackdebug ) {\n\t\t\t\tlog( topic, event );\n\t\t\t} else {\n\t\t\t\tschemaVisualEditorFeatureUse.log( event, (\n\t\t\t\t\tmw.config.get( 'wgWMESchemaEditAttemptStepOversample' ) ||\n\t\t\t\t\tmw.config.get( 'wgMFSchemaEditAttemptStepOversample' ) === 'visualeditor' ||\n\t\t\t\t\tmw.config.get( 'wgMFSchemaEditAttemptStepOversample' ) === 'all'\n\t\t\t\t) ? 1 : sampleRate );\n\t\t\t}\n\t\t} );\n\n\t} );\n};\n"],"sourceRoot":""}
\ No newline at end of file
this.mfModules=this.mfModules||{},this.mfModules["mobile.init"]=(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{"./src/mobile.init/BetaOptInPanel.js":function(e,t,i){var n=i("./src/mobile.startup/Button.js"),o=i("./src/mobile.startup/util.js"),r=i("./src/mobile.startup/mfExtend.js"),a=i("./src/mobile.startup/View.js"),s=mw.user;function l(e){a.call(this,o.extend({className:"panel panel-inline visible",events:{"click .optin":"_onOptin","click .cancel":"_onCancel"}},e)),this._onCancelCallback=e.onCancel}r(l,a,{templatePartials:o.extend({},a.prototype.templatePartials,{button:n.prototype.template}),template:mw.template.get("mobile.init","Panel.hogan"),defaults:o.extend({},a.prototype.defaults,{postUrl:void 0,editToken:s.tokens.get("editToken"),text:mw.msg("mobile-frontend-panel-betaoptin-msg"),buttons:[new n({progressive:!0,additionalClassNames:"optin",label:mw.msg("mobile-frontend-panel-ok")}).options,new n({additionalClassNames:"cancel",label:mw.msg("mobile-frontend-panel-cancel")}).options]}),_onCancel:function(e){e.preventDefault(),this.$el.removeClass("visible"),this._onCancelCallback&&this._onCancelCallback()},_onOptin:function(e){this.$el.find(e.currentTarget).closest("form").trigger("submit")}}),e.exports=l},"./src/mobile.init/ProgressBarWidget.js":function(e,t){e.exports=function(){this.$bar=$("<div>").addClass("mobile-progressBarWidget-bar"),this.$element=$("<div>").addClass("mobile-progressBarWidget").append(this.$bar)}},"./src/mobile.init/editor.js":function(e,t,i){var n=i("./src/mobile.startup/moduleLoaderSingleton.js"),o=i("./src/mobile.startup/util.js"),r=mw.loader.require("mediawiki.router"),a=i("./src/mobile.init/ProgressBarWidget.js"),s=i("./src/mobile.startup/Overlay.js"),l=i("./src/mobile.startup/OverlayManager.js").getSingleton(),d=i("./src/mobile.startup/rlModuleLoader.js"),c=$("#ca-edit a, a#ca-edit, .mw-editsection a, .edit-link"),m=mw.user,u=i("./src/mobile.startup/toast.js"),g=i("./src/mobile.startup/CtaDrawer.js"),w=/MSIE \d\./.test(navigator.userAgent),p=mw.config.get("wgPageContentModel"),b=r.isSupported()&&!w,f=mw.config.get("wgVisualEditorConfig"),v=mw.config.get("wgUserEditCount"),h=f,y=/^\/editor\/(\d+|all)$/;function P(){var e=new mw.Uri(this.href).query.section||"all";return r.navigate("#/editor/"+e),!1}function k(e,t){var i,u,g,w=0===e.options.id;c.on("click",P),l.add(y,function(i){var r,c,u,p,b,y=$("#mw-content-text"),P=function(){var e=mw.storage.get("preferredEditor");return e||(mw.config.get("wgMFUsePreferredEditor")&&"visualeditor"===mw.user.options.get("visualeditor-editor")?"VisualEditor":"SourceEditor")}(),k={overlayManager:l,api:new mw.Api,licenseMsg:t.getLicenseMsg(),title:e.title,titleObj:e.titleObj,isAnon:m.isAnon(),isNewPage:w,editCount:v,oldId:mw.util.getParamValue("oldid"),contentLang:y.attr("lang"),contentDir:y.attr("dir"),sessionId:m.generateRandomSessionId()},C=f&&f.namespaces||[],j=mw.util.getParamValue("redlink")?"new":"click";function x(){b.abort&&b.abort(),r.detach(),$("#content").css({transform:"","padding-bottom":"","margin-bottom":""}),$("#mw-mf-page-center").css({"padding-right":"","box-sizing":""}),$(document.body).removeClass("ve-loading")}function E(e){mw.track("mf.schemaEditAttemptStep",{action:"init",type:"section",mechanism:j,editor_interface:e,editing_session_id:k.sessionId})}function M(){return E("wikitext"),mw.hook("mobileFrontend.editorOpening").fire(),d.loadModule("mobile.editor.overlay").then(function(){return new(n.require("mobile.editor.overlay/EditorOverlay"))(k)})}return"all"!==i&&(k.sectionId=e.isWikiText()?+i:null),h&&e.isWikiText()&&-1!==C.indexOf(mw.config.get("wgNamespaceNumber"))&&"translation"!==mw.config.get("wgTranslatePageTranslation")&&("VisualEditor"===P||"VisualEditor"===g)&&"SourceEditor"!==g?(E("visualeditor"),mw.hook("mobileFrontend.editorOpening").fire(),function(){var e=new a;r=$("<div>").addClass("overlay-loading-ve").append(e.$element),$(document.body).append(r).addClass("ve-loading")}(),p=o.Deferred(),k.mode="visual",k.dataPromise=mw.loader.using("ext.visualEditor.targetLoader").then(function(){return b=mw.libs.ve.targetLoader.requestPageData(k.mode,k.titleObj.getPrefixedDb(),{sessionStore:!0,section:k.sectionId||null,oldId:k.oldId||void 0,targetName:"mobile"}),p.then(function(){return b})}),mw.loader.using("ext.visualEditor.targetLoader").then(function(){return mw.libs.ve.targetLoader.addPlugin("mobile.editor.ve"),mw.libs.ve.targetLoader.loadModules(k.mode)}).then(function(){var e,t=n.require("mobile.editor.overlay/VisualEditorOverlay"),i=n.require("mobile.editor.overlay/EditorOverlay");return k.EditorOverlay=i,(e=new t(k)).on("editor-loaded",x),e},function(){return M()}).then(function(e){var t=l.stack[0];t&&t.overlay===c&&(c.off("hide",x),e.on("hide",x),l.replaceCurrent(e))}),u=window.innerWidth-document.documentElement.clientWidth,(c=new s({className:"overlay overlay-loading",noHeader:!0})).on("hide",x),c.show=function(){var e,t,n,o,r;s.prototype.show.call(this),r=!0===f.enableVisualSectionEditing||"mobile"===f.enableVisualSectionEditing,e=$("#mw-mf-page-center"),t=$("#content"),n="0"===i||"all"===i?$("#bodyContent"):$('[data-section="'+i+'"]').closest("h1, h2, h3, h4, h5, h6"),e.css({"padding-right":"+="+u,"box-sizing":"border-box"}),e.prop("scrollTop",this.scrollTop),o=n.prop("offsetTop")-this.scrollTop,o-=48,("0"===i||"all"===i||r)&&(o-=16),t.css({transform:"translate( 0, "+-o+"px )","padding-bottom":"+="+o,"margin-bottom":"-="+o}),setTimeout(p.resolve,500)},c):M()}),$("#ca-edit a").prop("href",function(e,t){var i=new mw.Uri(t);return i.query.section=0,i.toString()}),r.getPath()||!mw.util.getParamValue("veaction")&&"edit"!==mw.util.getParamValue("action")||("edit"===mw.util.getParamValue("veaction")?g="VisualEditor":"editsource"===mw.util.getParamValue("veaction")&&(g="SourceEditor"),u="#/editor/"+(mw.util.getParamValue("section")||"edit"===mw.util.getParamValue("action")&&"all"||"0"),window.history&&history.pushState?(delete(i=mw.Uri()).query.action,delete i.query.veaction,delete i.query.section,history.replaceState(null,document.title,i.toString()+u)):r.navigate(u))}function C(e,t){var i,n;!(i=mw.config.get("wgMinervaReadOnly"))&&mw.config.get("wgIsProbablyEditable")?k(e,t):(function(e){e.$el.find(".mw-editsection").hide()}(e),n=mw.config.get("wgRestrictionEdit"),mw.user.isAnon()&&Array.isArray(n)&&-1!==n.indexOf("*")?function(){var e=new g({content:mw.msg("mobile-frontend-editor-disabled-anon"),signupQueryParams:{warning:"mobile-frontend-watchlist-signup-action"}});c.on("click",function(t){return e.show(),t.preventDefault(),e}),r.route(y,function(){e.show()}),r.checkRoute()}():j(i?mw.msg("apierror-readonly"):mw.msg("mobile-frontend-editor-disabled")))}function j(e){c.on("click",function(t){u.show(e),t.preventDefault()}),r.route(y,function(){u.show(e)}),r.checkRoute()}e.exports=function(e,t){var i=0===e.options.id;"wikitext"===p&&(mw.util.getParamValue("undo")||b&&(e.inNamespace("file")&&i?j(mw.msg("mobile-frontend-editor-uploadenable")):C(e,t)))}},"./src/mobile.init/mobile.init.js":function(e,t,i){var n,o,r=mw.storage,a=mw.config.get("skin"),s=mw.config.get("wgMFIsPageContentModelEditable"),l=i("./src/mobile.init/editor.js"),d=i("./src/mobile.startup/PageGateway.js"),c=i("./src/mobile.init/BetaOptInPanel.js"),m=new d(new mw.Api),u=mw.util,g=i("./src/mobile.startup/util.js"),w=g.getWindow(),p=g.getDocument(),b=mw.user,f=i("./src/mobile.startup/context.js"),v=i("./src/mobile.startup/Page.js"),h=mw.experiments,y=mw.config.get("wgMFExperiments")||{},P=i("./src/mobile.startup/Skin.js"),k=i("./src/mobile.startup/eventBusSingleton.js"),C=i("./src/mobile.startup/references/ReferencesMobileViewGateway.js"),j=E();function x(e,t){return function(){return[e.apply(this,arguments),t.apply(this,arguments)]}}function E(){return n||function(){var e=mw.config.get("wgRestrictionEdit",[]),t=$("#content #bodyContent"),i=mw.Title.newFromText(mw.config.get("wgRelevantPageName"));0===e.length&&e.push("*");return n=new v({el:t,title:i.getPrefixedText(),titleObj:i,protection:{edit:e},revId:mw.config.get("wgRevisionId"),isMainPage:mw.config.get("wgIsMainPage"),isWatched:$("#ca-watch").hasClass("watched"),sections:m.getSectionsFromHTML(t),isMissing:0===mw.config.get("wgArticleId"),id:mw.config.get("wgArticleId"),namespaceNumber:mw.config.get("wgNamespaceNumber")})}()}function M(){var e=r.get("userFontSize","regular");p.addClass("mf-font-size-"+e)}o=new P({el:"body",page:j,referencesGateway:C.getSingleton(),eventBus:k}),w.on("resize",x($.debounce(100,function(){k.emit("resize")}),$.throttle(200,function(){k.emit("resize:throttled")}))).on("scroll",x($.debounce(100,function(){k.emit("scroll")}),$.throttle(200,function(){k.emit("scroll:throttled")}))),w.on("pageshow",function(){M()}),M(),y.betaoptin&&function(e,t){var i,n,o,a=r.get("mobile-betaoptin-token");!1===a||"~"===a||t.isMainPage()||t.inNamespace("special")||(a||(a=b.generateRandomSessionId(),r.set("mobile-betaoptin-token",a)),n="stable"===f.getMode(),o="A"===h.getBucket(e,a),n&&(o||u.getParamValue("debug"))&&(i=new c({postUrl:u.getUrl("Special:MobileOptions",{returnto:t.title}),onCancel:function(){r.set("mobile-betaoptin-token","~")}})).appendTo(t.getLeadSectionElement()),mw.track("mobile.betaoptin",{isPanelShown:void 0!==i}))}(y.betaoptin,E()),window.console&&window.console.log&&window.console.log.apply&&mw.config.get("wgMFEnableJSConsoleRecruitment")&&console.log(mw.msg("mobile-frontend-console-recruit")),!j.inNamespace("special")&&s&&"minerva"===a&&null!==f.getMode()&&l(j,o),t={getCurrentPage:E},g.extend(mw.mobileFrontend,t),mw.log.deprecate(mw.mobileFrontend,"getCurrentPage",E),mw.mobileFrontend.deprecate("mobile.init/skin",o,"instance of mobile.startup/Skin. Minerva should have no dependencies on mobile.init"),e.exports=t}},[["./src/mobile.init/mobile.init.js",0,1]]]);
//# sourceMappingURL=mobile.init.js.map.json
\ No newline at end of file
This diff is collapsed.
this.mfModules=this.mfModules||{},this.mfModules["mobile.languages.structured"]=(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{"./src/mobile.languages.structured/LanguageSearcher.js":function(e,a,s){var t=s("./src/mobile.startup/View.js"),n=s("./src/mobile.startup/util.js"),r=s("./src/mobile.languages.structured/util.js");function u(e){var a=r.getStructuredLanguages(e.languages,e.variants,r.getFrequentlyUsedLanguages(),e.deviceLanguage);t.call(this,n.extend({className:"language-searcher",events:{"click a":"onLinkClick","input .search":"onSearchInput"},inputPlaceholder:mw.msg("mobile-frontend-languages-structured-overlay-search-input-placeholder"),allLanguagesHeader:mw.msg("mobile-frontend-languages-structured-overlay-all-languages-header").toLocaleUpperCase(),suggestedLanguagesHeader:mw.msg("mobile-frontend-languages-structured-overlay-suggested-languages-header").toLocaleUpperCase(),allLanguages:a.all,allLanguagesCount:a.all.length,suggestedLanguages:a.suggested,suggestedLanguagesCount:a.suggested.length},e))}s("./src/mobile.startup/mfExtend.js")(u,t,{template:mw.template.get("mobile.languages.structured","LanguageSearcher.hogan"),postRender:function(){this.$siteLinksList=this.$el.find(".site-link-list"),this.$languageItems=this.$siteLinksList.find("a"),this.$subheaders=this.$el.find("h3")},onLinkClick:function(e){var a=this.$el.find(e.currentTarget).attr("lang");r.saveLanguageUsageCount(a,r.getFrequentlyUsedLanguages())},onSearchInput:function(e){this.filterLanguages(this.$el.find(e.target).val().toLowerCase())},filterLanguages:function(e){var a=[];e?(this.options.languages.forEach(function(s){var t=s.langname;(s.autonym.toLowerCase().indexOf(e)>-1||t&&t.toLowerCase().indexOf(e)>-1||s.lang.toLowerCase().indexOf(e)>-1)&&a.push(s.lang)}),this.options.variants&&this.options.variants.forEach(function(s){(s.autonym.toLowerCase().indexOf(e)>-1||s.lang.toLowerCase().indexOf(e)>-1)&&a.push(s.lang)}),this.$languageItems.addClass("hidden"),a.length&&this.$siteLinksList.find("."+a.join(",.")).removeClass("hidden"),this.$siteLinksList.addClass("filtered"),this.$subheaders.addClass("hidden")):(this.$languageItems.removeClass("hidden"),this.$siteLinksList.removeClass("filtered"),this.$subheaders.removeClass("hidden"))}}),e.exports=u},"./src/mobile.languages.structured/mobile.languages.structured.js":function(e,a,s){var t=s("./src/mobile.startup/moduleLoaderSingleton.js"),n=s("./src/mobile.startup/PageGateway.js"),r=s("./src/mobile.languages.structured/LanguageSearcher.js"),u=s("./src/mobile.startup/languageOverlay/languageOverlay.js");t.define("mobile.languages.structured/LanguageSearcher",r),t.deprecate("mobile.languages.structured/LanguageOverlay",function(){return u(new n(new mw.Api))},"mobile.startup")},"./src/mobile.languages.structured/rtlLanguages.js":function(e,a){e.exports=["aeb","aeb-arab","ar","arc","arq","arz","azb","bcc","bgn","bqi","ckb","dv","fa","glk","he","khw","kk-arab","kk-cn","ks","ks-arab","ku-arab","lki","lrc","luz","mzn","pnb","ps","sd","sdh","skr","skr-arab","ug","ug-arab","ur","yi"]},"./src/mobile.languages.structured/util.js":function(e,a,s){var t=mw.log,n=s("./src/mobile.startup/util.js"),r=s("./src/mobile.languages.structured/rtlLanguages.js");e.exports={getDir:function(e){var a=r.indexOf(e.lang)>-1?"rtl":"ltr";return n.extend({},e,{dir:a})},getStructuredLanguages:function(e,a,s,n){var r=Object.prototype.hasOwnProperty,u=0,g=0,i=0,l=[],o=[],c=this;function d(e){return e.dir?e:(i++,c.getDir(e))}return(n=function(e,a){var s,t,n=Object.prototype.hasOwnProperty,r={};if(a)return-1!==(t=a.indexOf("-"))&&(s=a.slice(0,t)),e.forEach(function(e){e.lang!==s&&e.lang!==a||(r[e.lang]=!0)}),n.call(r,a)?a:n.call(r,s)?s:void 0}(e,n))&&(Object.keys(s).forEach(function(e){var a=s[e];u=u<a?a:u,g=g>a?a:g}),s[n]=u+1),e.map(d).forEach(function(e){r.call(s,e.lang)?(e.frequency=s[e.lang],l.push(e)):o.push(e)}),a&&a.map(d).forEach(function(e){r.call(s,e.lang)?e.frequency=s[e.lang]:e.frequency=g-1,l.push(e)}),l=l.sort(function(e,a){return a.frequency-e.frequency}),o=o.sort(function(e,a){return e.autonym.toLocaleLowerCase()<a.autonym.toLocaleLowerCase()?-1:1}),t.warn(0===i?"Direction is provided. Please remove handling in getStructuredLanguages":"`dir` attribute was missing from languages. Is T74153 resolved?"),{suggested:l,all:o}},getFrequentlyUsedLanguages:function(){var e=mw.storage.get("langMap");return e?JSON.parse(e):{}},saveFrequentlyUsedLanguages:function(e){mw.storage.set("langMap",JSON.stringify(e))},saveLanguageUsageCount:function(e,a){var s=a[e]||0;s+=1,a[e]=s>100?100:s,this.saveFrequentlyUsedLanguages(a)}}}},[["./src/mobile.languages.structured/mobile.languages.structured.js",0,1]]]);
//# sourceMappingURL=mobile.languages.structured.js.map.json
\ No newline at end of file
this.mfModules=this.mfModules||{},this.mfModules["mobile.mediaViewer"]=(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{"./src/mobile.mediaViewer/ImageCarousel.js":function(e,t,i){var a=i("./src/mobile.startup/View.js"),s=i("./src/mobile.startup/util.js"),r=i("./src/mobile.startup/mfExtend.js"),o=i("./src/mobile.startup/Icon.js"),n=i("./src/mobile.startup/icons.js"),l=new(i("./src/mobile.startup/Button.js"))({label:mw.msg("mobile-frontend-media-details"),additionalClassNames:"button",progressive:!0}),m=new o({rotation:90,name:"arrow-invert"}),d=new o({rotation:-90,name:"arrow-invert"}),h=i("./src/mobile.mediaViewer/LoadErrorMessage.js"),u=i("./src/mobile.mediaViewer/ImageGateway.js"),c=mw.loader.require("mediawiki.router");function g(e){this.gateway=e.gateway||new u({api:e.api}),this.router=e.router||c,this.eventBus=e.eventBus,a.call(this,s.extend({className:"image-carousel",events:{"click .image-wrapper":"onToggleDetails","click .slider-button":"onSlide"}},e))}r(g,a,{hideOnExitClick:!1,template:mw.template.get("mobile.mediaViewer","ImageCarousel.hogan"),defaults:s.extend({},a.prototype.defaults,{licenseLinkMsg:mw.msg("mobile-frontend-media-license-link"),thumbnails:[]}),onSlide:function(e){var t,i=this.$el.find(e.target).closest(".slider-button").data("thumbnail"),a=i.options.filename;this.router.navigateTo(null,{path:"#/media/"+a,useReplaceState:!0}),this.options.title=i.options.filename,t=new g(this.options),this.$el.replaceWith(t.$el),this.$el=t.$el},preRender:function(){var e=this;this.options.thumbnails.forEach(function(t,i){t.getFileName()===e.options.title&&(e.options.caption=t.getDescription(),e.galleryOffset=i)})},_enableArrowImages:function(e){var t,i,a=this.galleryOffset;void 0===this.galleryOffset?(t=e[e.length-1],i=e[0]):(t=e[0===a?e.length-1:a-1],i=e[a===e.length-1?0:a+1]),this.$el.find(".prev").data("thumbnail",t),this.$el.find(".next").data("thumbnail",i)},_disableArrowImages:function(){this.$el.find(".prev, .next").remove()},_handleRetry:function(){this.router.emit("hashchange")},postRender:function(){var e,t=this.$el,i=n.spinner().$el,a=this.options.thumbnails||[],s=this;function r(){s.hasLoadError=!0,i.hide(),t.find(".image img").hide(),0===t.find(".load-fail-msg").length&&new h({retryPath:s.router.getPath()}).on("retry",s._handleRetry.bind(s)).prependTo(t.find(".image"))}function o(){e.addClass("image-loaded")}a.length<2?this._disableArrowImages():this._enableArrowImages(a),this.$details=t.find(".image-details"),t.find(".image").append(i),this.$details.prepend(l.$el),this.gateway.getThumb(s.options.title).then(function(a){var n,l=a.descriptionurl+"#mw-jump-to-license";i.hide(),s.thumbWidth=a.thumbwidth,s.thumbHeight=a.thumbheight,s.imgRatio=a.thumbwidth/a.thumbheight,(e=s.parseHTML("<img>",document)).on("load",o).on("error",r),e.attr("src",a.thumburl).attr("alt",s.options.caption),t.find(".image").append(e),s.$details.addClass("is-visible"),s._positionImage(),t.find(".image-details a").attr("href",l),a.extmetadata&&(a.extmetadata.LicenseShortName&&t.find(".license a").text(a.extmetadata.LicenseShortName.value).attr("href",l),a.extmetadata.Artist&&(n=a.extmetadata.Artist.value.replace(/<.*?>/g,""),t.find(".license").prepend(n+" &bull; "))),s.adjustDetails()},function(){r()}),this.eventBus.on("resize:throttled",this._positionImage.bind(this)),this._positionImage()},onToggleDetails:function(){this.hasLoadError||(this.$el.find(".cancel, .slider-button").toggle(),this.$details.toggle(),this._positionImage())},_positionImage:function(){var e,t,i,a,r,o=s.getWindow();this.adjustDetails(),e=this.$details.is(":visible")?this.$details.outerHeight():0,a=(t=o.width())/(i=o.height()-e),r=this.$el.find("img"),this.imgRatio>a?t<this.thumbWidth&&r.css({width:t,height:"auto"}):i<this.thumbHeight&&r.css({width:"auto",height:i}),this.$el.find(".image-wrapper").css("bottom",e),this.$el.find(".slider-button.prev").append(m.$el),this.$el.find(".slider-button.next").append(d.$el)},adjustDetails:function(){var e=s.getWindow().height();this.$el.find(".image-details").height()>.5*e&&this.$el.find(".image-details").css("max-height",.5*e)}}),e.exports=g},"./src/mobile.mediaViewer/ImageGateway.js":function(e,t,i){var a=[320,640,800,1024,1280,1920,2560,2880],s=i("./src/mobile.startup/actionParams.js"),r=i("./src/mobile.startup/util.js");function o(e){for(var t=0;e>a[t]&&t<a.length-1;)++t;return a[t]}function n(e){this._cache={},this.api=e.api}n.prototype.getThumb=function(e){var t=this._cache[e],i=r.getWindow(),a=window.devicePixelRatio&&window.devicePixelRatio>1?window.devicePixelRatio:1;return t||(this._cache[e]=this.api.get(s({prop:"imageinfo",titles:e,iiprop:["url","extmetadata"],iiurlwidth:o(i.width()*a),iiurlheight:o(i.height()*a)})).then(function(e){if(e.query&&e.query.pages&&e.query.pages[0]&&e.query.pages[0].imageinfo)return e.query.pages[0].imageinfo[0];throw new Error("The API failed to return any pages matching the titles.")})),this._cache[e]},n._findSizeBucket=o,e.exports=n},"./src/mobile.mediaViewer/LoadErrorMessage.js":function(e,t,i){var a=i("./src/mobile.startup/util.js"),s=i("./src/mobile.startup/mfExtend.js"),r=i("./src/mobile.startup/Icon.js"),o=i("./src/mobile.startup/View.js");function n(e){if(!e.retryPath)throw new Error("'retryPath' must be set in options param. Received: "+e.retryPath);o.call(this,{events:{"click .load-fail-msg-link a":"onRetry"}},e)}s(n,o,{template:mw.template.get("mobile.mediaViewer","LoadErrorMessage.hogan"),isTemplateMode:!0,defaults:a.extend({},n.prototype.defaults,{icon:new r({name:"alert-invert",additionalClassNames:"load-fail-msg-icon"}).toHtmlString(),msgToUser:mw.msg("mobile-frontend-media-load-fail-message"),retryTxt:mw.msg("mobile-frontend-media-load-fail-retry")}),postRender:function(){this.$el.find(".load-fail-msg-link a").attr("href","#"+this.options.retryPath)},onRetry:function(){return this.emit("retry"),!1}}),e.exports=n},"./src/mobile.mediaViewer/mobile.mediaViewer.js":function(e,t,i){var a=i("./src/mobile.startup/moduleLoaderSingleton.js"),s=i("./src/mobile.startup/mediaViewer/overlay.js"),r=i("./src/mobile.mediaViewer/ImageCarousel.js");a.define("mobile.mediaViewer/ImageOverlay",function(e){return s(e)}),a.define("mobile.mediaViewer",{ImageCarousel:r})},"./src/mobile.startup/mediaViewer/overlay.js":function(e,t,i){var a=i("./src/mobile.startup/moduleLoaderSingleton.js"),s=i("./src/mobile.startup/promisedView.js"),r=i("./src/mobile.startup/util.js"),o=i("./src/mobile.startup/icons.js"),n=i("./src/mobile.startup/Overlay.js");e.exports=function(e){return n.make({cancelButton:o.cancel("gray").toHtmlString(),className:"overlay media-viewer"},s(r.Promise.all([mw.loader.using("mobile.mediaViewer")]).then(function(){return new(0,a.require("mobile.mediaViewer").ImageCarousel)(e)})))}}},[["./src/mobile.mediaViewer/mobile.mediaViewer.js",0,1]]]);
//# sourceMappingURL=mobile.mediaViewer.js.map.json
\ No newline at end of file
This diff is collapsed.
this.mfModules=this.mfModules||{},this.mfModules["mobile.notifications.overlay"]=(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{"./src/mobile.notifications.overlay/NotificationsFilterOverlay.js":function(i,e,o){var t,n=o("./src/mobile.startup/Overlay.js"),a=o("./src/mobile.startup/util.js");o("./src/mobile.startup/mfExtend.js")(t=function(i){var e=this;n.call(this,a.extend({className:"overlay notifications-filter-overlay notifications-overlay navigation-drawer"},i)),this.on("hide",function(){i.mainMenu.closeNavigationDrawers()}),i.$crossWikiUnreadFilter.on("click",function(){e.hide()}),i.$notifReadState.find(".oo-ui-buttonElement").on("click",function(){e.hide()}),this.$el.find(".overlay-content").append(this.parseHTML("<div>").addClass("notifications-filter-overlay-read-state").append(i.$notifReadState),i.$crossWikiUnreadFilter)},n,{defaults:a.extend({},n.prototype.defaults,{heading:mw.msg("mobile-frontend-notifications-filter-title")}),preRender:function(){this.options.heading="<strong>"+mw.message("mobile-frontend-notifications-filter-title").escaped()+"</strong>"}}),i.exports=t},"./src/mobile.notifications.overlay/list.js":function(i,e,o){var t=o("./src/mobile.startup/util.js"),n=o("./src/mobile.startup/View.js"),a=o("./src/mobile.startup/promisedView.js");i.exports=function(i,e,o,s){var r,l=mw.config.get("wgEchoMaxNotificationCount"),c=new i.api.EchoApi,f=new i.dm.UnreadNotificationCounter(c,"all",l),d=new i.dm.ModelManager(f,{type:["message","alert"]}),m=new i.Controller(c,d,{type:["message","alert"]}),u=function(){e.toggle(m.manager.hasLocalUnread())},p=t.parseHTML("<div>").addClass("notifications-overlay-overlay position-fixed");return i.config.maxPrioritizedActions=1,r=new i.ui.NotificationsWrapper(m,d,{$overlay:p}),e.toggle(!1),f.on("countChange",function(i){o(m.manager.getUnreadCounter().getCappedNotificationCount(i)),u()}),e.on("click",function(){var i=m.manager.getLocalUnread().length;m.markLocalNotificationsRead().then(function(){mw.notify(mw.msg("echo-mark-all-as-read-confirmation",i)),e.toggle(!1)},function(){e.toggle(!1)})}),a(r.populate().then(function(){return m.updateSeenTime(),s(),u(),d.on("update",u),n.make({},[r.$element,p])}))}},"./src/mobile.notifications.overlay/mobile.notifications.overlay.js":function(i,e,o){var t=o("./src/mobile.startup/moduleLoaderSingleton.js"),n=o("./src/mobile.startup/notifications/overlay.js"),a=o("./src/mobile.notifications.overlay/list.js"),s=o("./src/mobile.notifications.overlay/NotificationsFilterOverlay.js");t.define("mobile.notifications.overlay",{list:a}),t.define("mobile.notifications.overlay/NotificationsFilterOverlay",s),t.deprecate("mobile.notifications.overlay/NotificationsOverlay",function(i){return n(function(e){i.badge.setCount(e)},function(){i.badge.markAsSeen()})})}},[["./src/mobile.notifications.overlay/mobile.notifications.overlay.js",0,1]]]);
//# sourceMappingURL=mobile.notifications.overlay.js.map.json
\ No newline at end of file
{"version":3,"sources":["webpack://mfModules.[name]/./src/mobile.notifications.overlay/NotificationsFilterOverlay.js","webpack://mfModules.[name]/./src/mobile.notifications.overlay/list.js","webpack://mfModules.[name]/./src/mobile.notifications.overlay/mobile.notifications.overlay.js"],"names":["NotificationsFilterOverlay","Overlay","require","util","mfExtend","options","self","this","call","extend","className","on","mainMenu","closeNavigationDrawers","$crossWikiUnreadFilter","hide","$notifReadState","find","$el","append","parseHTML","addClass","defaults","prototype","heading","mw","msg","preRender","message","escaped","module","exports","View","promisedView","echo","markAllReadButton","onCountChange","onNotificationListRendered","wrapperWidget","maxNotificationCount","config","get","echoApi","api","EchoApi","unreadCounter","dm","UnreadNotificationCounter","modelManager","ModelManager","type","controller","Controller","markAsReadHandler","toggle","manager","hasLocalUnread","$moreOptions","maxPrioritizedActions","ui","NotificationsWrapper","$overlay","count","getUnreadCounter","getCappedNotificationCount","numNotifications","getLocalUnread","length","markLocalNotificationsRead","then","notify","populate","updateSeenTime","make","$element","m","defaultOverlay","list","define","deprecate","cappedCount","badge","setCount","markAsSeen"],"mappings":"8NAAA,IAGCA,EAHGC,EAAUC,EAAS,mCACtBC,EAAOD,EAAS,gCACLA,EAAS,mCA4CrBE,CA/BAJ,EAA6B,SAAWK,GACvC,IAAIC,EAAOC,KAEXN,EAAQO,KACPD,KACAJ,EAAKM,QAEJC,UAAW,gFACTL,IAIJE,KAAKI,GAAI,OAAQ,WAChBN,EAAQO,SAASC,2BAElBR,EAAQS,uBAAuBH,GAAI,QAAS,WAC3CL,EAAKS,SAGNV,EAAQW,gBAAgBC,KAAM,wBAAyBN,GAAI,QAAS,WACnEL,EAAKS,SAGNR,KAAKW,IAAID,KAAM,oBAAqBE,OACnCZ,KAAKa,UAAW,SACdC,SAAU,2CACVF,OAAQd,EAAQW,iBAClBX,EAAQS,yBAI4Bb,GAQrCqB,SAAUnB,EAAKM,UAAYR,EAAQsB,UAAUD,UAC5CE,QAASC,GAAGC,IAAK,gDAQlBC,UAAW,WACVpB,KAAKF,QAAQmB,QAAU,WAAaC,GAAGG,QAAS,8CAA+CC,UAAY,eAI7GC,EAAOC,QAAU/B,gECpEjB,IACCG,EAAOD,EAAS,gCAChB8B,EAAO9B,EAAS,gCAChB+B,EAAe/B,EAAS,wCAmFzB4B,EAAOC,QAhEP,SAA4BG,EAAMC,EAAmBC,EAAeC,GACnE,IAAIC,EACHC,EAAuBd,GAAGe,OAAOC,IAAK,8BACtCC,EAAU,IAAIR,EAAKS,IAAIC,QACvBC,EAAgB,IAAIX,EAAKY,GAAGC,0BAA2BL,EAAS,MAAOH,GACvES,EAAe,IAAId,EAAKY,GAAGG,aAAcJ,GAAiBK,MAAQ,UAAW,WAC7EC,EAAa,IAAIjB,EAAKkB,WACrBV,EACAM,GAECE,MAAQ,UAAW,WAGrBG,EAAoB,WACnBlB,EAAkBmB,OACjBH,EAAWI,QAAQC,mBAKrBC,EAAetD,EAAKiB,UAAW,SAC7BC,SAAU,gDA8Bb,OA5BAa,EAAKM,OAAOkB,sBAAwB,EAEpCpB,EAAgB,IAAIJ,EAAKyB,GAAGC,qBAAsBT,EAAYH,GAC7Da,SAAUJ,IAIXtB,EAAkBmB,QAAQ,GAG1BT,EAAclC,GAAI,cAAe,SAAWmD,GAC3C1B,EACCe,EAAWI,QAAQQ,mBAAmBC,2BAA4BF,IAEnET,MAEDlB,EAAkBxB,GAAI,QAAS,WAC9B,IAAIsD,EAAmBd,EAAWI,QAAQW,iBAAiBC,OAE3DhB,EAAWiB,6BACTC,KAAM,WACN5C,GAAG6C,OAAQ7C,GAAGC,IAAK,qCAAsCuC,IACzD9B,EAAkBmB,QAAQ,IACxB,WACFnB,EAAkBmB,QAAQ,OAItBrB,EAENK,EAAciC,WAAWF,KAAM,WAM9B,OALAlB,EAAWqB,iBACXnC,IACAgB,IAEAL,EAAarC,GAAI,SAAU0C,GACpBrB,EAAKyC,SAAYnC,EAAcoC,SAAUjB,8FCjFnD,IAAIkB,EAAIzE,EAAS,iDAChB0E,EAAiB1E,EAAS,iDAC1B2E,EAAO3E,EAAS,8CAChBF,EAA6BE,EAAS,oEAevCyE,EAAEG,OAAQ,gCACTD,SAGDF,EAAEG,OAAQ,0DAA2D9E,GACrE2E,EAAEI,UAAW,oDAbb,SAA+B1E,GAC9B,OAAOuE,EAAgB,SAAWI,GACjC3E,EAAQ4E,MAAMC,SAAUF,IACtB,WACF3E,EAAQ4E,MAAME","file":"mobile.notifications.overlay.js","sourcesContent":["var Overlay = require( '../mobile.startup/Overlay' ),\n\tutil = require( '../mobile.startup/util' ),\n\tmfExtend = require( '../mobile.startup/mfExtend' ),\n\tNotificationsFilterOverlay;\n\n/**\n * Overlay for notifications filter\n *\n * @class NotificationsFilterOverlay\n * @extends Overlay\n * @param {Object} options\n * @param {jQuery.Object} options.$notifReadState - notification read status widgets\n * @param {jQuery.Object} options.$crossWikiUnreadFilter - notification unread filter\n *\n */\nNotificationsFilterOverlay = function ( options ) {\n\tvar self = this;\n\n\tOverlay.call(\n\t\tthis,\n\t\tutil.extend( {\n\t\t\t// FIXME: notification-overlay class to be generalized\n\t\t\tclassName: 'overlay notifications-filter-overlay notifications-overlay navigation-drawer'\n\t\t}, options )\n\t);\n\n\t// Initialize\n\tthis.on( 'hide', function () {\n\t\toptions.mainMenu.closeNavigationDrawers();\n\t} );\n\toptions.$crossWikiUnreadFilter.on( 'click', function () {\n\t\tself.hide();\n\t} );\n\n\toptions.$notifReadState.find( '.oo-ui-buttonElement' ).on( 'click', function () {\n\t\tself.hide();\n\t} );\n\n\tthis.$el.find( '.overlay-content' ).append(\n\t\tthis.parseHTML( '<div>' )\n\t\t\t.addClass( 'notifications-filter-overlay-read-state' )\n\t\t\t.append( options.$notifReadState ),\n\t\toptions.$crossWikiUnreadFilter\n\t);\n};\n\nmfExtend( NotificationsFilterOverlay, Overlay, {\n\t/**\n\t * @memberof NotificationsFilterOverlay\n\t * @instance\n\t * @mixes Overlay#defaults\n\t * @property {Object} defaults Default options hash.\n\t * @property {string} defaults.heading Heading text.\n\t */\n\tdefaults: util.extend( {}, Overlay.prototype.defaults, {\n\t\theading: mw.msg( 'mobile-frontend-notifications-filter-title' )\n\t} ),\n\n\t/**\n\t * @inheritdoc\n\t * @memberof NotificationsFilterOverlay\n\t * @instance\n\t */\n\tpreRender: function () {\n\t\tthis.options.heading = '<strong>' + mw.message( 'mobile-frontend-notifications-filter-title' ).escaped() + '</strong>';\n\t}\n} );\n\nmodule.exports = NotificationsFilterOverlay;\n","const\n\tutil = require( '../mobile.startup/util' ),\n\tView = require( '../mobile.startup/View' ),\n\tpromisedView = require( '../mobile.startup/promisedView' );\n\n/**\n * This callback is displayed as a global member.\n * @callback countChangeCallback\n * @param {number} count a capped (0-99 or 99+) count\n */\n\n/**\n * List of notifications\n *\n * @param {mw.echo} echo class\n * @param {OO.ui.ButtonWidget} markAllReadButton - a button that will be associated with the\n * read status of the notifications list.\n * @param {countChangeCallback} onCountChange callback.\n * @param {Function} onNotificationListRendered a function that is called when the\n * notifications list has fully rendered (taking no arguments)\n * @return {View}\n */\nfunction notificationsList( echo, markAllReadButton, onCountChange, onNotificationListRendered ) {\n\tvar wrapperWidget,\n\t\tmaxNotificationCount = mw.config.get( 'wgEchoMaxNotificationCount' ),\n\t\techoApi = new echo.api.EchoApi(),\n\t\tunreadCounter = new echo.dm.UnreadNotificationCounter( echoApi, 'all', maxNotificationCount ),\n\t\tmodelManager = new echo.dm.ModelManager( unreadCounter, { type: [ 'message', 'alert' ] } ),\n\t\tcontroller = new echo.Controller(\n\t\t\techoApi,\n\t\t\tmodelManager,\n\t\t\t{\n\t\t\t\ttype: [ 'message', 'alert' ]\n\t\t\t}\n\t\t),\n\t\tmarkAsReadHandler = function () {\n\t\t\tmarkAllReadButton.toggle(\n\t\t\t\tcontroller.manager.hasLocalUnread()\n\t\t\t);\n\t\t},\n\t\t// Create a container which will be revealed when \"more options\" (...)\n\t\t// is clicked on a notification. Hidden by default.\n\t\t$moreOptions = util.parseHTML( '<div>' )\n\t\t\t.addClass( 'notifications-overlay-overlay position-fixed' );\n\n\techo.config.maxPrioritizedActions = 1;\n\n\twrapperWidget = new echo.ui.NotificationsWrapper( controller, modelManager, {\n\t\t$overlay: $moreOptions\n\t} );\n\n\t// Mark all read\n\tmarkAllReadButton.toggle( false );\n\n\t// Events\n\tunreadCounter.on( 'countChange', function ( count ) {\n\t\tonCountChange(\n\t\t\tcontroller.manager.getUnreadCounter().getCappedNotificationCount( count )\n\t\t);\n\t\tmarkAsReadHandler();\n\t} );\n\tmarkAllReadButton.on( 'click', function () {\n\t\tvar numNotifications = controller.manager.getLocalUnread().length;\n\n\t\tcontroller.markLocalNotificationsRead()\n\t\t\t.then( function () {\n\t\t\t\tmw.notify( mw.msg( 'echo-mark-all-as-read-confirmation', numNotifications ) );\n\t\t\t\tmarkAllReadButton.toggle( false );\n\t\t\t}, function () {\n\t\t\t\tmarkAllReadButton.toggle( false );\n\t\t\t} );\n\t} );\n\n\treturn promisedView(\n\t\t// Populate notifications\n\t\twrapperWidget.populate().then( function () {\n\t\t\tcontroller.updateSeenTime();\n\t\t\tonNotificationListRendered();\n\t\t\tmarkAsReadHandler();\n\t\t\t// Connect event here as we know that everything loaded correctly\n\t\t\tmodelManager.on( 'update', markAsReadHandler );\n\t\t\treturn View.make( {}, [ wrapperWidget.$element, $moreOptions ] );\n\t\t} )\n\t);\n}\n\nmodule.exports = notificationsList;\n","var m = require( './../mobile.startup/moduleLoaderSingleton' ),\n\tdefaultOverlay = require( './../mobile.startup/notifications/overlay' ),\n\tlist = require( './list' ),\n\tNotificationsFilterOverlay = require( './NotificationsFilterOverlay' );\n\n/**\n * @deprecated\n * @param {Object} options\n * @return {Overlay}\n */\nfunction NotificationsOverlay( options ) {\n\treturn defaultOverlay( function ( cappedCount ) {\n\t\toptions.badge.setCount( cappedCount );\n\t}, function () {\n\t\toptions.badge.markAsSeen();\n\t} );\n}\n\nm.define( 'mobile.notifications.overlay', {\n\tlist\n} );\n\nm.define( 'mobile.notifications.overlay/NotificationsFilterOverlay', NotificationsFilterOverlay );\nm.deprecate( 'mobile.notifications.overlay/NotificationsOverlay', NotificationsOverlay );\n"],"sourceRoot":""}
\ No newline at end of file
this.mfModules=this.mfModules||{},this.mfModules["mobile.special.mobilediff.scripts"]=(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{"./src/mobile.special.mobilediff.scripts.js":function(t,o,e){
/*!
* Animate patrol links to use asynchronous API requests to
* patrol pages, rather than navigating to a different URI.
*
* @author Florian Schmidt <florian.schmidt.welzow@t-online.de>
*/
var r=mw.user,s=e("./src/mobile.startup/Icon.js"),a=e("./src/mobile.startup/toast.js");r.tokens.exists("patrolToken")&&$(function(){var t,o,e=$(".patrollink a"),r=new s({name:"spinner",additionalClassNames:"savespinner loading"}).$el;e.on("click",function(s){$(s.target).hide().after(r),t=$(this).attr("href"),o=mw.util.getParamValue("rcid",t),(new mw.Api).postWithToken("patrol",{action:"patrol",rcid:o}).then(function(t){var o;e.closest(".patrollink").replaceWith($("<button>").addClass("mw-ui-button patrollink").prop("disabled",!0).text(e.closest(".patrollink").text())),r.remove(),void 0!==t.patrol?(o=new mw.Title(t.patrol.title),a.show(mw.msg("markedaspatrollednotify",o.toText()))):a.show(mw.msg("markedaspatrollederrornotify"),{type:"error"})},function(t){r.remove(),e.show(),"noautopatrol"===t?a.show(mw.msg("markedaspatrollederror-noautopatrol"),{type:"warn"}):a.show(mw.msg("markedaspatrollederrornotify"),{type:"error"})}),s.preventDefault()})})}},[["./src/mobile.special.mobilediff.scripts.js",0,1]]]);
//# sourceMappingURL=mobile.special.mobilediff.scripts.js.map.json
\ No newline at end of file
{"version":3,"sources":["webpack://mfModules.[name]/./src/mobile.special.mobilediff.scripts.js"],"names":["user","mw","Icon","require","toast","tokens","exists","$","href","rcid","$patrolLinks","$spinner","name","additionalClassNames","$el","on","e","target","hide","after","this","attr","util","getParamValue","Api","postWithToken","action","then","data","title","closest","replaceWith","addClass","prop","text","remove","undefined","patrol","Title","show","msg","toText","type","error","preventDefault"],"mappings":";;;;;;;AAOA,IAAIA,EAAOC,GAAGD,KACbE,EAAOC,EAAS,gCAChBC,EAAQD,EAAS,iCA0DbH,EAAKK,OAAOC,OAAQ,gBAGxBC,EAxDD,WACC,IAKCC,EAAMC,EALHC,EAAeH,EAAG,iBACrBI,EAAa,IAAIT,GAChBU,KAAM,UACNC,qBAAsB,wBACjBC,IAGPJ,EAAaK,GAAI,QAAS,SAAWC,GAEpCT,EAAGS,EAAEC,QAASC,OAAOC,MAAOR,GAE5BH,EAAOD,EAAGa,MAAOC,KAAM,QACvBZ,EAAOR,GAAGqB,KAAKC,cAAe,OAAQf,IACzB,IAAIP,GAAGuB,KACTC,cAAe,UACzBC,OAAQ,SACRjB,KAAMA,IACHkB,KAAM,SAAWC,GACpB,IAAIC,EAGJnB,EAAaoB,QAAS,eAAgBC,YACrCxB,EAAG,YACDyB,SAAU,2BACVC,KAAM,YAAY,GAClBC,KAAMxB,EAAaoB,QAAS,eAAgBI,SAE/CvB,EAASwB,cACYC,IAAhBR,EAAKS,QAETR,EAAQ,IAAI5B,GAAGqC,MAAOV,EAAKS,OAAOR,OAClCzB,EAAMmC,KAAMtC,GAAGuC,IAAK,0BAA2BX,EAAMY,YAGrDrC,EAAMmC,KAAMtC,GAAGuC,IAAK,iCAAoCE,KAAM,WAE7D,SAAWC,GACbhC,EAASwB,SAGTzB,EAAa6B,OACE,iBAAVI,EAEJvC,EAAMmC,KAAMtC,GAAGuC,IAAK,wCAA2CE,KAAM,SAErEtC,EAAMmC,KAAMtC,GAAGuC,IAAK,iCAAoCE,KAAM,YAIhE1B,EAAE4B","file":"mobile.special.mobilediff.scripts.js","sourcesContent":["/* global $ */\n/*!\n* Animate patrol links to use asynchronous API requests to\n* patrol pages, rather than navigating to a different URI.\n*\n* @author Florian Schmidt <florian.schmidt.welzow@t-online.de>\n*/\nvar user = mw.user,\n\tIcon = require( './mobile.startup/Icon' ),\n\ttoast = require( './mobile.startup/toast' );\n\n/**\n * Initialise mobile page patrolling as provided by the PageTriage extension.\n */\nfunction init() {\n\tvar $patrolLinks = $( '.patrollink a' ),\n\t\t$spinner = ( new Icon( {\n\t\t\tname: 'spinner',\n\t\t\tadditionalClassNames: 'savespinner loading'\n\t\t} ) ).$el,\n\t\thref, rcid, apiRequest;\n\n\t$patrolLinks.on( 'click', function ( e ) {\n\t\t// Hide the link show a spinner instead.\n\t\t$( e.target ).hide().after( $spinner );\n\n\t\thref = $( this ).attr( 'href' );\n\t\trcid = mw.util.getParamValue( 'rcid', href );\n\t\tapiRequest = new mw.Api();\n\t\tapiRequest.postWithToken( 'patrol', {\n\t\t\taction: 'patrol',\n\t\t\trcid: rcid\n\t\t} ).then( function ( data ) {\n\t\t\tvar title;\n\n\t\t\t// Disable all patrollinks from the page.\n\t\t\t$patrolLinks.closest( '.patrollink' ).replaceWith(\n\t\t\t\t$( '<button>' )\n\t\t\t\t\t.addClass( 'mw-ui-button patrollink' )\n\t\t\t\t\t.prop( 'disabled', true )\n\t\t\t\t\t.text( $patrolLinks.closest( '.patrollink' ).text() )\n\t\t\t);\n\t\t\t$spinner.remove();\n\t\t\tif ( data.patrol !== undefined ) {\n\t\t\t\t// Success\n\t\t\t\ttitle = new mw.Title( data.patrol.title );\n\t\t\t\ttoast.show( mw.msg( 'markedaspatrollednotify', title.toText() ) );\n\t\t\t} else {\n\t\t\t\t// This should never happen as errors should trigger fail\n\t\t\t\ttoast.show( mw.msg( 'markedaspatrollederrornotify' ), { type: 'error' } );\n\t\t\t}\n\t\t}, function ( error ) {\n\t\t\t$spinner.remove();\n\t\t\t// Restore the patrol link. This allows the user to try again\n\t\t\t// (or open it in a new window, bypassing this ajax module).\n\t\t\t$patrolLinks.show();\n\t\t\tif ( error === 'noautopatrol' ) {\n\t\t\t\t// Can't patrol own\n\t\t\t\ttoast.show( mw.msg( 'markedaspatrollederror-noautopatrol' ), { type: 'warn' } );\n\t\t\t} else {\n\t\t\t\ttoast.show( mw.msg( 'markedaspatrollederrornotify' ), { type: 'error' } );\n\t\t\t}\n\t\t} );\n\n\t\te.preventDefault();\n\t} );\n}\nif ( user.tokens.exists( 'patrolToken' ) ) {\n\t// Current user has no patrol right, or an old cached version of user.tokens\n\t// that didn't have patrolToken yet.\n\t$( init );\n}\n"],"sourceRoot":""}
\ No newline at end of file
this.mfModules=this.mfModules||{},this.mfModules["mobile.special.mobileoptions.scripts"]=(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{"./src/mobile.special.mobileoptions.scripts.js":function(e,n,t){var o=mw.storage,i=t("./src/mobile.startup/Browser.js").getSingleton(),s=t("./src/mobile.startup/toast.js"),l="expandSections",a=mw.msg,r="userFontSize";function c(e){e?s.showOnPageReload(a("mobile-frontend-settings-save")):s.show(a("mobile-frontend-settings-save"))}function d(e,n){var t=$("<div>");return t.append($("<strong>").text(e)),t.append($("<div>").addClass("option-description").text(n)),new OO.ui.LabelWidget({label:t})}mw.loader.using("oojs-ui-widgets").then(function(){var e=$("#mobile-options"),n=$("#enable-beta-toggle"),t=$("#enable-amc-toggle"),s=[];n.length&&s.push(n),t.length&&s.push(t),function(e,n){e.forEach(function(e){var t,o,i;o=OO.ui.infuse(e),i=o.$element,(t=new OO.ui.ToggleSwitchWidget({value:o.isSelected()})).$element.insertAfter(i),i.hide(),i.on("change",function(){i.attr("disabled",!0),t.setValue(o.isSelected())}),t.on("change",function(e){t.setValue=function(){},i.find("input").prop("checked",e),c(!0),setTimeout(function(){n.trigger("submit")},250)})})}(s,e),i.isWideScreen()||function(e){var n,t;n=new OO.ui.ToggleSwitchWidget({name:l,value:"true"===o.get(l)}),t=new OO.ui.FieldLayout(n,{label:d(mw.msg("mobile-frontend-expand-sections-status"),mw.msg("mobile-frontend-expand-sections-description")).$element}),n.on("change",function(e){o.set(l,e?"true":"false"),c()}),t.$element.prependTo(e)}(e),mw.config.get("wgMFEnableFontChanger")&&function(e){var n,t,i=o.get(r);t=new OO.ui.DropdownInputWidget({value:i||"regular",options:[{data:"small",label:a("mobile-frontend-fontchanger-option-small")},{data:"regular",label:a("mobile-frontend-fontchanger-option-medium")},{data:"large",label:a("mobile-frontend-fontchanger-option-large")},{data:"x-large",label:a("mobile-frontend-fontchanger-option-xlarge")}]}),n=new OO.ui.FieldLayout(t,{label:d(mw.msg("mobile-frontend-fontchanger-link"),mw.msg("mobile-frontend-fontchanger-desc")).$element}),t.on("change",function(e){o.set(r,e),c()}),n.$element.prependTo(e)}(e)})}},[["./src/mobile.special.mobileoptions.scripts.js",0,1]]]);
//# sourceMappingURL=mobile.special.mobileoptions.scripts.js.map.json
\ No newline at end of file
{"version":3,"sources":["webpack://mfModules.[name]/./src/mobile.special.mobileoptions.scripts.js"],"names":["storage","mw","browser","require","getSingleton","toast","EXPAND_SECTIONS_KEY","msg","FONT_SIZE_KEY","notify","isPending","showOnPageReload","show","createLabel","heading","description","$label","$","append","text","addClass","OO","ui","LabelWidget","label","loader","using","then","$form","betaToggle","amcToggle","toggles","length","push","toggleElements","forEach","$toggleElement","toggleSwitch","enableToggle","$checkbox","infuse","$element","ToggleSwitchWidget","value","isSelected","insertAfter","hide","on","attr","setValue","find","prop","setTimeout","trigger","infuseToggles","isWideScreen","cb","cbField","name","get","FieldLayout","set","prependTo","addExpandAllSectionsToForm","config","fontChanger","fontChangerDropdown","currentFontSize","DropdownInputWidget","options","data","addFontChangerToForm"],"mappings":"mNACA,IAAIA,EAAUC,GAAGD,QAChBE,EAAUC,EAAS,mCAA6BC,eAChDC,EAAQF,EAAS,iCACjBG,EAAsB,iBACtBC,EAAMN,GAAGM,IACTC,EAAgB,eAMjB,SAASC,EAAQC,GACXA,EACJL,EAAMM,iBAAkBJ,EAAK,kCAE7BF,EAAMO,KAAML,EAAK,kCASnB,SAASM,EAAaC,EAASC,GAC9B,IAAIC,EAASC,EAAG,SAQhB,OAPAD,EAAOE,OAAQD,EAAG,YAAaE,KAAML,IACrCE,EAAOE,OACND,EAAG,SACDG,SAAU,sBACVD,KAAMJ,IAGF,IAAIM,GAAGC,GAAGC,aAChBC,MAAOR,IAoKTf,GAAGwB,OAAOC,MAAO,mBAAoBC,KA3BrC,WACC,IAAIC,EAAQX,EAAG,mBACdY,EAAaZ,EAAG,uBAChBa,EAAYb,EAAG,sBACfc,KAEIF,EAAWG,QACfD,EAAQE,KAAMJ,GAEVC,EAAUE,QACdD,EAAQE,KAAMH,GAhEhB,SAAwBI,EAAgBN,GACvCM,EAAeC,QAAS,SAAWC,GAClC,IAAIC,EACHC,EACAC,EAEDD,EAAejB,GAAGC,GAAGkB,OAAQJ,GAC7BG,EAAYD,EAAaG,UAEzBJ,EAAe,IAAIhB,GAAGC,GAAGoB,oBACxBC,MAAOL,EAAaM,gBAKRH,SAASI,YAAaN,GAInCA,EAAUO,OAKVP,EAAUQ,GAAI,SAAU,WAEvBR,EAAUS,KAAM,YAAY,GAC5BX,EAAaY,SAAUX,EAAaM,gBAErCP,EAAaU,GAAI,SAAU,SAAWJ,GAKrCN,EAAaY,SAAW,aAExBV,EAAUW,KAAM,SACdC,KAAM,UAAWR,GACnBlC,GAAQ,GAKR2C,WAAY,WACXxB,EAAMyB,QAAS,WACb,SAqBLC,CAAevB,EAASH,GAKtB1B,EAAQqD,gBAtGX,SAAqC3B,GACpC,IAAI4B,EAAIC,EAERD,EAAK,IAAInC,GAAGC,GAAGoB,oBACdgB,KAAMpD,EACNqC,MAA8C,SAAvC3C,EAAQ2D,IAAKrD,KAErBmD,EAAU,IAAIpC,GAAGC,GAAGsC,YACnBJ,GAEChC,MAAOX,EACNZ,GAAGM,IAAK,0CACRN,GAAGM,IAAK,gDACPkC,WAGJe,EAAGT,GAAI,SAAU,SAAWJ,GAC3B3C,EAAQ6D,IAAKvD,EAAqBqC,EAAQ,OAAS,SACnDlC,MAGDgD,EAAQhB,SAASqB,UAAWlC,GAmF3BmC,CAA4BnC,GAGxB3B,GAAG+D,OAAOL,IAAK,0BAvJrB,SAA+B/B,GAC9B,IAAIqC,EAAaC,EAChBC,EAAkBnE,EAAQ2D,IAAKnD,GAEhC0D,EAAsB,IAAI7C,GAAGC,GAAG8C,qBAC/BzB,MAAOwB,GAAmB,UAC1BE,UAEEC,KAAM,QACN9C,MAAOjB,EAAK,8CAGZ+D,KAAM,UACN9C,MAAOjB,EAAK,+CAGZ+D,KAAM,QACN9C,MAAOjB,EAAK,8CAGZ+D,KAAM,UACN9C,MAAOjB,EAAK,iDAIf0D,EAAc,IAAI5C,GAAGC,GAAGsC,YACvBM,GAEC1C,MAAOX,EAAaZ,GAAGM,IAAK,oCAC3BN,GAAGM,IAAK,qCAAuCkC,WAGlDyB,EAAoBnB,GAAI,SAAU,SAAWJ,GAC5C3C,EAAQ6D,IAAKrD,EAAemC,GAC5BlC,MAGDwD,EAAYxB,SAASqB,UAAWlC,GAmH/B2C,CAAsB3C","file":"mobile.special.mobileoptions.scripts.js","sourcesContent":["/* global $, OO */\nvar storage = mw.storage,\n\tbrowser = require( './mobile.startup/Browser' ).getSingleton(),\n\ttoast = require( './mobile.startup/toast' ),\n\tEXPAND_SECTIONS_KEY = 'expandSections',\n\tmsg = mw.msg,\n\tFONT_SIZE_KEY = 'userFontSize';\n\n/**\n * Notifies the user that settings were asynchronously saved.\n * @param {boolean} [isPending] if set toast will show after page has been reloaded.\n */\nfunction notify( isPending ) {\n\tif ( isPending ) {\n\t\ttoast.showOnPageReload( msg( 'mobile-frontend-settings-save' ) );\n\t} else {\n\t\ttoast.show( msg( 'mobile-frontend-settings-save' ) );\n\t}\n}\n/**\n * Creates a label for use with a form input\n * @param {string} heading\n * @param {string} description\n * @return {OO.ui.LabelWidget}\n */\nfunction createLabel( heading, description ) {\n\tvar $label = $( '<div>' );\n\t$label.append( $( '<strong>' ).text( heading ) );\n\t$label.append(\n\t\t$( '<div>' )\n\t\t\t.addClass( 'option-description' )\n\t\t\t.text( description )\n\t);\n\n\treturn new OO.ui.LabelWidget( {\n\t\tlabel: $label\n\t} );\n}\n\n/**\n * Adds a font changer field to the form\n * @param {jQuery.Object} $form\n */\nfunction addFontChangerToForm( $form ) {\n\tvar fontChanger, fontChangerDropdown,\n\t\tcurrentFontSize = storage.get( FONT_SIZE_KEY );\n\n\tfontChangerDropdown = new OO.ui.DropdownInputWidget( {\n\t\tvalue: currentFontSize || 'regular',\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdata: 'small',\n\t\t\t\tlabel: msg( 'mobile-frontend-fontchanger-option-small' )\n\t\t\t},\n\t\t\t{\n\t\t\t\tdata: 'regular',\n\t\t\t\tlabel: msg( 'mobile-frontend-fontchanger-option-medium' )\n\t\t\t},\n\t\t\t{\n\t\t\t\tdata: 'large',\n\t\t\t\tlabel: msg( 'mobile-frontend-fontchanger-option-large' )\n\t\t\t},\n\t\t\t{\n\t\t\t\tdata: 'x-large',\n\t\t\t\tlabel: msg( 'mobile-frontend-fontchanger-option-xlarge' )\n\t\t\t}\n\t\t]\n\t} );\n\tfontChanger = new OO.ui.FieldLayout(\n\t\tfontChangerDropdown,\n\t\t{\n\t\t\tlabel: createLabel( mw.msg( 'mobile-frontend-fontchanger-link' ),\n\t\t\t\tmw.msg( 'mobile-frontend-fontchanger-desc' ) ).$element\n\t\t}\n\t);\n\tfontChangerDropdown.on( 'change', function ( value ) {\n\t\tstorage.set( FONT_SIZE_KEY, value );\n\t\tnotify();\n\t} );\n\n\tfontChanger.$element.prependTo( $form );\n}\n\n/**\n * Adds an expand all sections field to the form\n * @param {jQuery.Object} $form\n */\nfunction addExpandAllSectionsToForm( $form ) {\n\tvar cb, cbField;\n\n\tcb = new OO.ui.ToggleSwitchWidget( {\n\t\tname: EXPAND_SECTIONS_KEY,\n\t\tvalue: storage.get( EXPAND_SECTIONS_KEY ) === 'true'\n\t} );\n\tcbField = new OO.ui.FieldLayout(\n\t\tcb,\n\t\t{\n\t\t\tlabel: createLabel(\n\t\t\t\tmw.msg( 'mobile-frontend-expand-sections-status' ),\n\t\t\t\tmw.msg( 'mobile-frontend-expand-sections-description' )\n\t\t\t).$element\n\t\t}\n\t);\n\tcb.on( 'change', function ( value ) {\n\t\tstorage.set( EXPAND_SECTIONS_KEY, value ? 'true' : 'false' );\n\t\tnotify();\n\t} );\n\n\tcbField.$element.prependTo( $form );\n}\n\n/**\n * Helper method to infuse checkbox elements with OO magic\n * Additionally it applies all known hacks to make it mobile friendly\n *\n * @param {jQuery.Object[]} toggleElements an array of toggle elements to infuse\n * @param {jQuery.Object} $form form to submit when there is interaction with toggle\n */\nfunction infuseToggles( toggleElements, $form ) {\n\ttoggleElements.forEach( function ( $toggleElement ) {\n\t\tvar toggleSwitch,\n\t\t\tenableToggle,\n\t\t\t$checkbox;\n\n\t\tenableToggle = OO.ui.infuse( $toggleElement );\n\t\t$checkbox = enableToggle.$element;\n\n\t\ttoggleSwitch = new OO.ui.ToggleSwitchWidget( {\n\t\t\tvalue: enableToggle.isSelected()\n\t\t} );\n\t\t// Strangely the ToggleSwitchWidget does not behave as an input so any change\n\t\t// to it is not reflected in the form. (see T182466)\n\t\t// Ideally we'd replaceWith here and not have to hide the original element.\n\t\ttoggleSwitch.$element.insertAfter( $checkbox );\n\t\t// although the checkbox is hidden already, that is done via visibility\n\t\t// as a result, it still takes up space. We don't want it to any more now that the\n\t\t// new toggle switch has been added.\n\t\t$checkbox.hide();\n\n\t\t// listening on checkbox change is required to make the clicking on label working.\n\t\t// Otherwise clicking on label changes the checkbox \"checked\" state\n\t\t// but it's not reflected in the toggle switch\n\t\t$checkbox.on( 'change', function () {\n\t\t\t// disable checkbox as submit is delayed by 0.25s\n\t\t\t$checkbox.attr( 'disabled', true );\n\t\t\ttoggleSwitch.setValue( enableToggle.isSelected() );\n\t\t} );\n\t\ttoggleSwitch.on( 'change', function ( value ) {\n\t\t\t// ugly hack, we're delaying submit form by 0.25s\n\t\t\t// and we want to disable registering clicks\n\t\t\t// we want to disable the toggleSwitch\n\t\t\t// but we cannot use setDisabled(true) as it makes button gray\n\t\t\ttoggleSwitch.setValue = function () {};\n\n\t\t\t$checkbox.find( 'input' )\n\t\t\t\t.prop( 'checked', value );\n\t\t\tnotify( true );\n\t\t\t// On some Android devices animation gets stuck in the middle as browser\n\t\t\t// starts submitting the form.\n\t\t\t// Let's call submit on the form after toggle button transition is done\n\t\t\t// (0.25s, defined in OOUI)\n\t\t\tsetTimeout( function () {\n\t\t\t\t$form.trigger( 'submit' );\n\t\t\t}, 250 );\n\t\t} );\n\t} );\n}\n\n/**\n * Add features, that depends on localStorage, such as \"expand all sections\" or \"fontchanger\".\n * The checkbox is used for turning on/off expansion of all sections on page load.\n */\nfunction initMobileOptions() {\n\tvar $form = $( '#mobile-options' ),\n\t\tbetaToggle = $( '#enable-beta-toggle' ),\n\t\tamcToggle = $( '#enable-amc-toggle' ),\n\t\ttoggles = [];\n\n\tif ( betaToggle.length ) {\n\t\ttoggles.push( betaToggle );\n\t}\n\tif ( amcToggle.length ) {\n\t\ttoggles.push( amcToggle );\n\t}\n\tinfuseToggles( toggles, $form );\n\n\tif (\n\t\t// Don't show this option on large screens since it's only honored for small screens.\n\t\t// This logic should be kept in sync with Toggle._enable().\n\t\t!browser.isWideScreen()\n\t) {\n\t\taddExpandAllSectionsToForm( $form );\n\t}\n\n\tif ( mw.config.get( 'wgMFEnableFontChanger' ) ) {\n\t\taddFontChangerToForm( $form );\n\t}\n}\n\nmw.loader.using( 'oojs-ui-widgets' ).then( initMobileOptions );\n"],"sourceRoot":""}
\ No newline at end of file
this.mfModules=this.mfModules||{},this.mfModules["mobile.special.nearby.scripts"]=(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{"./src/mobile.special.nearby.scripts/LocationProvider.js":function(e,t,i){var r,n=i("./src/mobile.startup/Browser.js").getSingleton(),s=i("./src/mobile.startup/util.js");r={isAvailable:function(){return n.supportsGeoLocation()},getCurrentPosition:function(){var e=s.Deferred();return r.isAvailable()?navigator.geolocation.getCurrentPosition(function(t){e.resolve({latitude:t.coords.latitude,longitude:t.coords.longitude})},function(t){var i;switch(t.code){case t.PERMISSION_DENIED:i="permission";break;case t.TIMEOUT:i="timeout";break;case t.POSITION_UNAVAILABLE:i="location";break;default:i="unknown"}e.reject(i)},{timeout:1e4,enableHighAccuracy:!0}):e.reject("incompatible"),e}},e.exports=r},"./src/mobile.special.nearby.scripts/Nearby.js":function(e,t,i){var r=i("./src/mobile.startup/MessageBox.js"),n=i("./src/mobile.special.nearby.scripts/NearbyGateway.js"),s=i("./src/mobile.startup/util.js"),o=i("./src/mobile.startup/watchstar/WatchstarPageList.js");function a(e){var t=o;this.range=e.range||mw.config.get("wgMFNearbyRange")||1e3,this.source=e.source||"nearby",this.nearbyApi=new n({api:e.api}),this.eventBus=e.eventBus,e.errorType&&(e.errorOptions=this._errorOptions(e.errorType)),this.onItemClick=e.onItemClick,t.apply(this,arguments)}i("./src/mobile.startup/mfExtend.js")(a,o,{errorMessages:{empty:{heading:mw.msg("mobile-frontend-nearby-noresults"),hasHeading:!0,msg:mw.msg("mobile-frontend-nearby-noresults-guidance")},http:{heading:mw.msg("mobile-frontend-nearby-error"),hasHeading:!0,msg:mw.msg("mobile-frontend-nearby-error-guidance")},incompatible:{heading:mw.msg("mobile-frontend-nearby-requirements"),hasHeading:!0,msg:mw.msg("mobile-frontend-nearby-requirements-guidance")}},templatePartials:s.extend({},o.prototype.templatePartials,{pageList:o.prototype.template,messageBox:r.prototype.template}),template:mw.template.get("mobile.special.nearby.scripts","Nearby.hogan"),defaults:s.extend({},o.prototype.defaults,{errorOptions:void 0}),_find:function(e){var t=s.Deferred(),i=this;function r(r){e.pages=r,r&&0===r.length&&(e.errorOptions=i._errorOptions("empty")),i._isLoading=!1,t.resolve(e)}function n(r){i._isLoading=!1,e.errorOptions=i._errorOptions(r),t.resolve(e)}return e.latitude&&e.longitude?this.nearbyApi.getPages({latitude:e.latitude,longitude:e.longitude},this.range,e.exclude).then(r,n):e.pageTitle?this.nearbyApi.getPagesAroundPage(e.pageTitle,this.range).then(r,n):(e.errorType&&(e.errorOptions=this._errorOptions(e.errorType)),t.resolve(e)),t},_errorOptions:function(e){var t=this.errorMessages[e]||this.errorMessages.http;return s.extend({className:"errorbox"},t)},postRender:function(){var e=this;this._isLoading||this.$el.find(".page-list").removeClass("hidden"),o.prototype.postRender.apply(this),this._postRenderLinks(),this.$el.find(function(){e.eventBus.emit("Nearby-postRender")})},_postRenderLinks:function(){var e=this;this.$el.find("a").each(function(t){e.$el.find(this).attr("id","nearby-page-list-item-"+t)}).on("click",this.onItemClick)},refresh:function(e){var t=this,i=o;if(this.$el.find(".page-list").addClass("hidden"),this._isLoading=!0,e.latitude&&e.longitude||e.pageTitle)return e.pages=[],this._find(e).then(function(e){i.call(t,e)},function(r){e.errorOptions=t._errorOptions(r),t._isLoading=!1,i.call(t,e)});throw new Error("No title or longitude, latitude options have been passed")}}),e.exports=a},"./src/mobile.special.nearby.scripts/NearbyGateway.js":function(e,t,i){var r=i("./src/mobile.startup/Page.js"),n=mw.config.get("wgContentNamespaces"),s=i("./src/mobile.startup/util.js"),o=i("./src/mobile.startup/extendSearchParams.js");function a(e){this.api=e.api}a.prototype={_distanceMessage:function(e){if(e<1){if(e*=100,1e3!==(e=10*Math.ceil(e)))return mw.msg("mobile-frontend-nearby-distance-meters",mw.language.convertNumber(e));e=1}else e>2?(e*=10,e=(e=Math.ceil(e)/10).toFixed(1)):(e*=100,e=(e=Math.ceil(e)/100).toFixed(2));return mw.msg("mobile-frontend-nearby-distance",mw.language.convertNumber(e))},getPages:function(e,t,i){return this._search({ggscoord:[e.latitude,e.longitude]},t,i)},getPagesAroundPage:function(e,t){return this._search({ggspage:e},t,e)},_search:function(e,t,i){var a,c=s.Deferred(),l=this;return a=o("nearby",{colimit:"max",prop:["coordinates"],generator:"geosearch",ggsradius:t,ggsnamespace:n,ggslimit:50},e),e.ggscoord?a.codistancefrompoint=e.ggscoord:e.ggspage&&(a.codistancefrompage=e.ggspage),this.api.ajax(a).then(function(e){var t;(t=(t=e.query&&e.query.pages||[]).map(function(e,t){var n,s;return(s=r.newFromJSON(e)).anchor="item_"+t,e.coordinates?(n=e.coordinates[0],s.dist=n.dist/1e3,s.latitude=n.lat,s.longitude=n.lon,s.proximity=l._distanceMessage(s.dist)):s.dist=0,i!==e.title?s:null}).filter(function(e){return!!e})).sort(function(e,t){return e.dist>t.dist?1:-1}),c.resolve(t)},function(e){c.reject(e)}),c}},e.exports=a},"./src/mobile.special.nearby.scripts/mobile.special.nearby.scripts.js":function(e,t,i){var r,n=new mw.Api,s="Nearby-postRender",o=i("./src/mobile.special.nearby.scripts/LocationProvider.js"),a=i("./src/mobile.startup/loadingOverlay.js"),c=mw.loader.require("mediawiki.router"),l=i("./src/mobile.special.nearby.scripts/Nearby.js"),d=i("./src/mobile.startup/util.js"),p=$("#mf-nearby-info-holder"),u=new OO.EventEmitter,g={eventBus:u,el:$("#mw-mf-nearby"),funnel:"nearby",onItemClick:function(e){d.isModifiedEvent(e)||function(e){return e.match(/^(\/page|\/coord)/)}(c.getPath())||c.navigate($(this).attr("id"))}},m=a();function b(){p.remove(),$("body").removeClass("nearby-accept-pending")}function f(e){e=d.extend({},e,g),r||(r=new l(e),u.on(s,function(){var e,t=c.getPath();(function(e){return e&&-1===e.indexOf("/")})(t)&&(e=r.$el.find("#"+t))[0]&&e[0].nodeType&&$(window).scrollTop(e.offset().top),m.hide()})),r.refresh(e)}c.route(/^\/coord\/(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?)/,function(e,t){g.latitude=e,g.longitude=t,b(),f(d.extend(g,{api:n}))}),c.route(/^\/page\/(.+)$/,function(e){b(),m.hide(),f(d.extend({},g,{api:n,pageTitle:mw.Uri.decode(e)}))}),c.checkRoute(),$("#showArticles").on("click",function(){m.show(),o.getCurrentPosition().then(function(e){c.navigate("#/coord/"+e.latitude+","+e.longitude)}).catch(function(e){switch(m.hide(),e){case"permission":alert(mw.msg("mobile-frontend-nearby-permission-denied"));break;case"location":alert(mw.msg("mobile-frontend-nearby-location-unavailable"))}})})}},[["./src/mobile.special.nearby.scripts/mobile.special.nearby.scripts.js",0,1]]]);
//# sourceMappingURL=mobile.special.nearby.scripts.js.map.json
\ No newline at end of file
this.mfModules=this.mfModules||{},this.mfModules["mobile.special.uploads.scripts"]=(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{"./src/mobile.special.uploads.scripts/PhotoItem.js":function(t,e,i){var s=i("./src/mobile.startup/View.js");function n(){s.apply(this,arguments)}i("./src/mobile.startup/mfExtend.js")(n,s,{template:mw.template.get("mobile.special.uploads.scripts","PhotoItem.hogan"),tagName:"li"}),t.exports=n},"./src/mobile.special.uploads.scripts/PhotoList.js":function(t,e,i){var s=i("./src/mobile.startup/icons.js"),n=i("./src/mobile.special.uploads.scripts/PhotoListGateway.js"),o=i("./src/mobile.special.uploads.scripts/PhotoItem.js"),r=i("./src/mobile.startup/mfExtend.js"),a=i("./src/mobile.startup/ScrollEndEventEmitter.js"),l=i("./src/mobile.startup/View.js");function c(t){var e={url:t.url,api:t.api};t.username?e.username=t.username:t.category&&(e.category=t.category),this.gateway=new n(e),this.scrollEndEventEmitter=new a(t.eventBus,1e3),this.scrollEndEventEmitter.on(a.EVENT_SCROLL_END,this._loadPhotos.bind(this)),l.call(this,t)}r(c,l,{template:mw.template.get("mobile.special.uploads.scripts","PhotoList.hogan"),defaults:{spinner:s.spinner().toHtmlString()},preRender:function(){this.scrollEndEventEmitter.setElement(this.$el),this.scrollEndEventEmitter.disable()},postRender:function(){this.$end=this.$el.find(".end"),this.$list=this.$el.find("ul"),this._loadPhotos()},isEmpty:function(){return 0===this.$list.find("li").length},showEmptyMessage:function(){this.parseHTML('<p class="content empty">').text(mw.msg("mobile-frontend-donate-image-nouploads")).insertBefore(this.$list)},hideEmptyMessage:function(){this.$el.find(".empty").hide()},showSpinner:function(){this.$end.show()},hideSpinner:function(){this.$end.hide()},updateEmptyUI:function(){this.isEmpty()?this.showEmptyMessage():this.hideEmptyMessage()},appendPhotos:function(t){var e=this;t.forEach(function(t){new o(t).appendTo(e.$list)})},enableScroll:function(){!1===this.scrollEndEventEmitter.enabled&&this.scrollEndEventEmitter.enable()},_loadPhotos:function(){var t=this;t.showSpinner(),this.gateway.getPhotos().then(function(e){var i=e.photos||[],s=e.canContinue;t.appendPhotos(i),t.updateEmptyUI(),s&&t.enableScroll(),t.hideSpinner()}).catch(function(){t.updateEmptyUI(),t.hideSpinner(),t.enableScroll()})}}),t.exports=c},"./src/mobile.special.uploads.scripts/PhotoListGateway.js":function(t,e,i){var s=i("./src/mobile.startup/util.js");function n(t){this.api=t.api,this.url=t.url,this.username=t.username,this.category=t.category,this.limit=10,this.continueParams={continue:""},this.canContinue=!0}function o(t){return(t=t.replace(/\.[^. ]+$/,"")).replace(/^[^:]*:/,"").replace(/ \d{4}-\d{1,2}-\d{1,2} \d{1,2}-\d{1,2}$/,"")}n.prototype={getWidth:function(){return mw.config.get("wgMFThumbnailSizes").small},_getImageDataFromPage:function(t){var e=t.imageinfo[0];return{url:e.thumburl,title:t.title,timestamp:e.timestamp,description:o(t.title),descriptionUrl:e.descriptionurl}},getQuery:function(){var t=s.extend({action:"query",prop:"imageinfo",iiprop:"url|timestamp",iiurlwidth:this.getWidth()},this.continueParams);return this.username?s.extend(t,{generator:"allimages",gaiuser:this.username,gaisort:"timestamp",gaidir:"descending",gailimit:this.limit}):this.category&&s.extend(t,{generator:"categorymembers",gcmtitle:"Category:"+this.category,gcmtype:"file",gcmdir:"descending",gcmlimit:this.limit}),this.url&&(t.origin="*"),t},getPhotos:function(){var t=this;return this.api.ajax(this.getQuery(),{url:this.url}).then(function(e){var i=[];return e.query&&e.query.pages&&(i=Object.keys(e.query.pages).map(function(i){return t._getImageDataFromPage(e.query.pages[i])}).sort(function(t,e){return t.timestamp<e.timestamp?1:-1})),void 0!==e.continue?t.continueParams=e.continue:t.canContinue=!1,{canContinue:t.canContinue,photos:i}})}},n.test={getDescription:o},t.exports=n},"./src/mobile.special.uploads.scripts/mobile.special.uploads.scripts.js":function(t,e,i){var s=mw.user,n=i("./src/mobile.special.uploads.scripts/PhotoList.js"),o=i("./src/mobile.startup/eventBusSingleton.js"),r=mw.config.get("wgPageName").split("/"),a=s.getName(),l=mw.config.get("wgMFPhotoUploadEndpoint")||void 0,c=r[1]?r[1]:a;c&&$(function(){!function(t){0===$(".errorbox").length&&new n({url:l,api:t,username:c,eventBus:o}).appendTo("#mw-content-text .content")}(new mw.Api)})}},[["./src/mobile.special.uploads.scripts/mobile.special.uploads.scripts.js",0,1]]]);
//# sourceMappingURL=mobile.special.uploads.scripts.js.map.json
\ No newline at end of file
this.mfModules=this.mfModules||{},this.mfModules["mobile.special.userlogin.scripts"]=(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{"./src/mobile.special.userlogin.scripts.js":function(s,e){$(function(){$("#wpRemember").prop("checked",!0)})}},[["./src/mobile.special.userlogin.scripts.js",0]]]);
//# sourceMappingURL=mobile.special.userlogin.scripts.js.map.json
\ No newline at end of file
{"version":3,"sources":["webpack://mfModules.[name]/./src/mobile.special.userlogin.scripts.js"],"names":["$","prop"],"mappings":"yMACAA,EAAG,WAGFA,EAAG,eAAgBC,KAAM,WAAW","file":"mobile.special.userlogin.scripts.js","sourcesContent":["/* global $ */\n$( function () {\n\t// Most people on mobile devices are on a personal device so this property should be assumed.\n\t// To be consistent across platforms do same on desktop\n\t$( '#wpRemember' ).prop( 'checked', true );\n} );\n"],"sourceRoot":""}
\ No newline at end of file
this.mfModules=this.mfModules||{},this.mfModules["mobile.special.watchlist.scripts"]=(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{"./src/mobile.special.watchlist.scripts/WatchList.js":function(t,i,e){var s=e("./src/mobile.startup/mfExtend.js"),a=e("./src/mobile.startup/PageList.js"),n=e("./src/mobile.startup/watchstar/WatchstarPageList.js"),r=e("./src/mobile.startup/ScrollEndEventEmitter.js"),l=e("./src/mobile.startup/util.js"),c=e("./src/mobile.special.watchlist.scripts/WatchListGateway.js");function o(t){var i,e=l.extend({},{isBorderBox:!1},t);this.scrollEndEventEmitter=new r(e.eventBus),this.scrollEndEventEmitter.on(r.EVENT_SCROLL_END,this._loadPages.bind(this)),e.el&&(i=this.getLastTitle(e.el)),this.gateway=new c(e.api,i),n.call(this,e)}s(o,n,{preRender:function(){this.scrollEndEventEmitter.disable(),this.scrollEndEventEmitter.setElement(this.$el)},postRender:function(){var t,i;a.prototype.postRender.apply(this),t=this.queryUnitializedItems(),i=Object.keys(this.parsePagesFromItems(t)).reduce(function(t,i){return t[i]=!0,t},{}),this.renderItems(t,i),this.scrollEndEventEmitter.enable()},_loadPages:function(){this.gateway.loadWatchlist().then(function(t){t.forEach(function(t){this.appendPage(t)}.bind(this)),this.render()}.bind(this))},appendPage:function(t){var i=l.extend({},t.options,{wikidataDescription:void 0});this.$el.append(this.templatePartials.item.render(i))},getLastTitle:function(t){return t.find("li:last").attr("title")}}),t.exports=o},"./src/mobile.special.watchlist.scripts/WatchListGateway.js":function(t,i,e){var s=e("./src/mobile.startup/Page.js"),a=e("./src/mobile.startup/util.js"),n=e("./src/mobile.startup/extendSearchParams.js");function r(t,i){this.api=t,this.limit=50,i?(this.continueParams={continue:"gwrcontinue||",gwrcontinue:"0|"+i.replace(/ /g,"_")},this.shouldSkipFirstTitle=!0):(this.continueParams={continue:""},this.shouldSkipFirstTitle=!1),this.canContinue=!0}r.prototype={loadWatchlist:function(){var t=this,i=n("watchlist",{prop:["info","revisions"],rvprop:"timestamp|user",generator:"watchlistraw",gwrnamespace:"0",gwrlimit:this.limit},this.continueParams);return!1===this.canContinue?a.Deferred().resolve([]):this.api.get(i,{url:this.apiUrl}).then(function(i){return void 0!==i.continue?t.continueParams=i.continue:t.canContinue=!1,t.parseData(i)})},parseData:function(t){var i;return t.query&&t.query.pages?((i=t.query.pages).sort(function(t,i){return t.title===i.title?0:t.title<i.title?-1:1}),this.shouldSkipFirstTitle&&(i=i.slice(1),this.shouldSkipFirstTitle=!1),i.map(s.newFromJSON)):[]}},t.exports=r},"./src/mobile.special.watchlist.scripts/mobile.special.watchlist.scripts.js":function(t,i,e){var s=e("./src/mobile.special.watchlist.scripts/WatchList.js"),a=e("./src/mobile.startup/eventBusSingleton.js"),n=mw.user.options.get();$(function(){var t=new mw.Api,i=$(".button-bar .is-on a").data("view"),e=$(".mw-mf-watchlist-selector .selected a").data("filter");!function(){var t=$("ul.page-list");0===$(".mw-mf-watchlist-selector").length&&new s({api:new mw.Api,el:t,funnel:"watchlist",skipTemplateRender:!0,eventBus:a}),$(".more").remove()}(),i!==n.mfWatchlistView&&t.saveOption("mfWatchlistView",i),e&&e!==n.mfWatchlistFilter&&t.saveOption("mfWatchlistFilter",e)})}},[["./src/mobile.special.watchlist.scripts/mobile.special.watchlist.scripts.js",0,1]]]);
//# sourceMappingURL=mobile.special.watchlist.scripts.js.map.json
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
!function(e){function r(r){for(var n,f,i=r[0],l=r[1],a=r[2],c=0,s=[];c<i.length;c++)f=i[c],o[f]&&s.push(o[f][0]),o[f]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var l=t[i];0!==o[l]&&(n=!1)}n&&(u.splice(r--,1),e=f(f.s=t[0]))}return e}var n={},o={0:0},u=[];function f(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,f),t.l=!0,t.exports}f.m=e,f.c=n,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,r){if(1&r&&(e=f(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)f.d(t,n,function(r){return e[r]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="";var i=window.webpackJsonp=window.webpackJsonp||[],l=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var p=l;t()}([]);
//# sourceMappingURL=mobile.startup.runtime.js.map.json
\ No newline at end of file
{"version":3,"sources":["webpack://mfModules.[name]/webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","0","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice"],"mappings":"aACA,SAAAA,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAIAM,EAAA,EAAAC,KACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAKA,IAFAe,KAAAhB,GAEAO,EAAAC,QACAD,EAAAU,OAAAV,GAOA,OAHAW,EAAAR,KAAAS,MAAAD,EAAAb,OAGAe,IAEA,SAAAA,IAEA,IADA,IAAAC,EACAf,EAAA,EAAiBA,EAAAY,EAAAV,OAA4BF,IAAA,CAG7C,IAFA,IAAAgB,EAAAJ,EAAAZ,GACAiB,GAAA,EACAC,EAAA,EAAkBA,EAAAF,EAAAd,OAA2BgB,IAAA,CAC7C,IAAAC,EAAAH,EAAAE,GACA,IAAAf,EAAAgB,KAAAF,GAAA,GAEAA,IACAL,EAAAQ,OAAApB,IAAA,GACAe,EAAAM,IAAAC,EAAAN,EAAA,KAGA,OAAAD,EAIA,IAAAQ,KAKApB,GACAqB,EAAA,GAGAZ,KAGA,SAAAS,EAAA1B,GAGA,GAAA4B,EAAA5B,GACA,OAAA4B,EAAA5B,GAAA8B,QAGA,IAAAC,EAAAH,EAAA5B,IACAK,EAAAL,EACAgC,GAAA,EACAF,YAUA,OANAhB,EAAAd,GAAAa,KAAAkB,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAnB,EAGAY,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACA1B,OAAA6B,eAAAT,EAAAM,GAA0CI,YAAA,EAAAC,IAAAJ,KAK1CX,EAAAgB,EAAA,SAAAZ,GACA,oBAAAa,eAAAC,aACAlC,OAAA6B,eAAAT,EAAAa,OAAAC,aAAwDC,MAAA,WAExDnC,OAAA6B,eAAAT,EAAA,cAAiDe,OAAA,KAQjDnB,EAAAoB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAAnB,EAAAmB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAvC,OAAAwC,OAAA,MAGA,GAFAxB,EAAAgB,EAAAO,GACAvC,OAAA6B,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAAnB,EAAAS,EAAAc,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAAAF,GAIAvB,EAAA2B,EAAA,SAAAtB,GACA,IAAAM,EAAAN,KAAAiB,WACA,WAA2B,OAAAjB,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAgB,EAAAC,GAAsD,OAAA7C,OAAAC,UAAAC,eAAAC,KAAAyC,EAAAC,IAGtD7B,EAAA8B,EAAA,GAEA,IAAAC,EAAAC,OAAA,aAAAA,OAAA,iBACAC,EAAAF,EAAAhD,KAAA2C,KAAAK,GACAA,EAAAhD,KAAAX,EACA2D,IAAAG,QACA,QAAAvD,EAAA,EAAgBA,EAAAoD,EAAAlD,OAAuBF,IAAAP,EAAA2D,EAAApD,IACvC,IAAAU,EAAA4C,EAIAxC","file":"mobile.startup.runtime.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""}
\ No newline at end of file
this.mfModules=this.mfModules||{},this.mfModules["mobile.talk.overlays"]=(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{"./src/mobile.talk.overlays/AddTopicForm.js":function(e,t,i){var o=i("./src/mobile.startup/mfExtend.js"),s=i("./src/mobile.startup/View.js"),a=i("./src/mobile.startup/Panel.js"),n=i("./src/mobile.startup/util.js");function r(e){var t=new a;return t.$el.append(e),t}function l(e){s.call(this,n.extend(e,{topicTitlePlaceHolder:mw.msg("mobile-frontend-talk-add-overlay-subject-placeholder"),topicContentPlaceHolder:mw.msg("mobile-frontend-talk-add-overlay-content-placeholder"),className:"add-topic-form",events:{"input .wikitext-editor, input":"onTextInput","change .wikitext-editor, input":"onTextInput"}}))}o(l,s,{postRender:function(){var e=this.options,t=e.disabled,i=n.parseHTML("<input>").attr({class:"mw-ui-input",type:"text",disabled:t,value:e.subject,placeholder:e.topicTitlePlaceHolder}),o=n.parseHTML("<textarea>").attr({class:"wikitext-editor mw-ui-input",cols:40,rows:10,disabled:t,placeholder:e.topicContentPlaceHolder}).val(e.body),a=[r(n.parseHTML("<p>").addClass("license").html(e.licenseMsg)),r(i),r(o)];this.$el.append(a.map(function(e){return e.$el})),this.$subject=i,this.$messageBody=o,s.prototype.postRender.apply(this,arguments)},onTextInput:function(){this.options.onTextInput&&this.options.onTextInput(this.$subject.val().trim(),this.$messageBody.val().trim())}}),l.test={makePanel:r},e.exports=l},"./src/mobile.talk.overlays/TalkSectionAddOverlay.js":function(e,t,i){var o=i("./src/mobile.startup/mfExtend.js"),s=i("./src/mobile.startup/Overlay.js"),a=i("./src/mobile.startup/PageGateway.js"),n=i("./src/mobile.startup/util.js"),r=i("./src/mobile.talk.overlays/makeAddTopicForm.js"),l=i("./src/mobile.startup/toast.js"),d=i("./src/mobile.startup/Icon.js");function c(e){this.editorApi=e.api,this.pageGateway=new a(e.api),s.call(this,n.extend(e,{className:"talk-overlay overlay",events:{"click .confirm-save":"onSaveClick"}})),this.title=e.title,this.currentPageTitle=e.currentPageTitle,this.eventBus=e.eventBus,this._saveHit=!1}o(c,s,{defaults:n.extend({},s.prototype.defaults,{cancelMsg:mw.msg("mobile-frontend-editor-cancel"),editingMsg:mw.msg("mobile-frontend-talk-add-overlay-submit"),waitMsg:mw.msg("mobile-frontend-talk-topic-wait"),waitIcon:new d({name:"spinner",additionalClassNames:"savespinner loading"}).toHtmlString()}),template:mw.template.get("mobile.talk.overlays","SectionAddOverlay.hogan"),templatePartials:n.extend({},s.prototype.templatePartials,{contentHeader:mw.template.get("mobile.talk.overlays","SectionAddOverlay/contentHeader.hogan"),saveHeader:mw.template.get("mobile.editor.overlay","saveHeader.hogan")}),postRender:function(){var e;s.prototype.postRender.call(this),e=r({subject:"",body:"",disabled:!1,licenseMsg:this.options.licenseMsg,onTextInput:this.onTextInput.bind(this)}),this.showHidden(".initial-header"),this.$confirm=this.$el.find("button.confirm-save"),this.$el.find(".overlay-content").append(e.$el),this.$subject=e.$el.find("input"),this.$ta=e.$el.find(".wikitext-editor")},hide:function(){var e,t=mw.msg("mobile-frontend-editor-cancel-confirm");return e=!this.$subject.val()&&!this.$ta.val(),!!(this._saveHit||e||window.confirm(t))&&s.prototype.hide.apply(this,arguments)},onTextInput:function(e,t){this.subject=e,this.body=t,clearTimeout(this.timer),this.timer=setTimeout(function(){t&&e?this.$confirm.prop("disabled",!1):this.$confirm.prop("disabled",!0)}.bind(this),250)},onSaveClick:function(){var e=this.title===this.currentPageTitle;this.showHidden(".saving-header"),this.save().then(function(t){"ok"===t&&(e?this.eventBus.emit("talk-added-wo-overlay"):(this.pageGateway.invalidatePage(this.title),l.show(mw.msg("mobile-frontend-talk-topic-feedback")),this.eventBus.emit("talk-discussion-added"),this.hide()))}.bind(this),function(e){var t=mw.msg("mobile-frontend-talk-topic-error");switch(this.$confirm.prop("disabled",!1),e.details){case"protectedpage":t=mw.msg("mobile-frontend-talk-topic-error-protected");break;case"noedit":case"blocked":t=mw.msg("mobile-frontend-talk-topic-error-permission");break;case"spamdetected":t=mw.msg("mobile-frontend-talk-topic-error-spam");break;case"badtoken":t=mw.msg("mobile-frontend-talk-topic-error-badtoken");break;default:t=mw.msg("mobile-frontend-talk-topic-error")}l.show(t,{type:"error"}),this.showHidden(".save-header, .save-panel")}.bind(this))},save:function(){var e=this.subject,t=n.Deferred();return this.$ta.removeClass("error"),this.$subject.removeClass("error"),this._saveHit=!0,this.$el.find(".content").empty().addClass("loading"),this.editorApi.postWithToken("csrf",{action:"edit",section:"new",sectiontitle:e,title:this.title,summary:mw.msg("newsectionsummary",e),text:this.body}).then(function(){return"ok"},function(e){return t.reject({type:"error",details:e})})}}),e.exports=c},"./src/mobile.talk.overlays/TalkSectionOverlay.js":function(e,t,i){var o=mw.user,s=i("./src/mobile.startup/mfExtend.js"),a=i("./src/mobile.startup/PageGateway.js"),n=i("./src/mobile.startup/Overlay.js"),r=i("./src/mobile.startup/util.js"),l=i("./src/mobile.startup/toast.js"),d=i("./src/mobile.talk.overlays/autosign.js"),c=i("./src/mobile.startup/Page.js"),m=i("./src/mobile.startup/Button.js");function p(e){this.editorApi=e.api,this.pageGateway=new a(e.api),n.call(this,r.extend(!0,e,{className:"talk-overlay overlay",events:{"focus textarea":"onFocusTextarea","click .save-button":"onSaveClick"}}))}s(p,n,{templatePartials:r.extend({},n.prototype.templatePartials,{header:mw.template.get("mobile.talk.overlays","Section/header.hogan"),content:mw.template.get("mobile.talk.overlays","Section/content.hogan")}),defaults:r.extend({},n.prototype.defaults,{saveButton:new m({block:!0,additionalClassNames:"save-button",progressive:!0,label:mw.config.get("wgEditSubmitButtonLabelPublish")?mw.msg("mobile-frontend-editor-publish"):mw.msg("mobile-frontend-editor-save")}).options,title:void 0,section:void 0,reply:mw.msg("mobile-frontend-talk-reply"),info:mw.msg("mobile-frontend-talk-reply-info")}),postRender:function(){n.prototype.postRender.apply(this),this.$saveButton=this.$el.find(".save-button"),this.options.section?(this.hideSpinner(),this._enableComments()):this.renderFromApi(this.options)},_enableComments:function(){this.$commentBox=this.$el.find(".comment"),o.isAnon()?this.$commentBox.remove():this.$textarea=this.$commentBox.find("textarea")},renderFromApi:function(e){var t=this;this.pageGateway.getPage(e.title).then(function(i){var o=new c(i);e.section=o.getSection(e.id),t.render(e),t.hideSpinner()})},onFocusTextarea:function(){this.$textarea.removeClass("error")},onSaveClick:function(){var e=this.$textarea.val(),t=this;function i(){t.$saveButton.prop("disabled",!1)}e?(this.showSpinner(),this.$saveButton.prop("disabled",!0),e="\n\n"+d(e),this.editorApi.postWithToken("csrf",{action:"edit",title:this.options.title,section:this.options.id,appendtext:e,redirect:!0}).then(function(){l.show(mw.msg("mobile-frontend-talk-reply-success")),t.pageGateway.invalidatePage(t.options.title),t.renderFromApi(t.options),i()},function(e,o){var s;s=o.error&&["readonly","blocked","autoblocked"].indexOf(o.error.code)>-1?o.error.info:mw.msg("mobile-frontend-editor-error"),t.hideSpinner(),l.show(s,"toast error"),i()})):this.$textarea.addClass("error")}}),e.exports=p},"./src/mobile.talk.overlays/autosign.js":function(e,t){e.exports=function(e){return/~{3,5}/.test(e)?e:e+" ~~~~"}},"./src/mobile.talk.overlays/makeAddTopicForm.js":function(e,t,i){var o=i("./src/mobile.talk.overlays/AddTopicForm.js"),s=i("./src/mobile.talk.overlays/autosign.js");e.exports=function(e){var t=e.licenseMsg,i=e.onTextInput,a=e.subject,n=e.body,r=e.disabled;return new o({licenseMsg:t,disabled:r,subject:a,body:n,onTextInput:i?function(e,t){t&&(t=s(t)),i.call(this,e,t)}:void 0})}},"./src/mobile.talk.overlays/mobile.talk.overlays.js":function(e,t,i){var o=i("./src/mobile.startup/moduleLoaderSingleton.js"),s=i("./src/mobile.talk.overlays/talkBoard.js"),a=i("./src/mobile.startup/talk/overlay.js"),n=i("./src/mobile.startup/PageGateway.js"),r=i("./src/mobile.talk.overlays/TalkSectionAddOverlay.js"),l=i("./src/mobile.talk.overlays/TalkSectionOverlay.js");o.deprecate("mobile.talk.overlays/talkOverlay",function(e){return a(e.title,new n(e.api))},"Use `mobile.startup` (talk.overlay)"),o.define("mobile.talk.overlays/talkBoard",s),o.define("mobile.talk.overlays/TalkSectionAddOverlay",r),o.define("mobile.talk.overlays/TalkSectionOverlay",l)},"./src/mobile.talk.overlays/talkBoard.js":function(e,t,i){var o=i("./src/mobile.startup/util.js"),s=i("./src/mobile.startup/View.js");e.exports=function(e){var t,i=e.length>0?mw.msg("mobile-frontend-talk-explained"):mw.msg("mobile-frontend-talk-explained-empty");return(t=new s({className:"talk-board"})).append([o.parseHTML('<p class="content-header">').text(i),o.parseHTML('<ul class="topic-title-list">').append(e.map(function(e){return o.parseHTML("<li>").append(o.parseHTML("<a>").attr("href","#/talk/"+e.id).text(e.line))}))]),t}}},[["./src/mobile.talk.overlays/mobile.talk.overlays.js",0,1]]]);
//# sourceMappingURL=mobile.talk.overlays.js.map.json
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment