primer_view_components 0.0.66 → 0.0.69
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +104 -1
- data/README.md +1 -1
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/components/primer/alpha/tooltip.d.ts +24 -0
- data/app/components/primer/alpha/tooltip.js +381 -0
- data/app/components/primer/alpha/tooltip.rb +95 -0
- data/app/components/primer/alpha/tooltip.ts +377 -0
- data/app/components/primer/base_component.rb +2 -2
- data/app/components/primer/beta/auto_complete/auto_complete.html.erb +11 -3
- data/app/components/primer/beta/auto_complete.rb +20 -95
- data/app/components/primer/beta/blankslate.html.erb +6 -2
- data/app/components/primer/beta/blankslate.rb +8 -11
- data/app/components/primer/beta/truncate.rb +1 -0
- data/app/components/primer/content.rb +12 -0
- data/app/components/primer/details_component.rb +1 -1
- data/app/components/primer/dropdown.rb +2 -2
- data/app/components/primer/icon_button.rb +1 -1
- data/app/components/primer/markdown.rb +1 -1
- data/app/components/primer/popover_component.rb +15 -20
- data/app/components/primer/primer.d.ts +1 -0
- data/app/components/primer/primer.js +1 -0
- data/app/components/primer/primer.ts +1 -0
- data/app/components/primer/subhead_component.html.erb +1 -1
- data/app/components/primer/subhead_component.rb +1 -1
- data/app/components/primer/tooltip.rb +1 -1
- data/app/lib/primer/test_selector_helper.rb +1 -1
- data/lib/primer/classify/utilities.yml +20 -0
- data/lib/primer/view_components/linters/button_component_migration_counter.rb +1 -1
- data/lib/primer/view_components/version.rb +1 -1
- data/lib/rubocop/cop/primer/component_name_migration.rb +35 -0
- data/lib/rubocop/cop/primer/primer_octicon.rb +1 -1
- data/lib/tasks/docs.rake +19 -11
- data/lib/tasks/utilities.rake +1 -1
- data/static/arguments.yml +34 -1
- data/static/audited_at.json +2 -1
- data/static/classes.yml +5 -4
- data/static/constants.json +20 -8
- data/static/statuses.json +3 -2
- metadata +17 -11
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"primer_view_components.js","sources":["../../../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/clipboard_copy_component.js","../../../node_modules/@github/tab-container-element/dist/index.js","../../../node_modules/@github/time-elements/dist/index.js","../../../node_modules/@github/image-crop-element/dist/index.js","../../../node_modules/@github/details-menu-element/dist/index.js"],"sourcesContent":["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\nclass AutocompleteEvent extends CustomEvent {\n constructor(type, init) {\n super(type, init);\n this.relatedTarget = init.relatedTarget;\n }\n}\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 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\nclass Autocomplete {\n constructor(container, input, results) {\n this.container = container;\n this.input = input;\n this.results = results;\n this.combobox = new Combobox(input, results);\n this.results.hidden = true;\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.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 }\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 onKeydown(event) {\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.container.value = value;\n }\n onResultsMouseDown() {\n this.interactingWithList = true;\n }\n onInputChange() {\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 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 fragment(this.input, url.toString())\n .then(html => {\n this.results.innerHTML = html;\n this.identifyOptions();\n const hasResults = !!this.results.querySelector('[role=\"option\"]');\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\nconst state = new WeakMap();\nclass AutocompleteElement extends HTMLElement {\n constructor() {\n super();\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 state.set(this, new Autocomplete(this, input, results));\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}\n\nif (!window.customElements.get('auto-complete')) {\n window.AutocompleteElement = AutocompleteElement;\n window.customElements.define('auto-complete', AutocompleteElement);\n}\n\nexport default AutocompleteElement;\nexport { AutocompleteEvent };\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';\nconst CLIPBOARD_COPY_TIMER_DURATION = 2000;\nfunction showSVG(svg) {\n svg.style.display = 'inline-block';\n}\nfunction hideSVG(svg) {\n svg.style.display = 'none';\n}\n// Toggle a copy button.\nfunction showCopy(button) {\n const [copyIcon, checkIcon] = button.querySelectorAll('.octicon');\n if (!copyIcon || !checkIcon)\n return;\n showSVG(copyIcon);\n hideSVG(checkIcon);\n}\n// Toggle a copy button.\nfunction showCheck(button) {\n const [copyIcon, checkIcon] = button.querySelectorAll('.octicon');\n if (!copyIcon || !checkIcon)\n return;\n hideSVG(copyIcon);\n showSVG(checkIcon);\n}\nconst clipboardCopyElementTimers = new WeakMap();\ndocument.addEventListener('clipboard-copy', function ({ target }) {\n if (!(target instanceof HTMLElement))\n return;\n if (!target.hasAttribute('data-view-component'))\n return;\n const currentTimeout = clipboardCopyElementTimers.get(target);\n if (currentTimeout) {\n clearTimeout(currentTimeout);\n clipboardCopyElementTimers.delete(target);\n }\n else {\n showCheck(target);\n }\n clipboardCopyElementTimers.set(target, setTimeout(() => {\n showCopy(target);\n clipboardCopyElementTimers.delete(target);\n }, CLIPBOARD_COPY_TIMER_DURATION));\n});\n","export 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.getAttribute('role') !== 'tab' && !target.closest('[role=\"tablist\"]'))\n return;\n const tabs = Array.from(this.querySelectorAll('[role=\"tablist\"] [role=\"tab\"]'));\n const currentIndex = tabs.indexOf(tabs.find(tab => tab.matches('[aria-selected=\"true\"]')));\n if (event.code === 'ArrowRight') {\n let index = currentIndex + 1;\n if (index >= tabs.length)\n index = 0;\n selectTab(this, index);\n }\n else if (event.code === 'ArrowLeft') {\n let index = currentIndex - 1;\n if (index < 0)\n index = tabs.length - 1;\n selectTab(this, index);\n }\n else if (event.code === 'Home') {\n selectTab(this, 0);\n event.preventDefault();\n }\n else if (event.code === 'End') {\n selectTab(this, tabs.length - 1);\n event.preventDefault();\n }\n });\n this.addEventListener('click', (event) => {\n const tabs = Array.from(this.querySelectorAll('[role=\"tablist\"] [role=\"tab\"]'));\n if (!(event.target instanceof Element))\n return;\n const tab = event.target.closest('[role=\"tab\"]');\n if (!tab || !tab.closest('[role=\"tablist\"]'))\n return;\n const index = tabs.indexOf(tab);\n selectTab(this, index);\n });\n }\n connectedCallback() {\n for (const tab of this.querySelectorAll('[role=\"tablist\"] [role=\"tab\"]')) {\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}\nfunction selectTab(tabContainer, index) {\n const tabs = tabContainer.querySelectorAll('[role=\"tablist\"] [role=\"tab\"]');\n const panels = tabContainer.querySelectorAll('[role=\"tabpanel\"]');\n const selectedTab = tabs[index];\n const selectedPanel = panels[index];\n const cancelled = !tabContainer.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 tabContainer.dispatchEvent(new CustomEvent('tab-container-changed', {\n bubbles: true,\n detail: { relatedTarget: selectedPanel }\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","const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\nconst months = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December'\n];\nfunction pad(num) {\n return `0${num}`.slice(-2);\n}\nfunction strftime(time, formatString) {\n const day = time.getDay();\n const date = time.getDate();\n const month = time.getMonth();\n const year = time.getFullYear();\n const hour = time.getHours();\n const minute = time.getMinutes();\n const second = time.getSeconds();\n return formatString.replace(/%([%aAbBcdeHIlmMpPSwyYZz])/g, function (_arg) {\n let match;\n const modifier = _arg[1];\n switch (modifier) {\n case '%':\n return '%';\n case 'a':\n return weekdays[day].slice(0, 3);\n case 'A':\n return weekdays[day];\n case 'b':\n return months[month].slice(0, 3);\n case 'B':\n return months[month];\n case 'c':\n return time.toString();\n case 'd':\n return pad(date);\n case 'e':\n return String(date);\n case 'H':\n return pad(hour);\n case 'I':\n return pad(strftime(time, '%l'));\n case 'l':\n if (hour === 0 || hour === 12) {\n return String(12);\n }\n else {\n return String((hour + 12) % 12);\n }\n case 'm':\n return pad(month + 1);\n case 'M':\n return pad(minute);\n case 'p':\n if (hour > 11) {\n return 'PM';\n }\n else {\n return 'AM';\n }\n case 'P':\n if (hour > 11) {\n return 'pm';\n }\n else {\n return 'am';\n }\n case 'S':\n return pad(second);\n case 'w':\n return String(day);\n case 'y':\n return pad(year % 100);\n case 'Y':\n return String(year);\n case 'Z':\n match = time.toString().match(/\\((\\w+)\\)$/);\n return match ? match[1] : '';\n case 'z':\n match = time.toString().match(/\\w([+-]\\d\\d\\d\\d) /);\n return match ? match[1] : '';\n }\n return '';\n });\n}\nfunction makeFormatter(options) {\n let format;\n return function () {\n if (format)\n return format;\n if ('Intl' in window) {\n try {\n format = new Intl.DateTimeFormat(undefined, options);\n return format;\n }\n catch (e) {\n if (!(e instanceof RangeError)) {\n throw e;\n }\n }\n }\n };\n}\nlet dayFirst = null;\nconst dayFirstFormatter = makeFormatter({ day: 'numeric', month: 'short' });\nfunction isDayFirst() {\n if (dayFirst !== null) {\n return dayFirst;\n }\n const formatter = dayFirstFormatter();\n if (formatter) {\n const output = formatter.format(new Date(0));\n dayFirst = !!output.match(/^\\d/);\n return dayFirst;\n }\n else {\n return false;\n }\n}\nlet yearSeparator = null;\nconst yearFormatter = makeFormatter({ day: 'numeric', month: 'short', year: 'numeric' });\nfunction isYearSeparator() {\n if (yearSeparator !== null) {\n return yearSeparator;\n }\n const formatter = yearFormatter();\n if (formatter) {\n const output = formatter.format(new Date(0));\n yearSeparator = !!output.match(/\\d,/);\n return yearSeparator;\n }\n else {\n return true;\n }\n}\nfunction isThisYear(date) {\n const now = new Date();\n return now.getUTCFullYear() === date.getUTCFullYear();\n}\nfunction makeRelativeFormat(locale, options) {\n if ('Intl' in window && 'RelativeTimeFormat' in window.Intl) {\n try {\n return new Intl.RelativeTimeFormat(locale, options);\n }\n catch (e) {\n if (!(e instanceof RangeError)) {\n throw e;\n }\n }\n }\n}\nfunction localeFromElement(el) {\n const container = el.closest('[lang]');\n if (container instanceof HTMLElement && container.lang) {\n return container.lang;\n }\n return 'default';\n}\n\nconst datetimes = new WeakMap();\nclass ExtendedTimeElement extends HTMLElement {\n static get observedAttributes() {\n return [\n 'datetime',\n 'day',\n 'format',\n 'lang',\n 'hour',\n 'minute',\n 'month',\n 'second',\n 'title',\n 'weekday',\n 'year',\n 'time-zone-name'\n ];\n }\n connectedCallback() {\n const title = this.getFormattedTitle();\n if (title && !this.hasAttribute('title')) {\n this.setAttribute('title', title);\n }\n const text = this.getFormattedDate();\n if (text) {\n this.textContent = text;\n }\n }\n attributeChangedCallback(attrName, oldValue, newValue) {\n const oldTitle = this.getFormattedTitle();\n if (attrName === 'datetime') {\n const millis = Date.parse(newValue);\n if (isNaN(millis)) {\n datetimes.delete(this);\n }\n else {\n datetimes.set(this, new Date(millis));\n }\n }\n const title = this.getFormattedTitle();\n const currentTitle = this.getAttribute('title');\n if (attrName !== 'title' && title && (!currentTitle || currentTitle === oldTitle)) {\n this.setAttribute('title', title);\n }\n const text = this.getFormattedDate();\n if (text) {\n this.textContent = text;\n }\n }\n get date() {\n return datetimes.get(this);\n }\n getFormattedTitle() {\n const date = this.date;\n if (!date)\n return;\n const formatter = titleFormatter();\n if (formatter) {\n return formatter.format(date);\n }\n else {\n try {\n return date.toLocaleString();\n }\n catch (e) {\n if (e instanceof RangeError) {\n return date.toString();\n }\n else {\n throw e;\n }\n }\n }\n }\n getFormattedDate() {\n return;\n }\n}\nconst titleFormatter = makeFormatter({\n day: 'numeric',\n month: 'short',\n year: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n timeZoneName: 'short'\n});\n\nconst formatters = new WeakMap();\nclass LocalTimeElement extends ExtendedTimeElement {\n attributeChangedCallback(attrName, oldValue, newValue) {\n if (attrName === 'hour' || attrName === 'minute' || attrName === 'second' || attrName === 'time-zone-name') {\n formatters.delete(this);\n }\n super.attributeChangedCallback(attrName, oldValue, newValue);\n }\n getFormattedDate() {\n const d = this.date;\n if (!d)\n return;\n const date = formatDate(this, d) || '';\n const time = formatTime(this, d) || '';\n return `${date} ${time}`.trim();\n }\n}\nfunction formatDate(el, date) {\n const props = {\n weekday: {\n short: '%a',\n long: '%A'\n },\n day: {\n numeric: '%e',\n '2-digit': '%d'\n },\n month: {\n short: '%b',\n long: '%B'\n },\n year: {\n numeric: '%Y',\n '2-digit': '%y'\n }\n };\n let format = isDayFirst() ? 'weekday day month year' : 'weekday month day, year';\n for (const prop in props) {\n const value = props[prop][el.getAttribute(prop) || ''];\n format = format.replace(prop, value || '');\n }\n format = format.replace(/(\\s,)|(,\\s$)/, '');\n return strftime(date, format).replace(/\\s+/, ' ').trim();\n}\nfunction formatTime(el, date) {\n const options = {};\n const hour = el.getAttribute('hour');\n if (hour === 'numeric' || hour === '2-digit')\n options.hour = hour;\n const minute = el.getAttribute('minute');\n if (minute === 'numeric' || minute === '2-digit')\n options.minute = minute;\n const second = el.getAttribute('second');\n if (second === 'numeric' || second === '2-digit')\n options.second = second;\n const tz = el.getAttribute('time-zone-name');\n if (tz === 'short' || tz === 'long')\n options.timeZoneName = tz;\n if (Object.keys(options).length === 0) {\n return;\n }\n let factory = formatters.get(el);\n if (!factory) {\n factory = makeFormatter(options);\n formatters.set(el, factory);\n }\n const formatter = factory();\n if (formatter) {\n return formatter.format(date);\n }\n else {\n const timef = options.second ? '%H:%M:%S' : '%H:%M';\n return strftime(date, timef);\n }\n}\nif (!window.customElements.get('local-time')) {\n window.LocalTimeElement = LocalTimeElement;\n window.customElements.define('local-time', LocalTimeElement);\n}\n\nclass RelativeTime {\n constructor(date, locale) {\n this.date = date;\n this.locale = locale;\n }\n toString() {\n const ago = this.timeElapsed();\n if (ago) {\n return ago;\n }\n else {\n const ahead = this.timeAhead();\n if (ahead) {\n return ahead;\n }\n else {\n return `on ${this.formatDate()}`;\n }\n }\n }\n timeElapsed() {\n const ms = new Date().getTime() - this.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 if (ms >= 0 && day < 30) {\n return this.timeAgoFromMs(ms);\n }\n else {\n return null;\n }\n }\n timeAhead() {\n const ms = this.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 if (ms >= 0 && day < 30) {\n return this.timeUntil();\n }\n else {\n return null;\n }\n }\n timeAgo() {\n const ms = new Date().getTime() - this.date.getTime();\n return this.timeAgoFromMs(ms);\n }\n timeAgoFromMs(ms) {\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 formatRelativeTime(this.locale, 0, 'second');\n }\n else if (sec < 10) {\n return formatRelativeTime(this.locale, 0, 'second');\n }\n else if (sec < 45) {\n return formatRelativeTime(this.locale, -sec, 'second');\n }\n else if (sec < 90) {\n return formatRelativeTime(this.locale, -min, 'minute');\n }\n else if (min < 45) {\n return formatRelativeTime(this.locale, -min, 'minute');\n }\n else if (min < 90) {\n return formatRelativeTime(this.locale, -hr, 'hour');\n }\n else if (hr < 24) {\n return formatRelativeTime(this.locale, -hr, 'hour');\n }\n else if (hr < 36) {\n return formatRelativeTime(this.locale, -day, 'day');\n }\n else if (day < 30) {\n return formatRelativeTime(this.locale, -day, 'day');\n }\n else if (month < 18) {\n return formatRelativeTime(this.locale, -month, 'month');\n }\n else {\n return formatRelativeTime(this.locale, -year, 'year');\n }\n }\n microTimeAgo() {\n const ms = new Date().getTime() - this.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 '1m';\n }\n else if (min < 60) {\n return `${min}m`;\n }\n else if (hr < 24) {\n return `${hr}h`;\n }\n else if (day < 365) {\n return `${day}d`;\n }\n else {\n return `${year}y`;\n }\n }\n timeUntil() {\n const ms = this.date.getTime() - new Date().getTime();\n return this.timeUntilFromMs(ms);\n }\n timeUntilFromMs(ms) {\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 formatRelativeTime(this.locale, year, 'year');\n }\n else if (month >= 12) {\n return formatRelativeTime(this.locale, year, 'year');\n }\n else if (day >= 45) {\n return formatRelativeTime(this.locale, month, 'month');\n }\n else if (day >= 30) {\n return formatRelativeTime(this.locale, month, 'month');\n }\n else if (hr >= 36) {\n return formatRelativeTime(this.locale, day, 'day');\n }\n else if (hr >= 24) {\n return formatRelativeTime(this.locale, day, 'day');\n }\n else if (min >= 90) {\n return formatRelativeTime(this.locale, hr, 'hour');\n }\n else if (min >= 45) {\n return formatRelativeTime(this.locale, hr, 'hour');\n }\n else if (sec >= 90) {\n return formatRelativeTime(this.locale, min, 'minute');\n }\n else if (sec >= 45) {\n return formatRelativeTime(this.locale, min, 'minute');\n }\n else if (sec >= 10) {\n return formatRelativeTime(this.locale, sec, 'second');\n }\n else {\n return formatRelativeTime(this.locale, 0, 'second');\n }\n }\n microTimeUntil() {\n const ms = this.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}y`;\n }\n else if (hr >= 24) {\n return `${day}d`;\n }\n else if (min >= 60) {\n return `${hr}h`;\n }\n else if (min > 1) {\n return `${min}m`;\n }\n else {\n return '1m';\n }\n }\n formatDate() {\n let format = isDayFirst() ? '%e %b' : '%b %e';\n if (!isThisYear(this.date)) {\n format += isYearSeparator() ? ', %Y' : ' %Y';\n }\n return strftime(this.date, format);\n }\n formatTime() {\n const formatter = timeFormatter();\n if (formatter) {\n return formatter.format(this.date);\n }\n else {\n return strftime(this.date, '%l:%M%P');\n }\n }\n}\nfunction formatRelativeTime(locale, value, unit) {\n const formatter = makeRelativeFormat(locale, { numeric: 'auto' });\n if (formatter) {\n return formatter.format(value, unit);\n }\n else {\n return formatEnRelativeTime(value, unit);\n }\n}\nfunction formatEnRelativeTime(value, unit) {\n if (value === 0) {\n switch (unit) {\n case 'year':\n case 'quarter':\n case 'month':\n case 'week':\n return `this ${unit}`;\n case 'day':\n return 'today';\n case 'hour':\n case 'minute':\n return `in 0 ${unit}s`;\n case 'second':\n return 'now';\n }\n }\n else if (value === 1) {\n switch (unit) {\n case 'year':\n case 'quarter':\n case 'month':\n case 'week':\n return `next ${unit}`;\n case 'day':\n return 'tomorrow';\n case 'hour':\n case 'minute':\n case 'second':\n return `in 1 ${unit}`;\n }\n }\n else if (value === -1) {\n switch (unit) {\n case 'year':\n case 'quarter':\n case 'month':\n case 'week':\n return `last ${unit}`;\n case 'day':\n return 'yesterday';\n case 'hour':\n case 'minute':\n case 'second':\n return `1 ${unit} ago`;\n }\n }\n else if (value > 1) {\n switch (unit) {\n case 'year':\n case 'quarter':\n case 'month':\n case 'week':\n case 'day':\n case 'hour':\n case 'minute':\n case 'second':\n return `in ${value} ${unit}s`;\n }\n }\n else if (value < -1) {\n switch (unit) {\n case 'year':\n case 'quarter':\n case 'month':\n case 'week':\n case 'day':\n case 'hour':\n case 'minute':\n case 'second':\n return `${-value} ${unit}s ago`;\n }\n }\n throw new RangeError(`Invalid unit argument for format() '${unit}'`);\n}\nconst timeFormatter = makeFormatter({ hour: 'numeric', minute: '2-digit' });\n\nclass RelativeTimeElement extends ExtendedTimeElement {\n getFormattedDate() {\n const date = this.date;\n if (!date)\n return;\n return new RelativeTime(date, localeFromElement(this)).toString();\n }\n connectedCallback() {\n nowElements.push(this);\n if (!updateNowElementsId) {\n updateNowElements();\n updateNowElementsId = window.setInterval(updateNowElements, 60 * 1000);\n }\n super.connectedCallback();\n }\n disconnectedCallback() {\n const ix = nowElements.indexOf(this);\n if (ix !== -1) {\n nowElements.splice(ix, 1);\n }\n if (!nowElements.length) {\n if (updateNowElementsId) {\n clearInterval(updateNowElementsId);\n updateNowElementsId = null;\n }\n }\n }\n}\nconst nowElements = [];\nlet updateNowElementsId;\nfunction updateNowElements() {\n let time, i, len;\n for (i = 0, len = nowElements.length; i < len; i++) {\n time = nowElements[i];\n time.textContent = time.getFormattedDate() || '';\n }\n}\nif (!window.customElements.get('relative-time')) {\n window.RelativeTimeElement = RelativeTimeElement;\n window.customElements.define('relative-time', RelativeTimeElement);\n}\n\nclass TimeAgoElement extends RelativeTimeElement {\n getFormattedDate() {\n const format = this.getAttribute('format');\n const date = this.date;\n if (!date)\n return;\n if (format === 'micro') {\n return new RelativeTime(date, localeFromElement(this)).microTimeAgo();\n }\n else {\n return new RelativeTime(date, localeFromElement(this)).timeAgo();\n }\n }\n}\nif (!window.customElements.get('time-ago')) {\n window.TimeAgoElement = TimeAgoElement;\n window.customElements.define('time-ago', TimeAgoElement);\n}\n\nclass TimeUntilElement extends RelativeTimeElement {\n getFormattedDate() {\n const format = this.getAttribute('format');\n const date = this.date;\n if (!date)\n return;\n if (format === 'micro') {\n return new RelativeTime(date, localeFromElement(this)).microTimeUntil();\n }\n else {\n return new RelativeTime(date, localeFromElement(this)).timeUntil();\n }\n }\n}\nif (!window.customElements.get('time-until')) {\n window.TimeUntilElement = TimeUntilElement;\n window.customElements.define('time-until', TimeUntilElement);\n}\n\nexport { LocalTimeElement, RelativeTimeElement, TimeAgoElement, TimeUntilElement };\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<style>\n :host { touch-action: none; display: block; }\n :host(.nesw) { cursor: nesw-resize; }\n :host(.nwse) { cursor: nwse-resize; }\n :host(.nesw) .crop-box, :host(.nwse) .crop-box { cursor: inherit; }\n :host([loaded]) .crop-image { display: block; }\n :host([loaded]) ::slotted([data-loading-slot]), .crop-image { display: none; }\n\n .crop-wrapper {\n position: relative;\n font-size: 0;\n }\n .crop-container {\n user-select: none;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n position: absolute;\n overflow: hidden;\n z-index: 1;\n top: 0;\n width: 100%;\n height: 100%;\n }\n\n :host([rounded]) .crop-box {\n border-radius: 50%;\n box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.3);\n }\n .crop-box {\n position: absolute;\n border: 1px dashed #fff;\n box-sizing: border-box;\n cursor: move;\n }\n\n :host([rounded]) .crop-outline {\n outline: none;\n }\n .crop-outline {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n outline: 4000px solid rgba(0, 0, 0, .3);\n }\n\n .handle { position: absolute; }\n :host([rounded]) .handle::before { border-radius: 50%; }\n .handle:before {\n position: absolute;\n display: block;\n padding: 4px;\n transform: translate(-50%, -50%);\n content: ' ';\n background: #fff;\n border: 1px solid #767676;\n }\n .ne { top: 0; right: 0; cursor: nesw-resize; }\n .nw { top: 0; left: 0; cursor: nwse-resize; }\n .se { bottom: 0; right: 0; cursor: nwse-resize; }\n .sw { bottom: 0; left: 0; cursor: nesw-resize; }\n</style>\n<slot></slot>\n<div class=\"crop-wrapper\">\n <img width=\"100%\" class=\"crop-image\" alt=\"\">\n <div class=\"crop-container\">\n <div data-crop-box class=\"crop-box\">\n <div class=\"crop-outline\"></div>\n <div data-direction=\"nw\" class=\"handle nw\"></div>\n <div data-direction=\"ne\" class=\"handle ne\"></div>\n <div data-direction=\"sw\" class=\"handle sw\"></div>\n <div data-direction=\"se\" class=\"handle se\"></div>\n </div>\n </div>\n</div>\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","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]):not([aria-disabled=\"true\"])'));\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"],"names":["ctrlBindings","navigator","userAgent","match","Combobox","[object Object]","input","list","this","isComposing","id","Math","random","toString","slice","keyboardEventHandler","event","combobox","shiftKey","metaKey","altKey","ctrlKey","key","target","querySelector","getAttribute","click","commit","preventDefault","clearSelection","navigate","keyboardBindings","compositionEventHandler","type","document","getElementById","trackComposition","inputHandler","bind","setAttribute","stop","removeAttribute","addEventListener","commitWithElement","removeEventListener","indexDiff","focusEl","Array","from","querySelectorAll","filter","visible","els","focusIndex","indexOf","length","focus","indexOfItem","newIndex","el","scrollTo","Element","closest","dispatchEvent","CustomEvent","bubbles","fireCommitEvent","hidden","HTMLInputElement","offsetWidth","offsetHeight","container","element","scrollTop","containerBottom","clientHeight","top","offsetTop","bottom","inViewport","AutocompleteEvent","init","super","relatedTarget","requests","WeakMap","fragment","url","xhr","XMLHttpRequest","open","setRequestHeader","pending","get","abort","set","clear","delete","result","Promise","resolve","reject","onload","status","responseText","Error","onerror","send","then","request","Autocomplete","results","interactingWithList","onInputChange","callback","wait","timeout","Rest","clearTimeout","window","setTimeout","debounce","onResultsMouseDown","onInputBlur","onInputFocus","onKeydown","onCommit","stopPropagation","value","trim","fetchResults","selected","HTMLElement","HTMLAnchorElement","textContent","query","src","URL","location","href","params","URLSearchParams","search","append","html","innerHTML","identifyOptions","hasResults","catch","start","state","AutocompleteElement","listId","autocomplete","destroy","hasAttribute","observedAttributes","name","oldValue","newValue","close","copyNode","node","clipboard","writeText","selection","getSelection","removeAllRanges","range","createRange","selectNodeContents","addRange","execCommand","copyText","text","body","createElement","style","width","height","position","createNode","appendChild","removeChild","copy","button","trigger","root","prototype","getRootNode","ownerDocument","Document","ShadowRoot","content","HTMLTextAreaElement","clicked","currentTarget","keydown","focused","blurred","customElements","define","ClipboardCopyElement","showSVG","svg","display","hideSVG","clipboardCopyElementTimers","currentTimeout","copyIcon","checkIcon","showCheck","showCopy","TabContainerElement","tabs","currentIndex","find","tab","matches","code","index","selectTab","tabContainer","panels","selectedTab","selectedPanel","cancelable","detail","panel","weekdays","months","pad","num","strftime","time","formatString","day","getDay","date","getDate","month","getMonth","year","getFullYear","hour","getHours","minute","getMinutes","second","getSeconds","replace","_arg","String","makeFormatter","options","format","Intl","DateTimeFormat","undefined","e","RangeError","dayFirst","dayFirstFormatter","isDayFirst","formatter","output","Date","yearSeparator","yearFormatter","localeFromElement","lang","datetimes","ExtendedTimeElement","title","getFormattedTitle","getFormattedDate","attrName","oldTitle","millis","parse","isNaN","currentTitle","titleFormatter","toLocaleString","timeZoneName","formatters","LocalTimeElement","attributeChangedCallback","d","props","weekday","short","long","numeric","2-digit","prop","formatDate","tz","Object","keys","factory","formatTime","RelativeTime","locale","ago","timeElapsed","ahead","timeAhead","ms","getTime","sec","round","min","hr","timeAgoFromMs","timeUntil","formatRelativeTime","timeUntilFromMs","getUTCFullYear","isYearSeparator","timeFormatter","unit","RelativeTimeFormat","makeRelativeFormat","formatEnRelativeTime","RelativeTimeElement","nowElements","push","updateNowElementsId","updateNowElements","setInterval","connectedCallback","ix","splice","clearInterval","i","len","TimeAgoElement","microTimeAgo","timeAgo","TimeUntilElement","microTimeUntil","startPositions","dragStartPositions","constructedElements","moveCropArea","ImageCropElement","box","image","deltaX","deltaY","KeyboardEvent","has","MouseEvent","pos","pageX","dragStartX","pageY","dragStartY","TouchEvent","changedTouches","x","max","offsetLeft","y","left","fireChangeEvent","updateCropArea","getShadowHost","rect","getBoundingClientRect","delta","setInitialPosition","startX","startY","pageXOffset","pageYOffset","updateDimensions","rootNode","host","startUpdate","direction","passive","classList","add","reposition","newSide","abs","side","clientWidth","stopUpdate","remove","ratio","naturalWidth","slottedInput","shadowRoot","attachShadow","mode","HTMLImageElement","loaded","val","attribute","DetailsMenuElement","preload","details","parentElement","summary","subscriptions","fromEvent","shouldCommit","menu","states","isSummaryFocused","tagName","sibling","activeElement","isMenuItem","loadFragment","once","opened","contains","closeCurrentMenu","NullSubscription","focusOnOpen","sub","unsubscribe","eventName","onNext","loader","autofocus","isMouse","focusFirstItem","next","found","def","menuitem","checked","item","textEl","labelText","contentsEl","labelHTML","updateLabel","checkState","indeterminate","updateChecked","role"],"mappings":"AAAA,MAAMA,IAAiBC,UAAUC,UAAUC,MAAM,aAClC,MAAMC,EACjBC,YAAYC,EAAOC,GACfC,KAAKF,MAAQA,EACbE,KAAKD,KAAOA,EACZC,KAAKC,aAAc,EACdF,EAAKG,KACNH,EAAKG,GAAK,YAAYC,KAAKC,SACtBC,WACAC,MAAM,EAAG,MAElBN,KAAKO,q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Aa,eAAgBoZ,IAgBpCE,CAAc1T,EAAUiR,GACc,qBAAlCjR,EAAS1G,aAAa,SACtBuI,GAAMoP,GACVM,EAAK3V,cAAc,IAAIC,YAAY,wBAAyB,CACxDmK,OAAQ,CAAEhJ,cAAegD,OA2EjC,SAAS6R,GAAWrW,GAChB,MAAMmY,EAAOnY,EAAGlC,aAAa,QAC7B,MAAgB,aAATqa,GAAgC,qBAATA,GAAwC,kBAATA,EAEjE,SAAS9R,GAAMoP,GAEX,IADgBA,EAAQzP,aAAa,QAEjC,OACJyP,EAAQ3W,gBAAgB,QACxB,MAAM6W,EAAUF,EAAQ5X,cAAc,WAClC8X,GACAA,EAAQ9V,QA8BhB,SAASpB,GAAiBsX,EAAM1Y,GAC5B,MAAMsI,EAAQqQ,GAAO9T,IAAI6T,GACpBpQ,IAELA,EAAM7I,YAA6B,qBAAfO,EAAMiB,MAGzBsF,OAAOiF,eAAe3G,IAAI,kBAC3B0B,OAAO2R,mBAAqBA,GAC5B3R,OAAOiF,eAAeC,OAAO,eAAgByM"}
|
1
|
+
{"version":3,"file":"primer_view_components.js","sources":["../../../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/clipboard_copy_component.js","../../../node_modules/@github/tab-container-element/dist/index.js","../../../node_modules/@github/time-elements/dist/index.js","../../../node_modules/@github/image-crop-element/dist/index.js","../../../node_modules/@github/details-menu-element/dist/index.js","../../../node_modules/@primer/behaviors/dist/esm/anchored-position.js","../../components/primer/alpha/tooltip.js"],"sourcesContent":["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\nclass AutocompleteEvent extends CustomEvent {\n constructor(type, init) {\n super(type, init);\n this.relatedTarget = init.relatedTarget;\n }\n}\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 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\nclass Autocomplete {\n constructor(container, input, results) {\n this.container = container;\n this.input = input;\n this.results = results;\n this.combobox = new Combobox(input, results);\n this.results.hidden = true;\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.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 }\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 onKeydown(event) {\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.container.value = value;\n }\n onResultsMouseDown() {\n this.interactingWithList = true;\n }\n onInputChange() {\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 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 fragment(this.input, url.toString())\n .then(html => {\n this.results.innerHTML = html;\n this.identifyOptions();\n const hasResults = !!this.results.querySelector('[role=\"option\"]');\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\nconst state = new WeakMap();\nclass AutocompleteElement extends HTMLElement {\n constructor() {\n super();\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 state.set(this, new Autocomplete(this, input, results));\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}\n\nif (!window.customElements.get('auto-complete')) {\n window.AutocompleteElement = AutocompleteElement;\n window.customElements.define('auto-complete', AutocompleteElement);\n}\n\nexport default AutocompleteElement;\nexport { AutocompleteEvent };\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';\nconst CLIPBOARD_COPY_TIMER_DURATION = 2000;\nfunction showSVG(svg) {\n svg.style.display = 'inline-block';\n}\nfunction hideSVG(svg) {\n svg.style.display = 'none';\n}\n// Toggle a copy button.\nfunction showCopy(button) {\n const [copyIcon, checkIcon] = button.querySelectorAll('.octicon');\n if (!copyIcon || !checkIcon)\n return;\n showSVG(copyIcon);\n hideSVG(checkIcon);\n}\n// Toggle a copy button.\nfunction showCheck(button) {\n const [copyIcon, checkIcon] = button.querySelectorAll('.octicon');\n if (!copyIcon || !checkIcon)\n return;\n hideSVG(copyIcon);\n showSVG(checkIcon);\n}\nconst clipboardCopyElementTimers = new WeakMap();\ndocument.addEventListener('clipboard-copy', function ({ target }) {\n if (!(target instanceof HTMLElement))\n return;\n if (!target.hasAttribute('data-view-component'))\n return;\n const currentTimeout = clipboardCopyElementTimers.get(target);\n if (currentTimeout) {\n clearTimeout(currentTimeout);\n clipboardCopyElementTimers.delete(target);\n }\n else {\n showCheck(target);\n }\n clipboardCopyElementTimers.set(target, setTimeout(() => {\n showCopy(target);\n clipboardCopyElementTimers.delete(target);\n }, CLIPBOARD_COPY_TIMER_DURATION));\n});\n","export 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.getAttribute('role') !== 'tab' && !target.closest('[role=\"tablist\"]'))\n return;\n const tabs = Array.from(this.querySelectorAll('[role=\"tablist\"] [role=\"tab\"]'));\n const currentIndex = tabs.indexOf(tabs.find(tab => tab.matches('[aria-selected=\"true\"]')));\n if (event.code === 'ArrowRight') {\n let index = currentIndex + 1;\n if (index >= tabs.length)\n index = 0;\n selectTab(this, index);\n }\n else if (event.code === 'ArrowLeft') {\n let index = currentIndex - 1;\n if (index < 0)\n index = tabs.length - 1;\n selectTab(this, index);\n }\n else if (event.code === 'Home') {\n selectTab(this, 0);\n event.preventDefault();\n }\n else if (event.code === 'End') {\n selectTab(this, tabs.length - 1);\n event.preventDefault();\n }\n });\n this.addEventListener('click', (event) => {\n const tabs = Array.from(this.querySelectorAll('[role=\"tablist\"] [role=\"tab\"]'));\n if (!(event.target instanceof Element))\n return;\n const tab = event.target.closest('[role=\"tab\"]');\n if (!tab || !tab.closest('[role=\"tablist\"]'))\n return;\n const index = tabs.indexOf(tab);\n selectTab(this, index);\n });\n }\n connectedCallback() {\n for (const tab of this.querySelectorAll('[role=\"tablist\"] [role=\"tab\"]')) {\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}\nfunction selectTab(tabContainer, index) {\n const tabs = tabContainer.querySelectorAll('[role=\"tablist\"] [role=\"tab\"]');\n const panels = tabContainer.querySelectorAll('[role=\"tabpanel\"]');\n const selectedTab = tabs[index];\n const selectedPanel = panels[index];\n const cancelled = !tabContainer.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 tabContainer.dispatchEvent(new CustomEvent('tab-container-changed', {\n bubbles: true,\n detail: { relatedTarget: selectedPanel }\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","const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\nconst months = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December'\n];\nfunction pad(num) {\n return `0${num}`.slice(-2);\n}\nfunction strftime(time, formatString) {\n const day = time.getDay();\n const date = time.getDate();\n const month = time.getMonth();\n const year = time.getFullYear();\n const hour = time.getHours();\n const minute = time.getMinutes();\n const second = time.getSeconds();\n return formatString.replace(/%([%aAbBcdeHIlmMpPSwyYZz])/g, function (_arg) {\n let match;\n const modifier = _arg[1];\n switch (modifier) {\n case '%':\n return '%';\n case 'a':\n return weekdays[day].slice(0, 3);\n case 'A':\n return weekdays[day];\n case 'b':\n return months[month].slice(0, 3);\n case 'B':\n return months[month];\n case 'c':\n return time.toString();\n case 'd':\n return pad(date);\n case 'e':\n return String(date);\n case 'H':\n return pad(hour);\n case 'I':\n return pad(strftime(time, '%l'));\n case 'l':\n if (hour === 0 || hour === 12) {\n return String(12);\n }\n else {\n return String((hour + 12) % 12);\n }\n case 'm':\n return pad(month + 1);\n case 'M':\n return pad(minute);\n case 'p':\n if (hour > 11) {\n return 'PM';\n }\n else {\n return 'AM';\n }\n case 'P':\n if (hour > 11) {\n return 'pm';\n }\n else {\n return 'am';\n }\n case 'S':\n return pad(second);\n case 'w':\n return String(day);\n case 'y':\n return pad(year % 100);\n case 'Y':\n return String(year);\n case 'Z':\n match = time.toString().match(/\\((\\w+)\\)$/);\n return match ? match[1] : '';\n case 'z':\n match = time.toString().match(/\\w([+-]\\d\\d\\d\\d) /);\n return match ? match[1] : '';\n }\n return '';\n });\n}\nfunction makeFormatter(options) {\n let format;\n return function () {\n if (format)\n return format;\n if ('Intl' in window) {\n try {\n format = new Intl.DateTimeFormat(undefined, options);\n return format;\n }\n catch (e) {\n if (!(e instanceof RangeError)) {\n throw e;\n }\n }\n }\n };\n}\nlet dayFirst = null;\nconst dayFirstFormatter = makeFormatter({ day: 'numeric', month: 'short' });\nfunction isDayFirst() {\n if (dayFirst !== null) {\n return dayFirst;\n }\n const formatter = dayFirstFormatter();\n if (formatter) {\n const output = formatter.format(new Date(0));\n dayFirst = !!output.match(/^\\d/);\n return dayFirst;\n }\n else {\n return false;\n }\n}\nlet yearSeparator = null;\nconst yearFormatter = makeFormatter({ day: 'numeric', month: 'short', year: 'numeric' });\nfunction isYearSeparator() {\n if (yearSeparator !== null) {\n return yearSeparator;\n }\n const formatter = yearFormatter();\n if (formatter) {\n const output = formatter.format(new Date(0));\n yearSeparator = !!output.match(/\\d,/);\n return yearSeparator;\n }\n else {\n return true;\n }\n}\nfunction isThisYear(date) {\n const now = new Date();\n return now.getUTCFullYear() === date.getUTCFullYear();\n}\nfunction makeRelativeFormat(locale, options) {\n if ('Intl' in window && 'RelativeTimeFormat' in window.Intl) {\n try {\n return new Intl.RelativeTimeFormat(locale, options);\n }\n catch (e) {\n if (!(e instanceof RangeError)) {\n throw e;\n }\n }\n }\n}\nfunction localeFromElement(el) {\n const container = el.closest('[lang]');\n if (container instanceof HTMLElement && container.lang) {\n return container.lang;\n }\n return 'default';\n}\n\nconst datetimes = new WeakMap();\nclass ExtendedTimeElement extends HTMLElement {\n static get observedAttributes() {\n return [\n 'datetime',\n 'day',\n 'format',\n 'lang',\n 'hour',\n 'minute',\n 'month',\n 'second',\n 'title',\n 'weekday',\n 'year',\n 'time-zone-name'\n ];\n }\n connectedCallback() {\n const title = this.getFormattedTitle();\n if (title && !this.hasAttribute('title')) {\n this.setAttribute('title', title);\n }\n const text = this.getFormattedDate();\n if (text) {\n this.textContent = text;\n }\n }\n attributeChangedCallback(attrName, oldValue, newValue) {\n const oldTitle = this.getFormattedTitle();\n if (attrName === 'datetime') {\n const millis = Date.parse(newValue);\n if (isNaN(millis)) {\n datetimes.delete(this);\n }\n else {\n datetimes.set(this, new Date(millis));\n }\n }\n const title = this.getFormattedTitle();\n const currentTitle = this.getAttribute('title');\n if (attrName !== 'title' && title && (!currentTitle || currentTitle === oldTitle)) {\n this.setAttribute('title', title);\n }\n const text = this.getFormattedDate();\n if (text) {\n this.textContent = text;\n }\n }\n get date() {\n return datetimes.get(this);\n }\n getFormattedTitle() {\n const date = this.date;\n if (!date)\n return;\n const formatter = titleFormatter();\n if (formatter) {\n return formatter.format(date);\n }\n else {\n try {\n return date.toLocaleString();\n }\n catch (e) {\n if (e instanceof RangeError) {\n return date.toString();\n }\n else {\n throw e;\n }\n }\n }\n }\n getFormattedDate() {\n return;\n }\n}\nconst titleFormatter = makeFormatter({\n day: 'numeric',\n month: 'short',\n year: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n timeZoneName: 'short'\n});\n\nconst formatters = new WeakMap();\nclass LocalTimeElement extends ExtendedTimeElement {\n attributeChangedCallback(attrName, oldValue, newValue) {\n if (attrName === 'hour' || attrName === 'minute' || attrName === 'second' || attrName === 'time-zone-name') {\n formatters.delete(this);\n }\n super.attributeChangedCallback(attrName, oldValue, newValue);\n }\n getFormattedDate() {\n const d = this.date;\n if (!d)\n return;\n const date = formatDate(this, d) || '';\n const time = formatTime(this, d) || '';\n return `${date} ${time}`.trim();\n }\n}\nfunction formatDate(el, date) {\n const props = {\n weekday: {\n short: '%a',\n long: '%A'\n },\n day: {\n numeric: '%e',\n '2-digit': '%d'\n },\n month: {\n short: '%b',\n long: '%B'\n },\n year: {\n numeric: '%Y',\n '2-digit': '%y'\n }\n };\n let format = isDayFirst() ? 'weekday day month year' : 'weekday month day, year';\n for (const prop in props) {\n const value = props[prop][el.getAttribute(prop) || ''];\n format = format.replace(prop, value || '');\n }\n format = format.replace(/(\\s,)|(,\\s$)/, '');\n return strftime(date, format).replace(/\\s+/, ' ').trim();\n}\nfunction formatTime(el, date) {\n const options = {};\n const hour = el.getAttribute('hour');\n if (hour === 'numeric' || hour === '2-digit')\n options.hour = hour;\n const minute = el.getAttribute('minute');\n if (minute === 'numeric' || minute === '2-digit')\n options.minute = minute;\n const second = el.getAttribute('second');\n if (second === 'numeric' || second === '2-digit')\n options.second = second;\n const tz = el.getAttribute('time-zone-name');\n if (tz === 'short' || tz === 'long')\n options.timeZoneName = tz;\n if (Object.keys(options).length === 0) {\n return;\n }\n let factory = formatters.get(el);\n if (!factory) {\n factory = makeFormatter(options);\n formatters.set(el, factory);\n }\n const formatter = factory();\n if (formatter) {\n return formatter.format(date);\n }\n else {\n const timef = options.second ? '%H:%M:%S' : '%H:%M';\n return strftime(date, timef);\n }\n}\nif (!window.customElements.get('local-time')) {\n window.LocalTimeElement = LocalTimeElement;\n window.customElements.define('local-time', LocalTimeElement);\n}\n\nclass RelativeTime {\n constructor(date, locale) {\n this.date = date;\n this.locale = locale;\n }\n toString() {\n const ago = this.timeElapsed();\n if (ago) {\n return ago;\n }\n else {\n const ahead = this.timeAhead();\n if (ahead) {\n return ahead;\n }\n else {\n return `on ${this.formatDate()}`;\n }\n }\n }\n timeElapsed() {\n const ms = new Date().getTime() - this.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 if (ms >= 0 && day < 30) {\n return this.timeAgoFromMs(ms);\n }\n else {\n return null;\n }\n }\n timeAhead() {\n const ms = this.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 if (ms >= 0 && day < 30) {\n return this.timeUntil();\n }\n else {\n return null;\n }\n }\n timeAgo() {\n const ms = new Date().getTime() - this.date.getTime();\n return this.timeAgoFromMs(ms);\n }\n timeAgoFromMs(ms) {\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 formatRelativeTime(this.locale, 0, 'second');\n }\n else if (sec < 10) {\n return formatRelativeTime(this.locale, 0, 'second');\n }\n else if (sec < 45) {\n return formatRelativeTime(this.locale, -sec, 'second');\n }\n else if (sec < 90) {\n return formatRelativeTime(this.locale, -min, 'minute');\n }\n else if (min < 45) {\n return formatRelativeTime(this.locale, -min, 'minute');\n }\n else if (min < 90) {\n return formatRelativeTime(this.locale, -hr, 'hour');\n }\n else if (hr < 24) {\n return formatRelativeTime(this.locale, -hr, 'hour');\n }\n else if (hr < 36) {\n return formatRelativeTime(this.locale, -day, 'day');\n }\n else if (day < 30) {\n return formatRelativeTime(this.locale, -day, 'day');\n }\n else if (month < 18) {\n return formatRelativeTime(this.locale, -month, 'month');\n }\n else {\n return formatRelativeTime(this.locale, -year, 'year');\n }\n }\n microTimeAgo() {\n const ms = new Date().getTime() - this.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 '1m';\n }\n else if (min < 60) {\n return `${min}m`;\n }\n else if (hr < 24) {\n return `${hr}h`;\n }\n else if (day < 365) {\n return `${day}d`;\n }\n else {\n return `${year}y`;\n }\n }\n timeUntil() {\n const ms = this.date.getTime() - new Date().getTime();\n return this.timeUntilFromMs(ms);\n }\n timeUntilFromMs(ms) {\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 formatRelativeTime(this.locale, year, 'year');\n }\n else if (month >= 12) {\n return formatRelativeTime(this.locale, year, 'year');\n }\n else if (day >= 45) {\n return formatRelativeTime(this.locale, month, 'month');\n }\n else if (day >= 30) {\n return formatRelativeTime(this.locale, month, 'month');\n }\n else if (hr >= 36) {\n return formatRelativeTime(this.locale, day, 'day');\n }\n else if (hr >= 24) {\n return formatRelativeTime(this.locale, day, 'day');\n }\n else if (min >= 90) {\n return formatRelativeTime(this.locale, hr, 'hour');\n }\n else if (min >= 45) {\n return formatRelativeTime(this.locale, hr, 'hour');\n }\n else if (sec >= 90) {\n return formatRelativeTime(this.locale, min, 'minute');\n }\n else if (sec >= 45) {\n return formatRelativeTime(this.locale, min, 'minute');\n }\n else if (sec >= 10) {\n return formatRelativeTime(this.locale, sec, 'second');\n }\n else {\n return formatRelativeTime(this.locale, 0, 'second');\n }\n }\n microTimeUntil() {\n const ms = this.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}y`;\n }\n else if (hr >= 24) {\n return `${day}d`;\n }\n else if (min >= 60) {\n return `${hr}h`;\n }\n else if (min > 1) {\n return `${min}m`;\n }\n else {\n return '1m';\n }\n }\n formatDate() {\n let format = isDayFirst() ? '%e %b' : '%b %e';\n if (!isThisYear(this.date)) {\n format += isYearSeparator() ? ', %Y' : ' %Y';\n }\n return strftime(this.date, format);\n }\n formatTime() {\n const formatter = timeFormatter();\n if (formatter) {\n return formatter.format(this.date);\n }\n else {\n return strftime(this.date, '%l:%M%P');\n }\n }\n}\nfunction formatRelativeTime(locale, value, unit) {\n const formatter = makeRelativeFormat(locale, { numeric: 'auto' });\n if (formatter) {\n return formatter.format(value, unit);\n }\n else {\n return formatEnRelativeTime(value, unit);\n }\n}\nfunction formatEnRelativeTime(value, unit) {\n if (value === 0) {\n switch (unit) {\n case 'year':\n case 'quarter':\n case 'month':\n case 'week':\n return `this ${unit}`;\n case 'day':\n return 'today';\n case 'hour':\n case 'minute':\n return `in 0 ${unit}s`;\n case 'second':\n return 'now';\n }\n }\n else if (value === 1) {\n switch (unit) {\n case 'year':\n case 'quarter':\n case 'month':\n case 'week':\n return `next ${unit}`;\n case 'day':\n return 'tomorrow';\n case 'hour':\n case 'minute':\n case 'second':\n return `in 1 ${unit}`;\n }\n }\n else if (value === -1) {\n switch (unit) {\n case 'year':\n case 'quarter':\n case 'month':\n case 'week':\n return `last ${unit}`;\n case 'day':\n return 'yesterday';\n case 'hour':\n case 'minute':\n case 'second':\n return `1 ${unit} ago`;\n }\n }\n else if (value > 1) {\n switch (unit) {\n case 'year':\n case 'quarter':\n case 'month':\n case 'week':\n case 'day':\n case 'hour':\n case 'minute':\n case 'second':\n return `in ${value} ${unit}s`;\n }\n }\n else if (value < -1) {\n switch (unit) {\n case 'year':\n case 'quarter':\n case 'month':\n case 'week':\n case 'day':\n case 'hour':\n case 'minute':\n case 'second':\n return `${-value} ${unit}s ago`;\n }\n }\n throw new RangeError(`Invalid unit argument for format() '${unit}'`);\n}\nconst timeFormatter = makeFormatter({ hour: 'numeric', minute: '2-digit' });\n\nclass RelativeTimeElement extends ExtendedTimeElement {\n getFormattedDate() {\n const date = this.date;\n if (!date)\n return;\n return new RelativeTime(date, localeFromElement(this)).toString();\n }\n connectedCallback() {\n nowElements.push(this);\n if (!updateNowElementsId) {\n updateNowElements();\n updateNowElementsId = window.setInterval(updateNowElements, 60 * 1000);\n }\n super.connectedCallback();\n }\n disconnectedCallback() {\n const ix = nowElements.indexOf(this);\n if (ix !== -1) {\n nowElements.splice(ix, 1);\n }\n if (!nowElements.length) {\n if (updateNowElementsId) {\n clearInterval(updateNowElementsId);\n updateNowElementsId = null;\n }\n }\n }\n}\nconst nowElements = [];\nlet updateNowElementsId;\nfunction updateNowElements() {\n let time, i, len;\n for (i = 0, len = nowElements.length; i < len; i++) {\n time = nowElements[i];\n time.textContent = time.getFormattedDate() || '';\n }\n}\nif (!window.customElements.get('relative-time')) {\n window.RelativeTimeElement = RelativeTimeElement;\n window.customElements.define('relative-time', RelativeTimeElement);\n}\n\nclass TimeAgoElement extends RelativeTimeElement {\n getFormattedDate() {\n const format = this.getAttribute('format');\n const date = this.date;\n if (!date)\n return;\n if (format === 'micro') {\n return new RelativeTime(date, localeFromElement(this)).microTimeAgo();\n }\n else {\n return new RelativeTime(date, localeFromElement(this)).timeAgo();\n }\n }\n}\nif (!window.customElements.get('time-ago')) {\n window.TimeAgoElement = TimeAgoElement;\n window.customElements.define('time-ago', TimeAgoElement);\n}\n\nclass TimeUntilElement extends RelativeTimeElement {\n getFormattedDate() {\n const format = this.getAttribute('format');\n const date = this.date;\n if (!date)\n return;\n if (format === 'micro') {\n return new RelativeTime(date, localeFromElement(this)).microTimeUntil();\n }\n else {\n return new RelativeTime(date, localeFromElement(this)).timeUntil();\n }\n }\n}\nif (!window.customElements.get('time-until')) {\n window.TimeUntilElement = TimeUntilElement;\n window.customElements.define('time-until', TimeUntilElement);\n}\n\nexport { LocalTimeElement, RelativeTimeElement, TimeAgoElement, TimeUntilElement };\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<style>\n :host { touch-action: none; display: block; }\n :host(.nesw) { cursor: nesw-resize; }\n :host(.nwse) { cursor: nwse-resize; }\n :host(.nesw) .crop-box, :host(.nwse) .crop-box { cursor: inherit; }\n :host([loaded]) .crop-image { display: block; }\n :host([loaded]) ::slotted([data-loading-slot]), .crop-image { display: none; }\n\n .crop-wrapper {\n position: relative;\n font-size: 0;\n }\n .crop-container {\n user-select: none;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n position: absolute;\n overflow: hidden;\n z-index: 1;\n top: 0;\n width: 100%;\n height: 100%;\n }\n\n :host([rounded]) .crop-box {\n border-radius: 50%;\n box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.3);\n }\n .crop-box {\n position: absolute;\n border: 1px dashed #fff;\n box-sizing: border-box;\n cursor: move;\n }\n\n :host([rounded]) .crop-outline {\n outline: none;\n }\n .crop-outline {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n outline: 4000px solid rgba(0, 0, 0, .3);\n }\n\n .handle { position: absolute; }\n :host([rounded]) .handle::before { border-radius: 50%; }\n .handle:before {\n position: absolute;\n display: block;\n padding: 4px;\n transform: translate(-50%, -50%);\n content: ' ';\n background: #fff;\n border: 1px solid #767676;\n }\n .ne { top: 0; right: 0; cursor: nesw-resize; }\n .nw { top: 0; left: 0; cursor: nwse-resize; }\n .se { bottom: 0; right: 0; cursor: nwse-resize; }\n .sw { bottom: 0; left: 0; cursor: nesw-resize; }\n</style>\n<slot></slot>\n<div class=\"crop-wrapper\">\n <img width=\"100%\" class=\"crop-image\" alt=\"\">\n <div class=\"crop-container\">\n <div data-crop-box class=\"crop-box\">\n <div class=\"crop-outline\"></div>\n <div data-direction=\"nw\" class=\"handle nw\"></div>\n <div data-direction=\"ne\" class=\"handle ne\"></div>\n <div data-direction=\"sw\" class=\"handle sw\"></div>\n <div data-direction=\"se\" class=\"handle se\"></div>\n </div>\n </div>\n</div>\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","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]):not([aria-disabled=\"true\"])'));\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 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};\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 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 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 });\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}\n","var __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 __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 _TooltipElement_instances, _TooltipElement_abortController, _TooltipElement_align, _TooltipElement_side, _TooltipElement_allowUpdatePosition, _TooltipElement_adjustedAnchorAlignment, _TooltipElement_updatePosition;\nimport { getAnchoredPosition } from '@primer/behaviors';\nconst TOOLTIP_OPEN_CLASS = 'tooltip-open';\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];\nclass TooltipElement extends HTMLElement {\n constructor() {\n super();\n _TooltipElement_instances.add(this);\n _TooltipElement_abortController.set(this, void 0);\n _TooltipElement_align.set(this, 'center');\n _TooltipElement_side.set(this, 'outside-bottom');\n _TooltipElement_allowUpdatePosition.set(this, false);\n const shadow = this.attachShadow({ mode: 'open' });\n shadow.innerHTML = `\n <style>\n ${this.styles()}\n </style>\n <slot></slot>\n `;\n }\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 }\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-se):before,\n :host(.tooltip-sw):before {\n right: 50%;\n bottom: 100%;\n margin-right: -6px;\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 right: 50%;\n margin-right: -6px;\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 right: auto\n }\n \n :host(.tooltip-sw):before,\n :host(.tooltip-nw):before {\n right: 0;\n margin-right: 6px\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 get htmlFor() {\n return this.getAttribute('for') || '';\n }\n set htmlFor(value) {\n this.setAttribute('for', value);\n }\n get type() {\n const type = this.getAttribute('data-type');\n return type === 'label' ? 'label' : 'description';\n }\n set type(value) {\n this.setAttribute('data-type', value);\n }\n get direction() {\n return (this.getAttribute('data-direction') || 's');\n }\n set direction(value) {\n this.setAttribute('data-direction', value);\n }\n get control() {\n return this.ownerDocument.getElementById(this.htmlFor);\n }\n connectedCallback() {\n var _a;\n this.hidden = true;\n __classPrivateFieldSet(this, _TooltipElement_allowUpdatePosition, true, \"f\");\n if (!this.id) {\n this.id = `tooltip-${Date.now()}-${(Math.random() * 10000).toFixed(0)}`;\n }\n if (!this.control)\n return;\n this.setAttribute('role', 'tooltip');\n (_a = __classPrivateFieldGet(this, _TooltipElement_abortController, \"f\")) === null || _a === void 0 ? void 0 : _a.abort();\n __classPrivateFieldSet(this, _TooltipElement_abortController, new AbortController(), \"f\");\n const { signal } = __classPrivateFieldGet(this, _TooltipElement_abortController, \"f\");\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 }\n disconnectedCallback() {\n var _a;\n (_a = __classPrivateFieldGet(this, _TooltipElement_abortController, \"f\")) === null || _a === void 0 ? void 0 : _a.abort();\n }\n handleEvent(event) {\n if (!this.control)\n return;\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.hidden) {\n this.hidden = false;\n }\n else if (event.type === 'blur') {\n this.hidden = true;\n }\n else if (event.type === 'mouseleave' &&\n event.relatedTarget !== this.control &&\n event.relatedTarget !== this) {\n this.hidden = true;\n }\n else if (event.type === 'keydown' && event.key === 'Escape' && !this.hidden) {\n this.hidden = true;\n }\n }\n attributeChangedCallback(name) {\n if (name === 'id' || name === 'data-type') {\n if (!this.id || !this.control)\n return;\n if (this.type === 'label') {\n this.control.setAttribute('aria-labelledby', this.id);\n }\n else {\n let describedBy = this.control.getAttribute('aria-describedby');\n describedBy ? (describedBy = `${describedBy} ${this.id}`) : (describedBy = this.id);\n this.control.setAttribute('aria-describedby', describedBy);\n }\n }\n else if (name === 'hidden') {\n if (this.hidden) {\n this.classList.remove(TOOLTIP_OPEN_CLASS, ...DIRECTION_CLASSES);\n }\n else {\n this.classList.add(TOOLTIP_OPEN_CLASS);\n for (const tooltip of this.ownerDocument.querySelectorAll(this.tagName)) {\n if (tooltip !== this)\n tooltip.hidden = true;\n }\n __classPrivateFieldGet(this, _TooltipElement_instances, \"m\", _TooltipElement_updatePosition).call(this);\n }\n }\n else if (name === 'data-direction') {\n this.classList.remove(...DIRECTION_CLASSES);\n const direction = this.direction;\n if (direction === 'n') {\n __classPrivateFieldSet(this, _TooltipElement_align, 'center', \"f\");\n __classPrivateFieldSet(this, _TooltipElement_side, 'outside-top', \"f\");\n }\n else if (direction === 'ne') {\n __classPrivateFieldSet(this, _TooltipElement_align, 'start', \"f\");\n __classPrivateFieldSet(this, _TooltipElement_side, 'outside-top', \"f\");\n }\n else if (direction === 'e') {\n __classPrivateFieldSet(this, _TooltipElement_align, 'center', \"f\");\n __classPrivateFieldSet(this, _TooltipElement_side, 'outside-right', \"f\");\n }\n else if (direction === 'se') {\n __classPrivateFieldSet(this, _TooltipElement_align, 'start', \"f\");\n __classPrivateFieldSet(this, _TooltipElement_side, 'outside-bottom', \"f\");\n }\n else if (direction === 's') {\n __classPrivateFieldSet(this, _TooltipElement_align, 'center', \"f\");\n __classPrivateFieldSet(this, _TooltipElement_side, 'outside-bottom', \"f\");\n }\n else if (direction === 'sw') {\n __classPrivateFieldSet(this, _TooltipElement_align, 'end', \"f\");\n __classPrivateFieldSet(this, _TooltipElement_side, 'outside-bottom', \"f\");\n }\n else if (direction === 'w') {\n __classPrivateFieldSet(this, _TooltipElement_align, 'center', \"f\");\n __classPrivateFieldSet(this, _TooltipElement_side, 'outside-left', \"f\");\n }\n else if (direction === 'nw') {\n __classPrivateFieldSet(this, _TooltipElement_align, 'end', \"f\");\n __classPrivateFieldSet(this, _TooltipElement_side, 'outside-top', \"f\");\n }\n }\n }\n}\n_TooltipElement_abortController = new WeakMap(), _TooltipElement_align = new WeakMap(), _TooltipElement_side = new WeakMap(), _TooltipElement_allowUpdatePosition = new WeakMap(), _TooltipElement_instances = new WeakSet(), _TooltipElement_adjustedAnchorAlignment = function _TooltipElement_adjustedAnchorAlignment(anchorSide) {\n if (!this.control)\n return;\n const tooltipPosition = this.getBoundingClientRect();\n const targetPosition = this.control.getBoundingClientRect();\n const tooltipWidth = tooltipPosition.width;\n const tooltipCenter = tooltipPosition.left + tooltipWidth / 2;\n const targetCenter = targetPosition.x + targetPosition.width / 2;\n if (Math.abs(tooltipCenter - targetCenter) < 2 || anchorSide === 'outside-left' || anchorSide === 'outside-right') {\n return 'center';\n }\n else if (tooltipPosition.left === targetPosition.left) {\n return 'start';\n }\n else if (tooltipPosition.right === targetPosition.right) {\n return 'end';\n }\n else if (tooltipCenter < targetCenter) {\n if (tooltipPosition.left === 0)\n return 'start';\n return 'end';\n }\n else {\n if (tooltipPosition.right === 0)\n return 'end';\n return 'start';\n }\n}, _TooltipElement_updatePosition = function _TooltipElement_updatePosition() {\n if (!this.control)\n return;\n if (!__classPrivateFieldGet(this, _TooltipElement_allowUpdatePosition, \"f\") || this.hidden)\n return;\n const TOOLTIP_OFFSET = 10;\n this.style.left = `0px`; // Ensures we have reliable tooltip width in `getAnchoredPosition`\n let position = getAnchoredPosition(this, this.control, {\n side: __classPrivateFieldGet(this, _TooltipElement_side, \"f\"),\n align: __classPrivateFieldGet(this, _TooltipElement_align, \"f\"),\n anchorOffset: TOOLTIP_OFFSET\n });\n let anchorSide = position.anchorSide;\n // We need to set tooltip position in order to determine ideal align.\n this.style.top = `${position.top}px`;\n this.style.left = `${position.left}px`;\n let direction = 's';\n const align = __classPrivateFieldGet(this, _TooltipElement_instances, \"m\", _TooltipElement_adjustedAnchorAlignment).call(this, anchorSide);\n if (!align)\n return;\n this.style.left = `0px`; // Reset tooltip position again to ensure accurate width in `getAnchoredPosition`\n position = getAnchoredPosition(this, this.control, { side: anchorSide, align, anchorOffset: TOOLTIP_OFFSET });\n anchorSide = position.anchorSide;\n this.style.top = `${position.top}px`;\n this.style.left = `${position.left}px`;\n if (anchorSide === 'outside-left') {\n direction = 'w';\n }\n else if (anchorSide === 'outside-right') {\n direction = 'e';\n }\n else if (anchorSide === 'outside-top') {\n if (align === 'center') {\n direction = 'n';\n }\n else if (align === 'start') {\n direction = 'ne';\n }\n else {\n direction = 'nw';\n }\n }\n else {\n if (align === 'center') {\n direction = 's';\n }\n else if (align === 'start') {\n direction = 'se';\n }\n else {\n direction = 'sw';\n }\n }\n this.classList.add(`tooltip-${direction}`);\n};\nTooltipElement.observedAttributes = ['data-type', 'data-direction', 'id', 'hidden'];\nif (!window.customElements.get('tool-tip')) {\n window.TooltipElement = TooltipElement;\n window.customElements.define('tool-tip', TooltipElement);\n}\n"],"names":["ctrlBindings","navigator","userAgent","match","Combobox","[object Object]","input","list","this","isComposing","id","Math","random","toString","slice","keyboardEventHandler","event","combobox","shiftKey","metaKey","altKey","ctrlKey","key","target","querySelector","getAttribute","click","commit","preventDefault","clearSelection","navigate","keyboardBindings","compositionEventHandler","type","document","getElementById","trackComposition","inputHandler","bind","setAttribute","stop","removeAttribute","addEventListener","commitWithElement","removeEventListener","indexDiff","focusEl","Array","from","querySelectorAll","filter","visible","els","focusIndex","indexOf","length","focus","indexOfItem","newIndex","el","scrollTo","Element","closest","dispatchEvent","CustomEvent","bubbles","fireCommitEvent","hidden","HTMLInputElement","offsetWidth","offsetHeight","container","element","scrollTop","containerBottom","clientHeight","top","offsetTop","bottom","inViewport","AutocompleteEvent","init","super","relatedTarget","requests","WeakMap","fragment","url","xhr","XMLHttpRequest","open","setRequestHeader","pending","get","abort","set","clear","delete","result","Promise","resolve","reject","onload","status","responseText","Error","onerror","send","then","request","Autocomplete","results","interactingWithList","onInputChange","callback","wait","timeout","Rest","clearTimeout","window","setTimeout","debounce","onResultsMouseDown","onInputBlur","onInputFocus","onKeydown","onCommit","stopPropagation","value","trim","fetchResults","selected","HTMLElement","HTMLAnchorElement","textContent","query","src","URL","location","href","params","URLSearchParams","search","append","html","innerHTML","identifyOptions","hasResults","catch","start","state","AutocompleteElement","listId","autocomplete","destroy","hasAttribute","observedAttributes","name","oldValue","newValue","close","copyNode","node","clipboard","writeText","selection","getSelection","removeAllRanges","range","createRange","selectNodeContents","addRange","execCommand","copyText","text","body","createElement","style","width","height","position","createNode","appendChild","removeChild","copy","button","trigger","root","prototype","getRootNode","ownerDocument","Document","ShadowRoot","content","HTMLTextAreaElement","clicked","currentTarget","keydown","focused","blurred","customElements","define","ClipboardCopyElement","showSVG","svg","display","hideSVG","clipboardCopyElementTimers","currentTimeout","copyIcon","checkIcon","showCheck","showCopy","TabContainerElement","tabs","currentIndex","find","tab","matches","code","index","selectTab","tabContainer","panels","selectedTab","selectedPanel","cancelable","detail","panel","weekdays","months","pad","num","strftime","time","formatString","day","getDay","date","getDate","month","getMonth","year","getFullYear","hour","getHours","minute","getMinutes","second","getSeconds","replace","_arg","String","makeFormatter","options","format","Intl","DateTimeFormat","undefined","e","RangeError","dayFirst","dayFirstFormatter","isDayFirst","formatter","output","Date","yearSeparator","yearFormatter","localeFromElement","lang","datetimes","ExtendedTimeElement","title","getFormattedTitle","getFormattedDate","attrName","oldTitle","millis","parse","isNaN","currentTitle","titleFormatter","toLocaleString","timeZoneName","formatters","LocalTimeElement","attributeChangedCallback","d","props","weekday","short","long","numeric","2-digit","prop","formatDate","tz","Object","keys","factory","formatTime","RelativeTime","locale","ago","timeElapsed","ahead","timeAhead","ms","getTime","sec","round","min","hr","timeAgoFromMs","timeUntil","formatRelativeTime","timeUntilFromMs","getUTCFullYear","isYearSeparator","timeFormatter","unit","RelativeTimeFormat","makeRelativeFormat","formatEnRelativeTime","RelativeTimeElement","nowElements","push","updateNowElementsId","updateNowElements","setInterval","connectedCallback","ix","splice","clearInterval","i","len","TimeAgoElement","microTimeAgo","timeAgo","TimeUntilElement","microTimeUntil","startPositions","dragStartPositions","constructedElements","moveCropArea","ImageCropElement","box","image","deltaX","deltaY","KeyboardEvent","has","MouseEvent","pos","pageX","dragStartX","pageY","dragStartY","TouchEvent","changedTouches","x","max","offsetLeft","y","left","fireChangeEvent","updateCropArea","getShadowHost","rect","getBoundingClientRect","delta","setInitialPosition","startX","startY","pageXOffset","pageYOffset","updateDimensions","rootNode","host","startUpdate","direction","passive","classList","add","reposition","newSide","abs","side","clientWidth","stopUpdate","remove","ratio","naturalWidth","slottedInput","shadowRoot","attachShadow","mode","HTMLImageElement","loaded","val","attribute","DetailsMenuElement","preload","details","parentElement","summary","subscriptions","fromEvent","shouldCommit","menu","states","isSummaryFocused","tagName","sibling","activeElement","isMenuItem","loadFragment","once","opened","contains","closeCurrentMenu","NullSubscription","focusOnOpen","sub","unsubscribe","eventName","onNext","loader","autofocus","isMouse","focusFirstItem","next","found","def","menuitem","checked","item","textEl","labelText","contentsEl","labelHTML","updateLabel","checkState","indeterminate","updateChecked","role","alternateOrders","outside-top","outside-bottom","outside-left","outside-right","getAnchoredPosition","floatingElement","anchorElement","settings","parentNode","getComputedStyle","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","alternateOrder","positionAttempt","prevSide","shouldRecalculatePosition","nextSide","assign","pureCalculateAnchoredPosition","_a","_b","_c","_d","_e","positionDefaults","startsWith","getDefaultSettings","elementDimensions","anchorPosition","anchorRight","anchorBottom","currentPos","containerDimensions","_TooltipElement_instances","_TooltipElement_abortController","_TooltipElement_align","_TooltipElement_side","_TooltipElement_allowUpdatePosition","_TooltipElement_adjustedAnchorAlignment","_TooltipElement_updatePosition","__classPrivateFieldSet","receiver","kind","f","TypeError","call","__classPrivateFieldGet","DIRECTION_CLASSES","TooltipElement","styles","htmlFor","control","now","toFixed","AbortController","signal","describedBy","tooltip","WeakSet","tooltipPosition","targetPosition","tooltipWidth","tooltipCenter","targetCenter","right"],"mappings":"AAAA,MAAMA,IAAiBC,UAAUC,UAAUC,MAAM,aAClC,MAAMC,EACjBC,YAAYC,EAAOC,GACfC,KAAKF,MAAQA,EACbE,KAAKD,KAAOA,EACZC,KAAKC,aAAc,EACdF,EAAKG,KACNH,EAAKG,GAAK,YAAYC,KAAKC,SACtBC,WACAC,MAAM,EAAG,MAElBN,KAAKO,qBAAuBC,GAuEpC,SAA0BA,EAAOC,GAC7B,GAAID,EAAME,UAAYF,EAAMG,SAAWH,EAAMI,OACzC,OACJ,IAAKpB,GAAgBgB,EAAMK,QACvB,OACJ,GAAIJ,EAASR,YACT,OACJ,OAAQO,EAAMM,KACV,IAAK,QACL,IAAK,OA4Cb,SAAgBhB,EAAOC,GACnB,MAAMgB,EAAShB,EAAKiB,cAAc,0BAClC,QAAKD,IAEwC,SAAzCA,EAAOE,aAAa,kBAExBF,EAAOG,SADI,IAhDCC,CAAOV,EAASX,MAAOW,EAASV,OAChCS,EAAMY,iBAEV,MACJ,IAAK,SACDX,EAASY,iBACT,MACJ,IAAK,YACDZ,EAASa,SAAS,GAClBd,EAAMY,iBACN,MACJ,IAAK,UACDX,EAASa,UAAU,GACnBd,EAAMY,iBACN,MACJ,IAAK,IACG5B,GAAgBgB,EAAMK,UACtBJ,EAASa,SAAS,GAClBd,EAAMY,kBAEV,MACJ,IAAK,IACG5B,GAAgBgB,EAAMK,UACtBJ,EAASa,UA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