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mK,EAAKgE,UAAUI,OAAQ,kBAEzB,CA8DAlO,EAAOC,QAAU,CAAE+I,KArCnB,SAAe0J,GACd,MAAMF,EAAczD,IACI3G,MAAMuK,KAAMD,EAAUrH,iBAAkB,8CAChDD,SAAWwH,IAC1BA,EAAQ9E,UAAUnO,IAAK,0BAIvB,MAAM6I,EAAUoK,EAAQC,mBACxBrK,EAAQsF,UAAUnO,IAAK,0BAGvBiT,EAAQ3C,aAAc,WAAY,KAClC2C,EAAQ3C,aAAc,OAAQ,UAC9B2C,EAAQ3C,aAAc,gBAAiBzH,EAAQzJ,IAG/C,MAAM+K,EAAOzF,SAASyO,cAAe,QACrChJ,EAAKgE,UAAUnO,IAAK,UAAW,iBAAkB,uBACjDmK,EAAKmG,aAAc,eAAe,GAClC2C,EAAQG,QAASjJ,GAEjBwI,EAAmB9J,EAASoK,EAAS9I,EAAM0I,GAG3CI,EAAQzH,iBAAkB,SAAWzM,IAIhBA,EAAGwN,OAAOzH,QAAS,MA3C1C,SAAiB+D,EAAS+J,EAAazI,GAEtCwI,EAAmB9J,EAAS+J,EAAazI,GADjBtB,EAAQiK,OAIjC,CAwCIpD,CAAQ7G,EAASoK,EAAS9I,EAC3B,GACE,GAEL,E","sources":["webpack://mfModules/./src/mobile.init/editor.js","webpack://mfModules/./src/mobile.init/editorLoadingOverlay.js","webpack://mfModules/./src/mobile.init/fakeToolbar.js","webpack://mfModules/./src/mobile.init/lazyLoadedImages.js","webpack://mfModules/./src/mobile.init/mobile.init.js","webpack://mfModules/./src/mobile.init/toggling.js","webpack://mfModules/./src/mobile.startup/Toggler.js","webpack://mfModules/./src/mobile.startup/isCollapsedByDefault.js","webpack://mfModules/./src/mobile.startup/sectionCollapsing.js"],"sourcesContent":["/* global $ */\nconst\n\tutil = require( '../mobile.startup/util' ),\n\tfakeToolbar = require( './fakeToolbar' ),\n\teditorLoadingOverlay = require( './editorLoadingOverlay' ),\n\tOverlayManager = require( '../mobile.startup/OverlayManager' ),\n\t// #ca-edit, .mw-editsection are standard MediaWiki elements\n\t// .edit-link can be added to links anywhere to trigger the editor (e.g. MobileFrontend\n\t// user page creation CTA, edit-full-page overflow menu item)\n\t// Links in content are handled separately to allow reloading the content (T324686)\n\t$editTab = $( '#ca-edit, #ca-editsource, #ca-viewsource, #ca-ve-edit, #ca-ve-create, #ca-createsource' ),\n\thasTwoEditIcons = $editTab.length > 1,\n\tEDITSECTION_SELECTOR = '.mw-editsection a, .edit-link',\n\tuser = mw.user,\n\tCtaDrawer = require( '../mobile.startup/CtaDrawer' ),\n\tveConfig = mw.config.get( 'wgVisualEditorConfig' ),\n\teditorPath = /^\\/editor\\/(\\d+|T-\\d+|all)$/;\n\nlet editorOverride = null;\n\n/**\n * Event handler for edit link clicks. Will prevent default link\n * behaviour and will not allow propagation\n *\n * @method\n * @ignore\n * @param {HTMLElement} elem\n * @param {jQuery.Event} ev\n * @param {Router} router\n */\nfunction onEditLinkClick( elem, ev, router ) {\n\tlet section;\n\tif ( $( EDITSECTION_SELECTOR ).length === 0 ) {\n\t\t// If section edit links are not available, the only edit link\n\t\t// should allow editing the whole page (T232170)\n\t\tsection = 'all';\n\t} else {\n\t\tsection = mw.util.getParamValue( 'section', elem.href ) || 'all';\n\t}\n\t// Don't do anything for section edit links for different pages (transcluded)\n\tif ( mw.config.get( 'wgPageName' ) !== mw.util.getParamValue( 'title', elem.href ) ) {\n\t\treturn;\n\t}\n\tif ( hasTwoEditIcons ) {\n\t\tif ( elem.id === 'ca-ve-edit' || elem.id === 'ca-ve-create' ) {\n\t\t\t// \"Edit\" tab loads the visual editor\n\t\t\teditorOverride = 'VisualEditor';\n\t\t} else if ( elem.id === 'ca-editsource' || elem.id === 'ca-createsource' ) {\n\t\t\t// \"Edit source\" tab loads the source editor\n\t\t\teditorOverride = 'SourceEditor';\n\t\t} else {\n\t\t\t// Any other edit links (e.g. for sections) load the preferred editor\n\t\t}\n\t}\n\trouter.navigate( '#/editor/' + section );\n\t// DO NOT USE stopPropagation or you'll break click tracking in WikimediaEvents\n\t// You DO NOT NEED to\n\t// prevent folding section when clicking Edit by stopping propagation\n\t// as this is a concern of the Toggler class and taken care of by inspecting\n\t// !ev.target.href (see Toggler.js)\n\t// avoid navigating to ?action=edit\n\tev.preventDefault();\n}\n\n/**\n * Retrieve the user's preferred editor setting. If none is set, return the default\n * editor for this wiki.\n *\n * @method\n * @ignore\n * @return {string} Either 'VisualEditor' or 'SourceEditor'\n */\nfunction getPreferredEditor() {\n\tif ( editorOverride ) {\n\t\t// Temporary override, set via the URL for this request\n\t\t// or by clicking the chosen mode when both tabs are shown\n\t\treturn editorOverride;\n\t}\n\tconst preferredEditor = mw.user.options.get( 'mobile-editor' ) || mw.storage.get( 'preferredEditor' );\n\tif ( preferredEditor ) {\n\t\treturn preferredEditor;\n\t}\n\tswitch ( mw.config.get( 'wgMFDefaultEditor' ) ) {\n\t\tcase 'source':\n\t\t\treturn 'SourceEditor';\n\t\tcase 'visual':\n\t\t\treturn 'VisualEditor';\n\t\tcase 'preference':\n\t\t\t// First check if the user has actually used the desktop editor.\n\t\t\t// This is done hackily by checking if they have the preference\n\t\t\t// set to suppress the welcome dialog or user education popups. (T261423)\n\t\t\tif ( mw.user.options.get( 'visualeditor-hidebetawelcome' ) || mw.user.options.get( 'visualeditor-hideusered' ) ) {\n\t\t\t\treturn mw.user.options.get( 'visualeditor-editor' ) === 'visualeditor' ? 'VisualEditor' : 'SourceEditor';\n\t\t\t} else {\n\t\t\t\t// When there is no desktop preference, we use MFFallbackEditor.\n\t\t\t\treturn mw.config.get( 'wgMFFallbackEditor' ) === 'visual' ? 'VisualEditor' : 'SourceEditor';\n\t\t\t}\n\t}\n\t// In the event of misconfiguration, fall back to source\n\treturn 'SourceEditor';\n}\n\n/**\n * Initialize the edit button so that it launches the editor interface when clicked.\n *\n * @method\n * @ignore\n * @param {Page} page The page to edit.\n * @param {Skin} skin\n * @param {module:mobile.startup/PageHTMLParser} currentPageHTMLParser\n * @param {Router} router\n */\nfunction setupEditor( page, skin, currentPageHTMLParser, router ) {\n\tconst\n\t\toverlayManager = OverlayManager.getSingleton(),\n\t\tisNewPage = page.id === 0;\n\n\t$editTab.add( '.edit-link' ).on( 'click.mfeditlink', function ( ev ) {\n\t\tonEditLinkClick( this, ev, overlayManager.router );\n\t} );\n\tmw.hook( 'wikipage.content' ).add( ( $content ) => {\n\t\t// make sure that any .edit-link links in here don't get double-handled\n\t\t$content.find( EDITSECTION_SELECTOR ).off( 'click.mfeditlink' ).on( 'click.mfeditlink', function ( ev ) {\n\t\t\tonEditLinkClick( this, ev, overlayManager.router );\n\t\t} );\n\t} );\n\n\toverlayManager.add( editorPath, ( sectionId ) => {\n\t\tconst\n\t\t\tscrollTop = window.pageYOffset,\n\t\t\t$contentText = $( '#mw-content-text' ),\n\t\t\turl = new URL( location.href ),\n\t\t\teditorOptions = {\n\t\t\t\tfakeToolbar,\n\t\t\t\toverlayManager,\n\t\t\t\tcurrentPageHTMLParser,\n\t\t\t\tfakeScroll: 0,\n\t\t\t\tapi: new mw.Api(),\n\t\t\t\tlicenseMsg: skin.getLicenseMsg(),\n\t\t\t\ttitle: page.title,\n\t\t\t\ttitleObj: page.titleObj,\n\t\t\t\tisAnon: user.isAnon(),\n\t\t\t\tisNewPage,\n\t\t\t\toldId: mw.util.getParamValue( 'oldid' ),\n\t\t\t\tcontentLang: $contentText.attr( 'lang' ),\n\t\t\t\tcontentDir: $contentText.attr( 'dir' ),\n\t\t\t\t// Arrange preload content if we're on a page with those URL parameters\n\t\t\t\tpreload: url.searchParams.get( 'preload' ),\n\t\t\t\tpreloadparams: mw.util.getArrayParam( 'preloadparams', url.searchParams ),\n\t\t\t\teditintro: url.searchParams.get( 'editintro' )\n\t\t\t},\n\t\t\tvisualAbortPromise = $.Deferred();\n\n\t\tconst animationDelayDeferred = util.Deferred();\n\n\t\tlet abortableDataPromise, overlayPromise,\n\t\t\tinitMechanism = mw.util.getParamValue( 'redlink' ) ? 'new' : 'click';\n\n\t\tif ( sectionId !== 'all' ) {\n\t\t\teditorOptions.sectionId = page.isWikiText() ? sectionId : undefined;\n\t\t}\n\n\t\tfunction showLoading() {\n\t\t\tlet $sectionTop, fakeScroll, enableVisualSectionEditing;\n\n\t\t\t$( document.body ).addClass( 've-loading' );\n\n\t\t\tconst $page = $( '#mw-mf-page-center' );\n\t\t\tconst $content = $( '#content' );\n\t\t\tif ( sectionId === '0' || sectionId === 'all' ) {\n\t\t\t\t$sectionTop = $( '#bodyContent' );\n\t\t\t} else {\n\t\t\t\t$sectionTop = $(\n\t\t\t\t\t// ends with section=N\n\t\t\t\t\t'a[href$=\"section=' + sectionId + '\"],' +\n\t\t\t\t\t// contains section=N&...\n\t\t\t\t\t'a[href*=\"section=' + sectionId + '&\"]'\n\t\t\t\t).closest( '.mw-heading, h1, h2, h3, h4, h5, h6' );\n\t\t\t\t// When loading on action=edit URLs, there is no page content\n\t\t\t\tif ( !$sectionTop.length ) {\n\t\t\t\t\t$sectionTop = $( '#bodyContent' );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Pretend that we didn't just scroll the page to the top.\n\t\t\t$page.prop( 'scrollTop', scrollTop );\n\t\t\t// Then, pretend that we're scrolling to the position of the clicked heading.\n\t\t\tfakeScroll = $sectionTop[0].getBoundingClientRect().top;\n\t\t\t// Adjust for height of the toolbar.\n\t\t\tfakeScroll -= 48;\n\t\t\tif ( shouldLoadVisualEditor() ) {\n\t\t\t\tenableVisualSectionEditing = veConfig.enableVisualSectionEditing === true ||\n\t\t\t\t\t// === ve.init.mw.MobileArticleTarget.static.trackingName\n\t\t\t\t\tveConfig.enableVisualSectionEditing === 'mobile';\n\t\t\t\tif ( sectionId === '0' || sectionId === 'all' || enableVisualSectionEditing ) {\n\t\t\t\t\t// Adjust for surface padding. Only needed if we're at the beginning of the doc.\n\t\t\t\t\tfakeScroll -= 16;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( sectionId === '0' || sectionId === 'all' ) {\n\t\t\t\t\tfakeScroll -= 16;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$content.css( {\n\t\t\t\t// Use transform instead of scroll for smoother animation (via CSS transitions).\n\t\t\t\ttransform: 'translate( 0, ' + -fakeScroll + 'px )',\n\t\t\t\t// If the clicked heading is near the end of the page, we might need to insert\n\t\t\t\t// some extra space to allow us to scroll \"beyond the end\" of the page.\n\t\t\t\t'padding-bottom': '+=' + fakeScroll,\n\t\t\t\t'margin-bottom': '-=' + fakeScroll\n\t\t\t} );\n\t\t\teditorOptions.fakeScroll = fakeScroll;\n\t\t\tsetTimeout( animationDelayDeferred.resolve, 500 );\n\t\t}\n\n\t\tfunction clearLoading() {\n\t\t\tif ( abortableDataPromise && abortableDataPromise.abort ) {\n\t\t\t\tabortableDataPromise.abort();\n\t\t\t}\n\n\t\t\t$( '#content' ).css( {\n\t\t\t\ttransform: '',\n\t\t\t\t'padding-bottom': '',\n\t\t\t\t'margin-bottom': ''\n\t\t\t} );\n\n\t\t\t$( document.body ).removeClass( 've-loading' );\n\t\t}\n\n\t\tfunction loadBasicEditor() {\n\t\t\t// Note that this option was used when logging a wikitext init later\n\t\t\tinitMechanism = 'tooslow';\n\n\t\t\t// This restarts the loading (whether it was aborted when loading the code or the data)\n\t\t\tvisualAbortPromise.reject();\n\t\t\tif ( abortableDataPromise && abortableDataPromise.abort ) {\n\t\t\t\tabortableDataPromise.abort();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Log init event to edit schema.\n\t\t * Need to log this from outside the Overlay object because that module\n\t\t * won't have loaded yet.\n\t\t *\n\t\t * @private\n\t\t * @ignore\n\t\t * @param {string} editor name e.g. wikitext or visualeditor\n\t\t * @method\n\t\t */\n\t\tfunction logInit( editor ) {\n\t\t\tmw.track( 'editAttemptStep', {\n\t\t\t\taction: 'init',\n\t\t\t\ttype: 'section',\n\t\t\t\tmechanism: initMechanism,\n\t\t\t\tintegration: 'page',\n\t\t\t\t/* eslint-disable camelcase */\n\t\t\t\teditor_interface: editor\n\t\t\t\t/* eslint-enable camelcase */\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Check whether VisualEditor should be loaded\n\t\t *\n\t\t * @private\n\t\t * @ignore\n\t\t * @method\n\t\t * @return {bool}\n\t\t */\n\t\tfunction shouldLoadVisualEditor() {\n\t\t\tconst preferredEditor = getPreferredEditor();\n\n\t\t\treturn page.isVESourceAvailable() || (\n\t\t\t\tpage.isVEVisualAvailable() &&\n\t\t\t\t// If the user prefers visual mode or the user has no preference and\n\t\t\t\t// the visual mode is the default editor for this wiki\n\t\t\t\tpreferredEditor === 'VisualEditor'\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * Load source editor\n\t\t *\n\t\t * @ignore\n\t\t * @method\n\t\t * @return {jQuery.Promise} Promise resolved with the editor overlay\n\t\t * @fires mobileFrontend.editorOpening\n\t\t */\n\t\tfunction loadSourceEditor() {\n\t\t\tlogInit( 'wikitext' );\n\t\t\t// Inform other interested code that we're loading the editor\n\t\t\t/**\n\t\t\t * Internal for use in GrowthExperiments only.\n\t\t\t *\n\t\t\t * @event ~'mobileFrontend.editorOpening'\n\t\t\t * @memberof Hooks\n\t\t\t */\n\t\t\tmw.hook( 'mobileFrontend.editorOpening' ).fire();\n\n\t\t\treturn mw.loader.using( 'mobile.editor.overlay' ).then( () => {\n\t\t\t\tconst SourceEditorOverlay = __non_webpack_require__( 'mobile.editor.overlay' ).SourceEditorOverlay;\n\t\t\t\treturn new SourceEditorOverlay( editorOptions );\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Load visual editor. If it fails to load for any reason, load the source editor instead.\n\t\t *\n\t\t * @private\n\t\t * @ignore\n\t\t * @method\n\t\t * @return {jQuery.Promise} Promise resolved with the editor overlay\n\t\t */\n\t\tfunction loadVisualEditorMaybe() {\n\t\t\tlogInit( 'visualeditor' );\n\t\t\t// Inform other interested code that we're loading the editor\n\t\t\t/**\n\t\t\t * Internal for use in GrowthExperiments only.\n\t\t\t *\n\t\t\t * @event ~'mobileFrontend.editorOpening'\n\t\t\t * @memberof Hooks\n\t\t\t */\n\t\t\tmw.hook( 'mobileFrontend.editorOpening' ).fire();\n\n\t\t\teditorOptions.mode = mw.config.get( 'wgMFEnableVEWikitextEditor' ) && getPreferredEditor() === 'SourceEditor' ?\n\t\t\t\t'source' :\n\t\t\t\t'visual';\n\t\t\teditorOptions.dataPromise = mw.loader.using( 'ext.visualEditor.targetLoader' ).then( () => {\n\t\t\t\tabortableDataPromise = mw.libs.ve.targetLoader.requestPageData(\n\t\t\t\t\teditorOptions.mode,\n\t\t\t\t\teditorOptions.titleObj.getPrefixedDb(),\n\t\t\t\t\t{\n\t\t\t\t\t\tsessionStore: true,\n\t\t\t\t\t\tsection: editorOptions.sectionId === undefined ?\n\t\t\t\t\t\t\tnull : editorOptions.sectionId,\n\t\t\t\t\t\toldId: editorOptions.oldId || undefined,\n\t\t\t\t\t\tpreload: editorOptions.preload,\n\t\t\t\t\t\tpreloadparams: editorOptions.preloadparams,\n\t\t\t\t\t\teditintro: editorOptions.editintro,\n\t\t\t\t\t\t// Should be ve.init.mw.MobileArticleTarget.static.trackingName,\n\t\t\t\t\t\t// but the class hasn't loaded yet.\n\t\t\t\t\t\ttargetName: 'mobile'\n\t\t\t\t\t} );\n\t\t\t\treturn abortableDataPromise;\n\t\t\t} );\n\n\t\t\tconst visualLoadingPromise = mw.loader.using( 'ext.visualEditor.targetLoader' )\n\t\t\t\t.then(\n\t\t\t\t\t// Load 'mobile.editor.overlay' separately, so that if we fall back to basic\n\t\t\t\t\t// editor, we can display it without waiting for the visual code\n\t\t\t\t\t() => mw.loader.using( 'mobile.editor.overlay' ).then( () => {\n\t\t\t\t\t\tmw.libs.ve.targetLoader.addPlugin( 'ext.visualEditor.mobileArticleTarget' );\n\t\t\t\t\t\tif ( mw.config.get( 'wgMFEnableVEWikitextEditor' ) ) {\n\t\t\t\t\t\t\t// Target loader only loads wikitext editor if the desktop\n\t\t\t\t\t\t\t// preference is set.\n\t\t\t\t\t\t\t// TODO: Have a cleaner API for this instead of duplicating\n\t\t\t\t\t\t\t// the module name here.\n\t\t\t\t\t\t\tmw.libs.ve.targetLoader.addPlugin( 'ext.visualEditor.mwwikitext' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn mw.libs.ve.targetLoader.loadModules( editorOptions.mode );\n\t\t\t\t\t} )\n\t\t\t\t);\n\n\t\t\t// Continue when loading is completed or aborted\n\t\t\tconst visualPromise = $.Deferred();\n\t\t\tvisualLoadingPromise.then( visualPromise.resolve, visualPromise.reject );\n\t\t\tvisualAbortPromise.then( visualPromise.reject, visualPromise.reject );\n\n\t\t\treturn visualPromise\n\t\t\t\t.then( () => {\n\t\t\t\t\tconst editorOverlays = __non_webpack_require__( 'mobile.editor.overlay' );\n\t\t\t\t\tconst VisualEditorOverlay = editorOverlays.VisualEditorOverlay;\n\t\t\t\t\tconst SourceEditorOverlay = editorOverlays.SourceEditorOverlay;\n\t\t\t\t\teditorOptions.SourceEditorOverlay = SourceEditorOverlay;\n\t\t\t\t\treturn new VisualEditorOverlay( editorOptions );\n\t\t\t\t}, () => loadSourceEditor() );\n\t\t}\n\n\t\t// showLoading() has to run after the overlay has opened, which disables page scrolling.\n\t\t// clearLoading() has to run after the loading overlay is hidden in any way\n\t\t// (either when loading is aborted, or when the editor overlay is shown instead).\n\t\tconst loadingOverlay = editorLoadingOverlay(\n\t\t\tshowLoading, clearLoading, shouldLoadVisualEditor() ? loadBasicEditor : null\n\t\t);\n\n\t\tif ( shouldLoadVisualEditor() ) {\n\t\t\toverlayPromise = loadVisualEditorMaybe();\n\t\t} else {\n\t\t\toverlayPromise = loadSourceEditor();\n\t\t}\n\n\t\t// Wait for the scroll animation to finish before we show the editor overlay\n\t\tutil.Promise.all( [ overlayPromise, animationDelayDeferred ] ).then( ( overlay ) => {\n\t\t\t// Wait for the data to load before we show the editor overlay\n\t\t\toverlay.getLoadingPromise().catch( ( error ) => {\n\t\t\t\tif ( visualAbortPromise.state() === 'rejected' ) {\n\t\t\t\t\treturn loadSourceEditor().then( ( sourceOverlay ) => {\n\t\t\t\t\t\toverlay = sourceOverlay;\n\t\t\t\t\t\treturn overlay.getLoadingPromise();\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn $.Deferred().reject( error ).promise();\n\t\t\t} ).then( () => {\n\t\t\t\t// Make sure the user did not close the loading overlay while we were waiting\n\t\t\t\tconst overlayData = overlayManager.stack[0];\n\t\t\t\tif ( !overlayData || overlayData.overlay !== loadingOverlay ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// Show the editor!\n\t\t\t\toverlayManager.replaceCurrent( overlay );\n\t\t\t}, ( error, apiResponse ) => {\n\t\t\t\t// Could not load the editor.\n\t\t\t\toverlayManager.router.back();\n\t\t\t\tif ( error.show ) {\n\t\t\t\t\t// Probably a blockMessageDrawer returned because the user is blocked.\n\t\t\t\t\tdocument.body.appendChild( error.$el[ 0 ] );\n\t\t\t\t\terror.show();\n\t\t\t\t} else if ( apiResponse ) {\n\t\t\t\t\tmw.notify( editorOptions.api.getErrorMessage( apiResponse ) );\n\t\t\t\t} else {\n\t\t\t\t\tmw.notify( mw.msg( 'mobile-frontend-editor-error-loading' ) );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t// Reset the temporary override for the next load\n\t\teditorOverride = null;\n\n\t\treturn loadingOverlay;\n\t} );\n\n\t$( '#ca-edit a, a#ca-edit, #ca-editsource a, a#ca-editsource' ).prop( 'href', ( i, href ) => {\n\t\tconst editUrl = new URL( href, location.href );\n\t\t// By default the editor opens section 0 (lead section), rather than the whole article.\n\t\t// This might be changed in the future (T210659).\n\t\teditUrl.searchParams.set( 'section', '0' );\n\t\treturn editUrl.toString();\n\t} );\n\n\t// We use wgAction instead of getParamValue('action') as the former can be\n\t// overridden by hooks to stop the editor loading automatically.\n\tif ( !router.getPath() && ( mw.util.getParamValue( 'veaction' ) || mw.config.get( 'wgAction' ) === 'edit' ) ) {\n\t\tif ( mw.util.getParamValue( 'veaction' ) === 'edit' ) {\n\t\t\teditorOverride = 'VisualEditor';\n\t\t} else if ( mw.util.getParamValue( 'veaction' ) === 'editsource' ) {\n\t\t\teditorOverride = 'SourceEditor';\n\t\t}\n\t\t// else: action=edit, for which we allow the default to take effect\n\t\tconst fragment = '#/editor/' + ( mw.util.getParamValue( 'section' ) || ( mw.config.get( 'wgAction' ) === 'edit' ? 'all' : '0' ) );\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tif ( window.history && history.pushState ) {\n\t\t\t// We're reformatting the action=edit URL into a view URL and\n\t\t\t// replacing it into the history, and then will fall through to\n\t\t\t// router.navigate which will move us to the editing URL for the\n\t\t\t// mobile site. We do this because the editor overlay deeply\n\t\t\t// expects to have been opened on top of an actual page, and e.g.\n\t\t\t// closing the editor via the X will produce unexpected behavior\n\t\t\t// otherwise.\n\t\t\tconst url = new URL( location.href );\n\t\t\turl.searchParams.delete( 'action' );\n\t\t\turl.searchParams.delete( 'veaction' );\n\t\t\turl.searchParams.delete( 'section' );\n\t\t\thistory.replaceState( null, document.title, url );\n\t\t}\n\t\tutil.docReady( () => {\n\t\t\trouter.navigate( fragment );\n\t\t} );\n\t}\n}\n\n/**\n * Hide any section id icons in the page. This will not hide the edit icon in the page action\n * menu.\n *\n * @method\n * @ignore\n * @param {module:mobile.startup/PageHTMLParser} currentPageHTMLParser\n */\nfunction hideSectionEditIcons( currentPageHTMLParser ) {\n\tcurrentPageHTMLParser.$el.find( '.mw-editsection' ).hide();\n}\n\n/**\n * Show a drawer with log in / sign up buttons.\n *\n * @method\n * @ignore\n * @param {Router} router\n */\nfunction bindEditLinksLoginDrawer( router ) {\n\tlet drawer;\n\tfunction showLoginDrawer() {\n\t\tif ( !drawer ) {\n\t\t\tdrawer = new CtaDrawer( {\n\t\t\t\tcontent: mw.msg( 'mobile-frontend-editor-disabled-anon' ),\n\t\t\t\tsignupQueryParams: {\n\t\t\t\t\twarning: 'mobile-frontend-watchlist-signup-action'\n\t\t\t\t}\n\t\t\t} );\n\t\t\tdocument.body.appendChild( drawer.$el[ 0 ] );\n\t\t}\n\t\tdrawer.show();\n\t}\n\t$editTab.on( 'click', ( ev ) => {\n\t\tshowLoginDrawer();\n\t\tev.preventDefault();\n\t} );\n\tmw.hook( 'wikipage.content' ).add( ( $content ) => {\n\t\t$content.find( EDITSECTION_SELECTOR ).on( 'click', ( ev ) => {\n\t\t\tshowLoginDrawer();\n\t\t\tev.preventDefault();\n\t\t} );\n\t} );\n\trouter.addRoute( editorPath, () => {\n\t\tshowLoginDrawer();\n\t} );\n\trouter.checkRoute();\n}\n\n/**\n * Setup the editor if the user can edit the page otherwise show a sorry toast.\n *\n * @method\n * @ignore\n * @param {Page} currentPage\n * @param {module:mobile.startup/PageHTMLParser} currentPageHTMLParser\n * @param {Skin} skin\n * @param {Router} router\n */\nfunction init( currentPage, currentPageHTMLParser, skin, router ) {\n\tlet editErrorMessage, editRestrictions;\n\t// see: https://www.mediawiki.org/wiki/Manual:Interface/JavaScript#Page-specific\n\tconst isReadOnly = mw.config.get( 'wgMinervaReadOnly' );\n\tconst isEditable = !isReadOnly && mw.config.get( 'wgIsProbablyEditable' );\n\n\tif ( isEditable ) {\n\t\t// Edit button updated in setupEditor.\n\t\tsetupEditor( currentPage, skin, currentPageHTMLParser, router );\n\t} else {\n\t\thideSectionEditIcons( currentPageHTMLParser );\n\t\teditRestrictions = mw.config.get( 'wgRestrictionEdit' );\n\t\tif ( mw.user.isAnon() && Array.isArray( editRestrictions ) && !editRestrictions.length ) {\n\t\t\tbindEditLinksLoginDrawer( router );\n\t\t} else {\n\t\t\tconst $link = $( '<a>' ).attr( 'href', mw.util.getUrl( mw.config.get( 'wgPageName' ), { action: 'edit' } ) );\n\t\t\teditErrorMessage = isReadOnly ? mw.msg( 'apierror-readonly' ) : mw.message( 'mobile-frontend-editor-disabled', $link ).parseDom();\n\t\t\tbindEditLinksSorryToast( editErrorMessage, router );\n\t\t}\n\t}\n}\n\n/**\n * Wire up events that ensure we\n * show a toast message with sincere condolences when user navigates to\n * #/editor or clicks on an edit button\n *\n * @method\n * @ignore\n * @param {string} msg Message for sorry message\n * @param {Router} router\n */\nfunction bindEditLinksSorryToast( msg, router ) {\n\t$editTab.on( 'click', ( ev ) => {\n\t\tmw.notify( msg );\n\t\tev.preventDefault();\n\t} );\n\tmw.hook( 'wikipage.content' ).add( ( $content ) => {\n\t\t$content.find( EDITSECTION_SELECTOR ).on( 'click', ( ev ) => {\n\t\t\tmw.notify( msg );\n\t\t\tev.preventDefault();\n\t\t} );\n\t} );\n\trouter.addRoute( editorPath, () => {\n\t\tmw.notify( msg );\n\t} );\n\trouter.checkRoute();\n}\n\nmodule.exports = function ( currentPage, currentPageHTMLParser, skin ) {\n\tconst router = __non_webpack_require__( 'mediawiki.router' );\n\n\tif ( currentPage.inNamespace( 'file' ) && currentPage.id === 0 ) {\n\t\t// Is a new file page (enable upload image only) T60311\n\t\tbindEditLinksSorryToast( mw.msg( 'mobile-frontend-editor-uploadenable' ), router );\n\t} else {\n\t\t// Edit button is currently hidden. A call to init() will update it as needed.\n\t\tinit( currentPage, currentPageHTMLParser, skin, router );\n\t}\n};\n","const\n\tfakeToolbar = require( './fakeToolbar' ),\n\tIconButton = require( '../mobile.startup/IconButton' ),\n\tOverlay = require( '../mobile.startup/Overlay' );\n\n/* global $ */\n\n/**\n * Like loadingOverlay(), but with a fake editor toolbar instead of the spinner.\n *\n * @private\n * @param {Function} afterShow Callback which runs after overlay is shown\n * @param {Function} afterHide Callback which runs after overlay is hidden\n * @param {Function} [loadBasicEditor] Callback for the \"Use basic editor\" button\n * @return {module:mobile.startup/Overlay}\n */\nmodule.exports = function editorLoadingOverlay( afterShow, afterHide, loadBasicEditor ) {\n\tlet timeout;\n\tconst\n\t\t$fakeToolbar = fakeToolbar(),\n\t\t$loadBasicWrapper = $( '<div>' ).addClass( 've-loadbasiceditor' ),\n\t\tloadBasicButton = new IconButton( {\n\t\t\tlabel: mw.msg( 'mobile-frontend-editor-loadbasiceditor' ),\n\t\t\taction: 'progressive',\n\t\t\tweight: 'normal',\n\t\t\tsize: 'medium',\n\t\t\tisIconOnly: false,\n\t\t\ticon: null\n\t\t} ),\n\t\toverlay = new Overlay( {\n\t\t\tclassName: 'overlay overlay-loading',\n\t\t\tnoHeader: true,\n\t\t\tisBorderBox: false,\n\t\t\tonBeforeExit: ( exit ) => {\n\t\t\t\texit();\n\t\t\t\tafterHide();\n\t\t\t\tif ( timeout ) {\n\t\t\t\t\tclearTimeout( timeout );\n\t\t\t\t}\n\t\t\t}\n\t\t} ),\n\t\tlogFeatureUse = function ( feature, action ) {\n\t\t\tmw.track( 'visualEditorFeatureUse', {\n\t\t\t\tfeature,\n\t\t\t\taction,\n\t\t\t\t// eslint-disable-next-line camelcase\n\t\t\t\teditor_interface: 'visualeditor'\n\t\t\t} );\n\t\t};\n\n\toverlay.show = function () {\n\t\tOverlay.prototype.show.call( this );\n\t\tafterShow();\n\t};\n\n\toverlay.$el.find( '.overlay-content' ).append( $fakeToolbar );\n\n\tif ( loadBasicEditor ) {\n\t\toverlay.$el.find( '.overlay-content' ).append(\n\t\t\t$loadBasicWrapper.append(\n\t\t\t\t$( '<p>' ).text( mw.msg( 'mobile-frontend-editor-loadingtooslow' ) ),\n\t\t\t\tloadBasicButton.$el\n\t\t\t)\n\t\t);\n\n\t\ttimeout = setTimeout( () => {\n\t\t\t$loadBasicWrapper.addClass( 've-loadbasiceditor-shown' );\n\t\t\tlogFeatureUse( 'mobileVisualFallback', 'context-show' );\n\t\t}, 3000 );\n\n\t\tloadBasicButton.$el.on( 'click', () => {\n\t\t\t$loadBasicWrapper.removeClass( 've-loadbasiceditor-shown' );\n\t\t\tlogFeatureUse( 'mobileVisualFallback', 'fallback-confirm' );\n\t\t\tloadBasicEditor();\n\t\t} );\n\t}\n\n\t// Animate the toolbar sliding into place.\n\t$fakeToolbar.addClass( 'toolbar-hidden' );\n\tsetTimeout( () => {\n\t\t$fakeToolbar.addClass( 'toolbar-shown' );\n\t\tsetTimeout( () => {\n\t\t\t$fakeToolbar.addClass( 'toolbar-shown-done' );\n\t\t}, 250 );\n\t} );\n\n\treturn overlay;\n};\n","const icons = require( '../mobile.startup/icons' );\n\n/* global $ */\nmodule.exports = function fakeToolbar() {\n\tconst $goBack = icons.cancel().$el;\n\n\t// FIXME: Should not be a button, instead should be an icon with text\n\tconst $loadingMessage = icons.spinner( {\n\t\ttagName: 'span',\n\t\tisIconOnly: false,\n\t\tlabel: mw.msg( 'mobile-frontend-editor-loading' )\n\t} ).$el;\n\n\t// Wrappers similar to .overlay-header-container, .overlay-header and .oo-ui-toolbar\n\tconst $fakeToolbar = $( '<div>' )\n\t\t.addClass( 've-mobile-fakeToolbar-container' )\n\t\t.append( $( '<div>' )\n\t\t\t.addClass( 've-mobile-fakeToolbar-header' )\n\t\t\t// Minerva has some complicated styling for this class, so we have to include it\n\t\t\t.addClass( 'overlay-header' )\n\t\t\t.append( $( '<div>' )\n\t\t\t\t.addClass( 've-mobile-fakeToolbar' )\n\t\t\t\t.append( $goBack, $loadingMessage )\n\t\t\t)\n\t\t);\n\n\treturn $fakeToolbar;\n};\n","const lazyImageLoader = require( '../mobile.startup/lazyImages/lazyImageLoader' );\n\n/**\n * @namespace Hooks\n */\n\n/**\n * Initialise lazy loading images which utilizes native browser support.\n *\n * @private\n */\nfunction initNative() {\n\t// Regardless of whether or not lazy load is turned on\n\t// We need to load in all images before print\n\twindow.addEventListener( 'beforeprint', () => {\n\t\t// Printing documents with images that are lazy loaded is broken in Safari\n\t\t// https://bugs.webkit.org/show_bug.cgi?id=224547\n\t\tArray.prototype.forEach.call(\n\t\t\tdocument.querySelectorAll( 'img' ),\n\t\t\t( img ) => {\n\t\t\t\timg.loading = 'eager';\n\t\t\t}\n\t\t);\n\t} );\n}\n/**\n * Initialise lazy loading images to supplement the HTML changes inside the\n * MobileFormatter.\n *\n * @param {jQuery} $container\n * @private\n */\nfunction init( $container ) {\n\n\t// T360781 - since this is invoked via hook, the value of $container is not guaranteed.\n\t// If undefined, return early since no further work can be done on $container.\n\tif ( !( $container[ 0 ] instanceof HTMLElement ) ) {\n\t\treturn;\n\t}\n\n\t// When using Parsoid switch to native lazy loading (T230812)\n\tif ( $container.find( '[data-mw-parsoid-version]' ).length ) {\n\t\treturn initNative();\n\t}\n\n\tconst imagePlaceholders = lazyImageLoader.queryPlaceholders( $container[ 0 ] );\n\n\t// Regardless of whether or not lazy load is turned on\n\t// We need to load in all images before print\n\twindow.addEventListener( 'beforeprint', () => {\n\t\tlazyImageLoader.loadImages( imagePlaceholders );\n\t} );\n\n\tif ( !mw.config.get( 'wgMFLazyLoadImages' ) ) {\n\t\treturn;\n\t}\n\n\t// eslint-disable-next-line compat/compat\n\tconst observer = new IntersectionObserver(\n\t\t( entries ) => {\n\t\t\tentries.forEach( ( entry ) => {\n\t\t\t\tconst placeholder = entry.target;\n\t\t\t\t// If intersecting load image and stop observing it to free up resources.\n\t\t\t\tif ( entry.isIntersecting ) {\n\t\t\t\t\tlazyImageLoader.loadImage( placeholder );\n\t\t\t\t\tobserver.unobserve( placeholder );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t\t// See https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API\n\t\t{\n\t\t\t// Setup the area for observing.\n\t\t\t// By default the root is the viewport.\n\t\t\t// We want the detection area to be as tall as 150% of the viewport height,\n\t\t\t// allowing elements to be detected before they reach the viewport.\n\t\t\t// This is achieved with a 50% bottom margin.\n\t\t\trootMargin: '0px 0px 50% 0px',\n\t\t\t// The default is 0 (meaning as soon as even one pixel is visible,\n\t\t\t// the callback will be run), however we explicitly set this so that\n\t\t\t// it is clear we have made this choice in case we want to revisit later.\n\t\t\tthreshold: 0\n\t\t}\n\t);\n\n\t// observe all the placeholders\n\timagePlaceholders.forEach( ( placeholder ) => {\n\t\tobserver.observe( placeholder );\n\t} );\n}\n\n/**\n * Make modifications after an image was lazy loaded, stable for use.\n *\n * @event ~'mobileFrontend.loadLazyImages'\n * @memberof Hooks\n * @param {jQuery} $container\n */\nmw.hook( 'mobileFrontend.loadLazyImages' ).add( ( $container ) => {\n\tconst imagePlaceholders = lazyImageLoader.queryPlaceholders( $container[ 0 ] );\n\tlazyImageLoader.loadImages( imagePlaceholders );\n} );\n\nconst exports = function () {\n\tmw.hook( 'wikipage.content' ).add( init );\n};\n\nexports.test = {\n\tinitNative\n};\n\nmodule.exports = exports;\n","// FIXME: make this an object with a constructor to facilitate testing\n// (see https://bugzilla.wikimedia.org/show_bug.cgi?id=44264)\n/**\n * mobileFrontend namespace\n *\n * @private\n */\nlet url;\n\nconst\n\ttoggling = require( './toggling' ),\n\tFONT_SIZE_KEY = 'mf-font-size',\n\tSECTION_COLLAPSING_TOGGLE = 'mf-expand-sections',\n\tstorage = mw.storage,\n\tapi = new mw.Api(),\n\tlazyLoadedImages = require( './lazyLoadedImages' ),\n\teditor = require( './editor' ),\n\tcurrentPage = require( '../mobile.startup/currentPage' )(),\n\tcurrentPageHTMLParser = require( '../mobile.startup/currentPageHTMLParser' )(),\n\tmfUtil = require( '../mobile.startup/util' ),\n\t$window = mfUtil.getWindow(),\n\tSkin = require( '../mobile.startup/Skin' ),\n\teventBus = require( '../mobile.startup/eventBusSingleton' );\n\nconst skin = Skin.getSingleton();\n\n/**\n * Given 2 functions, it returns a function that will run both with it's\n * context and parameters and return the results combined\n *\n * @private\n * @param {Function} fn1\n * @param {Function} fn2\n * @return {Function} which returns void\n */\nfunction apply2( fn1, fn2 ) {\n\treturn function () {\n\t\tfn1.apply( this, arguments );\n\t\tfn2.apply( this, arguments );\n\t};\n}\n\n/**\n * The `window`'s resize event debounced at 100 ms.\n * The `resize:throttled` event is the `window`'s\n * resize event throttled to 200 ms.\n *\n * @event resize\n * @memberof window\n */\n\n/**\n * The `window`'s scroll event debounced at 100 ms.\n * The `scroll:throttled` event is the `window`'s\n * scroll event throttled to 200 ms.\n *\n * @event scroll\n * @memberof window\n */\n\n$window\n\t.on( 'resize', apply2(\n\t\tmw.util.debounce( () => {\n\t\t\teventBus.emit( 'resize' );\n\t\t}, 100 ),\n\t\tmw.util.throttle( () => {\n\t\t\teventBus.emit( 'resize:throttled' );\n\t\t}, 200 )\n\t) )\n\t.on( 'scroll', apply2(\n\t\tmw.util.debounce( () => {\n\t\t\teventBus.emit( 'scroll' );\n\t\t}, 100 ),\n\t\tmw.util.throttle( () => {\n\t\t\teventBus.emit( 'scroll:throttled' );\n\t\t}, 200 )\n\t) );\n\n// Hide URL flags used to pass state through reloads\n// venotify is normally handled in ve.init.mw.DesktopArticleTarget.init.js\n// but that's not loaded on mobile\n// eslint-disable-next-line no-restricted-properties\nif ( window.history && history.pushState ) {\n\t// eslint-disable-next-line no-restricted-properties\n\turl = new URL( window.location.href );\n\tif ( url.searchParams.has( 'venotify' ) || url.searchParams.has( 'mfnotify' ) ) {\n\t\turl.searchParams.delete( 'venotify' );\n\t\turl.searchParams.delete( 'mfnotify' );\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\twindow.history.replaceState( null, document.title, url.toString() );\n\t}\n}\n\n// Recruit volunteers through the console\n// (note console.log may not be a function so check via apply)\n/* eslint-disable no-console */\nif ( window.console && window.console.log && window.console.log.apply &&\n\t\tmw.config.get( 'wgMFEnableJSConsoleRecruitment' ) ) {\n\tconsole.log( mw.msg( 'mobile-frontend-console-recruit' ) );\n}\n/* eslint-enable no-console */\n\n// Setup editor, if supported for the current page view\nif ( mw.config.get( 'wgMFIsSupportedEditRequest' ) ) {\n\teditor( currentPage, currentPageHTMLParser, skin );\n}\n\nfunction migrateXLargeToLarge() {\n\tif ( document.documentElement.classList.contains( 'mf-font-size-clientpref-xlarge' ) ) {\n\t\tif ( mw.user.isAnon() ) {\n\t\t\tmw.user.clientPrefs.set( FONT_SIZE_KEY, 'large' );\n\t\t} else {\n\t\t\tapi.saveOption( FONT_SIZE_KEY, 'large' );\n\t\t}\n\t}\n}\n\nfunction migrateLegacyExpandAllSectionsToggle() {\n\tconst currentValue = mw.storage.get( 'expandSections' );\n\tif ( currentValue ) {\n\t\tif ( mw.user.isAnon() ) {\n\t\t\tmw.user.clientPrefs.set( SECTION_COLLAPSING_TOGGLE, '1' );\n\t\t} else {\n\t\t\tapi.saveOption( SECTION_COLLAPSING_TOGGLE, '1' );\n\t\t}\n\t\tstorage.remove( 'expandSections' );\n\t}\n}\n\nmigrateXLargeToLarge();\nmigrateLegacyExpandAllSectionsToggle();\ntoggling();\nlazyLoadedImages();\n","module.exports = function () {\n\tconst\n\t\tcurrentPage = require( '../mobile.startup/currentPage' )(),\n\t\tToggler = require( '../mobile.startup/Toggler' ),\n\t\tsectionCollapsing = require( '../mobile.startup/sectionCollapsing' ),\n\t\teventBus = require( '../mobile.startup/eventBusSingleton' );\n\n\t/**\n\t * Initialises toggling code.\n\t *\n\t * @method\n\t * @param {jQuery.Object} $container to enable toggling on\n\t * @param {string} prefix a prefix to use for the id.\n\t * @param {Page} page The current page\n\t * @ignore\n\t */\n\tfunction init( $container, prefix, page ) {\n\t\tconst isParsoidEnabled = !!document.querySelector( '.mw-parser-output[data-mw-parsoid-version]' );\n\t\tif ( isParsoidEnabled ) {\n\t\t\tsectionCollapsing.init( $container[0] );\n\t\t} else {\n\t\t\t// Only handle headings in content processed by MakeSectionsTransform.\n\t\t\t// Remove event handler added by MakeSectionsTransform::interimTogglingSupport().\n\t\t\t$container.find( '.section-heading' ).removeAttr( 'onclick' );\n\t\t\t// Cleanup global as it is no longer needed. We check if it's undefined because\n\t\t\t// there is no guarantee this won't be run on other skins e.g. Vector or cached HTML.\n\t\t\tif ( window.mfTempOpenSection !== undefined ) {\n\t\t\t\tdelete window.mfTempOpenSection;\n\t\t\t}\n\t\t\t// eslint-disable-next-line no-new\n\t\t\tnew Toggler( {\n\t\t\t\t$container,\n\t\t\t\tprefix,\n\t\t\t\tpage,\n\t\t\t\teventBus\n\t\t\t} );\n\t\t}\n\t}\n\n\tif (\n\t\t// Avoid this running on Watchlist.\n\t\t!currentPage.inNamespace( 'special' ) &&\n\t\t(\n\t\t\tmw.config.get( 'wgAction' ) === 'view' ||\n\t\t\tmw.config.get( 'wgAction' ) === 'edit'\n\t\t)\n\t) {\n\t\tmw.hook( 'wikipage.content' ).add( ( $container ) => {\n\t\t\tlet $contentContainer = $container.find( '.mw-parser-output' );\n\t\t\t// If there was no mw-parser-output wrapper, just use the parent.\n\t\t\tif ( $contentContainer.length === 0 ) {\n\t\t\t\t$contentContainer = $container;\n\t\t\t}\n\t\t\tinit( $contentContainer, 'content-', currentPage );\n\t\t} );\n\t}\n};\n","const\n\tutil = require( './util' ),\n\tescapeSelector = util.escapeSelector,\n\tarrowOptions = {\n\t\ticon: 'expand',\n\t\tisSmall: true,\n\t\tadditionalClassNames: 'indicator'\n\t},\n\tIcon = require( './Icon' );\nconst isCollapsedByDefault = require( './isCollapsedByDefault.js' );\n\n/**\n * @typedef {Object} ToggledEvent\n * @prop {boolean} expanded True if section is opened, false if closed.\n * @prop {Page} page\n * @prop {jQuery.Object} $heading\n * @memberof module:mobile.startup\n * @ignore\n */\n\n/**\n * A class for enabling toggling\n *\n * Toggling can be disabled on a sepcific heading by adding the\n * collapsible-heading-disabled class.\n */\nclass Toggler {\n\t/**\n\t * @param {Object} options\n\t * @param {OO.EventEmitter} options.eventBus Object used to emit section-toggled events.\n\t * @param {jQuery.Object} options.$container to apply toggling to\n\t * @param {string} options.prefix a prefix to use for the id.\n\t * @param {Page} options.page to allow storage of session for future visits\n\t */\n\tconstructor( options ) {\n\t\tthis.eventBus = options.eventBus;\n\t\tthis.$container = options.$container;\n\t\tthis.prefix = options.prefix;\n\t\tthis.page = options.page;\n\t\tthis._enable();\n\t}\n\n\t/**\n\t * Check if sections should be collapsed by default\n\t *\n\t * @return {boolean}\n\t */\n\tisCollapsedByDefault() {\n\t\tif ( this._isCollapsedByDefault === undefined ) {\n\t\t\t// Thess classes override site settings and user preferences. For example:\n\t\t\t// * ...-collapsed used on talk pages by DiscussionTools. (T321618, T322628)\n\t\t\t// * ...-expanded used in previews (T336572)\n\t\t\tconst $override = this.$container.closest( '.collapsible-headings-collapsed, .collapsible-headings-expanded' );\n\t\t\tif ( $override.length ) {\n\t\t\t\tthis._isCollapsedByDefault = $override.hasClass( 'collapsible-headings-collapsed' );\n\t\t\t} else {\n\t\t\t\t// Check site config\n\t\t\t\tthis._isCollapsedByDefault = isCollapsedByDefault();\n\t\t\t}\n\t\t}\n\t\treturn this._isCollapsedByDefault;\n\t}\n\n\t/**\n\t * Given a heading, toggle it and any of its children\n\t *\n\t * @memberof Toggler\n\t * @instance\n\t * @param {jQuery.Object} $heading A heading belonging to a section\n\t * @param {boolean} fromSaved Section is being toggled from a saved state\n\t * @return {boolean}\n\t */\n\ttoggle( $heading, fromSaved ) {\n\t\tif ( !fromSaved && $heading.hasClass( 'collapsible-heading-disabled' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst wasExpanded = $heading.is( '.open-block' );\n\n\t\t$heading.toggleClass( 'open-block' );\n\n\t\tarrowOptions.rotation = wasExpanded ? 0 : 180;\n\t\tconst newIndicator = new Icon( arrowOptions );\n\t\tconst $indicatorElement = $heading.data( 'indicator' );\n\t\tif ( $indicatorElement ) {\n\t\t\t$indicatorElement.replaceWith( newIndicator.$el );\n\t\t\t$heading.data( 'indicator', newIndicator.$el );\n\t\t}\n\n\t\tconst $headingLabel = $heading.find( '.mw-headline' );\n\t\t$headingLabel.attr( 'aria-expanded', !wasExpanded );\n\n\t\tconst $content = $heading.next();\n\t\tif ( $content.hasClass( 'open-block' ) ) {\n\t\t\t$content.removeClass( 'open-block' );\n\t\t\t// jquery doesn't allow custom values for the hidden attribute it seems.\n\t\t\t$content.get( 0 ).setAttribute( 'hidden', 'until-found' );\n\t\t} else {\n\t\t\t$content.addClass( 'open-block' );\n\t\t\t$content.removeAttr( 'hidden' );\n\t\t}\n\n\t\t/* T239418 We consider this event as a low-priority one and emit it asynchronously.\n\t\tThis ensures that any logic associated with section toggling is async and not contributing\n\t\tdirectly to a slow click/press event handler.\n\n\t\tCurrently costly reflow-inducing viewport size computation is being done for lazy-loaded\n\t\timages by the main listener to this event. */\n\t\tmw.requestIdleCallback( () => {\n\t\t\t/**\n\t\t\t * Global event emitted after a section has been toggled\n\t\t\t *\n\t\t\t * @event ~section-toggled\n\t\t\t * @type {ToggledEvent}\n\t\t\t * @memberof module:mobile.startup~Toggler\n\t\t\t * @ignore\n\t\t\t */\n\n\t\t\tthis.eventBus.emit( 'section-toggled', {\n\t\t\t\texpanded: wasExpanded,\n\t\t\t\t$heading\n\t\t\t} );\n\t\t\t/**\n\t\t\t * Internal for use inside ExternalGuidance.\n\t\t\t *\n\t\t\t * @event ~'mobileFrontend.section-toggled'\n\t\t\t * @memberof Hooks\n\t\t\t */\n\t\t\tmw.hook( 'mobileFrontend.section-toggled' ).fire( {\n\t\t\t\texpanded: wasExpanded,\n\t\t\t\t$heading\n\t\t\t} );\n\t\t} );\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Reveals an element and its parent section as identified by it's id\n\t *\n\t * @memberof Toggler\n\t * @instance\n\t * @param {string} id An element ID within the $container\n\t * @return {boolean} Target ID was found\n\t */\n\treveal( id ) {\n\t\tlet $target;\n\t\t// jQuery will throw for hashes containing certain characters which can break toggling\n\t\ttry {\n\t\t\t$target = this.$container.find( '#' + escapeSelector( id ) );\n\t\t} catch ( e ) {}\n\t\tif ( !$target || !$target.length ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet $heading = $target.parents( '.collapsible-heading' );\n\t\t// The heading is not a section heading, check if in a content block!\n\t\tif ( !$heading.length ) {\n\t\t\t$heading = $target.parents( '.collapsible-block' ).prev( '.collapsible-heading' );\n\t\t}\n\t\tif ( $heading.length && !$heading.hasClass( 'open-block' ) ) {\n\t\t\tthis.toggle( $heading );\n\t\t}\n\t\tif ( $heading.length ) {\n\t\t\t// scroll again after opening section (opening section makes the page longer)\n\t\t\twindow.scrollTo( 0, $target.offset().top );\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Enables section toggling in a given container.\n\t *\n\t * @memberof Toggler\n\t * @instance\n\t * @private\n\t */\n\t_enable() {\n\n\t\t// FIXME This should use .find() instead of .children(), some extensions like Wikibase\n\t\t// want to toggle other headlines than direct descendants of $container. (T95889)\n\t\tthis.$container.children( '.section-heading' ).each( ( i, headingEl ) => {\n\t\t\tconst $heading = this.$container.find( headingEl ),\n\t\t\t\t$headingLabel = $heading.find( '.mw-headline' ),\n\t\t\t\t$indicator = $heading.find( '.indicator' ),\n\t\t\t\tid = this.prefix + 'collapsible-block-' + i;\n\t\t\t// Be sure there is a `section` wrapping the section content.\n\t\t\t// Otherwise, collapsible sections for this page is not enabled.\n\t\t\tif ( $heading.next().is( 'section' ) ) {\n\t\t\t\tconst $content = $heading.next( 'section' );\n\t\t\t\t$heading\n\t\t\t\t\t.addClass( 'collapsible-heading ' )\n\t\t\t\t\t.data( 'section-number', i )\n\t\t\t\t\t.on( 'click', ( ev ) => {\n\t\t\t\t\t\t// don't toggle, if the click target was a link\n\t\t\t\t\t\t// (a link in a section heading)\n\t\t\t\t\t\t// See T117880\n\t\t\t\t\t\tconst clickedLink = ev.target.closest( 'a' );\n\t\t\t\t\t\tif ( !clickedLink || !clickedLink.href ) {\n\t\t\t\t\t\t\t// prevent taps/clicks on edit button after toggling (T58209)\n\t\t\t\t\t\t\tev.preventDefault();\n\t\t\t\t\t\t\tthis.toggle( $heading );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t$headingLabel\n\t\t\t\t\t.attr( {\n\t\t\t\t\t\ttabindex: 0,\n\t\t\t\t\t\trole: 'button',\n\t\t\t\t\t\t'aria-controls': id,\n\t\t\t\t\t\t'aria-expanded': 'false'\n\t\t\t\t\t} );\n\n\t\t\t\tarrowOptions.rotation = !this.isCollapsedByDefault() ? 180 : 0;\n\t\t\t\tconst indicator = new Icon( arrowOptions );\n\t\t\t\tif ( $indicator.length ) {\n\t\t\t\t\t// replace the existing indicator\n\t\t\t\t\t$indicator.replaceWith( indicator.$el );\n\t\t\t\t} else {\n\t\t\t\t\tindicator.prependTo( $heading );\n\t\t\t\t}\n\t\t\t\t$heading.data( 'indicator', indicator.$el );\n\t\t\t\t$content\n\t\t\t\t\t.addClass( 'collapsible-block' )\n\t\t\t\t\t.eq( 0 )\n\t\t\t\t\t.attr( {\n\t\t\t\t\t\t// We need to give each content block a unique id as that's\n\t\t\t\t\t\t// the only way we can tell screen readers what element we're\n\t\t\t\t\t\t// referring to via `aria-controls`.\n\t\t\t\t\t\tid\n\t\t\t\t\t} )\n\t\t\t\t\t.on( 'beforematch', () => this.toggle( $heading ) )\n\t\t\t\t\t.addClass( 'collapsible-block-js' )\n\t\t\t\t\t.get( 0 ).setAttribute( 'hidden', 'until-found' );\n\n\t\t\t\tenableKeyboardActions( this, $heading );\n\n\t\t\t\tif ( !this.isCollapsedByDefault() ) {\n\t\t\t\t\t// Expand sections by default on wide screen devices\n\t\t\t\t\t// or if the expand sections setting is set.\n\t\t\t\t\t// The wide screen logic for determining whether to collapse sections initially\n\t\t\t\t\t// should be kept in sync with mobileoptions#initLocalStorageElements().\n\t\t\t\t\tthis.toggle( $heading );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t/**\n\t\t * Checks the existing hash and toggles open any section that contains the fragment.\n\t\t *\n\t\t * @method\n\t\t */\n\t\tconst checkHash = () => {\n\t\t\t// eslint-disable-next-line no-restricted-properties\n\t\t\tlet hash = window.location.hash;\n\t\t\tif ( hash.indexOf( '#' ) === 0 ) {\n\t\t\t\thash = hash.slice( 1 );\n\t\t\t\t// Per https://html.spec.whatwg.org/multipage/browsing-the-web.html#target-element\n\t\t\t\t// we try the raw fragment first, then the percent-decoded fragment.\n\t\t\t\tif ( !this.reveal( hash ) ) {\n\t\t\t\t\tconst decodedHash = mw.util.percentDecodeFragment( hash );\n\t\t\t\t\tif ( decodedHash ) {\n\t\t\t\t\t\tthis.reveal( decodedHash );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Checks the value of wgInternalRedirectTargetUrl and sets the hash if present.\n\t\t * checkHash() will reveal the collapsed section that contains it afterwards.\n\t\t *\n\t\t * @method\n\t\t */\n\t\tfunction checkInternalRedirectAndHash() {\n\t\t\tconst internalRedirect = mw.config.get( 'wgInternalRedirectTargetUrl' ),\n\t\t\t\tinternalRedirectHash = internalRedirect ? internalRedirect.split( '#' )[1] : false;\n\n\t\t\tif ( internalRedirectHash ) {\n\t\t\t\t// eslint-disable-next-line no-restricted-properties\n\t\t\t\twindow.location.hash = internalRedirectHash;\n\t\t\t}\n\t\t}\n\n\t\tcheckInternalRedirectAndHash();\n\t\tcheckHash();\n\n\t\tutil.getWindow().on( 'hashchange', () => checkHash() );\n\t}\n}\n\n/**\n * Enables toggling via enter and space keys\n *\n * @param {Toggler} toggler instance.\n * @param {jQuery.Object} $heading\n * @ignore\n */\nfunction enableKeyboardActions( toggler, $heading ) {\n\t$heading.on( 'keypress', ( ev ) => {\n\t\tif ( ev.which === 13 || ev.which === 32 ) {\n\t\t\t// Only handle keypresses on the \"Enter\" or \"Space\" keys\n\t\t\ttoggler.toggle( $heading );\n\t\t}\n\t} ).find( 'a' ).on( 'keypress mouseup', ( ev ) => ev.stopPropagation() );\n}\n\nmodule.exports = Toggler;\n","const browser = require( './Browser' ).getSingleton();\n\n/**\n * Checks if sections should be collapsed by default.\n *\n * @ignore\n *\n * @return {boolean}\n */\nfunction isCollapsedByDefault() {\n\treturn !browser.isWideScreen() &&\n\t\t// Section collapsing can be disabled in MobilePreferences\n\t\t!document.documentElement.classList.contains(\n\t\t\t'mf-expand-sections-clientpref-1'\n\t\t);\n}\n\nmodule.exports = isCollapsedByDefault;\n","const isCollapsedByDefault = require( './isCollapsedByDefault' );\n\n/**\n * Sets attributes on collapsible elements based on collapsed state\n *\n * @method\n * @param {HTMLElement} container div element containing collapsible heading\n * @param {HTMLElement} headingText span element containing heading text\n * @param {HTMLElement} icon span element for icon\n * @param {boolean} isCollapsed collapsed state to set\n * @ignore\n */\nfunction setCollapsedState( content, headingText, icon, isCollapsed ) {\n\t// show the content if hidden, hide if shown (until found so find in page works)\n\tcontent.hidden = isCollapsed ? 'until-found' : false;\n\n\t// update the dropdown state based on the content visibility\n\tif ( isCollapsed ) {\n\t\theadingText.setAttribute( 'aria-expanded', 'false' );\n\t\ticon.classList.add( 'mf-icon-expand' );\n\t\ticon.classList.remove( 'mf-icon-collapse' );\n\t} else {\n\t\theadingText.setAttribute( 'aria-expanded', 'true' );\n\t\ticon.classList.add( 'mf-icon-collapse' );\n\t\ticon.classList.remove( 'mf-icon-expand' );\n\t}\n}\n\n/**\n * Toggles collapsible state for a heading\n *\n * @method\n * @param {HTMLElement} container div element containing collapsible heading\n * @param {HTMLElement} headingText span element containing heading text\n * @param {HTMLElement} icon span element for icon\n * @ignore\n */\nfunction toggle( content, headingText, icon ) {\n\tconst currentlyHidden = content.hidden;\n\tsetCollapsedState( content, headingText, icon,\n\t\t// This should reflect **new** collapsed state\n\t\t!currentlyHidden );\n}\n\n/**\n * Initialises collapsing code.\n *\n * @method\n * @param {HTMLElement} container to enable collapsing on\n * @ignore\n */\nfunction init( container ) {\n\tconst isCollapsed = isCollapsedByDefault();\n\tconst headingWrappers = Array.from( container.querySelectorAll( '.mw-parser-output > section > .mw-heading' ) );\n\theadingWrappers.forEach( ( wrapper ) => {\n\t\twrapper.classList.add( 'mf-collapsible-heading' );\n\n\t\t// Add class to collapsible content\n\t\t// Used in CSS before hidden attribute is added\n\t\tconst content = wrapper.nextElementSibling;\n\t\tcontent.classList.add( 'mf-collapsible-content' );\n\n\t\t// Update the heading wrapper to account for semantics of collapsing sections\n\t\twrapper.setAttribute( 'tabindex', '0' );\n\t\twrapper.setAttribute( 'role', 'button' );\n\t\twrapper.setAttribute( 'aria-controls', content.id );\n\n\t\t// Create the dropdown arrow\n\t\tconst icon = document.createElement( 'span' );\n\t\ticon.classList.add( 'mf-icon', 'mf-icon--small', 'mf-collapsible-icon' );\n\t\ticon.setAttribute( 'aria-hidden', true );\n\t\twrapper.prepend( icon );\n\n\t\tsetCollapsedState( content, wrapper, icon, isCollapsed );\n\n\t\t// Register the click handlers\n\t\twrapper.addEventListener( 'click', ( ev ) => {\n\t\t\t// Only toggle if a non-link was clicked.\n\t\t\t// We don't want sections to collapse if the edit link is clicked for\n\t\t\t// example.\n\t\t\tconst clickedLink = ev.target.closest( 'a' );\n\t\t\tif ( !clickedLink ) {\n\t\t\t\ttoggle( content, wrapper, icon );\n\t\t\t}\n\t\t} );\n\t} );\n}\n\nmodule.exports = { init };\n"],"names":["util","fakeToolbar","editorLoadingOverlay","OverlayManager","$editTab","$","hasTwoEditIcons","length","EDITSECTION_SELECTOR","user","mw","CtaDrawer","veConfig","config","get","editorPath","editorOverride","onEditLinkClick","elem","ev","router","section","getParamValue","href","id","navigate","preventDefault","getPreferredEditor","preferredEditor","options","storage","bindEditLinksSorryToast","msg","on","notify","hook","add","$content","find","addRoute","checkRoute","module","exports","currentPage","currentPageHTMLParser","skin","inNamespace","editErrorMessage","editRestrictions","isReadOnly","page","overlayManager","getSingleton","isNewPage","this","off","sectionId","scrollTop","window","pageYOffset","$contentText","url","URL","location","editorOptions","fakeScroll","api","Api","licenseMsg","getLicenseMsg","title","titleObj","isAnon","oldId","contentLang","attr","contentDir","preload","searchParams","preloadparams","getArrayParam","editintro","visualAbortPromise","Deferred","animationDelayDeferred","abortableDataPromise","overlayPromise","initMechanism","logInit","editor","track","action","type","mechanism","integration","editor_interface","shouldLoadVisualEditor","isVESourceAvailable","isVEVisualAvailable","loadSourceEditor","fire","loader","using","then","SourceEditorOverlay","isWikiText","undefined","loadingOverlay","$sectionTop","enableVisualSectionEditing","document","body","addClass","$page","closest","prop","getBoundingClientRect","top","css","transform","setTimeout","resolve","abort","removeClass","reject","mode","dataPromise","libs","ve","targetLoader","requestPageData","getPrefixedDb","sessionStore","targetName","visualLoadingPromise","addPlugin","loadModules","visualPromise","editorOverlays","VisualEditorOverlay","loadVisualEditorMaybe","Promise","all","overlay","getLoadingPromise","catch","error","state","sourceOverlay","promise","overlayData","stack","replaceCurrent","apiResponse","back","show","appendChild","$el","getErrorMessage","i","editUrl","set","toString","getPath","fragment","history","pushState","delete","replaceState","docReady","setupEditor","hide","hideSectionEditIcons","Array","isArray","drawer","showLoginDrawer","content","signupQueryParams","warning","bindEditLinksLoginDrawer","$link","getUrl","message","parseDom","init","IconButton","Overlay","afterShow","afterHide","loadBasicEditor","timeout","$fakeToolbar","$loadBasicWrapper","loadBasicButton","label","weight","size","isIconOnly","icon","className","noHeader","isBorderBox","onBeforeExit","exit","clearTimeout","logFeatureUse","feature","prototype","call","append","text","icons","$goBack","cancel","$loadingMessage","spinner","tagName","lazyImageLoader","initNative","addEventListener","forEach","querySelectorAll","img","loading","$container","HTMLElement","imagePlaceholders","queryPlaceholders","loadImages","observer","IntersectionObserver","entries","entry","placeholder","target","isIntersecting","loadImage","unobserve","rootMargin","threshold","observe","test","toggling","FONT_SIZE_KEY","SECTION_COLLAPSING_TOGGLE","lazyLoadedImages","$window","getWindow","Skin","eventBus","apply2","fn1","fn2","apply","arguments","debounce","emit","throttle","has","console","log","documentElement","classList","contains","clientPrefs","saveOption","remove","Toggler","sectionCollapsing","$contentContainer","prefix","querySelector","removeAttr","mfTempOpenSection","escapeSelector","arrowOptions","isSmall","additionalClassNames","Icon","isCollapsedByDefault","constructor","_enable","_isCollapsedByDefault","$override","hasClass","toggle","$heading","fromSaved","wasExpanded","is","toggleClass","rotation","newIndicator","$indicatorElement","data","replaceWith","next","setAttribute","requestIdleCallback","expanded","reveal","$target","e","parents","prev","scrollTo","offset","children","each","headingEl","$headingLabel","$indicator","clickedLink","tabindex","role","indicator","prependTo","eq","toggler","which","stopPropagation","enableKeyboardActions","checkHash","hash","indexOf","slice","decodedHash","percentDecodeFragment","internalRedirect","internalRedirectHash","split","checkInternalRedirectAndHash","browser","isWideScreen","setCollapsedState","headingText","isCollapsed","hidden","container","from","wrapper","nextElementSibling","createElement","prepend"],"sourceRoot":""}