{"version":3,"sources":["webpack:///./new_commit_form.js","webpack:///./pager.js","webpack:///./lib/utils/ace_utils.js","webpack:///./star.js","webpack:///./pages/projects/show/index.js","webpack:///./read_more.js","webpack:///./activities.js","webpack:///./blob/viewer/index.js","webpack:///./blob/file_template_selector.js","webpack:///./blob/template_selectors/type_selector.js","webpack:///./blob/template_selectors/ci_yaml_selector.js","webpack:///./blob/template_selectors/dockerfile_selector.js","webpack:///./blob/template_selectors/gitignore_selector.js","webpack:///./blob/template_selectors/license_selector.js","webpack:///./blob/file_template_mediator.js","webpack:///./blob_edit/edit_blob.js","webpack:///./blob/blob_file_dropzone.js","webpack:///./blob_edit/blob_bundle.js","webpack:///./gpg_badges.js","webpack:///./behaviors/shortcuts/shortcuts_navigation.js","webpack:///./project_select_combo_button.js","webpack:///./project_select.js","webpack:///./pages/projects/project.js","webpack:///./notifications_dropdown.js","webpack:///./notifications_form.js","webpack:///./user_callout.js","webpack:///./pages/projects/index.js","webpack:///./tree.js","webpack:///./lib/utils/constants.js"],"names":["NewCommitForm","form","_classCallCheck","this","renderDestination","bind","branchName","find","originalBranch","createMergeRequest","createMergeRequestContainer","keyup","different","val","show","wasDifferent","prop","hide","jquery__WEBPACK_IMPORTED_MODULE_0__","__webpack_require__","jquery__WEBPACK_IMPORTED_MODULE_0___default","n","_lib_utils_common_utils__WEBPACK_IMPORTED_MODULE_1__","_lib_utils_axios_utils__WEBPACK_IMPORTED_MODULE_2__","_lib_utils_url_utility__WEBPACK_IMPORTED_MODULE_3__","__webpack_exports__","init","limit","arguments","length","undefined","preload","disable","prepareData","$","noop","callback","container","url","data","removeParams","offset","parseInt","getParameterByName","loading","concat","first","getOld","initLoadMore","_this","axios","get","params","then","_ref","append","count","html","isScrollable","catch","$w","window","document","height","scrollTop","_this2","off","endlessScroll","bottomPixels","fireDelay","fireOnce","ceaseFire","is","getModeByFileExtension","path","ace","require","getModeForPath","mode","d","Star","on","$this","$starSpan","$starIcon","iconClasses","attr","split","post","isStarred","hasClass","parent","text","star_count","removeClass","s__","remove","prepend","spriteIcon","addClass","__","Flash","addEventListener","triggerSelector","triggerEls","querySelectorAll","forEach","triggerEl","targetEl","previousElementSibling","e","classList","add","target","once","initReadMore","notificationsDropdown","ShortcutsNavigation","NotificationsForm","UserCallout","setCalloutPerProject","className","treeSlider","querySelector","TreeView","initBlob","BlobViewer","Activities","waitForImages","ajaxGet","dataset","logsPath","GpgBadges","fetch","Pager","updateTooltips","preventDefault","toggleFilter","currentTarget","reloadActivities","localTimeAgo","sender","$sender","filter","Cookies","set","closest","toggleClass","initAuxiliaryViewer","initRichViewer","initMainViewers","auxiliaryViewer","loadViewer","viewer","richType","initViewer","promise","module","default","error","Promise","all","viewerParam","getAttribute","resolve","setAttribute","innerHTML","$fileHolder","switcher","switcherBtns","copySourceBtn","simpleViewer","richViewer","initBindings","switchToInitialViewer","initialViewerName","location","hash","indexOf","switchToViewer","Array","from","el","switchViewHandler","contains","blur","activeViewer","tooltip","name","newViewer","oldButton","newButton","oldViewer","toggleCopyButtonState","renderGFM","trigger","handleLocationHash","FileTemplateSelector","mediator","$dropdown","$wrapper","cfg","config","dropdown","wrapper","$loadingIcon","$dropdownToggleText","initDropdown","options","query","selectTemplateFile","opts","selectedObj","reportSelection","FileTemplateTypeSelector","dropdownData","type_selector_classCallCheck","_possibleConstructorReturn","_getPrototypeOf","call","glDropdown","filterable","selectable","toggleLabel","item","clicked","selectTemplateTypeOptions","BlobCiYamlSelector","ci_yaml_selector_classCallCheck","ci_yaml_selector_possibleConstructorReturn","ci_yaml_selector_getPrototypeOf","key","pattern","type","search","fields","reportSelectionName","DockerfileSelector","dockerfile_selector_classCallCheck","dockerfile_selector_possibleConstructorReturn","dockerfile_selector_getPrototypeOf","BlobGitignoreSelector","gitignore_selector_classCallCheck","gitignore_selector_possibleConstructorReturn","gitignore_selector_getPrototypeOf","BlobLicenseSelector","license_selector_classCallCheck","license_selector_possibleConstructorReturn","license_selector_getPrototypeOf","$el","project","fullname","id","FileTemplateMediator","editor","currentAction","projectId","file_template_mediator_classCallCheck","initTemplateSelectors","initTemplateTypeSelector","initDomElements","initDropdowns","initPageEvents","templateSelectors","GitignoreSelector","LicenseSelector","map","TemplateSelectorClass","typeSelector","templateSelector","$templatesMenu","$undoMenu","$fileEditor","$undoBtn","$templateSelectors","$filenameInput","$fileContent","$commitForm","$navLinks","hideTemplateSelectorMenu","displayMatchedTemplateSelector","listenForFilenameInput","prepFileContentForSubmit","listenForPreviewMode","_this3","submit","getValue","_this4","href","isHidden","showTemplateSelectorMenu","selector","setToggleText","cacheToggleText","selectTemplateType","_this5","renderLoading","destroyUndoMenu","fetchFileTemplate","file","showUndoMenu","setEditorContent","setFilename","renderLoaded","err","_this6","currentInput","getFilename","test","_this7","Api","projectTemplate","newValue","content","setValue","focus","navigateFileStart","_this8","restoreFromCache","cacheFileContents","cachedToggleText","getTemplateSelectorToggleText","cachedContent","cachedFilename","setTemplateSelectorToggleText","getToggleText","selected","EditBlob","edit_blob_classCallCheck","configureAceEditor","initModePanesAndLinks","initSoftWrap","initFileSelectors","_this$options","filePath","assetsPath","isMarkdown","loadModule","edit","addEditorMarkdownListeners","$blockScrolling","Infinity","getSession","setMode","_this$options2","fileTemplateMediator","TemplateSelectorMediator","$editModePanes","$editModeLinks","editModeLinkClickHandler","currentLink","paneId","currentPane","fadeIn","$toggleButton","empty","createFlash","isSoftWrapped","toggleSoftWrap","setUseWrapMode","toggleLoading","$icon","HIDDEN_CLASS","enable","Dropzone","autoDiscover","BlobFileDropzone","method","blob_file_dropzone_classCallCheck","formDropzone","submitButton","submitButtonLoadingIcon","dropzoneMessage","dropzone","autoProcessQueue","clickable","uploadMultiple","paramName","maxFilesize","gon","max_file_size","parallelUploads","maxFiles","addRemoveLinks","previewsContainer","headers","csrf","header","response","modal","visitUrl","removeFile","xhr","formData","errorMessage","stripped","stopPropagation","getQueuedFiles","alert","processQueue","editBlobForm","uploadBlobForm","deleteBlobForm","urlRoot","commitButton","onbeforeunload","gl","utils","disableButtonIfEmptyField","tag","badges","displayError","endpoint","reject","Error","parseQueryStringIntoObject","serialize","signatures","signature","commit_sha","replaceWith","Mousetrap","findAndFollowLink","enabledHelp","push","Shortcuts","ProjectSelectComboButton","select","projectSelectInput","newItemBtn","resourceType","resourceLabel","formattedText","deriveTextVariants","groupId","bindEvents","initLocalStorage","siblings","openDropdown","getProjectFromLocalStorage","selectProject","AccessorUtilities","isLocalStorageAccessSafe","localStorageKey","localStorageItemType","join","setBtnTextFromLocalStorage","event","t","select2","selectedProjectData","JSON","parse","projectMeta","setNewItemBtnAttributes","setProjectInLocalStorage","cachedProjectData","defaultTextPrefix","presetTextSuffix","projectString","localStorage","getItem","stringify","setItem","slice","projectSelect","each","i","placeholder","simpleFilter","includeGroups","allProjects","orderBy","withIssuesEnabled","withMergeRequestsEnabled","withShared","includeProjectsInSubgroups","allowClear","minimumInputLength","finalCallback","projectsCallback","projects","results","groupsCallback","groups","term","groupProjects","with_issues_enabled","with_merge_requests_enabled","with_shared","include_subgroups","order_by","membership","web_url","name_with_namespace","initSelection","dropdownCssClass","Project","$cloneOptions","$projectCloneField","$cloneBtnLabel","mobileCloneField","selectedCloneOption","trim","cloneType","activeText","$label","clipboardText","initRefSwitcher","parents","cookieKey","projectSelectDropdown","changeProject","refListItem","createElement","refLink","ref","flash","filterRemote","filterByText","inputFieldName","fieldName","renderRow","li","cloneNode","textContent","link","appendChild","obj","$form","$visit","shouldVisit","action","divider","_flash__WEBPACK_IMPORTED_MODULE_1__","notificationLevel","saved","toggleCheckbox","initEventListeners","$checkbox","$parent","saveEvent","showCheckboxLoadingSpinner","setTimeout","userCalloutBody","cookieName","isCalloutDismissed","dismissCallout","$currentTarget","expires","r","_projects_gke_cluster_dropdowns__WEBPACK_IMPORTED_MODULE_0__","_persistent_user_callout__WEBPACK_IMPORTED_MODULE_1__","_project__WEBPACK_IMPORTED_MODULE_2__","_behaviors_shortcuts_shortcuts_navigation__WEBPACK_IMPORTED_MODULE_3__","page","body","callout","PersistentUser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3C,EAAGgD,OAAOxd,SAAS,YAE3BjE,IAAEohB,GAAY3P,SACA,KAAZ7M,EAAEsc,QACX1e,EAAOxC,IAAE,8CAA8CoD,KAAK,SAEnDgT,YAAS5T,QAHb,2EC1DbvD,EAAA4D,EAAAtD,EAAA,sBAAAmiB,IAAAziB,EAAA4D,EAAAtD,EAAA,sBAAAiV,IAAO,IAAMkN,EAAe,KACflN,EAAe","file":"pages.projects.show.a00f6c69.chunk.js","sourcesContent":["/* eslint-disable no-var, no-return-assign */\nexport default class NewCommitForm {\n constructor(form) {\n this.form = form;\n this.renderDestination = this.renderDestination.bind(this);\n this.branchName = form.find('.js-branch-name');\n this.originalBranch = form.find('.js-original-branch');\n this.createMergeRequest = form.find('.js-create-merge-request');\n this.createMergeRequestContainer = form.find('.js-create-merge-request-container');\n this.branchName.keyup(this.renderDestination);\n this.renderDestination();\n }\n renderDestination() {\n var different;\n different = this.branchName.val() !== this.originalBranch.val();\n if (different) {\n this.createMergeRequestContainer.show();\n if (!this.wasDifferent) {\n this.createMergeRequest.prop('checked', true);\n }\n } else {\n this.createMergeRequestContainer.hide();\n this.createMergeRequest.prop('checked', false);\n }\n return (this.wasDifferent = different);\n }\n}\n","import $ from 'jquery';\nimport { getParameterByName } from '~/lib/utils/common_utils';\nimport axios from './lib/utils/axios_utils';\nimport { removeParams } from './lib/utils/url_utility';\n\nconst ENDLESS_SCROLL_BOTTOM_PX = 400;\nconst ENDLESS_SCROLL_FIRE_DELAY_MS = 1000;\n\nexport default {\n init(\n limit = 0,\n preload = false,\n disable = false,\n prepareData = $.noop,\n callback = $.noop,\n container = '',\n ) {\n this.url = $('.content_list').data('href') || removeParams(['limit', 'offset']);\n this.limit = limit;\n this.offset = parseInt(getParameterByName('offset'), 10) || this.limit;\n this.disable = disable;\n this.prepareData = prepareData;\n this.callback = callback;\n this.loading = $(`${container} .loading`).first();\n if (preload) {\n this.offset = 0;\n this.getOld();\n }\n this.initLoadMore();\n },\n\n getOld() {\n this.loading.show();\n axios\n .get(this.url, {\n params: {\n limit: this.limit,\n offset: this.offset,\n },\n })\n .then(({ data }) => {\n this.append(data.count, this.prepareData(data.html));\n this.callback();\n\n // keep loading until we've filled the viewport height\n if (!this.disable && !this.isScrollable()) {\n this.getOld();\n } else {\n this.loading.hide();\n }\n })\n .catch(() => this.loading.hide());\n },\n\n append(count, html) {\n $('.content_list').append(html);\n if (count > 0) {\n this.offset += count;\n } else {\n this.disable = true;\n }\n },\n\n isScrollable() {\n const $w = $(window);\n return $(document).height() > $w.height() + $w.scrollTop() + ENDLESS_SCROLL_BOTTOM_PX;\n },\n\n initLoadMore() {\n $(document).off('scroll');\n $(document).endlessScroll({\n bottomPixels: ENDLESS_SCROLL_BOTTOM_PX,\n fireDelay: ENDLESS_SCROLL_FIRE_DELAY_MS,\n fireOnce: true,\n ceaseFire: () => this.disable === true,\n callback: () => {\n if (!this.loading.is(':visible')) {\n this.loading.show();\n this.getOld();\n }\n },\n });\n },\n};\n","/* global ace */\n\nexport default function getModeByFileExtension(path) {\n const modelist = ace.require('ace/ext/modelist');\n return modelist.getModeForPath(path).mode;\n}\n","import $ from 'jquery';\nimport Flash from './flash';\nimport { __, s__ } from './locale';\nimport { spriteIcon } from './lib/utils/common_utils';\nimport axios from './lib/utils/axios_utils';\n\nexport default class Star {\n constructor(container = '.project-home-panel') {\n $(`${container} .toggle-star`).on('click', function toggleStarClickCallback() {\n const $this = $(this);\n const $starSpan = $this.find('span');\n const $starIcon = $this.find('svg');\n const iconClasses = $starIcon.attr('class').split(' ');\n\n axios\n .post($this.data('endpoint'))\n .then(({ data }) => {\n const isStarred = $starSpan.hasClass('starred');\n $this\n .parent()\n .find('.star-count')\n .text(data.star_count);\n\n if (isStarred) {\n $starSpan.removeClass('starred').text(s__('StarProject|Star'));\n $starIcon.remove();\n $this.prepend(spriteIcon('star-o', iconClasses));\n } else {\n $starSpan.addClass('starred').text(__('Unstar'));\n $starIcon.remove();\n $this.prepend(spriteIcon('star', iconClasses));\n }\n })\n .catch(() => Flash('Star toggle failed. Try again later.'));\n });\n }\n}\n","import $ from 'jquery';\nimport initBlob from '~/blob_edit/blob_bundle';\nimport ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';\nimport NotificationsForm from '~/notifications_form';\nimport UserCallout from '~/user_callout';\nimport TreeView from '~/tree';\nimport BlobViewer from '~/blob/viewer/index';\nimport Activities from '~/activities';\nimport { ajaxGet } from '~/lib/utils/common_utils';\nimport GpgBadges from '~/gpg_badges';\nimport initReadMore from '~/read_more';\nimport Star from '../../../star';\nimport notificationsDropdown from '../../../notifications_dropdown';\n\ndocument.addEventListener('DOMContentLoaded', () => {\n initReadMore();\n new Star(); // eslint-disable-line no-new\n notificationsDropdown();\n new ShortcutsNavigation(); // eslint-disable-line no-new\n new NotificationsForm(); // eslint-disable-line no-new\n // eslint-disable-next-line no-new\n new UserCallout({\n setCalloutPerProject: false,\n className: 'js-autodevops-banner',\n });\n\n // Project show page loads different overview content based on user preferences\n const treeSlider = document.querySelector('#tree-slider');\n if (treeSlider) {\n new TreeView(); // eslint-disable-line no-new\n initBlob();\n }\n\n if (document.querySelector('.blob-viewer')) {\n new BlobViewer(); // eslint-disable-line no-new\n }\n\n if (document.querySelector('.project-show-activity')) {\n new Activities(); // eslint-disable-line no-new\n }\n\n $(treeSlider).waitForImages(() => {\n ajaxGet(document.querySelector('.js-tree-content').dataset.logsPath);\n });\n\n GpgBadges.fetch();\n});\n","/**\n * ReadMore\n *\n * Adds \"read more\" functionality to elements.\n *\n * Specifically, it looks for a trigger, by default \".js-read-more-trigger\", and adds the class\n * \"is-expanded\" to the previous element in order to provide a click to expand functionality.\n *\n * This is useful for long text elements that you would like to truncate, especially for mobile.\n *\n * Example Markup\n *
\n *

Some text that should be long enough to have to truncate within a specified container.

\n *

This text will not appear in the container, as only the first line can be truncated.

\n *

This should also not appear, if everything is working correctly!

\n *
\n * \n *\n */\nexport default function initReadMore(triggerSelector = '.js-read-more-trigger') {\n const triggerEls = document.querySelectorAll(triggerSelector);\n\n if (!triggerEls) return;\n\n triggerEls.forEach(triggerEl => {\n const targetEl = triggerEl.previousElementSibling;\n\n if (!targetEl) {\n return;\n }\n\n triggerEl.addEventListener(\n 'click',\n e => {\n targetEl.classList.add('is-expanded');\n e.target.remove();\n },\n { once: true },\n );\n });\n}\n","/* eslint-disable class-methods-use-this */\n\nimport $ from 'jquery';\nimport Cookies from 'js-cookie';\nimport Pager from './pager';\nimport { localTimeAgo } from './lib/utils/datetime_utility';\n\nexport default class Activities {\n constructor(container = '') {\n this.container = container;\n\n Pager.init(20, true, false, data => data, this.updateTooltips, this.container);\n\n $('.event-filter-link').on('click', e => {\n e.preventDefault();\n this.toggleFilter(e.currentTarget);\n this.reloadActivities();\n });\n }\n\n updateTooltips() {\n localTimeAgo($('.js-timeago', '.content_list'));\n }\n\n reloadActivities() {\n $('.content_list').html('');\n Pager.init(20, true, false, data => data, this.updateTooltips, this.container);\n }\n\n toggleFilter(sender) {\n const $sender = $(sender);\n const filter = $sender.attr('id').split('_')[0];\n\n $('.event-filter .active').removeClass('active');\n Cookies.set('event_filter', filter);\n\n $sender.closest('li').toggleClass('active');\n }\n}\n","import $ from 'jquery';\nimport Flash from '../../flash';\nimport { handleLocationHash } from '../../lib/utils/common_utils';\nimport axios from '../../lib/utils/axios_utils';\n\nexport default class BlobViewer {\n constructor() {\n BlobViewer.initAuxiliaryViewer();\n BlobViewer.initRichViewer();\n\n this.initMainViewers();\n }\n\n static initAuxiliaryViewer() {\n const auxiliaryViewer = document.querySelector('.blob-viewer[data-type=\"auxiliary\"]');\n if (!auxiliaryViewer) return;\n\n BlobViewer.loadViewer(auxiliaryViewer);\n }\n\n static initRichViewer() {\n const viewer = document.querySelector('.blob-viewer[data-type=\"rich\"]');\n if (!viewer || !viewer.dataset.richType) return;\n\n const initViewer = promise =>\n promise\n .then(module => module.default(viewer))\n .catch(error => {\n Flash('Error loading file viewer.');\n throw error;\n });\n\n switch (viewer.dataset.richType) {\n case 'balsamiq':\n initViewer(import(/* webpackChunkName: 'balsamiq_viewer' */ '../balsamiq_viewer'));\n break;\n case 'notebook':\n initViewer(import(/* webpackChunkName: 'notebook_viewer' */ '../notebook_viewer'));\n break;\n case 'pdf':\n initViewer(import(/* webpackChunkName: 'pdf_viewer' */ '../pdf_viewer'));\n break;\n case 'sketch':\n initViewer(import(/* webpackChunkName: 'sketch_viewer' */ '../sketch_viewer'));\n break;\n case 'stl':\n initViewer(import(/* webpackChunkName: 'stl_viewer' */ '../stl_viewer'));\n break;\n default:\n break;\n }\n }\n\n initMainViewers() {\n this.$fileHolder = $('.file-holder');\n if (!this.$fileHolder.length) return;\n\n this.switcher = document.querySelector('.js-blob-viewer-switcher');\n this.switcherBtns = document.querySelectorAll('.js-blob-viewer-switch-btn');\n this.copySourceBtn = document.querySelector('.js-copy-blob-source-btn');\n\n this.simpleViewer = this.$fileHolder[0].querySelector('.blob-viewer[data-type=\"simple\"]');\n this.richViewer = this.$fileHolder[0].querySelector('.blob-viewer[data-type=\"rich\"]');\n\n this.initBindings();\n\n this.switchToInitialViewer();\n }\n\n switchToInitialViewer() {\n const initialViewer = this.$fileHolder[0].querySelector('.blob-viewer:not(.hidden)');\n let initialViewerName = initialViewer.getAttribute('data-type');\n\n if (this.switcher && window.location.hash.indexOf('#L') === 0) {\n initialViewerName = 'simple';\n }\n\n this.switchToViewer(initialViewerName);\n }\n\n initBindings() {\n if (this.switcherBtns.length) {\n Array.from(this.switcherBtns).forEach(el => {\n el.addEventListener('click', this.switchViewHandler.bind(this));\n });\n }\n\n if (this.copySourceBtn) {\n this.copySourceBtn.addEventListener('click', () => {\n if (this.copySourceBtn.classList.contains('disabled')) return this.copySourceBtn.blur();\n\n return this.switchToViewer('simple');\n });\n }\n }\n\n switchViewHandler(e) {\n const target = e.currentTarget;\n\n e.preventDefault();\n\n this.switchToViewer(target.getAttribute('data-viewer'));\n }\n\n toggleCopyButtonState() {\n if (!this.copySourceBtn) return;\n\n if (this.simpleViewer.getAttribute('data-loaded')) {\n this.copySourceBtn.setAttribute('title', 'Copy source to clipboard');\n this.copySourceBtn.classList.remove('disabled');\n } else if (this.activeViewer === this.simpleViewer) {\n this.copySourceBtn.setAttribute(\n 'title',\n 'Wait for the source to load to copy it to the clipboard',\n );\n this.copySourceBtn.classList.add('disabled');\n } else {\n this.copySourceBtn.setAttribute('title', 'Switch to the source to copy it to the clipboard');\n this.copySourceBtn.classList.add('disabled');\n }\n\n $(this.copySourceBtn).tooltip('_fixTitle');\n }\n\n switchToViewer(name) {\n const newViewer = this.$fileHolder[0].querySelector(`.blob-viewer[data-type='${name}']`);\n if (this.activeViewer === newViewer) return;\n\n const oldButton = document.querySelector('.js-blob-viewer-switch-btn.active');\n const newButton = document.querySelector(`.js-blob-viewer-switch-btn[data-viewer='${name}']`);\n const oldViewer = this.$fileHolder[0].querySelector(`.blob-viewer:not([data-type='${name}'])`);\n\n if (oldButton) {\n oldButton.classList.remove('active');\n }\n\n if (newButton) {\n newButton.classList.add('active');\n newButton.blur();\n }\n\n if (oldViewer) {\n oldViewer.classList.add('hidden');\n }\n\n newViewer.classList.remove('hidden');\n\n this.activeViewer = newViewer;\n\n this.toggleCopyButtonState();\n\n BlobViewer.loadViewer(newViewer)\n .then(viewer => {\n $(viewer).renderGFM();\n\n this.$fileHolder.trigger('highlight:line');\n handleLocationHash();\n\n this.toggleCopyButtonState();\n })\n .catch(() => new Flash('Error loading viewer'));\n }\n\n static loadViewer(viewerParam) {\n const viewer = viewerParam;\n const url = viewer.getAttribute('data-url');\n\n if (!url || viewer.getAttribute('data-loaded') || viewer.getAttribute('data-loading')) {\n return Promise.resolve(viewer);\n }\n\n viewer.setAttribute('data-loading', 'true');\n\n return axios.get(url).then(({ data }) => {\n viewer.innerHTML = data.html;\n viewer.setAttribute('data-loaded', 'true');\n\n return viewer;\n });\n }\n}\n","import $ from 'jquery';\n\nexport default class FileTemplateSelector {\n constructor(mediator) {\n this.mediator = mediator;\n this.$dropdown = null;\n this.$wrapper = null;\n }\n\n init() {\n const cfg = this.config;\n\n this.$dropdown = $(cfg.dropdown);\n this.$wrapper = $(cfg.wrapper);\n this.$loadingIcon = this.$wrapper.find('.fa-chevron-down');\n this.$dropdownToggleText = this.$wrapper.find('.dropdown-toggle-text');\n\n this.initDropdown();\n }\n\n show() {\n if (this.$dropdown === null) {\n this.init();\n }\n\n this.$wrapper.removeClass('hidden');\n }\n\n hide() {\n if (this.$dropdown !== null) {\n this.$wrapper.addClass('hidden');\n }\n }\n\n isHidden() {\n return this.$wrapper.hasClass('hidden');\n }\n\n getToggleText() {\n return this.$dropdownToggleText.text();\n }\n\n setToggleText(text) {\n this.$dropdownToggleText.text(text);\n }\n\n renderLoading() {\n this.$loadingIcon.addClass('fa-spinner fa-spin').removeClass('fa-chevron-down');\n }\n\n renderLoaded() {\n this.$loadingIcon.addClass('fa-chevron-down').removeClass('fa-spinner fa-spin');\n }\n\n reportSelection(options) {\n const { query, e, data } = options;\n e.preventDefault();\n return this.mediator.selectTemplateFile(this, query, data);\n }\n\n reportSelectionName(options) {\n const opts = options;\n opts.query = options.selectedObj.name;\n\n this.reportSelection(opts);\n }\n}\n","import FileTemplateSelector from '../file_template_selector';\n\nexport default class FileTemplateTypeSelector extends FileTemplateSelector {\n constructor({ mediator, dropdownData }) {\n super(mediator);\n this.mediator = mediator;\n this.config = {\n dropdown: '.js-template-type-selector',\n wrapper: '.js-template-type-selector-wrap',\n dropdownData,\n };\n }\n\n initDropdown() {\n this.$dropdown.glDropdown({\n data: this.config.dropdownData,\n filterable: false,\n selectable: true,\n toggleLabel: item => item.name,\n clicked: options => this.mediator.selectTemplateTypeOptions(options),\n text: item => item.name,\n });\n }\n}\n","import FileTemplateSelector from '../file_template_selector';\n\nexport default class BlobCiYamlSelector extends FileTemplateSelector {\n constructor({ mediator }) {\n super(mediator);\n this.config = {\n key: 'gitlab-ci-yaml',\n name: '.gitlab-ci.yml',\n pattern: /(.gitlab-ci.yml)/,\n type: 'gitlab_ci_ymls',\n dropdown: '.js-gitlab-ci-yml-selector',\n wrapper: '.js-gitlab-ci-yml-selector-wrap',\n };\n }\n\n initDropdown() {\n // maybe move to super class as well\n this.$dropdown.glDropdown({\n data: this.$dropdown.data('data'),\n filterable: true,\n selectable: true,\n toggleLabel: item => item.name,\n search: {\n fields: ['name'],\n },\n clicked: options => this.reportSelectionName(options),\n text: item => item.name,\n });\n }\n}\n","import FileTemplateSelector from '../file_template_selector';\n\nexport default class DockerfileSelector extends FileTemplateSelector {\n constructor({ mediator }) {\n super(mediator);\n this.config = {\n key: 'dockerfile',\n name: 'Dockerfile',\n pattern: /(Dockerfile)/,\n type: 'dockerfiles',\n dropdown: '.js-dockerfile-selector',\n wrapper: '.js-dockerfile-selector-wrap',\n };\n }\n\n initDropdown() {\n // maybe move to super class as well\n this.$dropdown.glDropdown({\n data: this.$dropdown.data('data'),\n filterable: true,\n selectable: true,\n toggleLabel: item => item.name,\n search: {\n fields: ['name'],\n },\n clicked: options => this.reportSelectionName(options),\n text: item => item.name,\n });\n }\n}\n","import FileTemplateSelector from '../file_template_selector';\n\nexport default class BlobGitignoreSelector extends FileTemplateSelector {\n constructor({ mediator }) {\n super(mediator);\n this.config = {\n key: 'gitignore',\n name: '.gitignore',\n pattern: /(.gitignore)/,\n type: 'gitignores',\n dropdown: '.js-gitignore-selector',\n wrapper: '.js-gitignore-selector-wrap',\n };\n }\n\n initDropdown() {\n this.$dropdown.glDropdown({\n data: this.$dropdown.data('data'),\n filterable: true,\n selectable: true,\n toggleLabel: item => item.name,\n search: {\n fields: ['name'],\n },\n clicked: options => this.reportSelectionName(options),\n text: item => item.name,\n });\n }\n}\n","import FileTemplateSelector from '../file_template_selector';\n\nexport default class BlobLicenseSelector extends FileTemplateSelector {\n constructor({ mediator }) {\n super(mediator);\n this.config = {\n key: 'license',\n name: 'LICENSE',\n pattern: /^(.+\\/)?(licen[sc]e|copying)($|\\.)/i,\n type: 'licenses',\n dropdown: '.js-license-selector',\n wrapper: '.js-license-selector-wrap',\n };\n }\n\n initDropdown() {\n this.$dropdown.glDropdown({\n data: this.$dropdown.data('data'),\n filterable: true,\n selectable: true,\n toggleLabel: item => item.name,\n search: {\n fields: ['name'],\n },\n clicked: options => {\n const { e } = options;\n const el = options.$el;\n const query = options.selectedObj;\n\n const data = {\n project: this.$dropdown.data('project'),\n fullname: this.$dropdown.data('fullname'),\n };\n\n this.reportSelection({\n query: query.id,\n el,\n e,\n data,\n });\n },\n text: item => item.name,\n });\n }\n}\n","import Api from '~/api';\n\nimport $ from 'jquery';\nimport Flash from '../flash';\nimport FileTemplateTypeSelector from './template_selectors/type_selector';\nimport BlobCiYamlSelector from './template_selectors/ci_yaml_selector';\nimport DockerfileSelector from './template_selectors/dockerfile_selector';\nimport GitignoreSelector from './template_selectors/gitignore_selector';\nimport LicenseSelector from './template_selectors/license_selector';\n\nexport default class FileTemplateMediator {\n constructor({ editor, currentAction, projectId }) {\n this.editor = editor;\n this.currentAction = currentAction;\n this.projectId = projectId;\n\n this.initTemplateSelectors();\n this.initTemplateTypeSelector();\n this.initDomElements();\n this.initDropdowns();\n this.initPageEvents();\n }\n\n initTemplateSelectors() {\n // Order dictates template type dropdown item order\n this.templateSelectors = [\n GitignoreSelector,\n BlobCiYamlSelector,\n DockerfileSelector,\n LicenseSelector,\n ].map(TemplateSelectorClass => new TemplateSelectorClass({ mediator: this }));\n }\n\n initTemplateTypeSelector() {\n this.typeSelector = new FileTemplateTypeSelector({\n mediator: this,\n dropdownData: this.templateSelectors.map(templateSelector => {\n const cfg = templateSelector.config;\n\n return {\n name: cfg.name,\n key: cfg.key,\n };\n }),\n });\n }\n\n initDomElements() {\n const $templatesMenu = $('.template-selectors-menu');\n const $undoMenu = $templatesMenu.find('.template-selectors-undo-menu');\n const $fileEditor = $('.file-editor');\n\n this.$templatesMenu = $templatesMenu;\n this.$undoMenu = $undoMenu;\n this.$undoBtn = $undoMenu.find('button');\n this.$templateSelectors = $templatesMenu.find('.template-selector-dropdowns-wrap');\n this.$filenameInput = $fileEditor.find('.js-file-path-name-input');\n this.$fileContent = $fileEditor.find('#file-content');\n this.$commitForm = $fileEditor.find('form');\n this.$navLinks = $fileEditor.find('.nav-links');\n }\n\n initDropdowns() {\n if (this.currentAction === 'create') {\n this.typeSelector.show();\n } else {\n this.hideTemplateSelectorMenu();\n }\n\n this.displayMatchedTemplateSelector();\n }\n\n initPageEvents() {\n this.listenForFilenameInput();\n this.prepFileContentForSubmit();\n this.listenForPreviewMode();\n }\n\n listenForFilenameInput() {\n this.$filenameInput.on('keyup blur', () => {\n this.displayMatchedTemplateSelector();\n });\n }\n\n prepFileContentForSubmit() {\n this.$commitForm.submit(() => {\n this.$fileContent.val(this.editor.getValue());\n });\n }\n\n listenForPreviewMode() {\n this.$navLinks.on('click', 'a', e => {\n const urlPieces = e.target.href.split('#');\n const hash = urlPieces[1];\n if (hash === 'preview') {\n this.hideTemplateSelectorMenu();\n } else if (hash === 'editor' && !this.typeSelector.isHidden()) {\n this.showTemplateSelectorMenu();\n }\n });\n }\n\n selectTemplateType(item, e) {\n if (e) {\n e.preventDefault();\n }\n\n this.templateSelectors.forEach(selector => {\n if (selector.config.key === item.key) {\n selector.show();\n } else {\n selector.hide();\n }\n });\n\n this.typeSelector.setToggleText(item.name);\n\n this.cacheToggleText();\n }\n\n selectTemplateTypeOptions(options) {\n this.selectTemplateType(options.selectedObj, options.e);\n }\n\n selectTemplateFile(selector, query, data) {\n selector.renderLoading();\n // in case undo menu is already there\n this.destroyUndoMenu();\n this.fetchFileTemplate(selector.config.type, query, data)\n .then(file => {\n this.showUndoMenu();\n this.setEditorContent(file);\n this.setFilename(selector.config.name);\n selector.renderLoaded();\n })\n .catch(err => new Flash(`An error occurred while fetching the template: ${err}`));\n }\n\n displayMatchedTemplateSelector() {\n const currentInput = this.getFilename();\n this.templateSelectors.forEach(selector => {\n const match = selector.config.pattern.test(currentInput);\n\n if (match) {\n this.typeSelector.show();\n this.selectTemplateType(selector.config);\n this.showTemplateSelectorMenu();\n }\n });\n }\n\n fetchFileTemplate(type, query, data = {}) {\n return new Promise(resolve => {\n const resolveFile = file => resolve(file);\n\n Api.projectTemplate(this.projectId, type, query, data, resolveFile);\n });\n }\n\n setEditorContent(file) {\n if (!file && file !== '') return;\n\n const newValue = file.content || file;\n\n this.editor.setValue(newValue, 1);\n\n this.editor.focus();\n\n this.editor.navigateFileStart();\n }\n\n findTemplateSelectorByKey(key) {\n return this.templateSelectors.find(selector => selector.config.key === key);\n }\n\n showUndoMenu() {\n this.$undoMenu.removeClass('hidden');\n\n this.$undoBtn.on('click', () => {\n this.restoreFromCache();\n this.destroyUndoMenu();\n });\n }\n\n destroyUndoMenu() {\n this.cacheFileContents();\n this.cacheToggleText();\n this.$undoMenu.addClass('hidden');\n this.$undoBtn.off('click');\n }\n\n hideTemplateSelectorMenu() {\n this.$templatesMenu.hide();\n }\n\n showTemplateSelectorMenu() {\n this.$templatesMenu.show();\n }\n\n cacheToggleText() {\n this.cachedToggleText = this.getTemplateSelectorToggleText();\n }\n\n cacheFileContents() {\n this.cachedContent = this.editor.getValue();\n this.cachedFilename = this.getFilename();\n }\n\n restoreFromCache() {\n this.setEditorContent(this.cachedContent);\n this.setFilename(this.cachedFilename);\n this.setTemplateSelectorToggleText();\n }\n\n getTemplateSelectorToggleText() {\n return this.$templateSelectors\n .find('.js-template-selector-wrap:visible .dropdown-toggle-text')\n .text();\n }\n\n setTemplateSelectorToggleText() {\n return this.$templateSelectors\n .find('.js-template-selector-wrap:visible .dropdown-toggle-text')\n .text(this.cachedToggleText);\n }\n\n getTypeSelectorToggleText() {\n return this.typeSelector.getToggleText();\n }\n\n getFilename() {\n return this.$filenameInput.val();\n }\n\n setFilename(name) {\n this.$filenameInput.val(name).trigger('change');\n }\n\n getSelected() {\n return this.templateSelectors.find(selector => selector.selected);\n }\n}\n","/* global ace */\n\nimport $ from 'jquery';\nimport axios from '~/lib/utils/axios_utils';\nimport createFlash from '~/flash';\nimport { __ } from '~/locale';\nimport TemplateSelectorMediator from '../blob/file_template_mediator';\nimport getModeByFileExtension from '~/lib/utils/ace_utils';\nimport { addEditorMarkdownListeners } from '~/lib/utils/text_markdown';\n\nexport default class EditBlob {\n // The options object has:\n // assetsPath, filePath, currentAction, projectId, isMarkdown\n constructor(options) {\n this.options = options;\n this.configureAceEditor();\n this.initModePanesAndLinks();\n this.initSoftWrap();\n this.initFileSelectors();\n }\n\n configureAceEditor() {\n const { filePath, assetsPath, isMarkdown } = this.options;\n ace.config.set('modePath', `${assetsPath}/ace`);\n ace.config.loadModule('ace/ext/searchbox');\n ace.config.loadModule('ace/ext/modelist');\n\n this.editor = ace.edit('editor');\n\n if (isMarkdown) {\n addEditorMarkdownListeners(this.editor);\n }\n\n // This prevents warnings re: automatic scrolling being logged\n this.editor.$blockScrolling = Infinity;\n\n this.editor.focus();\n\n if (filePath) {\n this.editor.getSession().setMode(getModeByFileExtension(filePath));\n }\n }\n\n initFileSelectors() {\n const { currentAction, projectId } = this.options;\n this.fileTemplateMediator = new TemplateSelectorMediator({\n currentAction,\n editor: this.editor,\n projectId,\n });\n }\n\n initModePanesAndLinks() {\n this.$editModePanes = $('.js-edit-mode-pane');\n this.$editModeLinks = $('.js-edit-mode a');\n this.$editModeLinks.on('click', e => this.editModeLinkClickHandler(e));\n }\n\n editModeLinkClickHandler(e) {\n e.preventDefault();\n\n const currentLink = $(e.target);\n const paneId = currentLink.attr('href');\n const currentPane = this.$editModePanes.filter(paneId);\n\n this.$editModeLinks.parent().removeClass('active hover');\n\n currentLink.parent().addClass('active hover');\n\n this.$editModePanes.hide();\n\n currentPane.fadeIn(200);\n\n if (paneId === '#preview') {\n this.$toggleButton.hide();\n axios\n .post(currentLink.data('previewUrl'), {\n content: this.editor.getValue(),\n })\n .then(({ data }) => {\n currentPane.empty().append(data);\n currentPane.renderGFM();\n })\n .catch(() => createFlash(__('An error occurred previewing the blob')));\n }\n\n this.$toggleButton.show();\n\n return this.editor.focus();\n }\n\n initSoftWrap() {\n this.isSoftWrapped = false;\n this.$toggleButton = $('.soft-wrap-toggle');\n this.$toggleButton.on('click', () => this.toggleSoftWrap());\n }\n\n toggleSoftWrap() {\n this.isSoftWrapped = !this.isSoftWrapped;\n this.$toggleButton.toggleClass('soft-wrap-active', this.isSoftWrapped);\n this.editor.getSession().setUseWrapMode(this.isSoftWrapped);\n }\n}\n","/* eslint-disable func-names, object-shorthand, prefer-arrow-callback */\n\nimport $ from 'jquery';\nimport Dropzone from 'dropzone';\nimport { visitUrl } from '../lib/utils/url_utility';\nimport { HIDDEN_CLASS } from '../lib/utils/constants';\nimport csrf from '../lib/utils/csrf';\n\nDropzone.autoDiscover = false;\n\nfunction toggleLoading($el, $icon, loading) {\n if (loading) {\n $el.disable();\n $icon.removeClass(HIDDEN_CLASS);\n } else {\n $el.enable();\n $icon.addClass(HIDDEN_CLASS);\n }\n}\nexport default class BlobFileDropzone {\n constructor(form, method) {\n const formDropzone = form.find('.dropzone');\n const submitButton = form.find('#submit-all');\n const submitButtonLoadingIcon = submitButton.find('.js-loading-icon');\n const dropzoneMessage = form.find('.dz-message');\n Dropzone.autoDiscover = false;\n\n const dropzone = formDropzone.dropzone({\n autoDiscover: false,\n autoProcessQueue: false,\n url: form.attr('action'),\n // Rails uses a hidden input field for PUT\n // http://stackoverflow.com/questions/21056482/how-to-set-method-put-in-form-tag-in-rails\n method: method,\n clickable: true,\n uploadMultiple: false,\n paramName: 'file',\n maxFilesize: gon.max_file_size || 10,\n parallelUploads: 1,\n maxFiles: 1,\n addRemoveLinks: true,\n previewsContainer: '.dropzone-previews',\n headers: csrf.headers,\n init: function() {\n this.on('addedfile', function() {\n toggleLoading(submitButton, submitButtonLoadingIcon, false);\n dropzoneMessage.addClass(HIDDEN_CLASS);\n $('.dropzone-alerts')\n .html('')\n .hide();\n });\n this.on('removedfile', function() {\n toggleLoading(submitButton, submitButtonLoadingIcon, false);\n dropzoneMessage.removeClass(HIDDEN_CLASS);\n });\n this.on('success', function(header, response) {\n $('#modal-upload-blob').modal('hide');\n visitUrl(response.filePath);\n });\n this.on('maxfilesexceeded', function(file) {\n dropzoneMessage.addClass(HIDDEN_CLASS);\n this.removeFile(file);\n });\n this.on('sending', function(file, xhr, formData) {\n formData.append('branch_name', form.find('.js-branch-name').val());\n formData.append('create_merge_request', form.find('.js-create-merge-request').val());\n formData.append('commit_message', form.find('.js-commit-message').val());\n });\n },\n // Override behavior of adding error underneath preview\n error: function(file, errorMessage) {\n const stripped = $('
')\n .html(errorMessage)\n .text();\n $('.dropzone-alerts')\n .html(`Error uploading file: \"${stripped}\"`)\n .show();\n this.removeFile(file);\n },\n });\n\n submitButton.on('click', e => {\n e.preventDefault();\n e.stopPropagation();\n if (dropzone[0].dropzone.getQueuedFiles().length === 0) {\n // eslint-disable-next-line no-alert\n alert('Please select a file');\n return false;\n }\n toggleLoading(submitButton, submitButtonLoadingIcon, true);\n dropzone[0].dropzone.processQueue();\n return false;\n });\n }\n}\n","/* eslint-disable no-new */\n\nimport $ from 'jquery';\nimport NewCommitForm from '../new_commit_form';\nimport EditBlob from './edit_blob';\nimport BlobFileDropzone from '../blob/blob_file_dropzone';\n\nexport default () => {\n const editBlobForm = $('.js-edit-blob-form');\n const uploadBlobForm = $('.js-upload-blob-form');\n const deleteBlobForm = $('.js-delete-blob-form');\n\n if (editBlobForm.length) {\n const urlRoot = editBlobForm.data('relativeUrlRoot');\n const assetsPath = editBlobForm.data('assetsPrefix');\n const filePath = `${editBlobForm.data('blobFilename')}`;\n const currentAction = $('.js-file-title').data('currentAction');\n const projectId = editBlobForm.data('project-id');\n const isMarkdown = editBlobForm.data('is-markdown');\n const commitButton = $('.js-commit-button');\n const cancelLink = $('.btn.btn-cancel');\n\n cancelLink.on('click', () => {\n window.onbeforeunload = null;\n });\n\n commitButton.on('click', () => {\n window.onbeforeunload = null;\n });\n\n new EditBlob({\n assetsPath: `${urlRoot}${assetsPath}`,\n filePath,\n currentAction,\n projectId,\n isMarkdown,\n });\n new NewCommitForm(editBlobForm);\n\n // returning here blocks page navigation\n window.onbeforeunload = () => '';\n }\n\n if (uploadBlobForm.length) {\n const method = uploadBlobForm.data('method');\n\n new BlobFileDropzone(uploadBlobForm, method);\n new NewCommitForm(uploadBlobForm);\n\n window.gl.utils.disableButtonIfEmptyField(\n uploadBlobForm.find('.js-commit-message'),\n '.btn-upload-file',\n );\n }\n\n if (deleteBlobForm.length) {\n new NewCommitForm(deleteBlobForm);\n }\n};\n","import $ from 'jquery';\nimport { parseQueryStringIntoObject } from '~/lib/utils/common_utils';\nimport axios from '~/lib/utils/axios_utils';\nimport createFlash from '~/flash';\nimport { __ } from '~/locale';\n\nexport default class GpgBadges {\n static fetch() {\n const tag = $('.js-signature-container');\n if (tag.length === 0) {\n return Promise.resolve();\n }\n\n const badges = $('.js-loading-gpg-badge');\n\n badges.html('');\n\n const displayError = () => createFlash(__('An error occurred while loading commit signatures'));\n\n const endpoint = tag.data('signaturesPath');\n if (!endpoint) {\n displayError();\n return Promise.reject(new Error('Missing commit signatures endpoint!'));\n }\n\n const params = parseQueryStringIntoObject(tag.serialize());\n return axios\n .get(endpoint, { params })\n .then(({ data }) => {\n data.signatures.forEach(signature => {\n badges.filter(`[data-commit-sha=\"${signature.commit_sha}\"]`).replaceWith(signature.html);\n });\n })\n .catch(displayError);\n }\n}\n","import Mousetrap from 'mousetrap';\nimport findAndFollowLink from '../../lib/utils/navigation_utility';\nimport Shortcuts from './shortcuts';\n\nexport default class ShortcutsNavigation extends Shortcuts {\n constructor() {\n super();\n\n Mousetrap.bind('g p', () => findAndFollowLink('.shortcuts-project'));\n Mousetrap.bind('g v', () => findAndFollowLink('.shortcuts-project-activity'));\n Mousetrap.bind('g r', () => findAndFollowLink('.shortcuts-project-releases'));\n Mousetrap.bind('g f', () => findAndFollowLink('.shortcuts-tree'));\n Mousetrap.bind('g c', () => findAndFollowLink('.shortcuts-commits'));\n Mousetrap.bind('g j', () => findAndFollowLink('.shortcuts-builds'));\n Mousetrap.bind('g n', () => findAndFollowLink('.shortcuts-network'));\n Mousetrap.bind('g d', () => findAndFollowLink('.shortcuts-repository-charts'));\n Mousetrap.bind('g i', () => findAndFollowLink('.shortcuts-issues'));\n Mousetrap.bind('g b', () => findAndFollowLink('.shortcuts-issue-boards'));\n Mousetrap.bind('g m', () => findAndFollowLink('.shortcuts-merge_requests'));\n Mousetrap.bind('g w', () => findAndFollowLink('.shortcuts-wiki'));\n Mousetrap.bind('g s', () => findAndFollowLink('.shortcuts-snippets'));\n Mousetrap.bind('g k', () => findAndFollowLink('.shortcuts-kubernetes'));\n Mousetrap.bind('g e', () => findAndFollowLink('.shortcuts-environments'));\n Mousetrap.bind('g l', () => findAndFollowLink('.shortcuts-metrics'));\n Mousetrap.bind('i', () => findAndFollowLink('.shortcuts-new-issue'));\n\n this.enabledHelp.push('.hidden-shortcut.project');\n }\n}\n","import $ from 'jquery';\nimport AccessorUtilities from './lib/utils/accessor';\n\nexport default class ProjectSelectComboButton {\n constructor(select) {\n this.projectSelectInput = $(select);\n this.newItemBtn = $('.new-project-item-link');\n this.resourceType = this.newItemBtn.data('type');\n this.resourceLabel = this.newItemBtn.data('label');\n this.formattedText = this.deriveTextVariants();\n this.groupId = this.projectSelectInput.data('groupId');\n this.bindEvents();\n this.initLocalStorage();\n }\n\n bindEvents() {\n this.projectSelectInput\n .siblings('.new-project-item-select-button')\n .on('click', e => this.openDropdown(e));\n\n this.newItemBtn.on('click', e => {\n if (!this.getProjectFromLocalStorage()) {\n e.preventDefault();\n this.openDropdown(e);\n }\n });\n\n this.projectSelectInput.on('change', () => this.selectProject());\n }\n\n initLocalStorage() {\n const localStorageIsSafe = AccessorUtilities.isLocalStorageAccessSafe();\n\n if (localStorageIsSafe) {\n this.localStorageKey = [\n 'group',\n this.groupId,\n this.formattedText.localStorageItemType,\n 'recent-project',\n ].join('-');\n this.setBtnTextFromLocalStorage();\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n openDropdown(event) {\n import(/* webpackChunkName: 'select2' */ 'select2/select2')\n .then(() => {\n $(event.currentTarget)\n .siblings('.project-item-select')\n .select2('open');\n })\n .catch(() => {});\n }\n\n selectProject() {\n const selectedProjectData = JSON.parse(this.projectSelectInput.val());\n const projectUrl = `${selectedProjectData.url}/${this.projectSelectInput.data('relativePath')}`;\n const projectName = selectedProjectData.name;\n\n const projectMeta = {\n url: projectUrl,\n name: projectName,\n };\n\n this.setNewItemBtnAttributes(projectMeta);\n this.setProjectInLocalStorage(projectMeta);\n }\n\n setBtnTextFromLocalStorage() {\n const cachedProjectData = this.getProjectFromLocalStorage();\n\n this.setNewItemBtnAttributes(cachedProjectData);\n }\n\n setNewItemBtnAttributes(project) {\n if (project) {\n this.newItemBtn.attr('href', project.url);\n this.newItemBtn.text(`${this.formattedText.defaultTextPrefix} in ${project.name}`);\n } else {\n this.newItemBtn.text(`Select project to create ${this.formattedText.presetTextSuffix}`);\n }\n }\n\n getProjectFromLocalStorage() {\n const projectString = localStorage.getItem(this.localStorageKey);\n\n return JSON.parse(projectString);\n }\n\n setProjectInLocalStorage(projectMeta) {\n const projectString = JSON.stringify(projectMeta);\n\n localStorage.setItem(this.localStorageKey, projectString);\n }\n\n deriveTextVariants() {\n const defaultTextPrefix = this.resourceLabel;\n\n // the trailing slice call depluralizes each of these strings (e.g. new-issues -> new-issue)\n const localStorageItemType = `new-${this.resourceType\n .split('_')\n .join('-')\n .slice(0, -1)}`;\n const presetTextSuffix = this.resourceType\n .split('_')\n .join(' ')\n .slice(0, -1);\n\n return {\n localStorageItemType, // new-issue / new-merge-request\n defaultTextPrefix, // New issue / New merge request\n presetTextSuffix, // issue / merge request\n };\n }\n}\n","/* eslint-disable func-names, no-var, object-shorthand, one-var, no-else-return */\n\nimport $ from 'jquery';\nimport Api from './api';\nimport ProjectSelectComboButton from './project_select_combo_button';\n\nexport default function projectSelect() {\n import(/* webpackChunkName: 'select2' */ 'select2/select2')\n .then(() => {\n $('.ajax-project-select').each(function(i, select) {\n var placeholder;\n const simpleFilter = $(select).data('simpleFilter') || false;\n this.groupId = $(select).data('groupId');\n this.includeGroups = $(select).data('includeGroups');\n this.allProjects = $(select).data('allProjects') || false;\n this.orderBy = $(select).data('orderBy') || 'id';\n this.withIssuesEnabled = $(select).data('withIssuesEnabled');\n this.withMergeRequestsEnabled = $(select).data('withMergeRequestsEnabled');\n this.withShared =\n $(select).data('withShared') === undefined ? true : $(select).data('withShared');\n this.includeProjectsInSubgroups = $(select).data('includeProjectsInSubgroups') || false;\n this.allowClear = $(select).data('allowClear') || false;\n\n placeholder = 'Search for project';\n if (this.includeGroups) {\n placeholder += ' or group';\n }\n\n $(select).select2({\n placeholder: placeholder,\n minimumInputLength: 0,\n query: (function(_this) {\n return function(query) {\n var finalCallback, projectsCallback;\n finalCallback = function(projects) {\n var data;\n data = {\n results: projects,\n };\n return query.callback(data);\n };\n if (_this.includeGroups) {\n projectsCallback = function(projects) {\n var groupsCallback;\n groupsCallback = function(groups) {\n var data;\n data = groups.concat(projects);\n return finalCallback(data);\n };\n return Api.groups(query.term, {}, groupsCallback);\n };\n } else {\n projectsCallback = finalCallback;\n }\n if (_this.groupId) {\n return Api.groupProjects(\n _this.groupId,\n query.term,\n {\n with_issues_enabled: _this.withIssuesEnabled,\n with_merge_requests_enabled: _this.withMergeRequestsEnabled,\n with_shared: _this.withShared,\n include_subgroups: _this.includeProjectsInSubgroups,\n },\n projectsCallback,\n );\n } else {\n return Api.projects(\n query.term,\n {\n order_by: _this.orderBy,\n with_issues_enabled: _this.withIssuesEnabled,\n with_merge_requests_enabled: _this.withMergeRequestsEnabled,\n membership: !_this.allProjects,\n },\n projectsCallback,\n );\n }\n };\n })(this),\n id: function(project) {\n if (simpleFilter) return project.id;\n return JSON.stringify({\n name: project.name,\n url: project.web_url,\n });\n },\n text: function(project) {\n return project.name_with_namespace || project.name;\n },\n\n initSelection: function(el, callback) {\n return Api.project(el.val()).then(({ data }) => callback(data));\n },\n\n allowClear: this.allowClear,\n\n dropdownCssClass: 'ajax-project-dropdown',\n });\n if (simpleFilter) return select;\n return new ProjectSelectComboButton(select);\n });\n })\n .catch(() => {});\n}\n","/* eslint-disable func-names, no-var, no-return-assign, one-var, object-shorthand, vars-on-top */\n\nimport $ from 'jquery';\nimport Cookies from 'js-cookie';\nimport { __ } from '~/locale';\nimport { visitUrl } from '~/lib/utils/url_utility';\nimport axios from '~/lib/utils/axios_utils';\nimport flash from '~/flash';\nimport projectSelect from '../../project_select';\n\nexport default class Project {\n constructor() {\n const $cloneOptions = $('ul.clone-options-dropdown');\n const $projectCloneField = $('#project_clone');\n const $cloneBtnLabel = $('.js-git-clone-holder .js-clone-dropdown-label');\n const mobileCloneField = document.querySelector(\n '.js-mobile-git-clone .js-clone-dropdown-label',\n );\n\n const selectedCloneOption = $cloneBtnLabel.text().trim();\n if (selectedCloneOption.length > 0) {\n $(`a:contains('${selectedCloneOption}')`, $cloneOptions).addClass('is-active');\n }\n\n $('a', $cloneOptions).on('click', e => {\n e.preventDefault();\n const $this = $(e.currentTarget);\n const url = $this.attr('href');\n const cloneType = $this.data('cloneType');\n\n $('.is-active', $cloneOptions).removeClass('is-active');\n $(`a[data-clone-type=\"${cloneType}\"]`).each(function() {\n const $el = $(this);\n const activeText = $el.find('.dropdown-menu-inner-title').text();\n const $container = $el.closest('.project-clone-holder');\n const $label = $container.find('.js-clone-dropdown-label');\n\n $el.toggleClass('is-active');\n $label.text(activeText);\n });\n\n if (mobileCloneField) {\n mobileCloneField.dataset.clipboardText = url;\n } else {\n $projectCloneField.val(url);\n }\n $('.js-git-empty .js-clone').text(url);\n });\n // Ref switcher\n Project.initRefSwitcher();\n $('.project-refs-select').on('change', function() {\n return $(this)\n .parents('form')\n .submit();\n });\n $('.hide-no-ssh-message').on('click', function(e) {\n Cookies.set('hide_no_ssh_message', 'false');\n $(this)\n .parents('.no-ssh-key-message')\n .remove();\n return e.preventDefault();\n });\n $('.hide-no-password-message').on('click', function(e) {\n Cookies.set('hide_no_password_message', 'false');\n $(this)\n .parents('.no-password-message')\n .remove();\n return e.preventDefault();\n });\n $('.hide-auto-devops-implicitly-enabled-banner').on('click', function(e) {\n const projectId = $(this).data('project-id');\n const cookieKey = `hide_auto_devops_implicitly_enabled_banner_${projectId}`;\n Cookies.set(cookieKey, 'false');\n $(this)\n .parents('.auto-devops-implicitly-enabled-banner')\n .remove();\n return e.preventDefault();\n });\n Project.projectSelectDropdown();\n }\n\n static projectSelectDropdown() {\n projectSelect();\n $('.project-item-select').on('click', e => Project.changeProject($(e.currentTarget).val()));\n }\n\n static changeProject(url) {\n return (window.location = url);\n }\n\n static initRefSwitcher() {\n var refListItem = document.createElement('li');\n var refLink = document.createElement('a');\n\n refLink.href = '#';\n\n return $('.js-project-refs-dropdown').each(function() {\n var $dropdown, selected;\n $dropdown = $(this);\n selected = $dropdown.data('selected');\n return $dropdown.glDropdown({\n data(term, callback) {\n axios\n .get($dropdown.data('refsUrl'), {\n params: {\n ref: $dropdown.data('ref'),\n search: term,\n },\n })\n .then(({ data }) => callback(data))\n .catch(() => flash(__('An error occurred while getting projects')));\n },\n selectable: true,\n filterable: true,\n filterRemote: true,\n filterByText: true,\n inputFieldName: $dropdown.data('inputFieldName'),\n fieldName: $dropdown.data('fieldName'),\n renderRow: function(ref) {\n var li = refListItem.cloneNode(false);\n\n if (ref.header != null) {\n li.className = 'dropdown-header';\n li.textContent = ref.header;\n } else {\n var link = refLink.cloneNode(false);\n\n if (ref === selected) {\n link.className = 'is-active';\n }\n\n link.textContent = ref;\n link.dataset.ref = ref;\n\n li.appendChild(link);\n }\n\n return li;\n },\n id: function(obj, $el) {\n return $el.attr('data-ref');\n },\n toggleLabel: function(obj, $el) {\n return $el.text().trim();\n },\n clicked: function(options) {\n const { e } = options;\n e.preventDefault();\n if ($('input[name=\"ref\"]').length) {\n var $form = $dropdown.closest('form');\n\n var $visit = $dropdown.data('visit');\n var shouldVisit = $visit ? true : $visit;\n var action = $form.attr('action');\n var divider = action.indexOf('?') === -1 ? '?' : '&';\n if (shouldVisit) {\n visitUrl(`${action}${divider}${$form.serialize()}`);\n }\n }\n },\n });\n });\n }\n}\n","import $ from 'jquery';\nimport Flash from './flash';\n\nexport default function notificationsDropdown() {\n $(document).on('click', '.update-notification', function updateNotificationCallback(e) {\n e.preventDefault();\n if ($(this).is('.is-active') && $(this).data('notificationLevel') === 'custom') {\n return;\n }\n\n const notificationLevel = $(this).data('notificationLevel');\n const form = $(this).parents('.notification-form:first');\n\n form.find('.js-notification-loading').toggleClass('fa-bell fa-spin fa-spinner');\n if (form.hasClass('no-label')) {\n form.find('.js-notification-loading').toggleClass('hidden');\n form.find('.js-notifications-icon').toggleClass('hidden');\n }\n form.find('#notification_setting_level').val(notificationLevel);\n form.submit();\n });\n\n $(document).on('ajax:success', '.notification-form', (e, data) => {\n if (data.saved) {\n $(e.currentTarget)\n .closest('.js-notification-dropdown')\n .replaceWith(data.html);\n } else {\n Flash('Failed to save new settings', 'alert');\n }\n });\n}\n","import $ from 'jquery';\nimport { __ } from './locale';\nimport axios from './lib/utils/axios_utils';\nimport flash from './flash';\n\nexport default class NotificationsForm {\n constructor() {\n this.toggleCheckbox = this.toggleCheckbox.bind(this);\n this.initEventListeners();\n }\n\n initEventListeners() {\n $(document).on('change', '.js-custom-notification-event', this.toggleCheckbox);\n }\n\n toggleCheckbox(e) {\n const $checkbox = $(e.currentTarget);\n const $parent = $checkbox.closest('.form-check');\n\n this.saveEvent($checkbox, $parent);\n }\n\n // eslint-disable-next-line class-methods-use-this\n showCheckboxLoadingSpinner($parent) {\n $parent\n .addClass('is-loading')\n .find('.custom-notification-event-loading')\n .removeClass('fa-check')\n .addClass('fa-spin fa-spinner')\n .removeClass('is-done');\n }\n\n saveEvent($checkbox, $parent) {\n const form = $parent.parents('form:first');\n\n this.showCheckboxLoadingSpinner($parent);\n\n axios[form.attr('method')](form.attr('action'), form.serialize())\n .then(({ data }) => {\n $checkbox.enable();\n if (data.saved) {\n $parent\n .find('.custom-notification-event-loading')\n .toggleClass('fa-spin fa-spinner fa-check is-done');\n setTimeout(() => {\n $parent\n .removeClass('is-loading')\n .find('.custom-notification-event-loading')\n .toggleClass('fa-spin fa-spinner fa-check is-done');\n }, 2000);\n }\n })\n .catch(() => flash(__('There was an error saving your notification settings.')));\n }\n}\n","import $ from 'jquery';\nimport Cookies from 'js-cookie';\n\nexport default class UserCallout {\n constructor(options = {}) {\n this.options = options;\n\n const className = this.options.className || 'user-callout';\n\n this.userCalloutBody = $(`.${className}`);\n this.cookieName = this.userCalloutBody.data('uid');\n this.isCalloutDismissed = Cookies.get(this.cookieName);\n this.init();\n }\n\n init() {\n if (!this.isCalloutDismissed || this.isCalloutDismissed === 'false') {\n this.userCalloutBody.find('.js-close-callout').on('click', e => this.dismissCallout(e));\n }\n }\n\n dismissCallout(e) {\n const $currentTarget = $(e.currentTarget);\n\n if (this.options.setCalloutPerProject) {\n Cookies.set(this.cookieName, 'true', {\n expires: 365,\n path: this.userCalloutBody.data('projectPath'),\n });\n } else {\n Cookies.set(this.cookieName, 'true', { expires: 365 });\n }\n\n if ($currentTarget.hasClass('close') || $currentTarget.hasClass('js-close')) {\n this.userCalloutBody.remove();\n }\n }\n}\n","import initGkeDropdowns from '~/projects/gke_cluster_dropdowns';\nimport PersistentUserCallout from '../../persistent_user_callout';\nimport Project from './project';\nimport ShortcutsNavigation from '../../behaviors/shortcuts/shortcuts_navigation';\n\ndocument.addEventListener('DOMContentLoaded', () => {\n const { page } = document.body.dataset;\n const newClusterViews = [\n 'projects:clusters:new',\n 'projects:clusters:create_gcp',\n 'projects:clusters:create_user',\n ];\n\n if (newClusterViews.indexOf(page) > -1) {\n const callout = document.querySelector('.gcp-signup-offer');\n PersistentUserCallout.factory(callout);\n\n initGkeDropdowns();\n }\n\n new Project(); // eslint-disable-line no-new\n new ShortcutsNavigation(); // eslint-disable-line no-new\n});\n","/* eslint-disable func-names, consistent-return, no-var, one-var, no-else-return, prefer-arrow-callback, class-methods-use-this */\n\nimport $ from 'jquery';\nimport { visitUrl } from './lib/utils/url_utility';\n\nexport default class TreeView {\n constructor() {\n this.initKeyNav();\n // Code browser tree slider\n // Make the entire tree-item row clickable, but not if clicking another link (like a commit message)\n $('.tree-content-holder .tree-item').on('click', function(e) {\n var $clickedEl, path;\n $clickedEl = $(e.target);\n path = $('.tree-item-file-name a', this).attr('href');\n if (!$clickedEl.is('a') && !$clickedEl.is('.str-truncated')) {\n if (e.metaKey || e.which === 2) {\n e.preventDefault();\n return window.open(path, '_blank');\n } else {\n return visitUrl(path);\n }\n }\n });\n // Show the \"Loading commit data\" for only the first element\n $('span.log_loading:first').removeClass('hide');\n }\n\n initKeyNav() {\n var li, liSelected;\n li = $('tr.tree-item');\n liSelected = null;\n return $('body').keydown(function(e) {\n var next, path;\n if ($('input:focus').length > 0 && (e.which === 38 || e.which === 40)) {\n return false;\n }\n if (e.which === 40) {\n if (liSelected) {\n next = liSelected.next();\n if (next.length > 0) {\n liSelected.removeClass('selected');\n liSelected = next.addClass('selected');\n }\n } else {\n liSelected = li.eq(0).addClass('selected');\n }\n return $(liSelected).focus();\n } else if (e.which === 38) {\n if (liSelected) {\n next = liSelected.prev();\n if (next.length > 0) {\n liSelected.removeClass('selected');\n liSelected = next.addClass('selected');\n }\n } else {\n liSelected = li.last().addClass('selected');\n }\n return $(liSelected).focus();\n } else if (e.which === 13) {\n path = $('.tree-item.selected .tree-item-file-name a').attr('href');\n if (path) {\n return visitUrl(path);\n }\n }\n });\n }\n}\n","export const BYTES_IN_KIB = 1024;\nexport const HIDDEN_CLASS = 'hidden';\n"],"sourceRoot":""}