{"version":3,"file":"primer_view_components.js","sources":["../../../node_modules/@github/details-menu-element/dist/index.js","../../../node_modules/@github/image-crop-element/dist/index.js","../../../node_modules/tslib/tslib.es6.js","../../../node_modules/@primer/behaviors/dist/esm/anchored-position.js","../../../node_modules/@primer/behaviors/dist/esm/utils/iterate-focusable-elements.js","../../../node_modules/@primer/behaviors/dist/esm/polyfills/event-listener-signal.js","../../../node_modules/@primer/behaviors/dist/esm/focus-trap.js","../../components/primer/alpha/modal_dialog.ts","../../../node_modules/@github/catalyst/lib/bind.js","../../../node_modules/@github/catalyst/lib/dasherize.js","../../../node_modules/@github/catalyst/lib/attr.js","../../../node_modules/@github/catalyst/lib/core.js","../../../node_modules/@github/catalyst/lib/register.js","../../../node_modules/@github/catalyst/lib/auto-shadow-root.js","../../../node_modules/@github/catalyst/lib/target.js","../../../node_modules/@github/catalyst/lib/findtarget.js","../../../node_modules/@github/catalyst/lib/controller.js","../../../node_modules/@github/catalyst/lib/lazy-define.js","../../components/primer/alpha/nav_list.ts","../../components/primer/alpha/segmented_control.ts","../../../node_modules/@github/mini-throttle/dist/index.js","../../components/primer/alpha/toggle_switch.ts","../../../node_modules/@github/mini-throttle/dist/decorators.js","../../components/primer/alpha/tool_tip.ts","../../components/primer/alpha/x_banner.ts","../../../node_modules/@github/combobox-nav/dist/index.js","../../../node_modules/@github/auto-complete-element/dist/index.js","../../../node_modules/@github/clipboard-copy-element/dist/index.esm.js","../../components/primer/beta/clipboard_copy.ts","../../../node_modules/@github/relative-time-element/dist/duration-format.js","../../../node_modules/@github/relative-time-element/dist/duration.js","../../../node_modules/@github/relative-time-element/dist/relative-time-element.js","../../../node_modules/@github/relative-time-element/dist/relative-time-element-define.js","../../../node_modules/@github/tab-container-element/dist/index.js","../../../lib/primer/forms/primer_multi_input.ts","../../../node_modules/@github/auto-check-element/dist/index.js","../../../lib/primer/forms/primer_text_field.ts"],"sourcesContent":["class DetailsMenuElement extends HTMLElement {\n get preload() {\n return this.hasAttribute('preload');\n }\n set preload(value) {\n if (value) {\n this.setAttribute('preload', '');\n }\n else {\n this.removeAttribute('preload');\n }\n }\n get src() {\n return this.getAttribute('src') || '';\n }\n set src(value) {\n this.setAttribute('src', value);\n }\n connectedCallback() {\n if (!this.hasAttribute('role'))\n this.setAttribute('role', 'menu');\n const details = this.parentElement;\n if (!details)\n return;\n const summary = details.querySelector('summary');\n if (summary) {\n summary.setAttribute('aria-haspopup', 'menu');\n if (!summary.hasAttribute('role'))\n summary.setAttribute('role', 'button');\n }\n const subscriptions = [\n fromEvent(details, 'compositionstart', e => trackComposition(this, e)),\n fromEvent(details, 'compositionend', e => trackComposition(this, e)),\n fromEvent(details, 'click', e => shouldCommit(details, e)),\n fromEvent(details, 'change', e => shouldCommit(details, e)),\n fromEvent(details, 'keydown', e => keydown(details, this, e)),\n fromEvent(details, 'toggle', () => loadFragment(details, this), { once: true }),\n fromEvent(details, 'toggle', () => closeCurrentMenu(details)),\n this.preload\n ? fromEvent(details, 'mouseover', () => loadFragment(details, this), { once: true })\n : NullSubscription,\n ...focusOnOpen(details)\n ];\n states.set(this, { subscriptions, loaded: false, isComposing: false });\n }\n disconnectedCallback() {\n const state = states.get(this);\n if (!state)\n return;\n states.delete(this);\n for (const sub of state.subscriptions) {\n sub.unsubscribe();\n }\n }\n}\nconst states = new WeakMap();\nconst NullSubscription = {\n unsubscribe() {\n }\n};\nfunction fromEvent(target, eventName, onNext, options = false) {\n target.addEventListener(eventName, onNext, options);\n return {\n unsubscribe: () => {\n target.removeEventListener(eventName, onNext, options);\n }\n };\n}\nfunction loadFragment(details, menu) {\n const src = menu.getAttribute('src');\n if (!src)\n return;\n const state = states.get(menu);\n if (!state)\n return;\n if (state.loaded)\n return;\n state.loaded = true;\n const loader = menu.querySelector('include-fragment');\n if (loader && !loader.hasAttribute('src')) {\n loader.addEventListener('loadend', () => autofocus(details));\n loader.setAttribute('src', src);\n }\n}\nfunction focusOnOpen(details) {\n let isMouse = false;\n const onmousedown = () => (isMouse = true);\n const onkeydown = () => (isMouse = false);\n const ontoggle = () => {\n if (!details.hasAttribute('open'))\n return;\n if (autofocus(details))\n return;\n if (!isMouse)\n focusFirstItem(details);\n };\n return [\n fromEvent(details, 'mousedown', onmousedown),\n fromEvent(details, 'keydown', onkeydown),\n fromEvent(details, 'toggle', ontoggle)\n ];\n}\nfunction closeCurrentMenu(details) {\n if (!details.hasAttribute('open'))\n return;\n for (const menu of document.querySelectorAll('details[open] > details-menu')) {\n const opened = menu.closest('details');\n if (opened && opened !== details && !opened.contains(details)) {\n opened.removeAttribute('open');\n }\n }\n}\nfunction autofocus(details) {\n if (!details.hasAttribute('open'))\n return false;\n const input = details.querySelector('details-menu [autofocus]');\n if (input) {\n input.focus();\n return true;\n }\n else {\n return false;\n }\n}\nfunction focusFirstItem(details) {\n const selected = document.activeElement;\n if (selected && isMenuItem(selected) && details.contains(selected))\n return;\n const target = sibling(details, true);\n if (target)\n target.focus();\n}\nfunction sibling(details, next) {\n const options = Array.from(details.querySelectorAll('[role^=\"menuitem\"]:not([hidden]):not([disabled])'));\n const selected = document.activeElement;\n const index = selected instanceof HTMLElement ? options.indexOf(selected) : -1;\n const found = next ? options[index + 1] : options[index - 1];\n const def = next ? options[0] : options[options.length - 1];\n return found || def;\n}\nconst ctrlBindings = navigator.userAgent.match(/Macintosh/);\nfunction shouldCommit(details, event) {\n const target = event.target;\n if (!(target instanceof Element))\n return;\n if (target.closest('details') !== details)\n return;\n if (event.type === 'click') {\n const menuitem = target.closest('[role=\"menuitem\"], [role=\"menuitemradio\"]');\n if (!menuitem)\n return;\n const input = menuitem.querySelector('input');\n if (menuitem.tagName === 'LABEL' && target === input)\n return;\n const onlyCommitOnChangeEvent = menuitem.tagName === 'LABEL' && input && !input.checked;\n if (!onlyCommitOnChangeEvent) {\n commit(menuitem, details);\n }\n }\n else if (event.type === 'change') {\n const menuitem = target.closest('[role=\"menuitemradio\"], [role=\"menuitemcheckbox\"]');\n if (menuitem)\n commit(menuitem, details);\n }\n}\nfunction updateChecked(selected, details) {\n for (const el of details.querySelectorAll('[role=\"menuitemradio\"], [role=\"menuitemcheckbox\"]')) {\n const input = el.querySelector('input[type=\"radio\"], input[type=\"checkbox\"]');\n let checkState = (el === selected).toString();\n if (input instanceof HTMLInputElement) {\n checkState = input.indeterminate ? 'mixed' : input.checked.toString();\n }\n el.setAttribute('aria-checked', checkState);\n }\n}\nfunction commit(selected, details) {\n if (selected.hasAttribute('disabled') || selected.getAttribute('aria-disabled') === 'true')\n return;\n const menu = selected.closest('details-menu');\n if (!menu)\n return;\n const dispatched = menu.dispatchEvent(new CustomEvent('details-menu-select', {\n cancelable: true,\n detail: { relatedTarget: selected }\n }));\n if (!dispatched)\n return;\n updateLabel(selected, details);\n updateChecked(selected, details);\n if (selected.getAttribute('role') !== 'menuitemcheckbox')\n close(details);\n menu.dispatchEvent(new CustomEvent('details-menu-selected', {\n detail: { relatedTarget: selected }\n }));\n}\nfunction keydown(details, menu, event) {\n if (!(event instanceof KeyboardEvent))\n return;\n if (details.querySelector('details[open]'))\n return;\n const state = states.get(menu);\n if (!state || state.isComposing)\n return;\n const isSummaryFocused = event.target instanceof Element && event.target.tagName === 'SUMMARY';\n switch (event.key) {\n case 'Escape':\n if (details.hasAttribute('open')) {\n close(details);\n event.preventDefault();\n event.stopPropagation();\n }\n break;\n case 'ArrowDown':\n {\n if (isSummaryFocused && !details.hasAttribute('open')) {\n details.setAttribute('open', '');\n }\n const target = sibling(details, true);\n if (target)\n target.focus();\n event.preventDefault();\n }\n break;\n case 'ArrowUp':\n {\n if (isSummaryFocused && !details.hasAttribute('open')) {\n details.setAttribute('open', '');\n }\n const target = sibling(details, false);\n if (target)\n target.focus();\n event.preventDefault();\n }\n break;\n case 'n':\n {\n if (ctrlBindings && event.ctrlKey) {\n const target = sibling(details, true);\n if (target)\n target.focus();\n event.preventDefault();\n }\n }\n break;\n case 'p':\n {\n if (ctrlBindings && event.ctrlKey) {\n const target = sibling(details, false);\n if (target)\n target.focus();\n event.preventDefault();\n }\n }\n break;\n case ' ':\n case 'Enter':\n {\n const selected = document.activeElement;\n if (selected instanceof HTMLElement && isMenuItem(selected) && selected.closest('details') === details) {\n event.preventDefault();\n event.stopPropagation();\n selected.click();\n }\n }\n break;\n }\n}\nfunction isMenuItem(el) {\n const role = el.getAttribute('role');\n return role === 'menuitem' || role === 'menuitemcheckbox' || role === 'menuitemradio';\n}\nfunction close(details) {\n const wasOpen = details.hasAttribute('open');\n if (!wasOpen)\n return;\n details.removeAttribute('open');\n const summary = details.querySelector('summary');\n if (summary)\n summary.focus();\n}\nfunction updateLabel(item, details) {\n const button = details.querySelector('[data-menu-button]');\n if (!button)\n return;\n const text = labelText(item);\n if (text) {\n button.textContent = text;\n }\n else {\n const html = labelHTML(item);\n if (html)\n button.innerHTML = html;\n }\n}\nfunction labelText(el) {\n if (!el)\n return null;\n const textEl = el.hasAttribute('data-menu-button-text') ? el : el.querySelector('[data-menu-button-text]');\n if (!textEl)\n return null;\n return textEl.getAttribute('data-menu-button-text') || textEl.textContent;\n}\nfunction labelHTML(el) {\n if (!el)\n return null;\n const contentsEl = el.hasAttribute('data-menu-button-contents') ? el : el.querySelector('[data-menu-button-contents]');\n return contentsEl ? contentsEl.innerHTML : null;\n}\nfunction trackComposition(menu, event) {\n const state = states.get(menu);\n if (!state)\n return;\n state.isComposing = event.type === 'compositionstart';\n}\nexport default DetailsMenuElement;\nif (!window.customElements.get('details-menu')) {\n window.DetailsMenuElement = DetailsMenuElement;\n window.customElements.define('details-menu', DetailsMenuElement);\n}\n","const startPositions = new WeakMap();\nconst dragStartPositions = new WeakMap();\nconst constructedElements = new WeakMap();\nfunction moveCropArea(event) {\n const el = event.currentTarget;\n if (!(el instanceof ImageCropElement))\n return;\n const { box, image } = constructedElements.get(el) || {};\n if (!box || !image)\n return;\n let deltaX = 0;\n let deltaY = 0;\n if (event instanceof KeyboardEvent) {\n if (event.key === 'ArrowUp') {\n deltaY = -1;\n }\n else if (event.key === 'ArrowDown') {\n deltaY = 1;\n }\n else if (event.key === 'ArrowLeft') {\n deltaX = -1;\n }\n else if (event.key === 'ArrowRight') {\n deltaX = 1;\n }\n }\n else if (dragStartPositions.has(el) && event instanceof MouseEvent) {\n const pos = dragStartPositions.get(el);\n deltaX = event.pageX - pos.dragStartX;\n deltaY = event.pageY - pos.dragStartY;\n }\n else if (dragStartPositions.has(el) && event instanceof TouchEvent) {\n const { pageX, pageY } = event.changedTouches[0];\n const { dragStartX, dragStartY } = dragStartPositions.get(el);\n deltaX = pageX - dragStartX;\n deltaY = pageY - dragStartY;\n }\n if (deltaX !== 0 || deltaY !== 0) {\n const x = Math.min(Math.max(0, box.offsetLeft + deltaX), image.width - box.offsetWidth);\n const y = Math.min(Math.max(0, box.offsetTop + deltaY), image.height - box.offsetHeight);\n box.style.left = `${x}px`;\n box.style.top = `${y}px`;\n fireChangeEvent(el, { x, y, width: box.offsetWidth, height: box.offsetHeight });\n }\n if (event instanceof MouseEvent) {\n dragStartPositions.set(el, {\n dragStartX: event.pageX,\n dragStartY: event.pageY\n });\n }\n else if (event instanceof TouchEvent) {\n const { pageX, pageY } = event.changedTouches[0];\n dragStartPositions.set(el, {\n dragStartX: pageX,\n dragStartY: pageY\n });\n }\n}\nfunction updateCropArea(event) {\n const target = event.target;\n if (!(target instanceof HTMLElement))\n return;\n const el = getShadowHost(target);\n if (!(el instanceof ImageCropElement))\n return;\n const { box } = constructedElements.get(el) || {};\n if (!box)\n return;\n const rect = el.getBoundingClientRect();\n let deltaX, deltaY, delta;\n if (event instanceof KeyboardEvent) {\n if (event.key === 'Escape')\n return setInitialPosition(el);\n if (event.key === '-')\n delta = -10;\n if (event.key === '=')\n delta = +10;\n if (!delta)\n return;\n deltaX = box.offsetWidth + delta;\n deltaY = box.offsetHeight + delta;\n startPositions.set(el, { startX: box.offsetLeft, startY: box.offsetTop });\n }\n else if (event instanceof MouseEvent) {\n const pos = startPositions.get(el);\n if (!pos)\n return;\n deltaX = event.pageX - pos.startX - rect.left - window.pageXOffset;\n deltaY = event.pageY - pos.startY - rect.top - window.pageYOffset;\n }\n else if (event instanceof TouchEvent) {\n const pos = startPositions.get(el);\n if (!pos)\n return;\n deltaX = event.changedTouches[0].pageX - pos.startX - rect.left - window.pageXOffset;\n deltaY = event.changedTouches[0].pageY - pos.startY - rect.top - window.pageYOffset;\n }\n if (deltaX && deltaY)\n updateDimensions(el, deltaX, deltaY, !(event instanceof KeyboardEvent));\n}\nfunction getShadowHost(el) {\n const rootNode = el.getRootNode();\n if (!(rootNode instanceof ShadowRoot))\n return el;\n return rootNode.host;\n}\nfunction startUpdate(event) {\n const currentTarget = event.currentTarget;\n if (!(currentTarget instanceof HTMLElement))\n return;\n const el = getShadowHost(currentTarget);\n if (!(el instanceof ImageCropElement))\n return;\n const { box } = constructedElements.get(el) || {};\n if (!box)\n return;\n const target = event.target;\n if (!(target instanceof HTMLElement))\n return;\n if (target.hasAttribute('data-direction')) {\n const direction = target.getAttribute('data-direction') || '';\n el.addEventListener('mousemove', updateCropArea);\n el.addEventListener('touchmove', updateCropArea, { passive: true });\n if (['nw', 'se'].indexOf(direction) >= 0)\n el.classList.add('nwse');\n if (['ne', 'sw'].indexOf(direction) >= 0)\n el.classList.add('nesw');\n startPositions.set(el, {\n startX: box.offsetLeft + (['se', 'ne'].indexOf(direction) >= 0 ? 0 : box.offsetWidth),\n startY: box.offsetTop + (['se', 'sw'].indexOf(direction) >= 0 ? 0 : box.offsetHeight)\n });\n updateCropArea(event);\n }\n else {\n el.addEventListener('mousemove', moveCropArea);\n el.addEventListener('touchmove', moveCropArea, { passive: true });\n }\n}\nfunction updateDimensions(target, deltaX, deltaY, reposition = true) {\n let newSide = Math.max(Math.abs(deltaX), Math.abs(deltaY), 10);\n const pos = startPositions.get(target);\n if (!pos)\n return;\n const { box, image } = constructedElements.get(target) || {};\n if (!box || !image)\n return;\n newSide = Math.min(newSide, deltaY > 0 ? image.height - pos.startY : pos.startY, deltaX > 0 ? image.width - pos.startX : pos.startX);\n const x = reposition ? Math.round(Math.max(0, deltaX > 0 ? pos.startX : pos.startX - newSide)) : box.offsetLeft;\n const y = reposition ? Math.round(Math.max(0, deltaY > 0 ? pos.startY : pos.startY - newSide)) : box.offsetTop;\n box.style.left = `${x}px`;\n box.style.top = `${y}px`;\n box.style.width = `${newSide}px`;\n box.style.height = `${newSide}px`;\n fireChangeEvent(target, { x, y, width: newSide, height: newSide });\n}\nfunction setInitialPosition(el) {\n const { image } = constructedElements.get(el) || {};\n if (!image)\n return;\n const side = Math.round(image.clientWidth > image.clientHeight ? image.clientHeight : image.clientWidth);\n startPositions.set(el, {\n startX: (image.clientWidth - side) / 2,\n startY: (image.clientHeight - side) / 2\n });\n updateDimensions(el, side, side);\n}\nfunction stopUpdate(event) {\n const el = event.currentTarget;\n if (!(el instanceof ImageCropElement))\n return;\n dragStartPositions.delete(el);\n el.classList.remove('nwse', 'nesw');\n el.removeEventListener('mousemove', updateCropArea);\n el.removeEventListener('mousemove', moveCropArea);\n el.removeEventListener('touchmove', updateCropArea);\n el.removeEventListener('touchmove', moveCropArea);\n}\nfunction fireChangeEvent(target, result) {\n const { image } = constructedElements.get(target) || {};\n if (!image)\n return;\n const ratio = image.naturalWidth / image.width;\n for (const key in result) {\n const value = Math.round(result[key] * ratio);\n result[key] = value;\n const slottedInput = target.querySelector(`[data-image-crop-input='${key}']`);\n if (slottedInput instanceof HTMLInputElement)\n slottedInput.value = value.toString();\n }\n target.dispatchEvent(new CustomEvent('image-crop-change', { bubbles: true, detail: result }));\n}\nclass ImageCropElement extends HTMLElement {\n connectedCallback() {\n if (constructedElements.has(this))\n return;\n const shadowRoot = this.attachShadow({ mode: 'open' });\n shadowRoot.innerHTML = `\n\n\n
\n \"\"\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n`;\n const box = shadowRoot.querySelector('[data-crop-box]');\n if (!(box instanceof HTMLElement))\n return;\n const image = shadowRoot.querySelector('img');\n if (!(image instanceof HTMLImageElement))\n return;\n constructedElements.set(this, { box, image });\n image.addEventListener('load', () => {\n this.loaded = true;\n setInitialPosition(this);\n });\n this.addEventListener('mouseleave', stopUpdate);\n this.addEventListener('touchend', stopUpdate);\n this.addEventListener('mouseup', stopUpdate);\n box.addEventListener('mousedown', startUpdate);\n box.addEventListener('touchstart', startUpdate, { passive: true });\n this.addEventListener('keydown', moveCropArea);\n this.addEventListener('keydown', updateCropArea);\n if (this.src)\n image.src = this.src;\n }\n static get observedAttributes() {\n return ['src'];\n }\n get src() {\n return this.getAttribute('src');\n }\n set src(val) {\n if (val) {\n this.setAttribute('src', val);\n }\n else {\n this.removeAttribute('src');\n }\n }\n get loaded() {\n return this.hasAttribute('loaded');\n }\n set loaded(val) {\n if (val) {\n this.setAttribute('loaded', '');\n }\n else {\n this.removeAttribute('loaded');\n }\n }\n attributeChangedCallback(attribute, oldValue, newValue) {\n const { image } = constructedElements.get(this) || {};\n if (attribute === 'src') {\n this.loaded = false;\n if (image)\n image.src = newValue;\n }\n }\n}\nexport default ImageCropElement;\nif (!window.customElements.get('image-crop')) {\n window.ImageCropElement = ImageCropElement;\n window.customElements.define('image-crop', ImageCropElement);\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","const alternateOrders = {\n 'outside-top': ['outside-bottom', 'outside-right', 'outside-left', 'outside-bottom'],\n 'outside-bottom': ['outside-top', 'outside-right', 'outside-left', 'outside-bottom'],\n 'outside-left': ['outside-right', 'outside-bottom', 'outside-top', 'outside-bottom'],\n 'outside-right': ['outside-left', 'outside-bottom', 'outside-top', 'outside-bottom']\n};\nconst alternateAlignments = {\n start: ['end', 'center'],\n end: ['start', 'center'],\n center: ['end', 'start']\n};\nexport function getAnchoredPosition(floatingElement, anchorElement, settings = {}) {\n const parentElement = getPositionedParent(floatingElement);\n const clippingRect = getClippingRect(parentElement);\n const parentElementStyle = getComputedStyle(parentElement);\n const parentElementRect = parentElement.getBoundingClientRect();\n const [borderTop, borderLeft] = [parentElementStyle.borderTopWidth, parentElementStyle.borderLeftWidth].map(v => parseInt(v, 10) || 0);\n const relativeRect = {\n top: parentElementRect.top + borderTop,\n left: parentElementRect.left + borderLeft\n };\n return pureCalculateAnchoredPosition(clippingRect, relativeRect, floatingElement.getBoundingClientRect(), anchorElement instanceof Element ? anchorElement.getBoundingClientRect() : anchorElement, getDefaultSettings(settings));\n}\nfunction getPositionedParent(element) {\n let parentNode = element.parentNode;\n while (parentNode !== null) {\n if (parentNode instanceof HTMLElement && getComputedStyle(parentNode).position !== 'static') {\n return parentNode;\n }\n parentNode = parentNode.parentNode;\n }\n return document.body;\n}\nfunction getClippingRect(element) {\n let parentNode = element;\n while (parentNode !== null) {\n if (parentNode === document.body) {\n break;\n }\n const parentNodeStyle = getComputedStyle(parentNode);\n if (parentNodeStyle.overflow !== 'visible') {\n break;\n }\n parentNode = parentNode.parentNode;\n }\n const clippingNode = parentNode === document.body || !(parentNode instanceof HTMLElement) ? document.body : parentNode;\n const elemRect = clippingNode.getBoundingClientRect();\n const elemStyle = getComputedStyle(clippingNode);\n const [borderTop, borderLeft, borderRight, borderBottom] = [\n elemStyle.borderTopWidth,\n elemStyle.borderLeftWidth,\n elemStyle.borderRightWidth,\n elemStyle.borderBottomWidth\n ].map(v => parseInt(v, 10) || 0);\n return {\n top: elemRect.top + borderTop,\n left: elemRect.left + borderLeft,\n width: elemRect.width - borderRight - borderLeft,\n height: Math.max(elemRect.height - borderTop - borderBottom, clippingNode === document.body ? window.innerHeight : -Infinity)\n };\n}\nconst positionDefaults = {\n side: 'outside-bottom',\n align: 'start',\n anchorOffset: 4,\n alignmentOffset: 4,\n allowOutOfBounds: false\n};\nfunction getDefaultSettings(settings = {}) {\n var _a, _b, _c, _d, _e;\n const side = (_a = settings.side) !== null && _a !== void 0 ? _a : positionDefaults.side;\n const align = (_b = settings.align) !== null && _b !== void 0 ? _b : positionDefaults.align;\n return {\n side,\n align,\n anchorOffset: (_c = settings.anchorOffset) !== null && _c !== void 0 ? _c : (side === 'inside-center' ? 0 : positionDefaults.anchorOffset),\n alignmentOffset: (_d = settings.alignmentOffset) !== null && _d !== void 0 ? _d : (align !== 'center' && side.startsWith('inside') ? positionDefaults.alignmentOffset : 0),\n allowOutOfBounds: (_e = settings.allowOutOfBounds) !== null && _e !== void 0 ? _e : positionDefaults.allowOutOfBounds\n };\n}\nfunction pureCalculateAnchoredPosition(viewportRect, relativePosition, floatingRect, anchorRect, { side, align, allowOutOfBounds, anchorOffset, alignmentOffset }) {\n const relativeViewportRect = {\n top: viewportRect.top - relativePosition.top,\n left: viewportRect.left - relativePosition.left,\n width: viewportRect.width,\n height: viewportRect.height\n };\n let pos = calculatePosition(floatingRect, anchorRect, side, align, anchorOffset, alignmentOffset);\n let anchorSide = side;\n let anchorAlign = align;\n pos.top -= relativePosition.top;\n pos.left -= relativePosition.left;\n if (!allowOutOfBounds) {\n const alternateOrder = alternateOrders[side];\n let positionAttempt = 0;\n if (alternateOrder) {\n let prevSide = side;\n while (positionAttempt < alternateOrder.length &&\n shouldRecalculatePosition(prevSide, pos, relativeViewportRect, floatingRect)) {\n const nextSide = alternateOrder[positionAttempt++];\n prevSide = nextSide;\n pos = calculatePosition(floatingRect, anchorRect, nextSide, align, anchorOffset, alignmentOffset);\n pos.top -= relativePosition.top;\n pos.left -= relativePosition.left;\n anchorSide = nextSide;\n }\n }\n const alternateAlignment = alternateAlignments[align];\n let alignmentAttempt = 0;\n if (alternateAlignment) {\n let prevAlign = align;\n while (alignmentAttempt < alternateAlignment.length &&\n shouldRecalculateAlignment(prevAlign, pos, relativeViewportRect, floatingRect)) {\n const nextAlign = alternateAlignment[alignmentAttempt++];\n prevAlign = nextAlign;\n pos = calculatePosition(floatingRect, anchorRect, anchorSide, nextAlign, anchorOffset, alignmentOffset);\n pos.top -= relativePosition.top;\n pos.left -= relativePosition.left;\n anchorAlign = nextAlign;\n }\n }\n if (pos.top < relativeViewportRect.top) {\n pos.top = relativeViewportRect.top;\n }\n if (pos.left < relativeViewportRect.left) {\n pos.left = relativeViewportRect.left;\n }\n if (pos.left + floatingRect.width > viewportRect.width + relativeViewportRect.left) {\n pos.left = viewportRect.width + relativeViewportRect.left - floatingRect.width;\n }\n if (alternateOrder && positionAttempt < alternateOrder.length) {\n if (pos.top + floatingRect.height > viewportRect.height + relativeViewportRect.top) {\n pos.top = viewportRect.height + relativeViewportRect.top - floatingRect.height;\n }\n }\n }\n return Object.assign(Object.assign({}, pos), { anchorSide, anchorAlign });\n}\nfunction calculatePosition(elementDimensions, anchorPosition, side, align, anchorOffset, alignmentOffset) {\n const anchorRight = anchorPosition.left + anchorPosition.width;\n const anchorBottom = anchorPosition.top + anchorPosition.height;\n let top = -1;\n let left = -1;\n if (side === 'outside-top') {\n top = anchorPosition.top - anchorOffset - elementDimensions.height;\n }\n else if (side === 'outside-bottom') {\n top = anchorBottom + anchorOffset;\n }\n else if (side === 'outside-left') {\n left = anchorPosition.left - anchorOffset - elementDimensions.width;\n }\n else if (side === 'outside-right') {\n left = anchorRight + anchorOffset;\n }\n if (side === 'outside-top' || side === 'outside-bottom') {\n if (align === 'start') {\n left = anchorPosition.left + alignmentOffset;\n }\n else if (align === 'center') {\n left = anchorPosition.left - (elementDimensions.width - anchorPosition.width) / 2 + alignmentOffset;\n }\n else {\n left = anchorRight - elementDimensions.width - alignmentOffset;\n }\n }\n if (side === 'outside-left' || side === 'outside-right') {\n if (align === 'start') {\n top = anchorPosition.top + alignmentOffset;\n }\n else if (align === 'center') {\n top = anchorPosition.top - (elementDimensions.height - anchorPosition.height) / 2 + alignmentOffset;\n }\n else {\n top = anchorBottom - elementDimensions.height - alignmentOffset;\n }\n }\n if (side === 'inside-top') {\n top = anchorPosition.top + anchorOffset;\n }\n else if (side === 'inside-bottom') {\n top = anchorBottom - anchorOffset - elementDimensions.height;\n }\n else if (side === 'inside-left') {\n left = anchorPosition.left + anchorOffset;\n }\n else if (side === 'inside-right') {\n left = anchorRight - anchorOffset - elementDimensions.width;\n }\n else if (side === 'inside-center') {\n left = (anchorRight + anchorPosition.left) / 2 - elementDimensions.width / 2 + anchorOffset;\n }\n if (side === 'inside-top' || side === 'inside-bottom') {\n if (align === 'start') {\n left = anchorPosition.left + alignmentOffset;\n }\n else if (align === 'center') {\n left = anchorPosition.left - (elementDimensions.width - anchorPosition.width) / 2 + alignmentOffset;\n }\n else {\n left = anchorRight - elementDimensions.width - alignmentOffset;\n }\n }\n else if (side === 'inside-left' || side === 'inside-right' || side === 'inside-center') {\n if (align === 'start') {\n top = anchorPosition.top + alignmentOffset;\n }\n else if (align === 'center') {\n top = anchorPosition.top - (elementDimensions.height - anchorPosition.height) / 2 + alignmentOffset;\n }\n else {\n top = anchorBottom - elementDimensions.height - alignmentOffset;\n }\n }\n return { top, left };\n}\nfunction shouldRecalculatePosition(side, currentPos, containerDimensions, elementDimensions) {\n if (side === 'outside-top' || side === 'outside-bottom') {\n return (currentPos.top < containerDimensions.top ||\n currentPos.top + elementDimensions.height > containerDimensions.height + containerDimensions.top);\n }\n else {\n return (currentPos.left < containerDimensions.left ||\n currentPos.left + elementDimensions.width > containerDimensions.width + containerDimensions.left);\n }\n}\nfunction shouldRecalculateAlignment(align, currentPos, containerDimensions, elementDimensions) {\n if (align === 'end') {\n return currentPos.left < containerDimensions.left;\n }\n else if (align === 'start' || align === 'center') {\n return (currentPos.left + elementDimensions.width > containerDimensions.left + containerDimensions.width ||\n currentPos.left < containerDimensions.left);\n }\n}\n","export function* iterateFocusableElements(container, options = {}) {\n var _a, _b;\n const strict = (_a = options.strict) !== null && _a !== void 0 ? _a : false;\n const acceptFn = ((_b = options.onlyTabbable) !== null && _b !== void 0 ? _b : false) ? isTabbable : isFocusable;\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: node => node instanceof HTMLElement && acceptFn(node, strict) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP\n });\n let nextNode = null;\n if (!options.reverse && acceptFn(container, strict)) {\n yield container;\n }\n if (options.reverse) {\n let lastChild = walker.lastChild();\n while (lastChild) {\n nextNode = lastChild;\n lastChild = walker.lastChild();\n }\n }\n else {\n nextNode = walker.firstChild();\n }\n while (nextNode instanceof HTMLElement) {\n yield nextNode;\n nextNode = options.reverse ? walker.previousNode() : walker.nextNode();\n }\n if (options.reverse && acceptFn(container, strict)) {\n yield container;\n }\n return undefined;\n}\nexport function getFocusableChild(container, lastChild = false) {\n return iterateFocusableElements(container, { reverse: lastChild, strict: true, onlyTabbable: true }).next().value;\n}\nexport function isFocusable(elem, strict = false) {\n const disabledAttrInert = ['BUTTON', 'INPUT', 'SELECT', 'TEXTAREA', 'OPTGROUP', 'OPTION', 'FIELDSET'].includes(elem.tagName) &&\n elem.disabled;\n const hiddenInert = elem.hidden;\n const hiddenInputInert = elem instanceof HTMLInputElement && elem.type === 'hidden';\n const sentinelInert = elem.classList.contains('sentinel');\n if (disabledAttrInert || hiddenInert || hiddenInputInert || sentinelInert) {\n return false;\n }\n if (strict) {\n const sizeInert = elem.offsetWidth === 0 || elem.offsetHeight === 0;\n const visibilityInert = ['hidden', 'collapse'].includes(getComputedStyle(elem).visibility);\n const clientRectsInert = elem.getClientRects().length === 0;\n if (sizeInert || visibilityInert || clientRectsInert) {\n return false;\n }\n }\n if (elem.getAttribute('tabindex') != null) {\n return true;\n }\n if (elem instanceof HTMLAnchorElement && elem.getAttribute('href') == null) {\n return false;\n }\n return elem.tabIndex !== -1;\n}\nexport function isTabbable(elem, strict = false) {\n return isFocusable(elem, strict) && elem.getAttribute('tabindex') !== '-1';\n}\n","let signalSupported = false;\nfunction noop() { }\ntry {\n const options = Object.create({}, {\n signal: {\n get() {\n signalSupported = true;\n }\n }\n });\n window.addEventListener('test', noop, options);\n window.removeEventListener('test', noop, options);\n}\ncatch (e) {\n}\nfunction featureSupported() {\n return signalSupported;\n}\nfunction monkeyPatch() {\n if (typeof window === 'undefined') {\n return;\n }\n const originalAddEventListener = EventTarget.prototype.addEventListener;\n EventTarget.prototype.addEventListener = function (name, originalCallback, optionsOrCapture) {\n if (typeof optionsOrCapture === 'object' &&\n 'signal' in optionsOrCapture &&\n optionsOrCapture.signal instanceof AbortSignal) {\n originalAddEventListener.call(optionsOrCapture.signal, 'abort', () => {\n this.removeEventListener(name, originalCallback, optionsOrCapture);\n });\n }\n return originalAddEventListener.call(this, name, originalCallback, optionsOrCapture);\n };\n}\nexport function polyfill() {\n if (!featureSupported()) {\n monkeyPatch();\n signalSupported = true;\n }\n}\n","import { getFocusableChild, isTabbable } from './utils/iterate-focusable-elements.js';\nimport { polyfill as eventListenerSignalPolyfill } from './polyfills/event-listener-signal.js';\neventListenerSignalPolyfill();\nconst suspendedTrapStack = [];\nlet activeTrap = undefined;\nfunction tryReactivate() {\n const trapToReactivate = suspendedTrapStack.pop();\n if (trapToReactivate) {\n focusTrap(trapToReactivate.container, trapToReactivate.initialFocus, trapToReactivate.originalSignal);\n }\n}\nfunction followSignal(signal) {\n const controller = new AbortController();\n signal.addEventListener('abort', () => {\n controller.abort();\n });\n return controller;\n}\nexport function focusTrap(container, initialFocus, abortSignal) {\n const controller = new AbortController();\n const signal = abortSignal !== null && abortSignal !== void 0 ? abortSignal : controller.signal;\n container.setAttribute('data-focus-trap', 'active');\n const sentinelStart = document.createElement('span');\n sentinelStart.setAttribute('class', 'sentinel');\n sentinelStart.setAttribute('tabindex', '0');\n sentinelStart.setAttribute('aria-hidden', 'true');\n sentinelStart.onfocus = () => {\n const lastFocusableChild = getFocusableChild(container, true);\n lastFocusableChild === null || lastFocusableChild === void 0 ? void 0 : lastFocusableChild.focus();\n };\n const sentinelEnd = document.createElement('span');\n sentinelEnd.setAttribute('class', 'sentinel');\n sentinelEnd.setAttribute('tabindex', '0');\n sentinelEnd.setAttribute('aria-hidden', 'true');\n sentinelEnd.onfocus = () => {\n const firstFocusableChild = getFocusableChild(container);\n firstFocusableChild === null || firstFocusableChild === void 0 ? void 0 : firstFocusableChild.focus();\n };\n container.prepend(sentinelStart);\n container.append(sentinelEnd);\n let lastFocusedChild = undefined;\n function ensureTrapZoneHasFocus(focusedElement) {\n if (focusedElement instanceof HTMLElement && document.contains(container)) {\n if (container.contains(focusedElement)) {\n lastFocusedChild = focusedElement;\n return;\n }\n else {\n if (lastFocusedChild && isTabbable(lastFocusedChild) && container.contains(lastFocusedChild)) {\n lastFocusedChild.focus();\n return;\n }\n else if (initialFocus && container.contains(initialFocus)) {\n initialFocus.focus();\n return;\n }\n else {\n const firstFocusableChild = getFocusableChild(container);\n firstFocusableChild === null || firstFocusableChild === void 0 ? void 0 : firstFocusableChild.focus();\n return;\n }\n }\n }\n }\n const wrappingController = followSignal(signal);\n if (activeTrap) {\n const suspendedTrap = activeTrap;\n activeTrap.container.setAttribute('data-focus-trap', 'suspended');\n activeTrap.controller.abort();\n suspendedTrapStack.push(suspendedTrap);\n }\n wrappingController.signal.addEventListener('abort', () => {\n activeTrap = undefined;\n });\n signal.addEventListener('abort', () => {\n container.removeAttribute('data-focus-trap');\n const sentinels = container.getElementsByClassName('sentinel');\n while (sentinels.length > 0)\n sentinels[0].remove();\n const suspendedTrapIndex = suspendedTrapStack.findIndex(t => t.container === container);\n if (suspendedTrapIndex >= 0) {\n suspendedTrapStack.splice(suspendedTrapIndex, 1);\n }\n tryReactivate();\n });\n document.addEventListener('focus', event => {\n ensureTrapZoneHasFocus(event.target);\n }, { signal: wrappingController.signal, capture: true });\n ensureTrapZoneHasFocus(document.activeElement);\n activeTrap = {\n container,\n controller: wrappingController,\n initialFocus,\n originalSignal: signal\n };\n const suspendedTrapIndex = suspendedTrapStack.findIndex(t => t.container === container);\n if (suspendedTrapIndex >= 0) {\n suspendedTrapStack.splice(suspendedTrapIndex, 1);\n }\n if (!abortSignal) {\n return controller;\n }\n}\n","import {focusTrap} from '@primer/behaviors'\nimport {getFocusableChild} from '@primer/behaviors/utils'\n\nfunction focusIfNeeded(elem: HTMLElement | undefined | null) {\n if (document.activeElement !== elem) {\n elem?.focus()\n }\n}\n\nconst overlayStack: ModalDialogElement[] = []\n\nfunction clickHandler(event: Event) {\n const target = event.target as HTMLElement\n const button = target?.closest('button')\n\n // If the user is clicking a valid dialog trigger\n let dialogId = button?.getAttribute('data-show-dialog-id')\n if (button && dialogId) {\n event.stopPropagation()\n const dialog = document.getElementById(dialogId)\n if (dialog instanceof ModalDialogElement) {\n dialog.openButton = button\n dialog.show()\n return\n }\n }\n\n // Find the top level dialog that is open.\n const topLevelDialog = overlayStack[overlayStack.length - 1]\n if (!topLevelDialog) return\n\n // Check if the click happened outside the boundary of the top level dialog\n const clickOutsideDialog = !target.closest(`#${topLevelDialog.getAttribute('id')}`)\n\n // Only close dialog if it's a click outside the dialog and the dialog has a\n // button?\n if (!button) {\n if (clickOutsideDialog) {\n overlayStack.pop()\n topLevelDialog.close()\n }\n return\n }\n\n dialogId = button.getAttribute('data-close-dialog-id')\n if (dialogId === topLevelDialog.id) {\n overlayStack.pop()\n topLevelDialog.close()\n }\n\n dialogId = button.getAttribute('data-submit-dialog-id')\n if (dialogId === topLevelDialog.id) {\n overlayStack.pop()\n topLevelDialog.close(true)\n }\n}\n\nexport class ModalDialogElement extends HTMLElement {\n //TODO: Do we remove the abortController from focusTrap?\n #focusAbortController = new AbortController()\n openButton: HTMLButtonElement | null\n\n get open() {\n return this.hasAttribute('open')\n }\n set open(value: boolean) {\n if (value) {\n if (this.open) return\n this.setAttribute('open', '')\n this.#overlayBackdrop?.classList.remove('Overlay--hidden')\n document.body.style.overflow = 'hidden'\n if (this.#focusAbortController.signal.aborted) {\n this.#focusAbortController = new AbortController()\n }\n focusTrap(this, undefined, this.#focusAbortController.signal)\n overlayStack.push(this)\n } else {\n if (!this.open) return\n this.removeAttribute('open')\n this.#overlayBackdrop?.classList.add('Overlay--hidden')\n document.body.style.overflow = 'initial'\n this.#focusAbortController.abort()\n // if #openButton is a child of a menu, we need to focus a suitable child of the menu\n // element since it is expected for the menu to close on click\n const menu = this.openButton?.closest('details') || this.openButton?.closest('action-menu')\n if (menu) {\n focusIfNeeded(getFocusableChild(menu))\n } else {\n focusIfNeeded(this.openButton)\n }\n this.openButton = null\n }\n }\n\n get #overlayBackdrop(): HTMLElement | null {\n if (this.parentElement?.hasAttribute('data-modal-dialog-overlay')) {\n return this.parentElement\n }\n\n return null\n }\n\n get showButtons(): NodeList {\n // Dialogs may also be opened from any arbitrary button with a matching show-dialog-id data attribute\n return document.querySelectorAll(`button[data-show-dialog-id='${this.id}']`)\n }\n\n connectedCallback(): void {\n if (!this.hasAttribute('role')) this.setAttribute('role', 'dialog')\n\n document.addEventListener('click', clickHandler)\n\n this.addEventListener('keydown', e => this.#keydown(e))\n }\n\n show() {\n this.open = true\n }\n\n close(closedNotCancelled = false) {\n if (this.open === false) return\n const eventType = closedNotCancelled ? 'close' : 'cancel'\n const dialogEvent = new Event(eventType)\n this.dispatchEvent(dialogEvent)\n this.open = false\n }\n\n #keydown(event: Event) {\n if (!(event instanceof KeyboardEvent)) return\n if (event.isComposing) return\n\n switch (event.key) {\n case 'Escape':\n if (this.open) {\n this.close()\n event.preventDefault()\n event.stopPropagation()\n }\n break\n }\n }\n}\n\ndeclare global {\n interface Window {\n ModalDialogElement: typeof ModalDialogElement\n }\n interface HTMLElementTagNameMap {\n 'modal-dialog': ModalDialogElement\n }\n}\n\nif (!window.customElements.get('modal-dialog')) {\n window.ModalDialogElement = ModalDialogElement\n window.customElements.define('modal-dialog', ModalDialogElement)\n}\n","const controllers = new WeakSet();\n/*\n * Bind `[data-action]` elements from the DOM to their actions.\n *\n */\nexport function bind(controller) {\n controllers.add(controller);\n if (controller.shadowRoot)\n bindShadow(controller.shadowRoot);\n bindElements(controller);\n listenForBind(controller.ownerDocument);\n}\nexport function bindShadow(root) {\n bindElements(root);\n listenForBind(root);\n}\nconst observers = new WeakMap();\n/**\n * Set up observer that will make sure any actions that are dynamically\n * injected into `el` will be bound to it's controller.\n *\n * This returns a Subscription object which you can call `unsubscribe()` on to\n * stop further live updates.\n */\nexport function listenForBind(el = document) {\n if (observers.has(el))\n return observers.get(el);\n let closed = false;\n const observer = new MutationObserver(mutations => {\n for (const mutation of mutations) {\n if (mutation.type === 'attributes' && mutation.target instanceof Element) {\n bindActions(mutation.target);\n }\n else if (mutation.type === 'childList' && mutation.addedNodes.length) {\n for (const node of mutation.addedNodes) {\n if (node instanceof Element) {\n bindElements(node);\n }\n }\n }\n }\n });\n observer.observe(el, { childList: true, subtree: true, attributeFilter: ['data-action'] });\n const subscription = {\n get closed() {\n return closed;\n },\n unsubscribe() {\n closed = true;\n observers.delete(el);\n observer.disconnect();\n }\n };\n observers.set(el, subscription);\n return subscription;\n}\nfunction bindElements(root) {\n for (const el of root.querySelectorAll('[data-action]')) {\n bindActions(el);\n }\n // Also bind the controller to itself\n if (root instanceof Element && root.hasAttribute('data-action')) {\n bindActions(root);\n }\n}\n// Bind a single function to all events to avoid anonymous closure performance penalty.\nfunction handleEvent(event) {\n const el = event.currentTarget;\n for (const binding of bindings(el)) {\n if (event.type === binding.type) {\n const controller = el.closest(binding.tag);\n if (controllers.has(controller) && typeof controller[binding.method] === 'function') {\n controller[binding.method](event);\n }\n const root = el.getRootNode();\n if (root instanceof ShadowRoot && controllers.has(root.host) && root.host.matches(binding.tag)) {\n const shadowController = root.host;\n if (typeof shadowController[binding.method] === 'function') {\n shadowController[binding.method](event);\n }\n }\n }\n }\n}\nfunction* bindings(el) {\n for (const action of (el.getAttribute('data-action') || '').trim().split(/\\s+/)) {\n const eventSep = action.lastIndexOf(':');\n const methodSep = Math.max(0, action.lastIndexOf('#')) || action.length;\n yield {\n type: action.slice(0, eventSep),\n tag: action.slice(eventSep + 1, methodSep),\n method: action.slice(methodSep + 1) || 'handleEvent'\n } || 'handleEvent';\n }\n}\nfunction bindActions(el) {\n for (const binding of bindings(el)) {\n el.addEventListener(binding.type, handleEvent);\n }\n}\n//# sourceMappingURL=bind.js.map","export const dasherize = (str) => String(typeof str === 'symbol' ? str.description : str)\n .replace(/([A-Z]($|[a-z]))/g, '-$1')\n .replace(/--/g, '-')\n .replace(/^-|-$/, '')\n .toLowerCase();\nexport const mustDasherize = (str, type = 'property') => {\n const dashed = dasherize(str);\n if (!dashed.includes('-')) {\n throw new DOMException(`${type}: ${String(str)} is not a valid ${type} name`, 'SyntaxError');\n }\n return dashed;\n};\n//# sourceMappingURL=dasherize.js.map","import { mustDasherize } from './dasherize.js';\nimport { meta } from './core.js';\nconst attrKey = 'attr';\n/**\n * Attr is a decorator which tags a property as one to be initialized via\n * `initializeAttrs`.\n *\n * The signature is typed such that the property must be one of a String,\n * Number or Boolean. This matches the behavior of `initializeAttrs`.\n */\nexport function attr(proto, key) {\n meta(proto, attrKey).add(key);\n}\n/**\n * initializeAttrs is called with a set of class property names (if omitted, it\n * will look for any properties tagged with the `@attr` decorator). With this\n * list it defines property descriptors for each property that map to `data-*`\n * attributes on the HTMLElement instance.\n *\n * It works around Native Class Property semantics - which are equivalent to\n * calling `Object.defineProperty` on the instance upon creation, but before\n * `constructor()` is called.\n *\n * If a class property is assigned to the class body, it will infer the type\n * (using `typeof`) and define an appropriate getter/setter combo that aligns\n * to that type. This means class properties assigned to Numbers can only ever\n * be Numbers, assigned to Booleans can only ever be Booleans, and assigned to\n * Strings can only ever be Strings.\n *\n * This is automatically called as part of `@controller`. If a class uses the\n * `@controller` decorator it should not call this manually.\n */\nconst initialized = new WeakSet();\nexport function initializeAttrs(instance, names) {\n if (initialized.has(instance))\n return;\n initialized.add(instance);\n const proto = Object.getPrototypeOf(instance);\n const prefix = proto?.constructor?.attrPrefix ?? 'data-';\n if (!names)\n names = meta(proto, attrKey);\n for (const key of names) {\n const value = instance[key];\n const name = mustDasherize(`${prefix}${key}`);\n let descriptor = {\n configurable: true,\n get() {\n return this.getAttribute(name) || '';\n },\n set(newValue) {\n this.setAttribute(name, newValue || '');\n }\n };\n if (typeof value === 'number') {\n descriptor = {\n configurable: true,\n get() {\n return Number(this.getAttribute(name) || 0);\n },\n set(newValue) {\n this.setAttribute(name, newValue);\n }\n };\n }\n else if (typeof value === 'boolean') {\n descriptor = {\n configurable: true,\n get() {\n return this.hasAttribute(name);\n },\n set(newValue) {\n this.toggleAttribute(name, newValue);\n }\n };\n }\n Object.defineProperty(instance, key, descriptor);\n if (key in instance && !instance.hasAttribute(name)) {\n descriptor.set.call(instance, value);\n }\n }\n}\nexport function defineObservedAttributes(classObject) {\n let observed = classObject.observedAttributes || [];\n const prefix = classObject.attrPrefix ?? 'data-';\n const attrToAttributeName = (name) => mustDasherize(`${prefix}${name}`);\n Object.defineProperty(classObject, 'observedAttributes', {\n configurable: true,\n get() {\n return [...meta(classObject.prototype, attrKey)].map(attrToAttributeName).concat(observed);\n },\n set(attributes) {\n observed = attributes;\n }\n });\n}\n//# sourceMappingURL=attr.js.map","import { register } from './register.js';\nimport { bind, bindShadow } from './bind.js';\nimport { autoShadowRoot } from './auto-shadow-root.js';\nimport { defineObservedAttributes, initializeAttrs } from './attr.js';\nconst symbol = Symbol.for('catalyst');\nexport class CatalystDelegate {\n constructor(classObject) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const delegate = this;\n const connectedCallback = classObject.prototype.connectedCallback;\n classObject.prototype.connectedCallback = function () {\n delegate.connectedCallback(this, connectedCallback);\n };\n const disconnectedCallback = classObject.prototype.disconnectedCallback;\n classObject.prototype.disconnectedCallback = function () {\n delegate.disconnectedCallback(this, disconnectedCallback);\n };\n const attributeChangedCallback = classObject.prototype.attributeChangedCallback;\n classObject.prototype.attributeChangedCallback = function (name, oldValue, newValue) {\n delegate.attributeChangedCallback(this, name, oldValue, newValue, attributeChangedCallback);\n };\n let observedAttributes = classObject.observedAttributes || [];\n Object.defineProperty(classObject, 'observedAttributes', {\n configurable: true,\n get() {\n return delegate.observedAttributes(this, observedAttributes);\n },\n set(attributes) {\n observedAttributes = attributes;\n }\n });\n defineObservedAttributes(classObject);\n register(classObject);\n }\n observedAttributes(instance, observedAttributes) {\n return observedAttributes;\n }\n connectedCallback(instance, connectedCallback) {\n instance.toggleAttribute('data-catalyst', true);\n customElements.upgrade(instance);\n autoShadowRoot(instance);\n initializeAttrs(instance);\n bind(instance);\n connectedCallback?.call(instance);\n if (instance.shadowRoot)\n bindShadow(instance.shadowRoot);\n }\n disconnectedCallback(element, disconnectedCallback) {\n disconnectedCallback?.call(element);\n }\n attributeChangedCallback(instance, name, oldValue, newValue, attributeChangedCallback) {\n initializeAttrs(instance);\n if (name !== 'data-catalyst' && attributeChangedCallback) {\n attributeChangedCallback.call(instance, name, oldValue, newValue);\n }\n }\n}\nexport function meta(proto, name) {\n if (!Object.prototype.hasOwnProperty.call(proto, symbol)) {\n const parent = proto[symbol];\n const map = (proto[symbol] = new Map());\n if (parent) {\n for (const [key, value] of parent) {\n map.set(key, new Set(value));\n }\n }\n }\n const map = proto[symbol];\n if (!map.has(name))\n map.set(name, new Set());\n return map.get(name);\n}\n//# sourceMappingURL=core.js.map","import { dasherize } from './dasherize.js';\n/**\n * Register the controller as a custom element.\n *\n * The classname is converted to a approriate tag name.\n *\n * Example: HelloController => hello-controller\n */\nexport function register(classObject) {\n const name = dasherize(classObject.name).replace(/-element$/, '');\n try {\n window.customElements.define(name, classObject);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n window[classObject.name] = customElements.get(name);\n }\n catch (e) {\n // The only reason for window.customElements.define to throw a `NotSupportedError`\n // is if the element has already been defined.\n if (!(e instanceof DOMException && e.name === 'NotSupportedError'))\n throw e;\n }\n return classObject;\n}\n//# sourceMappingURL=register.js.map","export function autoShadowRoot(element) {\n for (const template of element.querySelectorAll('template[data-shadowroot]')) {\n if (template.parentElement === element) {\n element\n .attachShadow({\n mode: template.getAttribute('data-shadowroot') === 'closed' ? 'closed' : 'open'\n })\n .append(template.content.cloneNode(true));\n }\n }\n}\n//# sourceMappingURL=auto-shadow-root.js.map","import { findTarget, findTargets } from './findtarget.js';\nimport { meta } from './core.js';\n/**\n * Target is a decorator which - when assigned to a property field on the\n * class - will override that class field, turning it into a Getter which\n * returns a call to `findTarget(this, key)` where `key` is the name of the\n * property field. In other words, `@target foo` becomes a getter for\n * `findTarget(this, 'foo')`.\n */\nexport function target(proto, key) {\n meta(proto, 'target').add(key);\n Object.defineProperty(proto, key, {\n configurable: true,\n get() {\n return findTarget(this, key);\n }\n });\n}\n/**\n * Targets is a decorator which - when assigned to a property field on the\n * class - will override that class field, turning it into a Getter which\n * returns a call to `findTargets(this, key)` where `key` is the name of the\n * property field. In other words, `@targets foo` becomes a getter for\n * `findTargets(this, 'foo')`.\n */\nexport function targets(proto, key) {\n meta(proto, 'targets').add(key);\n Object.defineProperty(proto, key, {\n configurable: true,\n get() {\n return findTargets(this, key);\n }\n });\n}\n//# sourceMappingURL=target.js.map","/**\n * findTarget will run `querySelectorAll` against the given controller, plus\n * its shadowRoot, returning any the first child that:\n *\n * - Matches the selector of `[data-target~=\"tag.name\"]` where tag is the\n * tagName of the given HTMLElement, and `name` is the given `name` argument.\n *\n * - Closest ascendant of the element, that matches the tagname of the\n * controller, is the specific instance of the controller itself - in other\n * words it is not nested in other controllers of the same type.\n *\n */\nexport function findTarget(controller, name) {\n const tag = controller.tagName.toLowerCase();\n if (controller.shadowRoot) {\n for (const el of controller.shadowRoot.querySelectorAll(`[data-target~=\"${tag}.${name}\"]`)) {\n if (!el.closest(tag))\n return el;\n }\n }\n for (const el of controller.querySelectorAll(`[data-target~=\"${tag}.${name}\"]`)) {\n if (el.closest(tag) === controller)\n return el;\n }\n}\nexport function findTargets(controller, name) {\n const tag = controller.tagName.toLowerCase();\n const targets = [];\n if (controller.shadowRoot) {\n for (const el of controller.shadowRoot.querySelectorAll(`[data-targets~=\"${tag}.${name}\"]`)) {\n if (!el.closest(tag))\n targets.push(el);\n }\n }\n for (const el of controller.querySelectorAll(`[data-targets~=\"${tag}.${name}\"]`)) {\n if (el.closest(tag) === controller)\n targets.push(el);\n }\n return targets;\n}\n//# sourceMappingURL=findtarget.js.map","import { CatalystDelegate } from './core.js';\n/**\n * Controller is a decorator to be used over a class that extends HTMLElement.\n * It will automatically `register()` the component in the customElement\n * registry, as well as ensuring `bind(this)` is called on `connectedCallback`,\n * wrapping the classes `connectedCallback` method if needed.\n */\nexport function controller(classObject) {\n new CatalystDelegate(classObject);\n}\n//# sourceMappingURL=controller.js.map","const dynamicElements = new Map();\nconst ready = new Promise(resolve => {\n if (document.readyState !== 'loading') {\n resolve();\n }\n else {\n document.addEventListener('readystatechange', () => resolve(), { once: true });\n }\n});\nconst firstInteraction = new Promise(resolve => {\n const controller = new AbortController();\n controller.signal.addEventListener('abort', () => resolve());\n const listenerOptions = { once: true, passive: true, signal: controller.signal };\n const handler = () => controller.abort();\n document.addEventListener('mousedown', handler, listenerOptions);\n // eslint-disable-next-line github/require-passive-events\n document.addEventListener('touchstart', handler, listenerOptions);\n document.addEventListener('keydown', handler, listenerOptions);\n document.addEventListener('pointerdown', handler, listenerOptions);\n});\nconst visible = (tagName) => new Promise(resolve => {\n const observer = new IntersectionObserver(entries => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n resolve();\n observer.disconnect();\n return;\n }\n }\n }, {\n // Currently the threshold is set to 256px from the bottom of the viewport\n // with a threshold of 0.1. This means the element will not load until about\n // 2 keyboard-down-arrow presses away from being visible in the viewport,\n // giving us some time to fetch it before the contents are made visible\n rootMargin: '0px 0px 256px 0px',\n threshold: 0.01\n });\n for (const el of document.querySelectorAll(tagName)) {\n observer.observe(el);\n }\n});\nconst strategies = {\n ready: () => ready,\n firstInteraction: () => firstInteraction,\n visible\n};\nconst timers = new WeakMap();\nfunction scan(node) {\n cancelAnimationFrame(timers.get(node) || 0);\n timers.set(node, requestAnimationFrame(() => {\n for (const tagName of dynamicElements.keys()) {\n const child = node.matches(tagName) ? node : node.querySelector(tagName);\n if (customElements.get(tagName) || child) {\n const strategyName = (child?.getAttribute('data-load-on') || 'ready');\n const strategy = strategyName in strategies ? strategies[strategyName] : strategies.ready;\n // eslint-disable-next-line github/no-then\n for (const cb of dynamicElements.get(tagName) || [])\n strategy(tagName).then(cb);\n dynamicElements.delete(tagName);\n timers.delete(node);\n }\n }\n }));\n}\nlet elementLoader;\nexport function lazyDefine(tagName, callback) {\n if (!dynamicElements.has(tagName))\n dynamicElements.set(tagName, new Set());\n dynamicElements.get(tagName).add(callback);\n scan(document.body);\n if (!elementLoader) {\n elementLoader = new MutationObserver(mutations => {\n if (!dynamicElements.size)\n return;\n for (const mutation of mutations) {\n for (const node of mutation.addedNodes) {\n if (node instanceof Element)\n scan(node);\n }\n }\n });\n elementLoader.observe(document, { subtree: true, childList: true });\n }\n}\n//# sourceMappingURL=lazy-define.js.map","/* eslint-disable custom-elements/expose-class-on-global */\nimport {controller, target, targets} from '@github/catalyst'\n\n@controller\nclass NavListElement extends HTMLElement {\n @target list: HTMLElement\n @target showMoreItem: HTMLElement\n @targets focusMarkers: HTMLElement[]\n\n connectedCallback(): void {\n this.setShowMoreItemState()\n }\n\n get showMoreDisabled(): boolean {\n return this.showMoreItem.hasAttribute('aria-disabled')\n }\n\n set showMoreDisabled(value: boolean) {\n if (value) {\n this.showMoreItem.setAttribute('aria-disabled', 'true')\n } else {\n this.showMoreItem.removeAttribute('aria-disabled')\n }\n this.showMoreItem.classList.toggle('disabled', value)\n }\n\n set currentPage(value: number) {\n this.showMoreItem.setAttribute('data-current-page', value.toString())\n }\n\n get currentPage(): number {\n return parseInt(this.showMoreItem.getAttribute('data-current-page') as string) || 1\n }\n\n get totalPages(): number {\n return parseInt(this.showMoreItem.getAttribute('data-total-pages') as string) || 1\n }\n\n get paginationSrc(): string {\n return this.showMoreItem.getAttribute('src') || ''\n }\n\n // expand collapsible item onClick\n expandItem(item: HTMLElement) {\n item.nextElementSibling?.removeAttribute('data-hidden')\n item.setAttribute('aria-expanded', 'true')\n }\n\n collapseItem(item: HTMLElement) {\n item.nextElementSibling?.setAttribute('data-hidden', '')\n item.setAttribute('aria-expanded', 'false')\n }\n\n itemIsExpanded(item: HTMLElement | null) {\n if (item?.tagName === 'A') {\n return true\n }\n return item?.getAttribute('aria-expanded') === 'true'\n }\n\n // expand/collapse item\n handleItemWithSubItemClick(e: Event) {\n const el = e.target\n if (!(el instanceof HTMLElement)) return\n\n const button = el.closest('button')\n if (!button) return\n if (this.itemIsExpanded(button)) {\n this.collapseItem(button)\n } else {\n this.expandItem(button)\n }\n\n e.stopPropagation()\n }\n\n private async showMore(e: Event) {\n e.preventDefault()\n if (this.showMoreDisabled) return\n this.showMoreDisabled = true\n let html\n try {\n const paginationURL = new URL(this.paginationSrc, window.location.origin)\n this.currentPage++\n paginationURL.searchParams.append('page', this.currentPage.toString())\n const response = await fetch(paginationURL)\n if (!response.ok) return\n html = await response.text()\n if (this.currentPage === this.totalPages) {\n this.showMoreItem.hidden = true\n }\n } catch (err) {\n // Ignore network errors\n this.showMoreDisabled = false\n this.currentPage--\n return\n }\n const fragment = this.parseHTML(document, html)\n fragment?.querySelector('li > a')?.setAttribute('data-targets', 'nav-list.focusMarkers')\n this.list.insertBefore(fragment, this.showMoreItem)\n this.focusMarkers.pop()?.focus()\n this.showMoreDisabled = false\n }\n\n private setShowMoreItemState() {\n if (!this.showMoreItem) {\n return\n }\n\n if (this.currentPage < this.totalPages) {\n this.showMoreItem.hidden = false\n } else {\n this.showMoreItem.hidden = true\n }\n }\n\n private parseHTML(document: Document, html: string): DocumentFragment {\n const template = document.createElement('template')\n // eslint-disable-next-line github/no-inner-html\n template.innerHTML = html\n return document.importNode(template.content, true)\n }\n}\n\ndeclare global {\n interface Window {\n NavListElement: typeof NavListElement\n }\n}\n","import {controller, targets} from '@github/catalyst'\n\n@controller\nclass SegmentedControlElement extends HTMLElement {\n @targets items: HTMLElement[]\n\n connectedCallback() {\n this.#updateButtonLabels()\n }\n\n select(event: Event) {\n const button = event.currentTarget as HTMLButtonElement\n for (const item of this.items) {\n item.classList.remove('SegmentedControl-item--selected')\n item.querySelector('[aria-current]')?.setAttribute('aria-current', 'false')\n }\n\n button.closest('li.SegmentedControl-item')?.classList.add('SegmentedControl-item--selected')\n button.setAttribute('aria-current', 'true')\n }\n\n // Updates the button labels to have a data-content attribute with the text\n // This is for selection styling to avoid the text jumping. It only needs to be\n // setup when the component is first loaded.\n #updateButtonLabels() {\n for (const label of this.querySelectorAll('.Button-label')) {\n label.setAttribute('data-content', label.textContent || '')\n }\n }\n}\n\ndeclare global {\n interface Window {\n SegmentedControlElement: typeof SegmentedControlElement\n }\n}\n\nif (!window.customElements.get('segmented-control')) {\n window.SegmentedControlElement = SegmentedControlElement\n window.customElements.define('segmented-control', SegmentedControlElement)\n}\n","export function throttle(callback, wait = 0, { start = true, middle = true, once = false } = {}) {\n let last = 0;\n let timer;\n let cancelled = false;\n function fn(...args) {\n if (cancelled)\n return;\n const delta = Date.now() - last;\n last = Date.now();\n if (start) {\n start = false;\n callback.apply(this, args);\n if (once)\n fn.cancel();\n }\n else if ((middle && delta < wait) || !middle) {\n clearTimeout(timer);\n timer = setTimeout(() => {\n last = Date.now();\n callback.apply(this, args);\n if (once)\n fn.cancel();\n }, !middle ? wait : wait - delta);\n }\n }\n fn.cancel = () => {\n clearTimeout(timer);\n cancelled = true;\n };\n return fn;\n}\nexport function debounce(callback, wait = 0, { start = false, middle = false, once = false } = {}) {\n return throttle(callback, wait, { start, middle, once });\n}\n","import {controller, target} from '@github/catalyst'\nimport {debounce} from '@github/mini-throttle/decorators'\n\n@controller\nclass ToggleSwitchElement extends HTMLElement {\n @target switch: HTMLElement\n @target loadingSpinner: HTMLElement\n @target errorIcon: HTMLElement\n\n get src(): string | null {\n const src = this.getAttribute('src')\n if (!src) return null\n\n const link = this.ownerDocument.createElement('a')\n link.href = src\n return link.href\n }\n\n get csrf(): string | null {\n const csrfElement = this.querySelector('[data-csrf]')\n return this.getAttribute('csrf') || (csrfElement instanceof HTMLInputElement && csrfElement.value) || null\n }\n\n get csrfField(): string {\n // the authenticity token is passed into the element and is not generated in js land\n\n return this.getAttribute('csrf-field') || 'authenticity_token'\n }\n\n isRemote(): boolean {\n return this.src != null\n }\n\n toggle() {\n if (this.isDisabled()) {\n return\n }\n\n if (this.isRemote()) {\n this.setLoadingState()\n this.submitForm()\n } else {\n this.performToggle()\n }\n }\n\n turnOn(): void {\n if (this.isDisabled()) {\n return\n }\n\n this.switch.setAttribute('aria-checked', 'true')\n this.classList.add('ToggleSwitch--checked')\n }\n\n turnOff(): void {\n if (this.isDisabled()) {\n return\n }\n\n this.switch.setAttribute('aria-checked', 'false')\n this.classList.remove('ToggleSwitch--checked')\n }\n\n isOn(): boolean {\n return this.switch.getAttribute('aria-checked') === 'true'\n }\n\n isOff(): boolean {\n return !this.isOn()\n }\n\n isDisabled(): boolean {\n return this.switch.getAttribute('aria-disabled') === 'true'\n }\n\n disable(): void {\n this.switch.setAttribute('aria-disabled', 'true')\n }\n\n enable(): void {\n this.switch.setAttribute('aria-disabled', 'false')\n }\n\n private performToggle(): void {\n if (this.isOn()) {\n this.turnOff()\n } else {\n this.turnOn()\n }\n }\n\n private setLoadingState(): void {\n this.disable()\n this.errorIcon.setAttribute('hidden', 'hidden')\n this.loadingSpinner.removeAttribute('hidden')\n }\n\n private setSuccessState(): void {\n this.setFinishedState(false)\n }\n\n private setErrorState(): void {\n this.setFinishedState(true)\n }\n\n private setFinishedState(error: boolean): void {\n if (error) {\n this.errorIcon.removeAttribute('hidden')\n }\n\n this.loadingSpinner.setAttribute('hidden', 'hidden')\n this.enable()\n }\n\n @debounce(300)\n private async submitForm() {\n const body = new FormData()\n\n if (this.csrf) {\n body.append(this.csrfField, this.csrf)\n }\n\n body.append('value', this.isOn() ? '0' : '1')\n\n try {\n if (!this.src) throw new Error('invalid src')\n const response = await fetch(this.src, {\n credentials: 'same-origin',\n method: 'POST',\n headers: {\n 'Requested-With': 'XMLHttpRequest'\n },\n body\n })\n if (response.ok) {\n this.setSuccessState()\n this.performToggle()\n } else {\n this.setErrorState()\n }\n } catch (error) {\n this.setErrorState()\n }\n }\n}\n\ndeclare global {\n interface Window {\n ToggleSwitchElement: typeof ToggleSwitchElement\n }\n}\n\nif (!window.customElements.get('toggle-switch')) {\n window.ToggleSwitchElement = ToggleSwitchElement\n window.customElements.define('toggle-switch', ToggleSwitchElement)\n}\n","import { debounce as db, throttle as th } from './index';\nexport function throttle(wait = 0, opts = {}) {\n return (proto, name, descriptor) => {\n if (!descriptor || typeof descriptor.value !== 'function') {\n throw new Error('debounce can only decorate functions');\n }\n const fn = descriptor.value;\n descriptor.value = th(fn, wait, opts);\n Object.defineProperty(proto, name, descriptor);\n };\n}\nexport function debounce(wait = 0, opts = {}) {\n return (proto, name, descriptor) => {\n if (!descriptor || typeof descriptor.value !== 'function') {\n throw new Error('debounce can only decorate functions');\n }\n const fn = descriptor.value;\n descriptor.value = db(fn, wait, opts);\n Object.defineProperty(proto, name, descriptor);\n };\n}\n","import type {AnchorAlignment, AnchorSide} from '@primer/behaviors'\nimport {getAnchoredPosition} from '@primer/behaviors'\n\nconst TOOLTIP_OPEN_CLASS = 'tooltip-open'\nconst TOOLTIP_ARROW_EDGE_OFFSET = 6\nconst TOOLTIP_SR_ONLY_CLASS = 'sr-only'\n\ntype Direction = 'n' | 's' | 'e' | 'w' | 'ne' | 'se' | 'nw' | 'sw'\n\nconst DIRECTION_CLASSES = [\n 'tooltip-n',\n 'tooltip-s',\n 'tooltip-e',\n 'tooltip-w',\n 'tooltip-ne',\n 'tooltip-se',\n 'tooltip-nw',\n 'tooltip-sw'\n]\n\nclass ToolTipElement extends HTMLElement {\n styles() {\n return `\n :host {\n position: absolute;\n z-index: 1000000;\n padding: .5em .75em;\n font: normal normal 11px/1.5 -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\";\n -webkit-font-smoothing: subpixel-antialiased;\n color: var(--color-fg-on-emphasis);\n text-align: center;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-wrap: break-word;\n white-space: pre;\n background: var(--color-neutral-emphasis-plus);\n border-radius: 6px;\n opacity: 0;\n max-width: 250px;\n word-wrap: break-word;\n white-space: normal;\n width: max-content;\n }\n\n :host:before{\n position: absolute;\n z-index: 1000001;\n color: var(--color-neutral-emphasis-plus);\n content: \"\";\n border: 6px solid transparent;\n opacity: 0\n }\n\n @keyframes tooltip-appear {\n from {\n opacity: 0\n }\n to {\n opacity: 1\n }\n }\n\n :host:after{\n position: absolute;\n display: block;\n right: 0;\n left: 0;\n height: 12px;\n content: \"\"\n }\n\n :host(.${TOOLTIP_OPEN_CLASS}),\n :host(.${TOOLTIP_OPEN_CLASS}):before {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n animation-delay: .4s\n }\n\n :host(.tooltip-s):before,\n :host(.tooltip-n):before {\n right: 50%;\n margin-right: -${TOOLTIP_ARROW_EDGE_OFFSET}px;\n }\n\n :host(.tooltip-s):before,\n :host(.tooltip-se):before,\n :host(.tooltip-sw):before {\n bottom: 100%;\n border-bottom-color: var(--color-neutral-emphasis-plus)\n }\n\n :host(.tooltip-s):after,\n :host(.tooltip-se):after,\n :host(.tooltip-sw):after {\n bottom: 100%\n }\n\n :host(.tooltip-n):before,\n :host(.tooltip-ne):before,\n :host(.tooltip-nw):before {\n top: 100%;\n border-top-color: var(--color-neutral-emphasis-plus)\n }\n\n :host(.tooltip-n):after,\n :host(.tooltip-ne):after,\n :host(.tooltip-nw):after {\n top: 100%\n }\n\n :host(.tooltip-se):before,\n :host(.tooltip-ne):before {\n left: 0;\n margin-left: ${TOOLTIP_ARROW_EDGE_OFFSET}px;\n }\n\n :host(.tooltip-sw):before,\n :host(.tooltip-nw):before {\n right: 0;\n margin-right: ${TOOLTIP_ARROW_EDGE_OFFSET}px;\n }\n\n :host(.tooltip-w):before {\n top: 50%;\n bottom: 50%;\n left: 100%;\n margin-top: -6px;\n border-left-color: var(--color-neutral-emphasis-plus)\n }\n\n :host(.tooltip-e):before {\n top: 50%;\n right: 100%;\n bottom: 50%;\n margin-top: -6px;\n border-right-color: var(--color-neutral-emphasis-plus)\n }\n `\n }\n\n #abortController: AbortController | undefined\n #align: AnchorAlignment = 'center'\n #side: AnchorSide = 'outside-bottom'\n #allowUpdatePosition = false\n\n get htmlFor(): string {\n return this.getAttribute('for') || ''\n }\n\n set htmlFor(value: string) {\n this.setAttribute('for', value)\n }\n\n get type(): 'description' | 'label' {\n const type = this.getAttribute('data-type')\n return type === 'label' ? 'label' : 'description'\n }\n\n set type(value: 'description' | 'label') {\n this.setAttribute('data-type', value)\n }\n\n get direction(): Direction {\n return (this.getAttribute('data-direction') || 's') as Direction\n }\n\n set direction(value: Direction) {\n this.setAttribute('data-direction', value)\n }\n\n get control(): HTMLElement | null {\n return this.ownerDocument.getElementById(this.htmlFor)\n }\n\n set hiddenFromView(value: true | false) {\n this.classList.toggle(TOOLTIP_SR_ONLY_CLASS, value)\n if (this.isConnected) this.#update()\n }\n\n get hiddenFromView() {\n return this.classList.contains(TOOLTIP_SR_ONLY_CLASS)\n }\n\n connectedCallback() {\n this.#updateControlReference()\n this.#updateDirection()\n if (!this.shadowRoot) {\n const shadow = this.attachShadow({mode: 'open'})\n // eslint-disable-next-line github/no-inner-html\n shadow.innerHTML = `\n \n \n `\n }\n this.hiddenFromView = true\n this.#allowUpdatePosition = true\n\n if (!this.id) {\n this.id = `tooltip-${Date.now()}-${(Math.random() * 10000).toFixed(0)}`\n }\n\n if (!this.control) return\n\n this.setAttribute('role', 'tooltip')\n\n this.#abortController?.abort()\n this.#abortController = new AbortController()\n const {signal} = this.#abortController\n\n this.addEventListener('mouseleave', this, {signal})\n this.control.addEventListener('mouseenter', this, {signal})\n this.control.addEventListener('mouseleave', this, {signal})\n this.control.addEventListener('focus', this, {signal})\n this.control.addEventListener('blur', this, {signal})\n this.ownerDocument.addEventListener('keydown', this, {signal})\n this.#update()\n }\n\n disconnectedCallback() {\n this.#abortController?.abort()\n }\n\n handleEvent(event: Event) {\n if (!this.control) return\n\n // Ensures that tooltip stays open when hovering between tooltip and element\n // WCAG Success Criterion 1.4.13 Hoverable\n if ((event.type === 'mouseenter' || event.type === 'focus') && this.hiddenFromView) {\n this.hiddenFromView = false\n } else if (event.type === 'blur') {\n this.hiddenFromView = true\n } else if (\n event.type === 'mouseleave' &&\n (event as MouseEvent).relatedTarget !== this.control &&\n (event as MouseEvent).relatedTarget !== this\n ) {\n this.hiddenFromView = true\n } else if (event.type === 'keydown' && (event as KeyboardEvent).key === 'Escape' && !this.hiddenFromView) {\n this.hiddenFromView = true\n }\n }\n\n static observedAttributes = ['data-type', 'data-direction', 'id']\n\n #update() {\n if (this.hiddenFromView) {\n this.classList.remove(TOOLTIP_OPEN_CLASS, ...DIRECTION_CLASSES)\n } else {\n this.classList.add(TOOLTIP_OPEN_CLASS)\n for (const tooltip of this.ownerDocument.querySelectorAll(this.tagName)) {\n if (tooltip !== this) tooltip.hiddenFromView = true\n }\n this.#updatePosition()\n }\n }\n\n attributeChangedCallback(name: string) {\n if (!this.isConnected) return\n\n if (name === 'id' || name === 'data-type') {\n this.#updateControlReference()\n } else if (name === 'data-direction') {\n this.#updateDirection()\n }\n }\n\n #updateControlReference() {\n if (!this.id || !this.control) return\n if (this.type === 'label') {\n let labelledBy = this.control.getAttribute('aria-labelledby')\n if (labelledBy) {\n if (!labelledBy.split(' ').includes(this.id)) {\n labelledBy = `${labelledBy} ${this.id}`\n } else {\n labelledBy = `${labelledBy}`\n }\n } else {\n labelledBy = this.id\n }\n this.control.setAttribute('aria-labelledby', labelledBy)\n\n // Prevent duplicate accessible name announcements.\n this.setAttribute('aria-hidden', 'true')\n } else {\n let describedBy = this.control.getAttribute('aria-describedby')\n if (describedBy) {\n if (!describedBy.split(' ').includes(this.id)) {\n describedBy = `${describedBy} ${this.id}`\n } else {\n describedBy = `${describedBy}`\n }\n } else {\n describedBy = this.id\n }\n this.control.setAttribute('aria-describedby', describedBy)\n }\n }\n\n #updateDirection() {\n this.classList.remove(...DIRECTION_CLASSES)\n const direction = this.direction\n if (direction === 'n') {\n this.#align = 'center'\n this.#side = 'outside-top'\n } else if (direction === 'ne') {\n this.#align = 'start'\n this.#side = 'outside-top'\n } else if (direction === 'e') {\n this.#align = 'center'\n this.#side = 'outside-right'\n } else if (direction === 'se') {\n this.#align = 'start'\n this.#side = 'outside-bottom'\n } else if (direction === 's') {\n this.#align = 'center'\n this.#side = 'outside-bottom'\n } else if (direction === 'sw') {\n this.#align = 'end'\n this.#side = 'outside-bottom'\n } else if (direction === 'w') {\n this.#align = 'center'\n this.#side = 'outside-left'\n } else if (direction === 'nw') {\n this.#align = 'end'\n this.#side = 'outside-top'\n }\n }\n\n #updatePosition() {\n if (!this.control) return\n if (!this.#allowUpdatePosition || this.hiddenFromView) return\n\n const TOOLTIP_OFFSET = 10\n\n this.style.left = `0px` // Ensures we have reliable tooltip width in `getAnchoredPosition`\n\n const position = getAnchoredPosition(this, this.control, {\n side: this.#side,\n align: this.#align,\n anchorOffset: TOOLTIP_OFFSET\n })\n const anchorSide = position.anchorSide\n const align = position.anchorAlign\n\n this.style.top = `${position.top}px`\n this.style.left = `${position.left}px`\n\n let direction: Direction = 's'\n\n if (anchorSide === 'outside-left') {\n direction = 'w'\n } else if (anchorSide === 'outside-right') {\n direction = 'e'\n } else if (anchorSide === 'outside-top') {\n if (align === 'center') {\n direction = 'n'\n } else if (align === 'start') {\n direction = 'ne'\n } else {\n direction = 'nw'\n }\n } else {\n if (align === 'center') {\n direction = 's'\n } else if (align === 'start') {\n direction = 'se'\n } else {\n direction = 'sw'\n }\n }\n\n this.classList.add(`tooltip-${direction}`)\n }\n}\n\nif (!window.customElements.get('tool-tip')) {\n window.ToolTipElement = ToolTipElement\n window.customElements.define('tool-tip', ToolTipElement)\n}\n\ndeclare global {\n interface Window {\n ToolTipElement: typeof ToolTipElement\n }\n}\n","import {controller, target} from '@github/catalyst'\n\n@controller\nclass XBannerElement extends HTMLElement {\n @target titleText: HTMLElement\n\n dismiss() {\n if (this.shouldReappear()) {\n this.style.setProperty('visibility', 'hidden')\n\n setTimeout(() => {\n this.style.setProperty('visibility', 'visible')\n }, 2000)\n\n return\n }\n\n const parentElement = this.parentElement\n if (!parentElement) return\n\n parentElement.removeChild(this)\n }\n\n private shouldReappear(): boolean {\n return this.getAttribute('data-reappear') === 'true'\n }\n}\n\ndeclare global {\n interface Window {\n XBannerElement: typeof XBannerElement\n }\n}\n\nif (!window.customElements.get('x-banner')) {\n window.XBannerElement = XBannerElement\n window.customElements.define('x-banner', XBannerElement)\n}\n","const ctrlBindings = !!navigator.userAgent.match(/Macintosh/);\nexport default class Combobox {\n constructor(input, list) {\n this.input = input;\n this.list = list;\n this.isComposing = false;\n if (!list.id) {\n list.id = `combobox-${Math.random()\n .toString()\n .slice(2, 6)}`;\n }\n this.keyboardEventHandler = event => keyboardBindings(event, this);\n this.compositionEventHandler = event => trackComposition(event, this);\n this.inputHandler = this.clearSelection.bind(this);\n input.setAttribute('role', 'combobox');\n input.setAttribute('aria-controls', list.id);\n input.setAttribute('aria-expanded', 'false');\n input.setAttribute('aria-autocomplete', 'list');\n input.setAttribute('aria-haspopup', 'listbox');\n }\n destroy() {\n this.clearSelection();\n this.stop();\n this.input.removeAttribute('role');\n this.input.removeAttribute('aria-controls');\n this.input.removeAttribute('aria-expanded');\n this.input.removeAttribute('aria-autocomplete');\n this.input.removeAttribute('aria-haspopup');\n }\n start() {\n this.input.setAttribute('aria-expanded', 'true');\n this.input.addEventListener('compositionstart', this.compositionEventHandler);\n this.input.addEventListener('compositionend', this.compositionEventHandler);\n this.input.addEventListener('input', this.inputHandler);\n this.input.addEventListener('keydown', this.keyboardEventHandler);\n this.list.addEventListener('click', commitWithElement);\n }\n stop() {\n this.clearSelection();\n this.input.setAttribute('aria-expanded', 'false');\n this.input.removeEventListener('compositionstart', this.compositionEventHandler);\n this.input.removeEventListener('compositionend', this.compositionEventHandler);\n this.input.removeEventListener('input', this.inputHandler);\n this.input.removeEventListener('keydown', this.keyboardEventHandler);\n this.list.removeEventListener('click', commitWithElement);\n }\n navigate(indexDiff = 1) {\n const focusEl = Array.from(this.list.querySelectorAll('[aria-selected=\"true\"]')).filter(visible)[0];\n const els = Array.from(this.list.querySelectorAll('[role=\"option\"]')).filter(visible);\n const focusIndex = els.indexOf(focusEl);\n if ((focusIndex === els.length - 1 && indexDiff === 1) || (focusIndex === 0 && indexDiff === -1)) {\n this.clearSelection();\n this.input.focus();\n return;\n }\n let indexOfItem = indexDiff === 1 ? 0 : els.length - 1;\n if (focusEl && focusIndex >= 0) {\n const newIndex = focusIndex + indexDiff;\n if (newIndex >= 0 && newIndex < els.length)\n indexOfItem = newIndex;\n }\n const target = els[indexOfItem];\n if (!target)\n return;\n for (const el of els) {\n if (target === el) {\n this.input.setAttribute('aria-activedescendant', target.id);\n target.setAttribute('aria-selected', 'true');\n scrollTo(this.list, target);\n }\n else {\n el.setAttribute('aria-selected', 'false');\n }\n }\n }\n clearSelection() {\n this.input.removeAttribute('aria-activedescendant');\n for (const el of this.list.querySelectorAll('[aria-selected=\"true\"]')) {\n el.setAttribute('aria-selected', 'false');\n }\n }\n}\nfunction keyboardBindings(event, combobox) {\n if (event.shiftKey || event.metaKey || event.altKey)\n return;\n if (!ctrlBindings && event.ctrlKey)\n return;\n if (combobox.isComposing)\n return;\n switch (event.key) {\n case 'Enter':\n case 'Tab':\n if (commit(combobox.input, combobox.list)) {\n event.preventDefault();\n }\n break;\n case 'Escape':\n combobox.clearSelection();\n break;\n case 'ArrowDown':\n combobox.navigate(1);\n event.preventDefault();\n break;\n case 'ArrowUp':\n combobox.navigate(-1);\n event.preventDefault();\n break;\n case 'n':\n if (ctrlBindings && event.ctrlKey) {\n combobox.navigate(1);\n event.preventDefault();\n }\n break;\n case 'p':\n if (ctrlBindings && event.ctrlKey) {\n combobox.navigate(-1);\n event.preventDefault();\n }\n break;\n default:\n if (event.ctrlKey)\n break;\n combobox.clearSelection();\n }\n}\nfunction commitWithElement(event) {\n if (!(event.target instanceof Element))\n return;\n const target = event.target.closest('[role=\"option\"]');\n if (!target)\n return;\n if (target.getAttribute('aria-disabled') === 'true')\n return;\n fireCommitEvent(target);\n}\nfunction commit(input, list) {\n const target = list.querySelector('[aria-selected=\"true\"]');\n if (!target)\n return false;\n if (target.getAttribute('aria-disabled') === 'true')\n return true;\n target.click();\n return true;\n}\nfunction fireCommitEvent(target) {\n target.dispatchEvent(new CustomEvent('combobox-commit', { bubbles: true }));\n}\nfunction visible(el) {\n return (!el.hidden &&\n !(el instanceof HTMLInputElement && el.type === 'hidden') &&\n (el.offsetWidth > 0 || el.offsetHeight > 0));\n}\nfunction trackComposition(event, combobox) {\n combobox.isComposing = event.type === 'compositionstart';\n const list = document.getElementById(combobox.input.getAttribute('aria-controls') || '');\n if (!list)\n return;\n combobox.clearSelection();\n}\nfunction scrollTo(container, target) {\n if (!inViewport(container, target)) {\n container.scrollTop = target.offsetTop;\n }\n}\nfunction inViewport(container, element) {\n const scrollTop = container.scrollTop;\n const containerBottom = scrollTop + container.clientHeight;\n const top = element.offsetTop;\n const bottom = top + element.clientHeight;\n return top >= scrollTop && bottom <= containerBottom;\n}\n","import Combobox from '@github/combobox-nav';\n\nfunction debounce(callback, wait = 0) {\n let timeout;\n return function (...Rest) {\n clearTimeout(timeout);\n timeout = window.setTimeout(() => {\n clearTimeout(timeout);\n callback(...Rest);\n }, wait);\n };\n}\n\nconst SCREEN_READER_DELAY = window.testScreenReaderDelay || 100;\nclass Autocomplete {\n constructor(container, input, results, autoselectEnabled = false) {\n var _a;\n this.container = container;\n this.input = input;\n this.results = results;\n this.combobox = new Combobox(input, results);\n this.feedback = document.getElementById(`${this.results.id}-feedback`);\n this.autoselectEnabled = autoselectEnabled;\n this.clearButton = document.getElementById(`${this.input.id || this.input.name}-clear`);\n this.clientOptions = results.querySelectorAll('[role=option]');\n if (this.feedback) {\n this.feedback.setAttribute('aria-live', 'polite');\n this.feedback.setAttribute('aria-atomic', 'true');\n }\n if (this.clearButton && !this.clearButton.getAttribute('aria-label')) {\n const labelElem = document.querySelector(`label[for=\"${this.input.name}\"]`);\n this.clearButton.setAttribute('aria-label', `clear:`);\n this.clearButton.setAttribute('aria-labelledby', `${this.clearButton.id} ${(labelElem === null || labelElem === void 0 ? void 0 : labelElem.id) || ''}`);\n }\n if (!this.input.getAttribute('aria-expanded')) {\n this.input.setAttribute('aria-expanded', 'false');\n }\n this.results.hidden = true;\n this.results.setAttribute('aria-label', 'results');\n this.input.setAttribute('autocomplete', 'off');\n this.input.setAttribute('spellcheck', 'false');\n this.interactingWithList = false;\n this.onInputChange = debounce(this.onInputChange.bind(this), 300);\n this.onResultsMouseDown = this.onResultsMouseDown.bind(this);\n this.onInputBlur = this.onInputBlur.bind(this);\n this.onInputFocus = this.onInputFocus.bind(this);\n this.onKeydown = this.onKeydown.bind(this);\n this.onCommit = this.onCommit.bind(this);\n this.handleClear = this.handleClear.bind(this);\n this.input.addEventListener('keydown', this.onKeydown);\n this.input.addEventListener('focus', this.onInputFocus);\n this.input.addEventListener('blur', this.onInputBlur);\n this.input.addEventListener('input', this.onInputChange);\n this.results.addEventListener('mousedown', this.onResultsMouseDown);\n this.results.addEventListener('combobox-commit', this.onCommit);\n (_a = this.clearButton) === null || _a === void 0 ? void 0 : _a.addEventListener('click', this.handleClear);\n }\n destroy() {\n this.input.removeEventListener('keydown', this.onKeydown);\n this.input.removeEventListener('focus', this.onInputFocus);\n this.input.removeEventListener('blur', this.onInputBlur);\n this.input.removeEventListener('input', this.onInputChange);\n this.results.removeEventListener('mousedown', this.onResultsMouseDown);\n this.results.removeEventListener('combobox-commit', this.onCommit);\n }\n handleClear(event) {\n event.preventDefault();\n if (this.input.getAttribute('aria-expanded') === 'true') {\n this.input.setAttribute('aria-expanded', 'false');\n this.updateFeedbackForScreenReaders('Results hidden.');\n }\n this.input.value = '';\n this.container.value = '';\n this.input.focus();\n this.input.dispatchEvent(new Event('change'));\n this.container.open = false;\n }\n onKeydown(event) {\n if (event.key === 'Enter' && this.container.open && this.autoselectEnabled) {\n const firstOption = this.results.children[0];\n if (firstOption) {\n event.stopPropagation();\n event.preventDefault();\n this.onCommit({ target: firstOption });\n }\n }\n if (event.key === 'Escape' && this.container.open) {\n this.container.open = false;\n event.stopPropagation();\n event.preventDefault();\n }\n else if (event.altKey && event.key === 'ArrowUp' && this.container.open) {\n this.container.open = false;\n event.stopPropagation();\n event.preventDefault();\n }\n else if (event.altKey && event.key === 'ArrowDown' && !this.container.open) {\n if (!this.input.value.trim())\n return;\n this.container.open = true;\n event.stopPropagation();\n event.preventDefault();\n }\n }\n onInputFocus() {\n this.fetchResults();\n }\n onInputBlur() {\n if (this.interactingWithList) {\n this.interactingWithList = false;\n return;\n }\n this.container.open = false;\n }\n onCommit({ target }) {\n const selected = target;\n if (!(selected instanceof HTMLElement))\n return;\n this.container.open = false;\n if (selected instanceof HTMLAnchorElement)\n return;\n const value = selected.getAttribute('data-autocomplete-value') || selected.textContent;\n this.updateFeedbackForScreenReaders(`${selected.textContent || ''} selected.`);\n this.container.value = value;\n if (!value) {\n this.updateFeedbackForScreenReaders(`Results hidden.`);\n }\n }\n onResultsMouseDown() {\n this.interactingWithList = true;\n }\n onInputChange() {\n if (this.feedback && this.feedback.textContent) {\n this.feedback.textContent = '';\n }\n this.container.removeAttribute('value');\n this.fetchResults();\n }\n identifyOptions() {\n let id = 0;\n for (const el of this.results.querySelectorAll('[role=\"option\"]:not([id])')) {\n el.id = `${this.results.id}-option-${id++}`;\n }\n }\n updateFeedbackForScreenReaders(inputString) {\n setTimeout(() => {\n if (this.feedback) {\n this.feedback.textContent = inputString;\n }\n }, SCREEN_READER_DELAY);\n }\n fetchResults() {\n const query = this.input.value.trim();\n if (!query) {\n this.container.open = false;\n return;\n }\n const src = this.container.src;\n if (!src)\n return;\n const url = new URL(src, window.location.href);\n const params = new URLSearchParams(url.search.slice(1));\n params.append('q', query);\n url.search = params.toString();\n this.container.dispatchEvent(new CustomEvent('loadstart'));\n this.container\n .fetchResult(this.input, url.toString())\n .then(html => {\n this.results.innerHTML = html;\n this.identifyOptions();\n const allNewOptions = this.results.querySelectorAll('[role=\"option\"]');\n const hasResults = !!allNewOptions.length;\n const numOptions = allNewOptions.length;\n const [firstOption] = allNewOptions;\n const firstOptionValue = firstOption === null || firstOption === void 0 ? void 0 : firstOption.textContent;\n if (this.autoselectEnabled && firstOptionValue) {\n this.updateFeedbackForScreenReaders(`${numOptions} results. ${firstOptionValue} is the top result: Press Enter to activate.`);\n }\n else {\n this.updateFeedbackForScreenReaders(`${numOptions || 'No'} results.`);\n }\n this.container.open = hasResults;\n this.container.dispatchEvent(new CustomEvent('load'));\n this.container.dispatchEvent(new CustomEvent('loadend'));\n })\n .catch(() => {\n this.container.dispatchEvent(new CustomEvent('error'));\n this.container.dispatchEvent(new CustomEvent('loadend'));\n });\n }\n open() {\n if (!this.results.hidden)\n return;\n this.combobox.start();\n this.results.hidden = false;\n }\n close() {\n if (this.results.hidden)\n return;\n this.combobox.stop();\n this.results.hidden = true;\n }\n}\n\nclass AutocompleteEvent extends CustomEvent {\n constructor(type, init) {\n super(type, init);\n this.relatedTarget = init.relatedTarget;\n }\n}\n\nconst requests = new WeakMap();\nfunction fragment(el, url) {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', url, true);\n xhr.setRequestHeader('Accept', 'text/fragment+html');\n return request(el, xhr);\n}\nfunction request(el, xhr) {\n const pending = requests.get(el);\n if (pending)\n pending.abort();\n requests.set(el, xhr);\n const clear = () => requests.delete(el);\n const result = send(xhr);\n result.then(clear, clear);\n return result;\n}\nfunction send(xhr) {\n return new Promise((resolve, reject) => {\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve(xhr.responseText);\n }\n else {\n reject(new Error(xhr.responseText));\n }\n };\n xhr.onerror = reject;\n xhr.send();\n });\n}\n\nconst state = new WeakMap();\nclass AutocompleteElement extends HTMLElement {\n constructor() {\n super(...arguments);\n this.fetchResult = fragment;\n }\n connectedCallback() {\n const listId = this.getAttribute('for');\n if (!listId)\n return;\n const input = this.querySelector('input');\n const results = document.getElementById(listId);\n if (!(input instanceof HTMLInputElement) || !results)\n return;\n const autoselectEnabled = this.getAttribute('data-autoselect') === 'true';\n state.set(this, new Autocomplete(this, input, results, autoselectEnabled));\n results.setAttribute('role', 'listbox');\n }\n disconnectedCallback() {\n const autocomplete = state.get(this);\n if (autocomplete) {\n autocomplete.destroy();\n state.delete(this);\n }\n }\n get src() {\n return this.getAttribute('src') || '';\n }\n set src(url) {\n this.setAttribute('src', url);\n }\n get value() {\n return this.getAttribute('value') || '';\n }\n set value(value) {\n this.setAttribute('value', value);\n }\n get open() {\n return this.hasAttribute('open');\n }\n set open(value) {\n if (value) {\n this.setAttribute('open', '');\n }\n else {\n this.removeAttribute('open');\n }\n }\n static get observedAttributes() {\n return ['open', 'value'];\n }\n attributeChangedCallback(name, oldValue, newValue) {\n if (oldValue === newValue)\n return;\n const autocomplete = state.get(this);\n if (!autocomplete)\n return;\n switch (name) {\n case 'open':\n newValue === null ? autocomplete.close() : autocomplete.open();\n break;\n case 'value':\n if (newValue !== null) {\n autocomplete.input.value = newValue;\n }\n this.dispatchEvent(new AutocompleteEvent('auto-complete-change', {\n bubbles: true,\n relatedTarget: autocomplete.input\n }));\n break;\n }\n }\n}\nif (!window.customElements.get('auto-complete')) {\n window.AutocompleteElement = AutocompleteElement;\n window.customElements.define('auto-complete', AutocompleteElement);\n}\n\nexport { AutocompleteEvent, AutocompleteElement as default };\n","function createNode(text) {\n const node = document.createElement('pre');\n node.style.width = '1px';\n node.style.height = '1px';\n node.style.position = 'fixed';\n node.style.top = '5px';\n node.textContent = text;\n return node;\n}\n\nfunction copyNode(node) {\n if ('clipboard' in navigator) {\n // eslint-disable-next-line flowtype/no-flow-fix-me-comments\n // $FlowFixMe Clipboard is not defined in Flow yet.\n return navigator.clipboard.writeText(node.textContent);\n }\n\n const selection = getSelection();\n\n if (selection == null) {\n return Promise.reject(new Error());\n }\n\n selection.removeAllRanges();\n const range = document.createRange();\n range.selectNodeContents(node);\n selection.addRange(range);\n document.execCommand('copy');\n selection.removeAllRanges();\n return Promise.resolve();\n}\nfunction copyText(text) {\n if ('clipboard' in navigator) {\n // eslint-disable-next-line flowtype/no-flow-fix-me-comments\n // $FlowFixMe Clipboard is not defined in Flow yet.\n return navigator.clipboard.writeText(text);\n }\n\n const body = document.body;\n\n if (!body) {\n return Promise.reject(new Error());\n }\n\n const node = createNode(text);\n body.appendChild(node);\n copyNode(node);\n body.removeChild(node);\n return Promise.resolve();\n}\n\nfunction copy(button) {\n const id = button.getAttribute('for');\n const text = button.getAttribute('value');\n\n function trigger() {\n button.dispatchEvent(new CustomEvent('clipboard-copy', {\n bubbles: true\n }));\n }\n\n if (text) {\n copyText(text).then(trigger);\n } else if (id) {\n const root = 'getRootNode' in Element.prototype ? button.getRootNode() : button.ownerDocument;\n if (!(root instanceof Document || 'ShadowRoot' in window && root instanceof ShadowRoot)) return;\n const node = root.getElementById(id);\n if (node) copyTarget(node).then(trigger);\n }\n}\n\nfunction copyTarget(content) {\n if (content instanceof HTMLInputElement || content instanceof HTMLTextAreaElement) {\n return copyText(content.value);\n } else if (content instanceof HTMLAnchorElement && content.hasAttribute('href')) {\n return copyText(content.href);\n } else {\n return copyNode(content);\n }\n}\n\nfunction clicked(event) {\n const button = event.currentTarget;\n\n if (button instanceof HTMLElement) {\n copy(button);\n }\n}\n\nfunction keydown(event) {\n if (event.key === ' ' || event.key === 'Enter') {\n const button = event.currentTarget;\n\n if (button instanceof HTMLElement) {\n event.preventDefault();\n copy(button);\n }\n }\n}\n\nfunction focused(event) {\n event.currentTarget.addEventListener('keydown', keydown);\n}\n\nfunction blurred(event) {\n event.currentTarget.removeEventListener('keydown', keydown);\n}\n\nclass ClipboardCopyElement extends HTMLElement {\n constructor() {\n super();\n this.addEventListener('click', clicked);\n this.addEventListener('focus', focused);\n this.addEventListener('blur', blurred);\n }\n\n connectedCallback() {\n if (!this.hasAttribute('tabindex')) {\n this.setAttribute('tabindex', '0');\n }\n\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n }\n\n get value() {\n return this.getAttribute('value') || '';\n }\n\n set value(text) {\n this.setAttribute('value', text);\n }\n\n}\n\nif (!window.customElements.get('clipboard-copy')) {\n window.ClipboardCopyElement = ClipboardCopyElement;\n window.customElements.define('clipboard-copy', ClipboardCopyElement);\n}\n\nexport default ClipboardCopyElement;\n","import '@github/clipboard-copy-element'\n\nconst CLIPBOARD_COPY_TIMER_DURATION = 2000\n\nfunction showSVG(svg: SVGElement) {\n svg.style.display = 'inline-block'\n}\n\nfunction hideSVG(svg: SVGElement) {\n svg.style.display = 'none'\n}\n\n// Toggle a copy button.\nfunction showCopy(button: HTMLElement) {\n const [copyIcon, checkIcon] = button.querySelectorAll('.octicon')\n\n if (!copyIcon || !checkIcon) return\n\n showSVG(copyIcon)\n hideSVG(checkIcon)\n}\n\n// Toggle a copy button.\nfunction showCheck(button: HTMLElement) {\n const [copyIcon, checkIcon] = button.querySelectorAll('.octicon')\n\n if (!copyIcon || !checkIcon) return\n\n hideSVG(copyIcon)\n showSVG(checkIcon)\n}\n\nconst clipboardCopyElementTimers = new WeakMap()\n\ndocument.addEventListener('clipboard-copy', ({target}) => {\n if (!(target instanceof HTMLElement)) return\n if (!target.hasAttribute('data-view-component')) return\n\n const currentTimeout = clipboardCopyElementTimers.get(target)\n\n if (currentTimeout) {\n clearTimeout(currentTimeout)\n clipboardCopyElementTimers.delete(target)\n } else {\n showCheck(target)\n }\n\n clipboardCopyElementTimers.set(\n target,\n setTimeout(() => {\n showCopy(target)\n clipboardCopyElementTimers.delete(target)\n }, CLIPBOARD_COPY_TIMER_DURATION)\n )\n})\n","export const unitNames = ['second', 'minute', 'hour', 'day', 'month', 'year'];\nexport function timeAgo(date) {\n const ms = new Date().getTime() - date.getTime();\n const sec = Math.round(ms / 1000);\n const min = Math.round(sec / 60);\n const hr = Math.round(min / 60);\n const day = Math.round(hr / 24);\n const month = Math.round(day / 30);\n const year = Math.round(month / 12);\n if (ms < 0) {\n return [0, 'second'];\n }\n else if (sec < 10) {\n return [0, 'second'];\n }\n else if (sec < 45) {\n return [-sec, 'second'];\n }\n else if (sec < 90) {\n return [-min, 'minute'];\n }\n else if (min < 45) {\n return [-min, 'minute'];\n }\n else if (min < 90) {\n return [-hr, 'hour'];\n }\n else if (hr < 24) {\n return [-hr, 'hour'];\n }\n else if (hr < 36) {\n return [-day, 'day'];\n }\n else if (day < 30) {\n return [-day, 'day'];\n }\n else if (month < 18) {\n return [-month, 'month'];\n }\n else {\n return [-year, 'year'];\n }\n}\nexport function microTimeAgo(date) {\n const ms = new Date().getTime() - date.getTime();\n const sec = Math.round(ms / 1000);\n const min = Math.round(sec / 60);\n const hr = Math.round(min / 60);\n const day = Math.round(hr / 24);\n const month = Math.round(day / 30);\n const year = Math.round(month / 12);\n if (min < 1) {\n return [1, 'minute'];\n }\n else if (min < 60) {\n return [min, 'minute'];\n }\n else if (hr < 24) {\n return [hr, 'hour'];\n }\n else if (day < 365) {\n return [day, 'day'];\n }\n else {\n return [year, 'year'];\n }\n}\nexport function timeUntil(date) {\n const ms = date.getTime() - new Date().getTime();\n const sec = Math.round(ms / 1000);\n const min = Math.round(sec / 60);\n const hr = Math.round(min / 60);\n const day = Math.round(hr / 24);\n const month = Math.round(day / 30);\n const year = Math.round(month / 12);\n if (month >= 18) {\n return [year, 'year'];\n }\n else if (month >= 12) {\n return [year, 'year'];\n }\n else if (day >= 45) {\n return [month, 'month'];\n }\n else if (day >= 30) {\n return [month, 'month'];\n }\n else if (hr >= 36) {\n return [day, 'day'];\n }\n else if (hr >= 24) {\n return [day, 'day'];\n }\n else if (min >= 90) {\n return [hr, 'hour'];\n }\n else if (min >= 45) {\n return [hr, 'hour'];\n }\n else if (sec >= 90) {\n return [min, 'minute'];\n }\n else if (sec >= 45) {\n return [min, 'minute'];\n }\n else if (sec >= 10) {\n return [sec, 'second'];\n }\n else {\n return [0, 'second'];\n }\n}\nexport function microTimeUntil(date) {\n const ms = date.getTime() - new Date().getTime();\n const sec = Math.round(ms / 1000);\n const min = Math.round(sec / 60);\n const hr = Math.round(min / 60);\n const day = Math.round(hr / 24);\n const month = Math.round(day / 30);\n const year = Math.round(month / 12);\n if (day >= 365) {\n return [year, 'year'];\n }\n else if (hr >= 24) {\n return [day, 'day'];\n }\n else if (min >= 60) {\n return [hr, 'hour'];\n }\n else if (min > 1) {\n return [min, 'minute'];\n }\n else {\n return [1, 'minute'];\n }\n}\nexport function elapsedTime(date) {\n const ms = Math.abs(date.getTime() - new Date().getTime());\n const sec = Math.floor(ms / 1000);\n const min = Math.floor(sec / 60);\n const hr = Math.floor(min / 60);\n const day = Math.floor(hr / 24);\n const month = Math.floor(day / 30);\n const year = Math.floor(month / 12);\n const units = [];\n if (year)\n units.push([year, 'year']);\n if (month - year * 12)\n units.push([month - year * 12, 'month']);\n if (day - month * 30)\n units.push([day - month * 30, 'day']);\n if (hr - day * 24)\n units.push([hr - day * 24, 'hour']);\n if (min - hr * 60)\n units.push([min - hr * 60, 'minute']);\n if (sec - min * 60)\n units.push([sec - min * 60, 'second']);\n return units;\n}\n","const durationRe = /^[-+]?P(?:(\\d+)Y)?(?:(\\d+)M)?(?:(\\d+)W)?(?:(\\d+)D)?(?:T(?:(\\d+)H)?(?:(\\d+)M)?(?:(\\d+)S)?)?$/;\nexport const isDuration = (str) => durationRe.test(str);\nexport class Duration {\n constructor(years = 0, months = 0, weeks = 0, days = 0, hours = 0, minutes = 0, seconds = 0) {\n this.years = years;\n this.months = months;\n this.weeks = weeks;\n this.days = days;\n this.hours = hours;\n this.minutes = minutes;\n this.seconds = seconds;\n }\n abs() {\n return new Duration(Math.abs(this.years), Math.abs(this.months), Math.abs(this.weeks), Math.abs(this.days), Math.abs(this.hours), Math.abs(this.minutes), Math.abs(this.seconds));\n }\n static from(durationLike) {\n var _a;\n if (typeof durationLike === 'string') {\n const str = String(durationLike).trim();\n const factor = str.startsWith('-') ? -1 : 1;\n const parsed = (_a = str\n .match(durationRe)) === null || _a === void 0 ? void 0 : _a.slice(1).map(x => (Number(x) || 0) * factor);\n if (!parsed)\n return new Duration();\n return new Duration(...parsed);\n }\n else if (typeof durationLike === 'object') {\n const { years, months, weeks, days, hours, minutes, seconds } = durationLike;\n return new Duration(years, months, weeks, days, hours, minutes, seconds);\n }\n throw new RangeError('invalid duration');\n }\n}\nexport function applyDuration(date, duration) {\n const r = new Date(date);\n r.setFullYear(r.getFullYear() + duration.years);\n r.setMonth(r.getMonth() + duration.months);\n r.setDate(r.getDate() + duration.weeks * 7 + duration.days);\n r.setHours(r.getHours() + duration.hours);\n r.setMinutes(r.getMinutes() + duration.minutes);\n r.setSeconds(r.getSeconds() + duration.seconds);\n return r;\n}\nexport function withinDuration(a, b, str) {\n const duration = Duration.from(str).abs();\n const threshold = applyDuration(a, duration);\n if (!threshold)\n return true;\n return Math.abs(Number(threshold) - Number(a)) > Math.abs(Number(a) - Number(b));\n}\n","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _RelativeTimeElement_instances, _RelativeTimeElement_customTitle, _RelativeTimeElement_updating, _RelativeTimeElement_lang_get, _RelativeTimeElement_renderRoot, _RelativeTimeElement_getFormattedTitle, _RelativeTimeElement_getFormattedDate;\nimport { unitNames, microTimeAgo, microTimeUntil, timeUntil, timeAgo, elapsedTime } from './duration-format.js';\nimport { isDuration, withinDuration } from './duration.js';\nconst root = (typeof globalThis !== 'undefined' ? globalThis : window);\nconst HTMLElement = root.HTMLElement || null;\nexport class RelativeTimeUpdatedEvent extends Event {\n constructor(oldText, newText, oldTitle, newTitle) {\n super('relative-time-updated', { bubbles: true, composed: true });\n this.oldText = oldText;\n this.newText = newText;\n this.oldTitle = oldTitle;\n this.newTitle = newTitle;\n }\n}\nfunction getUnitFactor(el) {\n if (!el.date)\n return Infinity;\n if (el.format === 'elapsed') {\n const precision = el.precision;\n if (precision === 'second') {\n return 1000;\n }\n else if (precision === 'minute') {\n return 60 * 1000;\n }\n }\n const ms = Math.abs(Date.now() - el.date.getTime());\n if (ms < 60 * 1000)\n return 1000;\n if (ms < 60 * 60 * 1000)\n return 60 * 1000;\n return 60 * 60 * 1000;\n}\nconst dateObserver = new (class {\n constructor() {\n this.elements = new Set();\n this.time = Infinity;\n this.timer = -1;\n }\n observe(element) {\n if (this.elements.has(element))\n return;\n this.elements.add(element);\n const date = element.date;\n if (date && date.getTime()) {\n const ms = getUnitFactor(element);\n const time = Date.now() + ms;\n if (time < this.time) {\n clearTimeout(this.timer);\n this.timer = setTimeout(() => this.update(), ms);\n this.time = time;\n }\n }\n }\n unobserve(element) {\n if (!this.elements.has(element))\n return;\n this.elements.delete(element);\n }\n update() {\n clearTimeout(this.timer);\n if (!this.elements.size)\n return;\n let nearestDistance = Infinity;\n for (const timeEl of this.elements) {\n nearestDistance = Math.min(nearestDistance, getUnitFactor(timeEl));\n timeEl.update();\n }\n this.time = Math.min(60 * 60 * 1000, nearestDistance);\n this.timer = setTimeout(() => this.update(), this.time);\n this.time += Date.now();\n }\n})();\nexport default class RelativeTimeElement extends HTMLElement {\n constructor() {\n super(...arguments);\n _RelativeTimeElement_instances.add(this);\n _RelativeTimeElement_customTitle.set(this, false);\n _RelativeTimeElement_updating.set(this, false);\n _RelativeTimeElement_renderRoot.set(this, this.shadowRoot ? this.shadowRoot : this.attachShadow ? this.attachShadow({ mode: 'open' }) : this);\n }\n static get observedAttributes() {\n return [\n 'second',\n 'minute',\n 'hour',\n 'weekday',\n 'day',\n 'month',\n 'year',\n 'time-zone-name',\n 'prefix',\n 'threshold',\n 'tense',\n 'precision',\n 'format',\n 'datetime',\n 'lang',\n 'title'\n ];\n }\n get second() {\n const second = this.getAttribute('second');\n if (second === 'numeric' || second === '2-digit')\n return second;\n }\n set second(value) {\n this.setAttribute('second', value || '');\n }\n get minute() {\n const minute = this.getAttribute('minute');\n if (minute === 'numeric' || minute === '2-digit')\n return minute;\n }\n set minute(value) {\n this.setAttribute('minute', value || '');\n }\n get hour() {\n const hour = this.getAttribute('hour');\n if (hour === 'numeric' || hour === '2-digit')\n return hour;\n }\n set hour(value) {\n this.setAttribute('hour', value || '');\n }\n get weekday() {\n const weekday = this.getAttribute('weekday');\n if (weekday === 'long' || weekday === 'short' || weekday === 'narrow')\n return weekday;\n }\n set weekday(value) {\n this.setAttribute('weekday', value || '');\n }\n get day() {\n var _a;\n const day = (_a = this.getAttribute('day')) !== null && _a !== void 0 ? _a : 'numeric';\n if (day === 'numeric' || day === '2-digit')\n return day;\n }\n set day(value) {\n this.setAttribute('day', value || '');\n }\n get month() {\n var _a;\n const month = (_a = this.getAttribute('month')) !== null && _a !== void 0 ? _a : 'short';\n if (month === 'numeric' || month === '2-digit' || month === 'short' || month === 'long' || month === 'narrow') {\n return month;\n }\n }\n set month(value) {\n this.setAttribute('month', value || '');\n }\n get year() {\n var _a;\n const year = this.getAttribute('year');\n if (year === 'numeric' || year === '2-digit')\n return year;\n if (!this.hasAttribute('year') && new Date().getUTCFullYear() !== ((_a = this.date) === null || _a === void 0 ? void 0 : _a.getUTCFullYear())) {\n return 'numeric';\n }\n }\n set year(value) {\n this.setAttribute('day', value || '');\n }\n get timeZoneName() {\n const name = this.getAttribute('time-zone-name');\n if (name === 'long' ||\n name === 'short' ||\n name === 'shortOffset' ||\n name === 'longOffset' ||\n name === 'shortGeneric' ||\n name === 'longGeneric') {\n return name;\n }\n }\n set timeZoneName(value) {\n this.setAttribute('time-zone-name', value || '');\n }\n get prefix() {\n var _a;\n return (_a = this.getAttribute('prefix')) !== null && _a !== void 0 ? _a : 'on';\n }\n set prefix(value) {\n this.setAttribute('prefix', value);\n }\n get threshold() {\n const threshold = this.getAttribute('threshold');\n return threshold && isDuration(threshold) ? threshold : 'P30D';\n }\n set threshold(value) {\n this.setAttribute('threshold', value);\n }\n get tense() {\n const tense = this.getAttribute('tense');\n if (tense === 'past')\n return 'past';\n if (tense === 'future')\n return 'future';\n return 'auto';\n }\n set tense(value) {\n this.setAttribute('tense', value);\n }\n get precision() {\n const precision = this.getAttribute('precision');\n if (unitNames.includes(precision))\n return precision;\n return 'second';\n }\n set precision(value) {\n this.setAttribute('precision', value);\n }\n get format() {\n const format = this.getAttribute('format');\n if (format === 'micro')\n return 'micro';\n if (format === 'elapsed')\n return 'elapsed';\n return 'auto';\n }\n set format(value) {\n this.setAttribute('format', value);\n }\n get datetime() {\n return this.getAttribute('datetime') || '';\n }\n set datetime(value) {\n this.setAttribute('datetime', value);\n }\n get date() {\n const parsed = Date.parse(this.datetime);\n return Number.isNaN(parsed) ? null : new Date(parsed);\n }\n set date(value) {\n this.datetime = (value === null || value === void 0 ? void 0 : value.toISOString()) || '';\n }\n connectedCallback() {\n this.update();\n }\n disconnectedCallback() {\n dateObserver.unobserve(this);\n }\n attributeChangedCallback(attrName, oldValue, newValue) {\n if (oldValue === newValue)\n return;\n if (attrName === 'title') {\n __classPrivateFieldSet(this, _RelativeTimeElement_customTitle, newValue !== null && __classPrivateFieldGet(this, _RelativeTimeElement_instances, \"m\", _RelativeTimeElement_getFormattedTitle).call(this) !== newValue, \"f\");\n }\n if (!__classPrivateFieldGet(this, _RelativeTimeElement_updating, \"f\") && !(attrName === 'title' && __classPrivateFieldGet(this, _RelativeTimeElement_customTitle, \"f\"))) {\n __classPrivateFieldSet(this, _RelativeTimeElement_updating, (async () => {\n await Promise.resolve();\n this.update();\n })(), \"f\");\n }\n }\n update() {\n const oldText = __classPrivateFieldGet(this, _RelativeTimeElement_renderRoot, \"f\").textContent || '';\n const oldTitle = this.getAttribute('title') || '';\n let newTitle = oldTitle;\n let newText = oldText;\n const now = new Date();\n if (!__classPrivateFieldGet(this, _RelativeTimeElement_customTitle, \"f\")) {\n newTitle = __classPrivateFieldGet(this, _RelativeTimeElement_instances, \"m\", _RelativeTimeElement_getFormattedTitle).call(this) || '';\n if (newTitle)\n this.setAttribute('title', newTitle);\n }\n newText = __classPrivateFieldGet(this, _RelativeTimeElement_instances, \"m\", _RelativeTimeElement_getFormattedDate).call(this, now) || '';\n if (newText) {\n __classPrivateFieldGet(this, _RelativeTimeElement_renderRoot, \"f\").textContent = newText;\n }\n else if (this.shadowRoot === __classPrivateFieldGet(this, _RelativeTimeElement_renderRoot, \"f\") && this.textContent) {\n __classPrivateFieldGet(this, _RelativeTimeElement_renderRoot, \"f\").textContent = this.textContent;\n }\n if (newText !== oldText || newTitle !== oldTitle) {\n this.dispatchEvent(new RelativeTimeUpdatedEvent(oldText, newText, oldTitle, newTitle));\n }\n const date = this.date;\n const format = this.format;\n const isRelative = (format === 'auto' || format === 'micro') && date && withinDuration(now, date, this.threshold);\n if (format === 'elapsed' || isRelative) {\n dateObserver.observe(this);\n }\n else {\n dateObserver.unobserve(this);\n }\n __classPrivateFieldSet(this, _RelativeTimeElement_updating, false, \"f\");\n }\n}\n_RelativeTimeElement_customTitle = new WeakMap(), _RelativeTimeElement_updating = new WeakMap(), _RelativeTimeElement_renderRoot = new WeakMap(), _RelativeTimeElement_instances = new WeakSet(), _RelativeTimeElement_lang_get = function _RelativeTimeElement_lang_get() {\n var _a, _b;\n return (_b = (_a = this.closest('[lang]')) === null || _a === void 0 ? void 0 : _a.getAttribute('lang')) !== null && _b !== void 0 ? _b : 'default';\n}, _RelativeTimeElement_getFormattedTitle = function _RelativeTimeElement_getFormattedTitle() {\n const date = this.date;\n if (!date)\n return;\n if (typeof Intl === 'undefined' || !Intl.DateTimeFormat)\n return;\n return new Intl.DateTimeFormat(__classPrivateFieldGet(this, _RelativeTimeElement_instances, \"a\", _RelativeTimeElement_lang_get), {\n day: 'numeric',\n month: 'short',\n year: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n timeZoneName: 'short'\n }).format(date);\n}, _RelativeTimeElement_getFormattedDate = function _RelativeTimeElement_getFormattedDate(now = new Date()) {\n const date = this.date;\n if (!date)\n return;\n const format = this.format;\n if (format === 'elapsed') {\n const precisionIndex = unitNames.indexOf(this.precision) || 0;\n const units = elapsedTime(date).filter(unit => unitNames.indexOf(unit[1]) >= precisionIndex);\n return units.map(([int, unit]) => `${int}${unit[0]}`).join(' ') || `0${this.precision[0]}`;\n }\n const tense = this.tense;\n const micro = format === 'micro';\n const inFuture = now.getTime() < date.getTime();\n const within = withinDuration(now, date, this.threshold);\n const locale = __classPrivateFieldGet(this, _RelativeTimeElement_instances, \"a\", _RelativeTimeElement_lang_get);\n if (typeof Intl !== 'undefined' && Intl.RelativeTimeFormat) {\n const relativeFormat = new Intl.RelativeTimeFormat(locale, { numeric: 'auto' });\n if (tense === 'past' || (tense === 'auto' && !inFuture && within)) {\n const [int, unit] = micro ? microTimeAgo(date) : timeAgo(date);\n if (micro)\n return `${int}${unit[0]}`;\n return relativeFormat.format(int, unit);\n }\n if (tense === 'future' || (tense === 'auto' && inFuture && within)) {\n const [int, unit] = micro ? microTimeUntil(date) : timeUntil(date);\n if (micro)\n return `${int}${unit[0]}`;\n return relativeFormat.format(int, unit);\n }\n }\n if (typeof Intl === 'undefined' || !Intl.DateTimeFormat)\n return;\n const formatter = new Intl.DateTimeFormat(locale, {\n second: this.second,\n minute: this.minute,\n hour: this.hour,\n weekday: this.weekday,\n day: this.day,\n month: this.month,\n year: this.year,\n timeZoneName: this.timeZoneName\n });\n return `${this.prefix} ${formatter.format(date)}`.trim();\n};\n","import RelativeTimeElement from './relative-time-element.js';\nconst root = (typeof globalThis !== 'undefined' ? globalThis : window);\ntry {\n customElements.define('relative-time', RelativeTimeElement);\n root.RelativeTimeElement = RelativeTimeElement;\n}\ncatch (e) {\n if (!(root.DOMException && e instanceof DOMException && e.name === 'NotSupportedError') &&\n !(e instanceof ReferenceError)) {\n throw e;\n }\n}\nexport default RelativeTimeElement;\nexport * from './relative-time-element.js';\n","function getTabs(el) {\n return Array.from(el.querySelectorAll('[role=\"tablist\"] [role=\"tab\"]')).filter(tab => tab instanceof HTMLElement && tab.closest(el.tagName) === el);\n}\nfunction getNavigationKeyCodes(vertical) {\n if (vertical) {\n return [\n ['ArrowDown', 'ArrowRight'],\n ['ArrowUp', 'ArrowLeft']\n ];\n }\n else {\n return [['ArrowRight'], ['ArrowLeft']];\n }\n}\nexport default class TabContainerElement extends HTMLElement {\n constructor() {\n super();\n this.addEventListener('keydown', (event) => {\n const target = event.target;\n if (!(target instanceof HTMLElement))\n return;\n if (target.closest(this.tagName) !== this)\n return;\n if (target.getAttribute('role') !== 'tab' && !target.closest('[role=\"tablist\"]'))\n return;\n const tabs = getTabs(this);\n const currentIndex = tabs.indexOf(tabs.find(tab => tab.matches('[aria-selected=\"true\"]')));\n const [incrementKeys, decrementKeys] = getNavigationKeyCodes(target.closest('[role=\"tablist\"]')?.getAttribute('aria-orientation') === 'vertical');\n if (incrementKeys.some(code => event.code === code)) {\n let index = currentIndex + 1;\n if (index >= tabs.length)\n index = 0;\n this.selectTab(index);\n }\n else if (decrementKeys.some(code => event.code === code)) {\n let index = currentIndex - 1;\n if (index < 0)\n index = tabs.length - 1;\n this.selectTab(index);\n }\n else if (event.code === 'Home') {\n this.selectTab(0);\n event.preventDefault();\n }\n else if (event.code === 'End') {\n this.selectTab(tabs.length - 1);\n event.preventDefault();\n }\n });\n this.addEventListener('click', (event) => {\n const tabs = getTabs(this);\n if (!(event.target instanceof Element))\n return;\n if (event.target.closest(this.tagName) !== this)\n return;\n const tab = event.target.closest('[role=\"tab\"]');\n if (!(tab instanceof HTMLElement) || !tab.closest('[role=\"tablist\"]'))\n return;\n const index = tabs.indexOf(tab);\n this.selectTab(index);\n });\n }\n connectedCallback() {\n for (const tab of getTabs(this)) {\n if (!tab.hasAttribute('aria-selected')) {\n tab.setAttribute('aria-selected', 'false');\n }\n if (!tab.hasAttribute('tabindex')) {\n if (tab.getAttribute('aria-selected') === 'true') {\n tab.setAttribute('tabindex', '0');\n }\n else {\n tab.setAttribute('tabindex', '-1');\n }\n }\n }\n }\n selectTab(index) {\n const tabs = getTabs(this);\n const panels = Array.from(this.querySelectorAll('[role=\"tabpanel\"]')).filter(panel => panel.closest(this.tagName) === this);\n /**\n * Out of bounds index\n */\n if (index > tabs.length - 1) {\n throw new RangeError(`Index \"${index}\" out of bounds`);\n }\n const selectedTab = tabs[index];\n const selectedPanel = panels[index];\n const cancelled = !this.dispatchEvent(new CustomEvent('tab-container-change', {\n bubbles: true,\n cancelable: true,\n detail: { relatedTarget: selectedPanel }\n }));\n if (cancelled)\n return;\n for (const tab of tabs) {\n tab.setAttribute('aria-selected', 'false');\n tab.setAttribute('tabindex', '-1');\n }\n for (const panel of panels) {\n panel.hidden = true;\n if (!panel.hasAttribute('tabindex') && !panel.hasAttribute('data-tab-container-no-tabstop')) {\n panel.setAttribute('tabindex', '0');\n }\n }\n selectedTab.setAttribute('aria-selected', 'true');\n selectedTab.setAttribute('tabindex', '0');\n selectedTab.focus();\n selectedPanel.hidden = false;\n this.dispatchEvent(new CustomEvent('tab-container-changed', {\n bubbles: true,\n detail: { relatedTarget: selectedPanel }\n }));\n }\n}\nif (!window.customElements.get('tab-container')) {\n window.TabContainerElement = TabContainerElement;\n window.customElements.define('tab-container', TabContainerElement);\n}\n//# sourceMappingURL=index.js.map","/* eslint-disable custom-elements/expose-class-on-global */\nimport {controller, targets} from '@github/catalyst'\n\n@controller\nexport class PrimerMultiInputElement extends HTMLElement {\n @targets fields: HTMLInputElement[]\n\n activateField(name: string) {\n const fieldWithName = this.findField(name)\n if (!fieldWithName) return\n\n for (const field of this.fields) {\n if (field === fieldWithName) continue\n\n field.setAttribute('disabled', 'disabled')\n field.setAttribute('hidden', 'hidden')\n\n field.parentElement?.setAttribute('hidden', 'hidden')\n }\n\n fieldWithName.removeAttribute('disabled')\n fieldWithName.removeAttribute('hidden')\n fieldWithName.parentElement?.removeAttribute('hidden')\n }\n\n private findField(name: string): HTMLElement | null {\n for (const field of this.fields) {\n if (field.getAttribute('data-name') === name) {\n return field\n }\n }\n\n return null\n }\n}\n\ndeclare global {\n interface Window {\n PrimerMultiInputElement: typeof PrimerMultiInputElement\n }\n}\n\nif (!window.customElements.get('primer-multi-input')) {\n Object.assign(window, {PrimerMultiInputElement})\n window.customElements.define('primer-multi-input', PrimerMultiInputElement)\n}\n","function throttle(callback, wait = 0, {\n start = true,\n middle = true,\n once = false\n} = {}) {\n var last = 0;\n var timer;\n var cancelled = false;\n\n var fn = function fn(...args) {\n if (cancelled) return;\n var delta = Date.now() - last;\n last = Date.now();\n\n if (start) {\n //eslint-disable-next-line flowtype/no-flow-fix-me-comments\n // $FlowFixMe this isn't a const\n start = false;\n callback(...args);\n if (once) fn.cancel();\n } else if (middle && delta < wait || !middle) {\n clearTimeout(timer);\n timer = setTimeout(function () {\n last = Date.now();\n callback(...args);\n if (once) fn.cancel();\n }, !middle ? wait : wait - delta);\n }\n };\n\n fn.cancel = function () {\n clearTimeout(timer);\n cancelled = true;\n };\n\n return fn;\n}\nfunction debounce(callback, wait = 0, {\n start = false,\n middle = false,\n once = false\n} = {}) {\n return throttle(callback, wait, {\n start: start,\n middle: middle,\n once: once\n });\n}\n\nconst states = new WeakMap();\nclass AutoCheckElement extends HTMLElement {\n connectedCallback() {\n const input = this.input;\n if (!input)\n return;\n const checker = debounce(check.bind(null, this), 300);\n const state = { check: checker, controller: null };\n states.set(this, state);\n input.addEventListener('input', setLoadingState);\n input.addEventListener('input', checker);\n input.autocomplete = 'off';\n input.spellcheck = false;\n }\n disconnectedCallback() {\n const input = this.input;\n if (!input)\n return;\n const state = states.get(this);\n if (!state)\n return;\n states.delete(this);\n input.removeEventListener('input', setLoadingState);\n input.removeEventListener('input', state.check);\n input.setCustomValidity('');\n }\n attributeChangedCallback(name) {\n if (name === 'required') {\n const input = this.input;\n if (!input)\n return;\n input.required = this.required;\n }\n }\n static get observedAttributes() {\n return ['required'];\n }\n get input() {\n return this.querySelector('input');\n }\n get src() {\n const src = this.getAttribute('src');\n if (!src)\n return '';\n const link = this.ownerDocument.createElement('a');\n link.href = src;\n return link.href;\n }\n set src(value) {\n this.setAttribute('src', value);\n }\n get csrf() {\n const csrfElement = this.querySelector('[data-csrf]');\n return this.getAttribute('csrf') || (csrfElement instanceof HTMLInputElement && csrfElement.value) || '';\n }\n set csrf(value) {\n this.setAttribute('csrf', value);\n }\n get required() {\n return this.hasAttribute('required');\n }\n set required(required) {\n if (required) {\n this.setAttribute('required', '');\n }\n else {\n this.removeAttribute('required');\n }\n }\n get csrfField() {\n return this.getAttribute('csrf-field') || 'authenticity_token';\n }\n set csrfField(value) {\n this.setAttribute('csrf-field', value);\n }\n}\nfunction setLoadingState(event) {\n const input = event.currentTarget;\n if (!(input instanceof HTMLInputElement))\n return;\n const autoCheckElement = input.closest('auto-check');\n if (!(autoCheckElement instanceof AutoCheckElement))\n return;\n const src = autoCheckElement.src;\n const csrf = autoCheckElement.csrf;\n const state = states.get(autoCheckElement);\n if (!src || !csrf || !state) {\n return;\n }\n let message = 'Verifying…';\n const setValidity = (text) => (message = text);\n input.dispatchEvent(new CustomEvent('auto-check-start', {\n bubbles: true,\n detail: { setValidity }\n }));\n if (autoCheckElement.required) {\n input.setCustomValidity(message);\n }\n}\nfunction makeAbortController() {\n if ('AbortController' in window) {\n return new AbortController();\n }\n return {\n signal: null,\n abort() {\n }\n };\n}\nasync function fetchWithNetworkEvents(el, url, options) {\n try {\n const response = await fetch(url, options);\n el.dispatchEvent(new CustomEvent('load'));\n el.dispatchEvent(new CustomEvent('loadend'));\n return response;\n }\n catch (error) {\n if (error.name !== 'AbortError') {\n el.dispatchEvent(new CustomEvent('error'));\n el.dispatchEvent(new CustomEvent('loadend'));\n }\n throw error;\n }\n}\nasync function check(autoCheckElement) {\n const input = autoCheckElement.input;\n if (!input) {\n return;\n }\n const csrfField = autoCheckElement.csrfField;\n const src = autoCheckElement.src;\n const csrf = autoCheckElement.csrf;\n const state = states.get(autoCheckElement);\n if (!src || !csrf || !state) {\n if (autoCheckElement.required) {\n input.setCustomValidity('');\n }\n return;\n }\n if (!input.value.trim()) {\n if (autoCheckElement.required) {\n input.setCustomValidity('');\n }\n return;\n }\n const body = new FormData();\n body.append(csrfField, csrf);\n body.append('value', input.value);\n input.dispatchEvent(new CustomEvent('auto-check-send', {\n bubbles: true,\n detail: { body }\n }));\n if (state.controller) {\n state.controller.abort();\n }\n else {\n autoCheckElement.dispatchEvent(new CustomEvent('loadstart'));\n }\n state.controller = makeAbortController();\n try {\n const response = await fetchWithNetworkEvents(autoCheckElement, src, {\n credentials: 'same-origin',\n signal: state.controller.signal,\n method: 'POST',\n body\n });\n if (response.ok) {\n processSuccess(response, input, autoCheckElement.required);\n }\n else {\n processFailure(response, input, autoCheckElement.required);\n }\n state.controller = null;\n input.dispatchEvent(new CustomEvent('auto-check-complete', { bubbles: true }));\n }\n catch (error) {\n if (error.name !== 'AbortError') {\n state.controller = null;\n input.dispatchEvent(new CustomEvent('auto-check-complete', { bubbles: true }));\n }\n }\n}\nfunction processSuccess(response, input, required) {\n if (required) {\n input.setCustomValidity('');\n }\n input.dispatchEvent(new CustomEvent('auto-check-success', {\n bubbles: true,\n detail: {\n response: response.clone()\n }\n }));\n}\nfunction processFailure(response, input, required) {\n let message = 'Validation failed';\n const setValidity = (text) => (message = text);\n input.dispatchEvent(new CustomEvent('auto-check-error', {\n bubbles: true,\n detail: {\n response: response.clone(),\n setValidity\n }\n }));\n if (required) {\n input.setCustomValidity(message);\n }\n}\nif (!window.customElements.get('auto-check')) {\n window.AutoCheckElement = AutoCheckElement;\n window.customElements.define('auto-check', AutoCheckElement);\n}\n\nexport default AutoCheckElement;\n","import '@github/auto-check-element'\nimport {controller, target} from '@github/catalyst'\n\n@controller\nclass PrimerTextFieldElement extends HTMLElement {\n @target inputElement: HTMLInputElement\n @target validationElement: HTMLElement\n @target validationMessageElement: HTMLElement\n\n #abortController: AbortController | null\n\n connectedCallback(): void {\n this.#abortController?.abort()\n const {signal} = (this.#abortController = new AbortController())\n\n this.inputElement.addEventListener(\n 'auto-check-success',\n () => { this.clearError() },\n {signal}\n )\n\n this.inputElement.addEventListener(\n 'auto-check-error',\n (event: any) => {\n event.detail.response.text().then(\n (error_message: string) => { this.setError(error_message) }\n )\n },\n {signal}\n )\n }\n\n disconnectedCallback() {\n this.#abortController?.abort()\n }\n\n clearError(): void {\n this.inputElement.removeAttribute('invalid')\n this.validationElement.hidden = true\n this.validationMessageElement.innerText = ''\n }\n\n setError(message: string): void {\n this.validationMessageElement.innerText = message\n this.validationElement.hidden = false\n this.inputElement.setAttribute('invalid', 'true')\n }\n}\n"],"names":["DetailsMenuElement","HTMLElement","preload","this","hasAttribute","value","setAttribute","removeAttribute","src","getAttribute","[object Object]","details","parentElement","summary","querySelector","subscriptions","fromEvent","e","trackComposition","shouldCommit","menu","event","KeyboardEvent","state","states","get","isComposing","isSummaryFocused","target","Element","tagName","key","close","preventDefault","stopPropagation","sibling","focus","ctrlBindings","ctrlKey","selected","document","activeElement","isMenuItem","closest","click","keydown","loadFragment","once","querySelectorAll","opened","contains","closeCurrentMenu","NullSubscription","focusOnOpen","set","loaded","delete","sub","unsubscribe","WeakMap","eventName","onNext","options","addEventListener","removeEventListener","loader","autofocus","isMouse","focusFirstItem","input","next","Array","from","index","indexOf","found","def","length","navigator","userAgent","match","type","menuitem","checked","commit","dispatchEvent","CustomEvent","cancelable","detail","relatedTarget","item","button","text","el","textEl","textContent","labelText","html","contentsEl","innerHTML","labelHTML","updateLabel","checkState","toString","HTMLInputElement","indeterminate","updateChecked","role","window","customElements","define","startPositions","dragStartPositions","constructedElements","moveCropArea","currentTarget","ImageCropElement","box","image","deltaX","deltaY","has","MouseEvent","pos","pageX","dragStartX","pageY","dragStartY","TouchEvent","changedTouches","x","Math","min","max","offsetLeft","width","offsetWidth","y","offsetTop","height","offsetHeight","style","left","top","fireChangeEvent","updateCropArea","getShadowHost","rect","getBoundingClientRect","delta","setInitialPosition","startX","startY","pageXOffset","pageYOffset","updateDimensions","rootNode","getRootNode","ShadowRoot","host","startUpdate","direction","passive","classList","add","reposition","newSide","abs","round","side","clientWidth","clientHeight","stopUpdate","remove","result","ratio","naturalWidth","slottedInput","bubbles","shadowRoot","attachShadow","mode","HTMLImageElement","observedAttributes","val","attribute","oldValue","newValue","__decorate","decorators","desc","d","c","arguments","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__classPrivateFieldGet","receiver","kind","f","TypeError","call","__classPrivateFieldSet","alternateOrders","outside-top","outside-bottom","outside-left","outside-right","alternateAlignments","start","end","center","getAnchoredPosition","floatingElement","anchorElement","settings","element","parentNode","getComputedStyle","position","body","getPositionedParent","clippingRect","overflow","clippingNode","elemRect","elemStyle","borderTop","borderLeft","borderRight","borderBottom","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","map","v","parseInt","innerHeight","Infinity","getClippingRect","parentElementStyle","parentElementRect","viewportRect","relativePosition","floatingRect","anchorRect","align","allowOutOfBounds","anchorOffset","alignmentOffset","relativeViewportRect","calculatePosition","anchorSide","anchorAlign","alternateOrder","positionAttempt","prevSide","shouldRecalculatePosition","nextSide","alternateAlignment","alignmentAttempt","prevAlign","shouldRecalculateAlignment","nextAlign","assign","pureCalculateAnchoredPosition","_a","_b","_c","_d","_e","positionDefaults","startsWith","getDefaultSettings","elementDimensions","anchorPosition","anchorRight","anchorBottom","currentPos","containerDimensions","getFocusableChild","container","lastChild","strict","acceptFn","onlyTabbable","isTabbable","isFocusable","walker","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","node","FILTER_ACCEPT","FILTER_SKIP","nextNode","reverse","firstChild","previousNode","iterateFocusableElements","elem","disabledAttrInert","includes","disabled","hiddenInert","hidden","hiddenInputInert","sentinelInert","sizeInert","visibilityInert","visibility","clientRectsInert","getClientRects","HTMLAnchorElement","tabIndex","signalSupported","noop","create","signal","originalAddEventListener","EventTarget","prototype","name","originalCallback","optionsOrCapture","AbortSignal","monkeyPatch","suspendedTrapStack","activeTrap","focusTrap","initialFocus","abortSignal","controller","AbortController","sentinelStart","createElement","onfocus","lastFocusableChild","sentinelEnd","lastFocusedChild","ensureTrapZoneHasFocus","focusedElement","firstFocusableChild","prepend","append","wrappingController","abort","followSignal","suspendedTrap","push","undefined","sentinels","getElementsByClassName","suspendedTrapIndex","findIndex","t","splice","trapToReactivate","pop","originalSignal","tryReactivate","capture","focusIfNeeded","overlayStack","clickHandler","dialogId","dialog","getElementById","ModalDialogElement","openButton","show","topLevelDialog","clickOutsideDialog","id","_ModalDialogElement_focusAbortController","open","_ModalDialogElement_instances","_ModalDialogElement_overlayBackdrop_get","aborted","showButtons","closedNotCancelled","dialogEvent","Event","controllers","WeakSet","bindShadow","root","bindElements","listenForBind","observers","closed","observer","MutationObserver","mutations","mutation","bindActions","addedNodes","observe","childList","subtree","attributeFilter","subscription","disconnect","handleEvent","binding","bindings","tag","method","matches","shadowController","action","trim","split","eventSep","lastIndexOf","methodSep","slice","dasherize","str","String","description","replace","toLowerCase","mustDasherize","dashed","DOMException","attrKey","initialized","initializeAttrs","instance","names","proto","getPrototypeOf","prefix","constructor","attrPrefix","meta","descriptor","configurable","Number","toggleAttribute","symbol","Symbol","for","CatalystDelegate","classObject","delegate","connectedCallback","disconnectedCallback","attributeChangedCallback","attributes","observed","attrToAttributeName","concat","defineObservedAttributes","register","upgrade","template","content","cloneNode","autoShadowRoot","ownerDocument","bind","hasOwnProperty","parent","Map","Set","findTarget","targets","findTargets","Promise","resolve","readyState","listenerOptions","handler","NavListElement","setShowMoreItemState","showMoreDisabled","showMoreItem","toggle","currentPage","totalPages","paginationSrc","nextElementSibling","itemIsExpanded","collapseItem","expandItem","paginationURL","URL","location","origin","searchParams","response","fetch","ok","err","fragment","parseHTML","list","insertBefore","focusMarkers","importNode","SegmentedControlElement","_SegmentedControlElement_instances","_SegmentedControlElement_updateButtonLabels","items","debounce","callback","wait","middle","timer","last","cancelled","fn","args","Date","now","apply","cancel","clearTimeout","setTimeout","throttle","label","ToggleSwitchElement","link","href","csrf","csrfElement","csrfField","isDisabled","isRemote","setLoadingState","submitForm","performToggle","switch","isOn","turnOff","turnOn","disable","errorIcon","loadingSpinner","setFinishedState","error","enable","FormData","Error","credentials","headers","Requested-With","setSuccessState","setErrorState","opts","db","TOOLTIP_OPEN_CLASS","TOOLTIP_SR_ONLY_CLASS","DIRECTION_CLASSES","ToolTipElement","_ToolTipElement_abortController","_ToolTipElement_align","_ToolTipElement_side","_ToolTipElement_allowUpdatePosition","htmlFor","control","hiddenFromView","isConnected","_ToolTipElement_instances","_ToolTipElement_update","_ToolTipElement_updateControlReference","_ToolTipElement_updateDirection","styles","random","toFixed","tooltip","_ToolTipElement_updatePosition","labelledBy","describedBy","XBannerElement","shouldReappear","setProperty","removeChild","Combobox","keyboardEventHandler","combobox","shiftKey","metaKey","altKey","clearSelection","navigate","keyboardBindings","compositionEventHandler","inputHandler","stop","commitWithElement","indexDiff","focusEl","filter","visible","els","focusIndex","indexOfItem","newIndex","scrollTo","fireCommitEvent","scrollTop","containerBottom","bottom","inViewport","SCREEN_READER_DELAY","testScreenReaderDelay","Autocomplete","results","autoselectEnabled","feedback","clearButton","clientOptions","labelElem","interactingWithList","onInputChange","timeout","Rest","onResultsMouseDown","onInputBlur","onInputFocus","onKeydown","onCommit","handleClear","updateFeedbackForScreenReaders","firstOption","children","fetchResults","inputString","query","url","params","URLSearchParams","search","fetchResult","then","identifyOptions","allNewOptions","hasResults","numOptions","firstOptionValue","catch","AutocompleteEvent","init","super","requests","xhr","XMLHttpRequest","setRequestHeader","pending","clear","reject","onload","status","responseText","onerror","send","request","AutocompleteElement","listId","autocomplete","destroy","copyNode","clipboard","writeText","selection","getSelection","removeAllRanges","range","createRange","selectNodeContents","addRange","execCommand","copyText","createNode","appendChild","copy","trigger","Document","HTMLTextAreaElement","clicked","focused","blurred","ClipboardCopyElement","showSVG","svg","display","hideSVG","clipboardCopyElementTimers","currentTimeout","copyIcon","checkIcon","showCheck","showCopy","unitNames","durationRe","Duration","years","months","weeks","days","hours","minutes","seconds","durationLike","factor","parsed","RangeError","withinDuration","a","b","threshold","date","duration","setFullYear","getFullYear","setMonth","getMonth","setDate","getDate","setHours","getHours","setMinutes","getMinutes","setSeconds","getSeconds","applyDuration","_RelativeTimeElement_instances","_RelativeTimeElement_customTitle","_RelativeTimeElement_updating","_RelativeTimeElement_lang_get","_RelativeTimeElement_renderRoot","_RelativeTimeElement_getFormattedTitle","_RelativeTimeElement_getFormattedDate","globalThis","RelativeTimeUpdatedEvent","oldText","newText","oldTitle","newTitle","composed","getUnitFactor","format","precision","ms","getTime","dateObserver","elements","time","update","size","nearestDistance","timeEl","RelativeTimeElement","second","minute","hour","weekday","day","month","year","getUTCFullYear","timeZoneName","test","tense","datetime","parse","isNaN","toISOString","unobserve","attrName","isRelative","Intl","DateTimeFormat","precisionIndex","sec","floor","hr","units","elapsedTime","unit","int","join","micro","inFuture","within","locale","RelativeTimeFormat","relativeFormat","numeric","microTimeAgo","timeAgo","microTimeUntil","timeUntil","formatter","ReferenceError","getTabs","tab","TabContainerElement","tabs","currentIndex","find","incrementKeys","decrementKeys","some","code","selectTab","panels","panel","selectedTab","selectedPanel","PrimerMultiInputElement","fieldWithName","findField","field","fields","AutoCheckElement","checker","check","spellcheck","setCustomValidity","required","autoCheckElement","message","setValidity","async","fetchWithNetworkEvents","clone","processSuccess","processFailure","PrimerTextFieldElement","_PrimerTextFieldElement_abortController","inputElement","clearError","error_message","setError","validationElement","validationMessageElement","innerText"],"mappings":"yBAAA,MAAMA,2BAA2BC,YAC7BC,cACI,OAAOC,KAAKC,aAAa,WAE7BF,YAAYG,GACJA,EACAF,KAAKG,aAAa,UAAW,IAG7BH,KAAKI,gBAAgB,WAG7BC,UACI,OAAOL,KAAKM,aAAa,QAAU,GAEvCD,QAAQH,GACJF,KAAKG,aAAa,MAAOD,GAE7BK,oBACSP,KAAKC,aAAa,SACnBD,KAAKG,aAAa,OAAQ,QAC9B,MAAMK,EAAUR,KAAKS,cACrB,IAAKD,EACD,OACJ,MAAME,EAAUF,EAAQG,cAAc,WAClCD,IACAA,EAAQP,aAAa,gBAAiB,QACjCO,EAAQT,aAAa,SACtBS,EAAQP,aAAa,OAAQ,WAErC,MAAMS,EAAgB,CAClBC,EAAUL,EAAS,oBAAoBM,GAAKC,EAAiBf,KAAMc,KACnED,EAAUL,E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