babelacc

compare different implementations of the text alternative computation  https://p.ce9e.org/babelacc/
git clone https://git.ce9e.org/babelacc.git

commit
8a0340b7a3c84587b066221abeadc4decd880991
parent
246bc471f4034682051c18760dbc7c7cd297f2c7
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2019-05-23 08:04
build

Diffstat

M babel.js 1869 ++++++++++++++++++++++++++++++++++++++-----------------------
M fuzz.js 1793 +++++++++++++++++++++++++++++++++++++++----------------------
M package.json 2 +-
M src/babel.js 4 ++--

4 files changed, 2306 insertions, 1362 deletions


diff --git a/babel.js b/babel.js

@@ -4703,7 +4703,210 @@ module.exports = {
 4703  4703 	closest: query.closest,
 4704  4704 };
 4705  4705 
 4706    -1 },{"./lib/name.js":9,"./lib/query.js":10}],8:[function(require,module,exports){
   -1  4706 },{"./lib/name.js":11,"./lib/query.js":12}],8:[function(require,module,exports){
   -1  4707 var attrs = require('./attrs');
   -1  4708 
   -1  4709 var _getOwner = function(node) {
   -1  4710 	if (node.nodeType === node.ELEMENT_NODE && node.id) {
   -1  4711 		var owner = document.querySelector('[aria-owns~="' + node.id + '"]');
   -1  4712 		if (owner) {
   -1  4713 			return owner;
   -1  4714 		}
   -1  4715 	}
   -1  4716 };
   -1  4717 
   -1  4718 var _getParentNode = function(node) {
   -1  4719 	return _getOwner(node) || node.parentNode;
   -1  4720 };
   -1  4721 
   -1  4722 var detectLoop = function(node) {
   -1  4723 	var tmp = _getParentNode(node);
   -1  4724 	while (tmp) {
   -1  4725 		if (tmp === node) {
   -1  4726 			return true;
   -1  4727 		}
   -1  4728 		tmp = _getParentNode(tmp);
   -1  4729 	}
   -1  4730 };
   -1  4731 
   -1  4732 var getOwner = function(node) {
   -1  4733 	if (node.nodeType === node.ELEMENT_NODE && node.id) {
   -1  4734 		var owner = document.querySelector('[aria-owns~="' + node.id + '"]');
   -1  4735 		if (owner && !detectLoop(node)) {
   -1  4736 			return owner;
   -1  4737 		}
   -1  4738 	}
   -1  4739 };
   -1  4740 
   -1  4741 var getParentNode = function(node) {
   -1  4742 	return getOwner(node) || node.parentNode;
   -1  4743 };
   -1  4744 
   -1  4745 var isHidden = function(node) {
   -1  4746 	return node.nodeType === node.ELEMENT_NODE && attrs.getAttribute(node, 'hidden');
   -1  4747 };
   -1  4748 
   -1  4749 var getChildNodes = function(node) {
   -1  4750 	var childNodes = [];
   -1  4751 
   -1  4752 	for (var i = 0; i < node.childNodes.length; i++) {
   -1  4753 		var child = node.childNodes[i];
   -1  4754 		if (!getOwner(child) && !isHidden(child)) {
   -1  4755 			childNodes.push(child);
   -1  4756 		}
   -1  4757 	}
   -1  4758 
   -1  4759 	if (node.nodeType === node.ELEMENT_NODE) {
   -1  4760 		var owns = attrs.getAttribute(node, 'owns') || [];
   -1  4761 		for (var i = 0; i < owns.length; i++) {
   -1  4762 			var child = document.getElementById(owns[i]);
   -1  4763 			// double check with getOwner for consistency
   -1  4764 			if (child && getOwner(child) === node && !isHidden(child)) {
   -1  4765 				childNodes.push(child);
   -1  4766 			}
   -1  4767 		}
   -1  4768 	}
   -1  4769 
   -1  4770 	return childNodes;
   -1  4771 };
   -1  4772 
   -1  4773 var walk = function(root, fn) {
   -1  4774 	fn(root);
   -1  4775 	getChildNodes(root).forEach(function(child) {
   -1  4776 		walk(child, fn);
   -1  4777 	});
   -1  4778 };
   -1  4779 
   -1  4780 var searchUp = function(node, test) {
   -1  4781 	var candidate = getParentNode(node);
   -1  4782 	if (candidate) {
   -1  4783 		if (test(candidate)) {
   -1  4784 			return candidate;
   -1  4785 		} else {
   -1  4786 			return searchUp(candidate, test);
   -1  4787 		}
   -1  4788 	}
   -1  4789 };
   -1  4790 
   -1  4791 module.exports = {
   -1  4792 	'getParentNode': getParentNode,
   -1  4793 	'getChildNodes': getChildNodes,
   -1  4794 	'walk': walk,
   -1  4795 	'searchUp': searchUp,
   -1  4796 };
   -1  4797 
   -1  4798 },{"./attrs":9}],9:[function(require,module,exports){
   -1  4799 var constants = require('./constants.js');
   -1  4800 
   -1  4801 // candidates can be passed for performance optimization
   -1  4802 var getRole = function(el, candidates) {
   -1  4803 	if (el.hasAttribute('role')) {
   -1  4804 		return el.getAttribute('role');
   -1  4805 	}
   -1  4806 	for (var role in constants.roles) {
   -1  4807 		var selector = (constants.roles[role].selectors || []).join(',');
   -1  4808 		if (selector && (!candidates || candidates.indexOf(role) !== -1) && el.matches(selector)) {
   -1  4809 			return role;
   -1  4810 		}
   -1  4811 	}
   -1  4812 
   -1  4813 	if (!candidates ||
   -1  4814 			candidates.indexOf('banner') !== -1 ||
   -1  4815 			candidates.indexOf('contentinfo') !== -1) {
   -1  4816 		var scoped = el.matches(constants.scoped);
   -1  4817 
   -1  4818 		if (el.matches('header') && !scoped) {
   -1  4819 			return 'banner';
   -1  4820 		}
   -1  4821 		if (el.matches('footer') && !scoped) {
   -1  4822 			return 'contentinfo';
   -1  4823 		}
   -1  4824 	}
   -1  4825 };
   -1  4826 
   -1  4827 var hasRole = function(el, roles) {
   -1  4828 	var candidates = [].concat.apply([], roles.map(function(role) {
   -1  4829 		return (constants.roles[role] || {}).subRoles || [role];
   -1  4830 	}));
   -1  4831 	actual = getRole(el, candidates);
   -1  4832 	return candidates.indexOf(actual) !== -1;
   -1  4833 };
   -1  4834 
   -1  4835 var getAttribute = function(el, key) {
   -1  4836 	if (constants.attributeStrongMapping.hasOwnProperty(key)) {
   -1  4837 		var value = el[constants.attributeStrongMapping[key]];
   -1  4838 		if (value) {
   -1  4839 			return value;
   -1  4840 		}
   -1  4841 	}
   -1  4842 	if (key === 'readonly' && el.contentEditable) {
   -1  4843 		return false;
   -1  4844 	} else if (key === 'invalid' && el.checkValidity) {
   -1  4845 		return !el.checkValidity();
   -1  4846 	} else if (key === 'hidden') {
   -1  4847 		var style = window.getComputedStyle(el);
   -1  4848 		if (style.display === 'none' || style.visibility === 'hidden') {
   -1  4849 			return true;
   -1  4850 		}
   -1  4851 	}
   -1  4852 
   -1  4853 	var type = constants.attributes[key];
   -1  4854 	var raw = el.getAttribute('aria-' + key);
   -1  4855 
   -1  4856 	if (raw) {
   -1  4857 		if (type === 'bool') {
   -1  4858 			return raw === 'true';
   -1  4859 		} else if (type === 'tristate') {
   -1  4860 			return raw === 'true' ? true : raw === 'false' ? false : 'mixed';
   -1  4861 		} else if (type === 'bool-undefined') {
   -1  4862 			return raw === 'true' ? true : raw === 'false' ? false : undefined;
   -1  4863 		} else if (type === 'id-list') {
   -1  4864 			return raw.split(/\s+/);
   -1  4865 		} else if (type === 'integer') {
   -1  4866 			return parseInt(raw);
   -1  4867 		} else if (type === 'number') {
   -1  4868 			return parseFloat(raw);
   -1  4869 		} else if (type === 'token-list') {
   -1  4870 			return raw.split(/\s+/);
   -1  4871 		} else {
   -1  4872 			return raw;
   -1  4873 		}
   -1  4874 	}
   -1  4875 
   -1  4876 	// TODO
   -1  4877 	// autocomplete
   -1  4878 	// contextmenu -> aria-haspopup
   -1  4879 	// indeterminate -> aria-checked="mixed"
   -1  4880 	// list -> aria-controls
   -1  4881 
   -1  4882 	if (key === 'level') {
   -1  4883 		for (var i = 1; i <= 6; i++) {
   -1  4884 			if (el.tagName.toLowerCase() === 'h' + i) {
   -1  4885 				return i;
   -1  4886 			}
   -1  4887 		}
   -1  4888 	} else if (constants.attributeWeakMapping.hasOwnProperty(key)) {
   -1  4889 		return el[constants.attributeWeakMapping[key]];
   -1  4890 	}
   -1  4891 
   -1  4892 	var role = getRole(el);
   -1  4893 	var defaults = (constants.roles[role] || {}).defaults;
   -1  4894 	if (defaults && defaults.hasOwnProperty(key)) {
   -1  4895 		return defaults[key];
   -1  4896 	}
   -1  4897 
   -1  4898 	if (type === 'bool' || type === 'tristate') {
   -1  4899 		return false;
   -1  4900 	}
   -1  4901 };
   -1  4902 
   -1  4903 module.exports = {
   -1  4904 	getRole: getRole,
   -1  4905 	hasRole: hasRole,
   -1  4906 	getAttribute: getAttribute,
   -1  4907 };
   -1  4908 
   -1  4909 },{"./constants.js":10}],10:[function(require,module,exports){
 4707  4910 exports.attributes = {
 4708  4911 	// widget
 4709  4912 	'autocomplete': 'token',
@@ -4764,7 +4967,6 @@ exports.attributes = {
 4764  4967 
 4765  4968 exports.attributeStrongMapping = {
 4766  4969 	'disabled': 'disabled',
 4767    -1 	'hidden': 'hidden',
 4768  4970 	'placeholder': 'placeholder',
 4769  4971 	'readonly': 'readOnly',
 4770  4972 	'required': 'required',
@@ -4779,202 +4981,447 @@ exports.attributeWeakMapping = {
 4779  4981 	'selected': 'selected',
 4780  4982 };
 4781  4983 
 4782    -1 // https://www.w3.org/TR/html-aria/#docconformance
 4783    -1 exports.extraSelectors = {
 4784    -1 	article: ['article'],
 4785    -1 	button: [
 4786    -1 		'button',
 4787    -1 		'input[type="button"]',
 4788    -1 		'input[type="image"]',
 4789    -1 		'input[type="reset"]',
 4790    -1 		'input[type="submit"]',
 4791    -1 		'summary',
 4792    -1 	],
 4793    -1 	cell: ['td'],
 4794    -1 	checkbox: ['input[type="checkbox"]'],
 4795    -1 	combobox: [
   -1  4984 // https://www.w3.org/TR/html-aam-1.0/#html-element-role-mappings
   -1  4985 // https://www.w3.org/TR/wai-aria/roles
   -1  4986 exports.roles = {
   -1  4987 	alert: {
   -1  4988 		childRoles: ['alertdialog'],
   -1  4989 		defaults: {
   -1  4990 			'live': 'assertive',
   -1  4991 			'atomic': true,
   -1  4992 		},
   -1  4993 	},
   -1  4994 	article: {
   -1  4995 		selectors: ['article'],
   -1  4996 	},
   -1  4997 	button: {
   -1  4998 		selectors: [
   -1  4999 			'button',
   -1  5000 			'input[type="button"]',
   -1  5001 			'input[type="image"]',
   -1  5002 			'input[type="reset"]',
   -1  5003 			'input[type="submit"]',
   -1  5004 			'summary',
   -1  5005 		],
   -1  5006 		nameFromContents: true,
   -1  5007 	},
   -1  5008 	cell: {
   -1  5009 		selectors: ['td'],
   -1  5010 		childRoles: ['gridcell', 'rowheader'],
   -1  5011 	},
   -1  5012 	checkbox: {
   -1  5013 		selectors: ['input[type="checkbox"]'],
   -1  5014 		childRoles: ['menuitemcheckbox', 'switch'],
   -1  5015 		nameFromContents: true,
   -1  5016 		defaults: {
   -1  5017 			'checked': 'false',
   -1  5018 		},
   -1  5019 	},
   -1  5020 	columnheader: {
   -1  5021 		selectors: ['th[scope="col"]'],
   -1  5022 		nameFromContents: true,
   -1  5023 	},
   -1  5024 	combobox: {
   -1  5025 		selectors: [
 4796  5026 		'input:not([type])[list]',
 4797    -1 		'input[type="email"][list]',
 4798    -1 		'input[type="search"][list]',
 4799    -1 		'input[type="tel"][list]',
 4800    -1 		'input[type="text"][list]',
 4801    -1 		'input[type="url"][list]',
 4802    -1 		'select:not([size]):not([multiple])',
 4803    -1 		'select[size="0"]:not([multiple])',
 4804    -1 		'select[size="1"]:not([multiple])',
 4805    -1 	],
 4806    -1 	complementary: ['aside'],
 4807    -1 	definition: ['dd'],
 4808    -1 	dialog: ['dialog'],
 4809    -1 	document: ['body'],
 4810    -1 	figure: ['figure'],
 4811    -1 	form: ['form[aria-label]', 'form[aria-labelledby]'],
 4812    -1 	group: ['details', 'optgroup'],
 4813    -1 	heading: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
 4814    -1 	img: ['img:not([alt=""])', 'graphics-symbol'],
 4815    -1 	link: ['a[href]', 'area[href]', 'link[href]'],
 4816    -1 	list: ['dl', 'ol', 'ul'],
 4817    -1 	listbox: [
 4818    -1 		'select[multiple]',
 4819    -1 		'select[size]:not([size="0"]):not([size="1"])',
 4820    -1 	],
 4821    -1 	listitem: ['dt', 'ul > li', 'ol > li'],
 4822    -1 	main: ['main'],
 4823    -1 	math: ['math'],
 4824    -1 	menuitemcheckbox: ['menuitem[type="checkbox"]'],
 4825    -1 	menuitem: ['menuitem[type="command"]'],
 4826    -1 	menuitemradio: ['menuitem[type="radio"]'],
 4827    -1 	menu: ['menu[type="context"]'],
 4828    -1 	navigation: ['nav'],
 4829    -1 	option: ['option'],
 4830    -1 	progressbar: ['progress'],
 4831    -1 	radio: ['input[type="radio"]'],
 4832    -1 	region: ['section[aria-label]', 'section[aria-labelledby]', 'section[title]'],
 4833    -1 	rowgroup: ['tbody', 'thead', 'tfoot'],
 4834    -1 	row: ['tr'],
 4835    -1 	searchbox: ['input[type="search"]:not([list])'],
 4836    -1 	separator: ['hr'],
 4837    -1 	slider: ['input[type="range"]'],
 4838    -1 	spinbutton: ['input[type="number"]'],
 4839    -1 	status: ['output'],
 4840    -1 	table: ['table'],
 4841    -1 	term: ['dfn', 'dt'],
 4842    -1 	textbox: [
 4843    -1 		'input:not([type]):not([list])',
 4844    -1 		'input[type="email"]:not([list])',
 4845    -1 		'input[type="tel"]:not([list])',
 4846    -1 		'input[type="text"]:not([list])',
 4847    -1 		'input[type="url"]:not([list])',
 4848    -1 		'textarea',
 4849    -1 	],
 4850    -1 
 4851    -1 	// if scope is missing, it is calculated automatically
 4852    -1 	rowheader: ['th[scope="row"]'],
 4853    -1 	columnheader: ['th[scope="col"]'],
   -1  5027 			'input[type="email"][list]',
   -1  5028 			'input[type="search"][list]',
   -1  5029 			'input[type="tel"][list]',
   -1  5030 			'input[type="text"][list]',
   -1  5031 			'input[type="url"][list]',
   -1  5032 			'select:not([size]):not([multiple])',
   -1  5033 			'select[size="0"]:not([multiple])',
   -1  5034 			'select[size="1"]:not([multiple])',
   -1  5035 		],
   -1  5036 		defaults: {
   -1  5037 			'expanded': false,
   -1  5038 			'haspopup': 'listbox',
   -1  5039 		},
   -1  5040 	},
   -1  5041 	command: {
   -1  5042 		childRoles: ['button', 'link', 'menuitem'],
   -1  5043 	},
   -1  5044 	complementary: {
   -1  5045 		selectors: ['aside'],
   -1  5046 	},
   -1  5047 	composite: {
   -1  5048 		childRoles: ['grid', 'select', 'spinbutton', 'tablist'],
   -1  5049 	},
   -1  5050 	definition: {
   -1  5051 		selectors: ['dd'],
   -1  5052 	},
   -1  5053 	dialog: {
   -1  5054 		selectors: ['dialog'],
   -1  5055 		childRoles: ['alertdialog'],
   -1  5056 	},
   -1  5057 	'doc-backlink': {
   -1  5058 		nameFromContents: true,
   -1  5059 	},
   -1  5060 	'doc-biblioref': {
   -1  5061 		nameFromContents: true,
   -1  5062 	},
   -1  5063 	'doc-glossref': {
   -1  5064 		nameFromContents: true,
   -1  5065 	},
   -1  5066 	'doc-noteref': {
   -1  5067 		nameFromContents: true,
   -1  5068 	},
   -1  5069 	document: {
   -1  5070 		selectors: ['body'],
   -1  5071 		childRoles: ['article', 'graphics-document'],
   -1  5072 	},
   -1  5073 	figure: {
   -1  5074 		selectors: ['figure'],
   -1  5075 	},
   -1  5076 	form: {
   -1  5077 		selectors: ['form[aria-label]', 'form[aria-labelledby]', 'form[title]'],
   -1  5078 	},
   -1  5079 	grid: {
   -1  5080 		childRoles: ['treegrid'],
   -1  5081 	},
   -1  5082 	gridcell: {
   -1  5083 		childRoles: ['columnheader', 'rowheader'],
   -1  5084 		nameFromContents: true,
   -1  5085 	},
   -1  5086 	group: {
   -1  5087 		selectors: ['details', 'optgroup'],
   -1  5088 		childRoles: ['row', 'select', 'toolbar', 'graphics-object'],
   -1  5089 	},
   -1  5090 	heading: {
   -1  5091 		selectors: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
   -1  5092 		nameFromContents: true,
   -1  5093 		defaults: {
   -1  5094 			'level': 2,
   -1  5095 		},
   -1  5096 	},
   -1  5097 	img: {
   -1  5098 		selectors: ['img:not([alt=""])', 'graphics-symbol'],
   -1  5099 		childRoles: ['doc-cover'],
   -1  5100 	},
   -1  5101 	input: {
   -1  5102 		childRoles: ['checkbox', 'option', 'radio', 'slider', 'spinbutton', 'textbox'],
   -1  5103 	},
   -1  5104 	landmark: {
   -1  5105 		childRoles: [
   -1  5106 			'banner',
   -1  5107 			'complementary',
   -1  5108 			'contentinfo',
   -1  5109 			'doc-acknowledgments',
   -1  5110 			'doc-afterword',
   -1  5111 			'doc-appendix',
   -1  5112 			'doc-bibliography',
   -1  5113 			'doc-chapter',
   -1  5114 			'doc-conclusion',
   -1  5115 			'doc-credits',
   -1  5116 			'doc-endnotes',
   -1  5117 			'doc-epilogue',
   -1  5118 			'doc-errata',
   -1  5119 			'doc-foreword',
   -1  5120 			'doc-glossary',
   -1  5121 			'doc-introduction',
   -1  5122 			'doc-part',
   -1  5123 			'doc-preface',
   -1  5124 			'doc-prologue',
   -1  5125 			'form',
   -1  5126 			'main',
   -1  5127 			'navigation',
   -1  5128 			'region',
   -1  5129 			'search',
   -1  5130 		],
   -1  5131 	},
   -1  5132 	link: {
   -1  5133 		selectors: ['a[href]', 'area[href]', 'link[href]'],
   -1  5134 		childRoles: ['doc-backlink', 'doc-biblioref', 'doc-glossref', 'doc-noteref'],
   -1  5135 		nameFromContents: true,
   -1  5136 	},
   -1  5137 	list: {
   -1  5138 		selectors: ['dl', 'ol', 'ul'],
   -1  5139 		childRoles: ['directory', 'feed'],
   -1  5140 	},
   -1  5141 	listbox: {
   -1  5142 		selectors: [
   -1  5143 			'select[multiple]',
   -1  5144 			'select[size]:not([size="0"]):not([size="1"])',
   -1  5145 		],
   -1  5146 		defaults: {
   -1  5147 			'orientation': 'vertical',
   -1  5148 		},
   -1  5149 	},
   -1  5150 	listitem: {
   -1  5151 		selectors: ['dt', 'ul > li', 'ol > li'],
   -1  5152 		childRoles: ['doc-biblioentry', 'doc-endnote', 'treeitem'],
   -1  5153 	},
   -1  5154 	log: {
   -1  5155 		defaults: {
   -1  5156 			'live': 'polite',
   -1  5157 		},
   -1  5158 	},
   -1  5159 	main: {
   -1  5160 		selectors: ['main'],
   -1  5161 	},
   -1  5162 	math: {
   -1  5163 		selectors: ['math'],
   -1  5164 	},
   -1  5165 	menu: {
   -1  5166 		selectors: ['menu[type="context"]'],
   -1  5167 		childRoles: ['menubar'],
   -1  5168 		defaults: {
   -1  5169 			'orientation': 'vertical',
   -1  5170 		},
   -1  5171 	},
   -1  5172 	menubar: {
   -1  5173 		defaults: {
   -1  5174 			'orientation': 'horizontal',
   -1  5175 		},
   -1  5176 	},
   -1  5177 	menuitem: {
   -1  5178 		selectors: ['menuitem[type="command"]'],
   -1  5179 		childRoles: ['menuitemcheckbox'],
   -1  5180 		nameFromContents: true,
   -1  5181 	},
   -1  5182 	menuitemcheckbox: {
   -1  5183 		selectors: ['menuitem[type="checkbox"]'],
   -1  5184 		childRoles: ['menuitemradio'],
   -1  5185 		nameFromContents: true,
   -1  5186 		defaults: {
   -1  5187 			'checked': 'false',
   -1  5188 		},
   -1  5189 	},
   -1  5190 	menuitemradio: {
   -1  5191 		selectors: ['menuitem[type="radio"]'],
   -1  5192 		nameFromContents: true,
   -1  5193 		defaults: {
   -1  5194 			'checked': 'false',
   -1  5195 		},
   -1  5196 	},
   -1  5197 	navigation: {
   -1  5198 		selectors: ['nav'],
   -1  5199 		childRoles: ['doc-index', 'doc-pagelist', 'doc-toc'],
   -1  5200 	},
   -1  5201 	note: {
   -1  5202 		childRoles: ['doc-notice', 'doc-tip'],
   -1  5203 	},
   -1  5204 	option: {
   -1  5205 		selectors: ['option'],
   -1  5206 		childRoles: ['treeitem'],
   -1  5207 		nameFromContents: true,
   -1  5208 		defaults: {
   -1  5209 			'selected': 'false',
   -1  5210 		},
   -1  5211 	},
   -1  5212 	progressbar: {
   -1  5213 		selectors: ['progress'],
   -1  5214 	},
   -1  5215 	radio: {
   -1  5216 		selectors: ['input[type="radio"]'],
   -1  5217 		childRoles: ['menuitemradio'],
   -1  5218 		nameFromContents: true,
   -1  5219 		defaults: {
   -1  5220 			'checked': 'false',
   -1  5221 		},
   -1  5222 	},
   -1  5223 	range: {
   -1  5224 		childRoles: ['progressbar', 'scrollbar', 'slider', 'spinbutton'],
   -1  5225 	},
   -1  5226 	region: {
   -1  5227 		selectors: ['section[aria-label]', 'section[aria-labelledby]', 'section[title]'],
   -1  5228 	},
   -1  5229 	roletype: {
   -1  5230 		childRoles: ['structure', 'widget', 'window'],
   -1  5231 	},
   -1  5232 	row: {
   -1  5233 		selectors: ['tr'],
   -1  5234 		nameFromContents: true,
   -1  5235 	},
   -1  5236 	rowheader: {
   -1  5237 		selectors: ['th[scope="row"]'],
   -1  5238 		nameFromContents: true,
   -1  5239 	},
   -1  5240 	rowgroup: {
   -1  5241 		selectors: ['tbody', 'thead', 'tfoot'],
   -1  5242 		nameFromContents: true,
   -1  5243 	},
   -1  5244 	scrollbar: {
   -1  5245 		defaults: {
   -1  5246 			'orientation': 'vertical',
   -1  5247 			'valuemin': 0,
   -1  5248 			'valuemax': 100,
   -1  5249 			// FIXME: halfway between actual valuemin and valuemax
   -1  5250 			'valuenow': 50,
   -1  5251 		},
   -1  5252 	},
   -1  5253 	searchbox: {
   -1  5254 		selectors: ['input[type="search"]:not([list])'],
   -1  5255 	},
   -1  5256 	section: {
   -1  5257 		childRoles: [
   -1  5258 			'alert',
   -1  5259 			'cell',
   -1  5260 			'definition',
   -1  5261 			'doc-abstract',
   -1  5262 			'doc-colophon',
   -1  5263 			'doc-credit',
   -1  5264 			'doc-dedication',
   -1  5265 			'doc-epigraph',
   -1  5266 			'doc-example',
   -1  5267 			'doc-footnote',
   -1  5268 			'doc-qna',
   -1  5269 			'figure',
   -1  5270 			'group',
   -1  5271 			'img',
   -1  5272 			'landmark',
   -1  5273 			'list',
   -1  5274 			'listitem',
   -1  5275 			'log',
   -1  5276 			'marquee',
   -1  5277 			'math',
   -1  5278 			'note',
   -1  5279 			'status',
   -1  5280 			'table',
   -1  5281 			'tabpanel',
   -1  5282 			'term',
   -1  5283 			'tooltip',
   -1  5284 		],
   -1  5285 	},
   -1  5286 	sectionhead: {
   -1  5287 		childRoles: [
   -1  5288 			'columnheader',
   -1  5289 			'doc-subtitle',
   -1  5290 			'heading',
   -1  5291 			'rowheader',
   -1  5292 			'tab',
   -1  5293 		],
   -1  5294 		nameFromContents: true,
   -1  5295 	},
   -1  5296 	select: {
   -1  5297 		childRoles: ['combobox', 'listbox', 'menu', 'radiogroup', 'tree'],
   -1  5298 	},
   -1  5299 	separator: {
   -1  5300 		selectors: ['hr'],
   -1  5301 		childRoles: ['doc-pagebreak'],
   -1  5302 		defaults: {
   -1  5303 			'orientation': 'horizontal',
   -1  5304 			'valuemin': 0,
   -1  5305 			'valuemax': 100,
   -1  5306 			'valuenow': 50,
   -1  5307 		},
   -1  5308 	},
   -1  5309 	slider: {
   -1  5310 		selectors: ['input[type="range"]'],
   -1  5311 		defaults: {
   -1  5312 			'orientation': 'horizontal',
   -1  5313 			'valuemin': 0,
   -1  5314 			'valuemax': 100,
   -1  5315 			// FIXME: halfway between actual valuemin and valuemax
   -1  5316 			'valuenow': 50,
   -1  5317 		},
   -1  5318 	},
   -1  5319 	spinbutton: {
   -1  5320 		selectors: ['input[type="number"]'],
   -1  5321 		defaults: {
   -1  5322 			// FIXME: no valuemin/valuemax
   -1  5323 			'valuenow': 0,
   -1  5324 		},
   -1  5325 	},
   -1  5326 	status: {
   -1  5327 		selectors: ['output'],
   -1  5328 		childRoles: ['timer'],
   -1  5329 		defaults: {
   -1  5330 			'live': 'polite',
   -1  5331 			'atomic': true,
   -1  5332 		},
   -1  5333 	},
   -1  5334 	switch: {
   -1  5335 		nameFromContents: true,
   -1  5336 		defaults: {
   -1  5337 			'checked': false,
   -1  5338 		},
   -1  5339 	},
   -1  5340 	structure: {
   -1  5341 		childRoles: [
   -1  5342 			'application',
   -1  5343 			'document',
   -1  5344 			'none',
   -1  5345 			'presentation',
   -1  5346 			'rowgroup',
   -1  5347 			'section',
   -1  5348 			'sectionhead',
   -1  5349 			'separator',
   -1  5350 		],
   -1  5351 	},
   -1  5352 	tab: {
   -1  5353 		nameFromContents: true,
   -1  5354 		defaults: {
   -1  5355 			'selected': false,
   -1  5356 		},
   -1  5357 	},
   -1  5358 	table: {
   -1  5359 		selectors: ['table'],
   -1  5360 		childRoles: ['grid'],
   -1  5361 	},
   -1  5362 	tablist: {
   -1  5363 		defaults: {
   -1  5364 			'orientation': 'horizontal',
   -1  5365 		},
   -1  5366 	},
   -1  5367 	term: {
   -1  5368 		selectors: ['dfn', 'dt'],
   -1  5369 	},
   -1  5370 	textbox: {
   -1  5371 		selectors: [
   -1  5372 			'input:not([type]):not([list])',
   -1  5373 			'input[type="email"]:not([list])',
   -1  5374 			'input[type="tel"]:not([list])',
   -1  5375 			'input[type="text"]:not([list])',
   -1  5376 			'input[type="url"]:not([list])',
   -1  5377 			'textarea',
   -1  5378 		],
   -1  5379 		childRoles: ['searchbox'],
   -1  5380 	},
   -1  5381 	toolbar: {
   -1  5382 		defaults: {
   -1  5383 			'orientation': 'horizontal',
   -1  5384 		},
   -1  5385 	},
   -1  5386 	tooltip: {
   -1  5387 		nameFromContents: true,
   -1  5388 	},
   -1  5389 	tree: {
   -1  5390 		childRoles: ['treegrid'],
   -1  5391 		defaults: {
   -1  5392 			'orientation': 'vertical',
   -1  5393 		},
   -1  5394 	},
   -1  5395 	treeitem: {
   -1  5396 		nameFromContents: true,
   -1  5397 	},
   -1  5398 	widget: {
   -1  5399 		childRoles: [
   -1  5400 			'command',
   -1  5401 			'composite',
   -1  5402 			'gridcell',
   -1  5403 			'input',
   -1  5404 			'range',
   -1  5405 			'row',
   -1  5406 			'separator',
   -1  5407 			'tab',
   -1  5408 		],
   -1  5409 	},
   -1  5410 	window: {
   -1  5411 		childRoles: ['dialog'],
   -1  5412 	},
 4854  5413 };
 4855  5414 
 4856  5415 exports.scoped = [
 4857    -1 	'article *', 'aside *', 'main *', 'nav *', 'section *',
   -1  5416 	'main *',
   -1  5417 	// https://www.w3.org/TR/html/dom.html#sectioning-content-2
   -1  5418 	'article *', 'aside *', 'nav *', 'section *',
   -1  5419 	// https://www.w3.org/TR/html/sections.html#sectioning-roots
   -1  5420 	'blockquote *', 'details *', 'dialog *', 'fieldset *', 'figure *', 'td *',
 4858  5421 ].join(',');
 4859  5422 
 4860    -1 // https://www.w3.org/TR/wai-aria/roles
 4861    -1 var subRoles = {
 4862    -1 	cell: ['gridcell', 'rowheader'],
 4863    -1 	command: ['button', 'link', 'menuitem'],
 4864    -1 	composite: ['grid', 'select', 'spinbutton', 'tablist'],
 4865    -1 	img: ['doc-cover'],
 4866    -1 	input: ['checkbox', 'option', 'radio', 'slider', 'spinbutton', 'textbox'],
 4867    -1 	landmark: [
 4868    -1 		'banner',
 4869    -1 		'complementary',
 4870    -1 		'contentinfo',
 4871    -1 		'doc-acknowledgments',
 4872    -1 		'doc-afterword',
 4873    -1 		'doc-appendix',
 4874    -1 		'doc-bibliography',
 4875    -1 		'doc-chapter',
 4876    -1 		'doc-conclusion',
 4877    -1 		'doc-credits',
 4878    -1 		'doc-endnotes',
 4879    -1 		'doc-epilogue',
 4880    -1 		'doc-errata',
 4881    -1 		'doc-foreword',
 4882    -1 		'doc-glossary',
 4883    -1 		'doc-introduction',
 4884    -1 		'doc-part',
 4885    -1 		'doc-preface',
 4886    -1 		'doc-prologue',
 4887    -1 		'form',
 4888    -1 		'main',
 4889    -1 		'navigation',
 4890    -1 		'region',
 4891    -1 		'search',
 4892    -1 	],
 4893    -1 	range: ['progressbar', 'scrollbar', 'slider', 'spinbutton'],
 4894    -1 	roletype: ['structure', 'widget', 'window'],
 4895    -1 	section: [
 4896    -1 		'alert',
 4897    -1 		'cell',
 4898    -1 		'definition',
 4899    -1 		'doc-abstract',
 4900    -1 		'doc-colophon',
 4901    -1 		'doc-credit',
 4902    -1 		'doc-dedication',
 4903    -1 		'doc-epigraph',
 4904    -1 		'doc-example',
 4905    -1 		'doc-footnote',
 4906    -1 		'doc-qna',
 4907    -1 		'figure',
 4908    -1 		'group',
 4909    -1 		'img',
 4910    -1 		'landmark',
 4911    -1 		'list',
 4912    -1 		'listitem',
 4913    -1 		'log',
 4914    -1 		'marquee',
 4915    -1 		'math',
 4916    -1 		'note',
 4917    -1 		'status',
 4918    -1 		'table',
 4919    -1 		'tabpanel',
 4920    -1 		'term',
 4921    -1 		'tooltip',
 4922    -1 	],
 4923    -1 	sectionhead: [
 4924    -1 		'columnheader',
 4925    -1 		'doc-subtitle',
 4926    -1 		'heading',
 4927    -1 		'rowheader',
 4928    -1 		'tab',
 4929    -1 	],
 4930    -1 	select: ['combobox', 'listbox', 'menu', 'radiogroup', 'tree'],
 4931    -1 	separator: ['doc-pagebreak'],
 4932    -1 	structure: [
 4933    -1 		'application',
 4934    -1 		'document',
 4935    -1 		'none',
 4936    -1 		'presentation',
 4937    -1 		'rowgroup',
 4938    -1 		'section',
 4939    -1 		'sectionhead',
 4940    -1 		'separator',
 4941    -1 	],
 4942    -1 	table: ['grid'],
 4943    -1 	textbox: ['searchbox'],
 4944    -1 	widget: [
 4945    -1 		'command',
 4946    -1 		'composite',
 4947    -1 		'gridcell',
 4948    -1 		'input',
 4949    -1 		'range',
 4950    -1 		'row',
 4951    -1 		'separator',
 4952    -1 		'tab',
 4953    -1 	],
 4954    -1 	window: ['dialog'],
 4955    -1 	alert: ['alertdialog'],
 4956    -1 	checkbox: ['menuitemcheckbox', 'switch'],
 4957    -1 	dialog: ['alertdialog'],
 4958    -1 	gridcell: ['columnheader', 'rowheader'],
 4959    -1 	menuitem: ['menuitemcheckbox'],
 4960    -1 	menuitemcheckbox: ['menuitemradio'],
 4961    -1 	option: ['treeitem'],
 4962    -1 	radio: ['menuitemradio'],
 4963    -1 	status: ['timer'],
 4964    -1 	grid: ['treegrid'],
 4965    -1 	menu: ['menubar'],
 4966    -1 	tree: ['treegrid'],
 4967    -1 	document: ['article', 'graphics-document'],
 4968    -1 	group: ['row', 'select', 'toolbar', 'graphics-object'],
 4969    -1 	link: ['doc-backlink', 'doc-biblioref', 'doc-glossref', 'doc-noteref'],
 4970    -1 	list: ['directory', 'feed'],
 4971    -1 	listitem: ['doc-biblioentry', 'doc-endnote', 'treeitem'],
 4972    -1 	navigation: ['doc-index', 'doc-pagelist', 'doc-toc'],
 4973    -1 	note: ['doc-notice', 'doc-tip'],
 4974    -1 };
 4975    -1 
 4976  5423 var getSubRoles = function(role) {
 4977    -1 	var children = subRoles[role] || [];
   -1  5424 	var children = (exports.roles[role] || {}).childRoles || [];
 4978  5425 	var descendents = children.map(getSubRoles);
 4979  5426 
 4980  5427 	var result = [role];
@@ -4990,38 +5437,13 @@ var getSubRoles = function(role) {
 4990  5437 	return result;
 4991  5438 };
 4992  5439 
 4993    -1 exports.subRoles = {};
 4994    -1 for (var role in subRoles) {
 4995    -1 	exports.subRoles[role] = getSubRoles(role);
   -1  5440 for (var role in exports.roles) {
   -1  5441 	exports.roles[role].subRoles = getSubRoles(role);
 4996  5442 }
 4997    -1 exports.subRoles['none'] = ['none', 'presentation'];
 4998    -1 exports.subRoles['presentation'] = ['presentation', 'none'];
 4999    -1 
 5000    -1 exports.nameFromContents = [
 5001    -1 	'button',
 5002    -1 	'checkbox',
 5003    -1 	'columnheader',
 5004    -1 	'doc-backlink',
 5005    -1 	'doc-biblioref',
 5006    -1 	'doc-glossref',
 5007    -1 	'doc-noteref',
 5008    -1 	'gridcell',
 5009    -1 	'heading',
 5010    -1 	'link',
 5011    -1 	'menuitem',
 5012    -1 	'menuitemcheckbox',
 5013    -1 	'menuitemradio',
 5014    -1 	'option',
 5015    -1 	'radio',
 5016    -1 	'row',
 5017    -1 	'rowgroup',
 5018    -1 	'rowheader',
 5019    -1 	'sectionhead',
 5020    -1 	'tab',
 5021    -1 	'tooltip',
 5022    -1 	'treeitem',
 5023    -1 	'switch',
 5024    -1 ];
   -1  5443 exports.roles['none'] = exports.roles['none'] || {};
   -1  5444 exports.roles['none'].subRoles = ['none', 'presentation'];
   -1  5445 exports.roles['presentation'] = exports.roles['presentation'] || {};
   -1  5446 exports.roles['presentation'].subRoles = ['presentation', 'none'];
 5025  5447 
 5026  5448 exports.nameFromDescendant = {
 5027  5449 	'figure': 'figcaption',
@@ -5046,10 +5468,10 @@ exports.labelable = [
 5046  5468 	'textarea',
 5047  5469 ];
 5048  5470 
 5049    -1 },{}],9:[function(require,module,exports){
   -1  5471 },{}],11:[function(require,module,exports){
 5050  5472 var constants = require('./constants.js');
   -1  5473 var atree = require('./atree.js');
 5051  5474 var query = require('./query.js');
 5052    -1 var util = require('./util.js');
 5053  5475 
 5054  5476 var getPseudoContent = function(node, selector) {
 5055  5477 	var styles = window.getComputedStyle(node, selector);
@@ -5069,24 +5491,8 @@ var getPseudoContent = function(node, selector) {
 5069  5491 	}
 5070  5492 };
 5071  5493 
 5072    -1 var getContent = function(root, referenced, owned) {
 5073    -1 	var children = [];
 5074    -1 
 5075    -1 	for (var i = 0; i < root.childNodes.length; i++) {
 5076    -1 		var node = root.childNodes[i];
 5077    -1 		if (!node.id || !document.querySelector('[aria-owns~="' + node.id + '"]')) {
 5078    -1 			children.push(node);
 5079    -1 		}
 5080    -1 	}
 5081    -1 
 5082    -1 	var owns = query.getAttribute(root, 'owns') || [];
 5083    -1 	for (var i = 0; i < owns.length; i++) {
 5084    -1 		var child = document.getElementById(owns[i]);
 5085    -1 		if (child && child !== root && owned.indexOf(child.id) === -1) {
 5086    -1 			children.push(child);
 5087    -1 			owned.push(child.id);
 5088    -1 		}
 5089    -1 	}
   -1  5494 var getContent = function(root, visited) {
   -1  5495 	var children = atree.getChildNodes(root);
 5090  5496 
 5091  5497 	var ret = '';
 5092  5498 	for (var i = 0; i < children.length; i++) {
@@ -5099,9 +5505,9 @@ var getContent = function(root, referenced, owned) {
 5099  5505 			} else if (window.getComputedStyle(node).display.substr(0, 6) === 'inline' &&
 5100  5506 					node.tagName.toLowerCase() !== 'input' &&
 5101  5507 					node.tagName.toLowerCase() !== 'img') {  // https://github.com/w3c/accname/issues/3
 5102    -1 				ret += getName(node, true, referenced, owned);
   -1  5508 				ret += getName(node, true, visited);
 5103  5509 			} else {
 5104    -1 				ret += ' ' + getName(node, true, referenced, owned) + ' ';
   -1  5510 				ret += ' ' + getName(node, true, visited) + ' ';
 5105  5511 			}
 5106  5512 		}
 5107  5513 	}
@@ -5111,7 +5517,7 @@ var getContent = function(root, referenced, owned) {
 5111  5517 
 5112  5518 var allowNameFromContent = function(el) {
 5113  5519 	var role = query.getRole(el);
 5114    -1 	return role && constants.nameFromContents.indexOf(role) !== -1;
   -1  5520 	return (constants.roles[role] || {}).nameFromContents;
 5115  5521 };
 5116  5522 
 5117  5523 var isLabelable = function(el) {
@@ -5123,15 +5529,13 @@ var isLabelable = function(el) {
 5123  5529 var getLabelNodes = function(element) {
 5124  5530 	var labels = [];
 5125  5531 	var labelable = constants.labelable.join(',');
 5126    -1 	util.walkDOM(document.body, function(node) {
 5127    -1 		if (node.tagName && node.tagName.toLowerCase() === 'label') {
 5128    -1 			if (node.getAttribute('for')) {
 5129    -1 				if (element.id && node.getAttribute('for') === element.id) {
 5130    -1 					labels.push(node);
 5131    -1 				}
 5132    -1 			} else if (node.querySelector(labelable) === element) {
   -1  5532 	document.querySelectorAll('label').forEach(function(node) {
   -1  5533 		if (node.getAttribute('for')) {
   -1  5534 			if (element.id && node.getAttribute('for') === element.id) {
 5133  5535 				labels.push(node);
 5134  5536 			}
   -1  5537 		} else if (node.querySelector(labelable) === element) {
   -1  5538 			labels.push(node);
 5135  5539 		}
 5136  5540 	});
 5137  5541 	return labels;
@@ -5143,34 +5547,41 @@ var isInLabelForOtherWidget = function(el) {
 5143  5547 	return label && ownLabels.indexOf(label) === -1;
 5144  5548 };
 5145  5549 
 5146    -1 var getName = function(el, recursive, referenced, owned) {
   -1  5550 var getName = function(el, recursive, visited, directReference) {
 5147  5551 	var ret = '';
 5148    -1 	var owned = owned || [];
 5149  5552 
 5150    -1 	// A
 5151    -1 	if (query.getAttribute(el, 'hidden', referenced)) {
 5152    -1 		return '';
   -1  5553 	visited = visited || [];
   -1  5554 	if (visited.includes(el)) {
   -1  5555 		if (!directReference) {
   -1  5556 			return '';
   -1  5557 		}
   -1  5558 	} else {
   -1  5559 		visited.push(el);
 5153  5560 	}
 5154  5561 
   -1  5562 	// A
   -1  5563 	// handled in atree
   -1  5564 
 5155  5565 	// B
 5156  5566 	if (!recursive && el.matches('[aria-labelledby]')) {
 5157  5567 		var ids = el.getAttribute('aria-labelledby').split(/\s+/);
 5158  5568 		var strings = ids.map(function(id) {
 5159  5569 			var label = document.getElementById(id);
 5160    -1 			return label ? getName(label, true, label, owned) : '';
   -1  5570 			return label ? getName(label, true, visited, true) : '';
 5161  5571 		});
 5162  5572 		ret = strings.join(' ');
 5163  5573 	}
 5164  5574 
 5165  5575 	// C
 5166  5576 	if (!ret.trim() && el.matches('[aria-label]')) {
   -1  5577 		// FIXME: may skip to 2E
 5167  5578 		ret = el.getAttribute('aria-label');
 5168  5579 	}
 5169  5580 
 5170  5581 	// D
 5171  5582 	if (!ret.trim() && !recursive && isLabelable(el)) {
 5172  5583 		var strings = getLabelNodes(el).map(function(label) {
 5173    -1 			return getName(label, true, label, owned);
   -1  5584 			return getName(label, true, visited);
 5174  5585 		});
 5175  5586 		ret = strings.join(' ');
 5176  5587 	}
@@ -5188,7 +5599,7 @@ var getName = function(el, recursive, referenced, owned) {
 5188  5599 			if (el.matches(selector)) {
 5189  5600 				var descendant = el.querySelector(constants.nameFromDescendant[selector]);
 5190  5601 				if (descendant) {
 5191    -1 					ret = getName(descendant, true, descendant, owned);
   -1  5602 					ret = getName(descendant, true, visited);
 5192  5603 				}
 5193  5604 			}
 5194  5605 		}
@@ -5202,7 +5613,7 @@ var getName = function(el, recursive, referenced, owned) {
 5202  5613 			} else if (query.matches(el, 'combobox,listbox')) {
 5203  5614 				var selected = query.querySelector(el, ':selected') || query.querySelector(el, 'option');
 5204  5615 				if (selected) {
 5205    -1 					ret = getName(selected, recursive, referenced, owned);
   -1  5616 					ret = getName(selected, recursive, visited);
 5206  5617 				} else {
 5207  5618 					ret = el.value || '';
 5208  5619 				}
@@ -5215,18 +5626,9 @@ var getName = function(el, recursive, referenced, owned) {
 5215  5626 	// F
 5216  5627 	// FIXME: menu is not mentioned in the spec
 5217  5628 	if (!ret.trim() && (recursive || allowNameFromContent(el) || el.closest('label')) && !query.matches(el, 'menu')) {
 5218    -1 		ret = getContent(el, referenced, owned);
 5219    -1 	}
 5220    -1 
 5221    -1 	// TODO: G
 5222    -1 	// TODO: H
 5223    -1 
 5224    -1 	// FIXME: not mentioned in the spec
 5225    -1 	if (!ret.trim() && query.matches(el, 'presentation')) {
 5226    -1 		return getContent(el, referenced, owned);
   -1  5629 		ret = getContent(el, visited);
 5227  5630 	}
 5228  5631 
 5229    -1 	// FIXME: not mentioned in the spec
 5230  5632 	if (!ret.trim()) {
 5231  5633 		for (var selector in constants.nameDefaults) {
 5232  5634 			if (el.matches(selector)) {
@@ -5235,8 +5637,12 @@ var getName = function(el, recursive, referenced, owned) {
 5235  5637 		}
 5236  5638 	}
 5237  5639 
   -1  5640 	// G/H
   -1  5641 	// handled in getContent
   -1  5642 
 5238  5643 	// I
 5239    -1 	if (!ret.trim()) {
   -1  5644 	// FIXME: presentation not mentioned in the spec
   -1  5645 	if (!ret.trim() && !query.matches(el, 'presentation')) {
 5240  5646 		ret = el.title || '';
 5241  5647 	}
 5242  5648 
@@ -5251,13 +5657,12 @@ var getNameTrimmed = function(el) {
 5251  5657 
 5252  5658 var getDescription = function(el) {
 5253  5659 	var ret = '';
 5254    -1 	var owned = [];
 5255  5660 
 5256  5661 	if (el.matches('[aria-describedby]')) {
 5257  5662 		var ids = el.getAttribute('aria-describedby').split(/\s+/);
 5258  5663 		var strings = ids.map(function(id) {
 5259  5664 			var label = document.getElementById(id);
 5260    -1 			return label ? getName(label, true, label, owned) : '';
   -1  5665 			return label ? getName(label, true) : '';
 5261  5666 		});
 5262  5667 		ret = strings.join(' ');
 5263  5668 	} else if (el.title) {
@@ -5269,145 +5674,42 @@ var getDescription = function(el) {
 5269  5674 	ret = (ret || '').trim().replace(/\s+/g, ' ');
 5270  5675 
 5271  5676 	if (ret === getNameTrimmed(el)) {
 5272    -1 		ret = '';
 5273    -1 	}
 5274    -1 
 5275    -1 	return ret;
 5276    -1 };
 5277    -1 
 5278    -1 module.exports = {
 5279    -1 	getName: getNameTrimmed,
 5280    -1 	getDescription: getDescription,
 5281    -1 };
 5282    -1 
 5283    -1 },{"./constants.js":8,"./query.js":10,"./util.js":11}],10:[function(require,module,exports){
 5284    -1 var constants = require('./constants.js');
 5285    -1 var util = require('./util.js');
 5286    -1 
 5287    -1 var getSubRoles = function(roles) {
 5288    -1 	return [].concat.apply([], roles.map(function(role) {
 5289    -1 		return constants.subRoles[role] || [role];
 5290    -1 	}));
 5291    -1 };
 5292    -1 
 5293    -1 // candidates can be passed for performance optimization
 5294    -1 var _getRole = function(el, candidates) {
 5295    -1 	if (el.hasAttribute('role')) {
 5296    -1 		return el.getAttribute('role');
 5297    -1 	}
 5298    -1 	for (var role in constants.extraSelectors) {
 5299    -1 		var selector = constants.extraSelectors[role].join(',');
 5300    -1 		if ((!candidates || candidates.indexOf(role) !== -1) && el.matches(selector)) {
 5301    -1 			return role;
 5302    -1 		}
 5303    -1 	}
 5304    -1 
 5305    -1 	if (!candidates ||
 5306    -1 			candidates.indexOf('banner') !== -1 ||
 5307    -1 			candidates.indexOf('contentinfo') !== -1) {
 5308    -1 		var scoped = el.matches(constants.scoped);
 5309    -1 
 5310    -1 		if (el.matches('header') && !scoped) {
 5311    -1 			return 'banner';
 5312    -1 		}
 5313    -1 		if (el.matches('footer') && !scoped) {
 5314    -1 			return 'contentinfo';
 5315    -1 		}
 5316    -1 	}
 5317    -1 };
 5318    -1 
 5319    -1 var getAttribute = function(el, key, _hiddenRoot) {
 5320    -1 	if (key === 'hidden' && el === _hiddenRoot) {  // used for name calculation
 5321    -1 		return false;
 5322    -1 	}
 5323    -1 
 5324    -1 	if (constants.attributeStrongMapping.hasOwnProperty(key)) {
 5325    -1 		var value = el[constants.attributeStrongMapping[key]];
 5326    -1 		if (value) {
 5327    -1 			return value;
 5328    -1 		}
 5329    -1 	}
 5330    -1 	if (key === 'readonly' && el.contentEditable) {
 5331    -1 		return false;
 5332    -1 	} else if (key === 'invalid' && el.checkValidity) {
 5333    -1 		return !el.checkValidity();
 5334    -1 	} else if (key === 'hidden') {
 5335    -1 		var style = window.getComputedStyle(el);
 5336    -1 		if (style.display === 'none' || style.visibility === 'hidden') {
 5337    -1 			return true;
 5338    -1 		}
 5339    -1 	}
 5340    -1 
 5341    -1 	var type = constants.attributes[key];
 5342    -1 	var raw = el.getAttribute('aria-' + key);
 5343    -1 
 5344    -1 	if (raw) {
 5345    -1 		if (type === 'bool') {
 5346    -1 			return raw === 'true';
 5347    -1 		} else if (type === 'tristate') {
 5348    -1 			return raw === 'true' ? true : raw === 'false' ? false : 'mixed';
 5349    -1 		} else if (type === 'bool-undefined') {
 5350    -1 			return raw === 'true' ? true : raw === 'false' ? false : undefined;
 5351    -1 		} else if (type === 'id-list') {
 5352    -1 			return raw.split(/\s+/);
 5353    -1 		} else if (type === 'integer') {
 5354    -1 			return parseInt(raw);
 5355    -1 		} else if (type === 'number') {
 5356    -1 			return parseFloat(raw);
 5357    -1 		} else if (type === 'token-list') {
 5358    -1 			return raw.split(/\s+/);
 5359    -1 		} else {
 5360    -1 			return raw;
 5361    -1 		}
 5362    -1 	}
 5363    -1 
 5364    -1 	// TODO
 5365    -1 	// autocomplete
 5366    -1 	// contextmenu -> aria-haspopup
 5367    -1 	// indeterminate -> aria-checked="mixed"
 5368    -1 	// list -> aria-controls
 5369    -1 
 5370    -1 	if (key === 'level') {
 5371    -1 		for (var i = 1; i <= 6; i++) {
 5372    -1 			if (el.tagName.toLowerCase() === 'h' + i) {
 5373    -1 				return i;
 5374    -1 			}
 5375    -1 		}
 5376    -1 	} else if (key === 'hidden') {
 5377    -1 		if (el.clientHeight === 0) {  // rough check for performance
 5378    -1 			return el.parentNode && getAttribute(el.parentNode, 'hidden', _hiddenRoot);
 5379    -1 		}
 5380    -1 	} else if (constants.attributeWeakMapping.hasOwnProperty(key)) {
 5381    -1 		return el[constants.attributeWeakMapping[key]];
 5382    -1 	}
 5383    -1 
 5384    -1 	if (type === 'bool' || type === 'tristate') {
 5385    -1 		return false;
   -1  5677 		ret = '';
 5386  5678 	}
   -1  5679 
   -1  5680 	return ret;
   -1  5681 };
   -1  5682 
   -1  5683 module.exports = {
   -1  5684 	getName: getNameTrimmed,
   -1  5685 	getDescription: getDescription,
 5387  5686 };
 5388  5687 
   -1  5688 },{"./atree.js":8,"./constants.js":10,"./query.js":12}],12:[function(require,module,exports){
   -1  5689 var attrs = require('./attrs.js');
   -1  5690 var atree = require('./atree.js');
   -1  5691 
   -1  5692 
 5389  5693 var matches = function(el, selector) {
 5390  5694 	var actual;
 5391  5695 
 5392  5696 	if (selector.substr(0, 1) === ':') {
 5393  5697 		var attr = selector.substr(1);
 5394    -1 		return getAttribute(el, attr);
   -1  5698 		return attrs.getAttribute(el, attr);
 5395  5699 	} else if (selector.substr(0, 1) === '[') {
 5396  5700 		var match = /\[([a-z]+)="(.*)"\]/.exec(selector);
 5397    -1 		actual = getAttribute(el, match[1]);
   -1  5701 		actual = attrs.getAttribute(el, match[1]);
 5398  5702 		var rawValue = match[2];
 5399  5703 		return actual.toString() == rawValue;
 5400  5704 	} else {
 5401    -1 		var candidates = getSubRoles(selector.split(','));
 5402    -1 		actual = _getRole(el, candidates);
 5403    -1 		return candidates.indexOf(actual) !== -1;
   -1  5705 		return attrs.hasRole(el, selector.split(','));
 5404  5706 	}
 5405  5707 };
 5406  5708 
 5407  5709 var _querySelector = function(all) {
 5408  5710 	return function(root, role) {
 5409  5711 		var results = [];
 5410    -1 		util.walkDOM(root, function(node) {
   -1  5712 		atree.walk(root, function(node) {
 5411  5713 			if (node.nodeType === node.ELEMENT_NODE) {
 5412  5714 				// FIXME: skip hidden elements
 5413  5715 				if (matches(node, role)) {
@@ -5423,53 +5725,25 @@ var _querySelector = function(all) {
 5423  5725 };
 5424  5726 
 5425  5727 var closest = function(el, selector) {
 5426    -1 	return util.searchUp(el, function(candidate) {
 5427    -1 		return matches(candidate, selector);
   -1  5728 	return atree.searchUp(el, function(candidate) {
   -1  5729 		if (candidate.nodeType === candidate.ELEMENT_NODE) {
   -1  5730 			return matches(candidate, selector);
   -1  5731 		}
 5428  5732 	});
 5429  5733 };
 5430  5734 
 5431  5735 module.exports = {
 5432  5736 	getRole: function(el) {
 5433    -1 		return _getRole(el);
   -1  5737 		return attrs.getRole(el);
 5434  5738 	},
 5435    -1 	getAttribute: getAttribute,
   -1  5739 	getAttribute: attrs.getAttribute,
 5436  5740 	matches: matches,
 5437  5741 	querySelector: _querySelector(),
 5438  5742 	querySelectorAll: _querySelector(true),
 5439  5743 	closest: closest,
 5440  5744 };
 5441  5745 
 5442    -1 },{"./constants.js":8,"./util.js":11}],11:[function(require,module,exports){
 5443    -1 var walkDOM = function(root, fn) {
 5444    -1 	if (fn(root) === false) {
 5445    -1 		return false;
 5446    -1 	}
 5447    -1 	var node = root.firstChild;
 5448    -1 	while (node) {
 5449    -1 		if (walkDOM(node, fn) === false) {
 5450    -1 			return false;
 5451    -1 		}
 5452    -1 		node = node.nextSibling;
 5453    -1 	}
 5454    -1 };
 5455    -1 
 5456    -1 var searchUp = function(el, test) {
 5457    -1 	var candidate = el.parentElement;
 5458    -1 	if (candidate) {
 5459    -1 		if (test(candidate)) {
 5460    -1 			return candidate;
 5461    -1 		} else {
 5462    -1 			return searchUp(candidate, test);
 5463    -1 		}
 5464    -1 	}
 5465    -1 };
 5466    -1 
 5467    -1 module.exports = {
 5468    -1 	walkDOM: walkDOM,
 5469    -1 	searchUp: searchUp,
 5470    -1 };
 5471    -1 
 5472    -1 },{}],12:[function(require,module,exports){
   -1  5746 },{"./atree.js":8,"./attrs.js":9}],13:[function(require,module,exports){
 5473  5747 /*! aXe v3.2.2
 5474  5748  * Copyright (c) 2019 Deque Systems, Inc.
 5475  5749  *
@@ -20768,8 +21042,8 @@ module.exports = {
20768 21042     }()
20769 21043   });
20770 21044 })(typeof window === 'object' ? window : this);
20771    -1 },{}],13:[function(require,module,exports){
20772    -1 window.getAccNameVersion = "2.22";
   -1 21045 },{}],14:[function(require,module,exports){
   -1 21046 window.getAccNameVersion = "2.26";
20773 21047 
20774 21048 /*!
20775 21049 CalcNames: The AccName Computation Prototype, compute the Name and Description property values for a DOM node
@@ -20782,11 +21056,14 @@ Distributed under the terms of the Open Source Initiative OSI - MIT License
20782 21056 */
20783 21057 
20784 21058 // AccName Computation Prototype
20785    -1 window.getAccName = calcNames = function(
   -1 21059 window.getAccName = window.calcNames = function(
20786 21060   node,
20787 21061   fnc,
20788    -1   preventVisualARIASelfCSSRef
   -1 21062   preventVisualARIASelfCSSRef,
   -1 21063   overrides
20789 21064 ) {
   -1 21065   overrides = overrides || {};
   -1 21066   var docO = overrides.document || document;
20790 21067   var props = { name: "", desc: "", error: "" };
20791 21068   try {
20792 21069     if (!node || node.nodeType !== 1) {
@@ -20806,8 +21083,13 @@ window.getAccName = calcNames = function(
20806 21083       skip,
20807 21084       nodesToIgnoreValues,
20808 21085       skipAbort,
20809    -1       ownedBy
   -1 21086       ownedBy,
   -1 21087       skipTo
20810 21088     ) {
   -1 21089       skipTo = skipTo || {};
   -1 21090       skipTo.tag = skipTo.tag || false;
   -1 21091       skipTo.role = skipTo.role || false;
   -1 21092       skipTo.go = skipTo.go || false;
20811 21093       var fullResult = {
20812 21094         name: "",
20813 21095         title: ""
@@ -20817,6 +21099,7 @@ window.getAccName = calcNames = function(
20817 21099   ARIA Role Exception Rule Set 1.1
20818 21100   The following Role Exception Rule Set is based on the following ARIA Working Group discussion involving all relevant browser venders.
20819 21101   https://lists.w3.org/Archives/Public/public-aria/2017Jun/0057.html
   -1 21102 Plus roles extended for the Role Parity project.
20820 21103   */
20821 21104       var isException = function(node, refNode) {
20822 21105         if (
@@ -20855,8 +21138,9 @@ window.getAccName = calcNames = function(
20855 21138         }
20856 21139         // Otherwise process list2 to identify roles to ignore processing name from content.
20857 21140         else if (
20858    -1           inList(node, list2) ||
20859    -1           (node === rootNode && !inList(node, list1))
   -1 21141           (inList(node, list2) ||
   -1 21142             (node === rootNode && !inList(node, list1))) &&
   -1 21143           !skipTo.go
20860 21144         ) {
20861 21145           return true;
20862 21146         } else {
@@ -20880,7 +21164,7 @@ window.getAccName = calcNames = function(
20880 21164           }
20881 21165           if (node && node === parent) {
20882 21166             return true;
20883    -1           } else if (!node || node === ownedBy.top || node === document.body) {
   -1 21167           } else if (!node || node === ownedBy.top || node === docO.body) {
20884 21168             return false;
20885 21169           }
20886 21170         }
@@ -20894,16 +21178,16 @@ window.getAccName = calcNames = function(
20894 21178       };
20895 21179 
20896 21180       if (ownedBy.ref) {
20897    -1         if (isParentHidden(refNode, document.body, true, true)) {
   -1 21181         if (isParentHidden(refNode, docO.body, true, true)) {
20898 21182           // If referenced via aria-labelledby or aria-describedby, do not return a name or description if a parent node is hidden.
20899 21183           return fullResult;
20900    -1         } else if (isHidden(refNode, document.body)) {
   -1 21184         } else if (isHidden(refNode, docO.body)) {
20901 21185           // Otherwise, if aria-labelledby or aria-describedby reference a node that is explicitly hidden, then process all children regardless of their individual hidden states.
20902 21186           var ignoreHidden = true;
20903 21187         }
20904 21188       }
20905 21189 
20906    -1       if (nodes.indexOf(refNode) === -1) {
   -1 21190       if (!skipTo.tag && !skipTo.role && nodes.indexOf(refNode) === -1) {
20907 21191         // Store the before and after pseudo element 'content' values for the top level DOM node
20908 21192         // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added.
20909 21193         cssOP = getCSSText(refNode, null);
@@ -20938,11 +21222,13 @@ window.getAccName = calcNames = function(
20938 21222           node && node.nodeType === 1 && isBlockLevelElement(node)
20939 21223             ? true
20940 21224             : false;
   -1 21225         var currentNode = node;
20941 21226         var fResult = fn(node) || {};
20942 21227         if (fResult.name && fResult.name.length) {
20943 21228           res.name += fResult.name;
20944 21229         }
20945    -1         if (!isException(node, ownedBy.top, ownedBy)) {
   -1 21230         if (!fResult.skip && !isException(node, ownedBy.top)) {
   -1 21231           if (skipTo.go) skipTo.go = false;
20946 21232           node = node.firstChild;
20947 21233           while (node) {
20948 21234             res.name += walkDOM(node, fn, refNode).name;
@@ -20950,12 +21236,16 @@ window.getAccName = calcNames = function(
20950 21236           }
20951 21237         }
20952 21238         res.name += fResult.owns || "";
20953    -1         if (rootNode === refNode && !trim(res.name) && trim(fResult.title)) {
   -1 21239         if (
   -1 21240           rootNode === currentNode &&
   -1 21241           !trim(res.name) &&
   -1 21242           trim(fResult.title)
   -1 21243         ) {
20954 21244           res.name = addSpacing(fResult.title);
20955    -1         } else if (rootNode === refNode && trim(fResult.title)) {
   -1 21245         } else if (rootNode === currentNode && trim(fResult.title)) {
20956 21246           res.title = addSpacing(fResult.title);
20957 21247         }
20958    -1         if (rootNode === refNode && trim(fResult.desc)) {
   -1 21248         if (rootNode === currentNode && trim(fResult.desc)) {
20959 21249           res.title = addSpacing(fResult.desc);
20960 21250         }
20961 21251         if (nodeIsBlock || fResult.isWidget) {
@@ -20974,7 +21264,8 @@ window.getAccName = calcNames = function(
20974 21264           var result = {
20975 21265             name: "",
20976 21266             title: "",
20977    -1             owns: ""
   -1 21267             owns: "",
   -1 21268             skip: false
20978 21269           };
20979 21270           var isEmbeddedNode =
20980 21271             node &&
@@ -20999,7 +21290,7 @@ window.getAccName = calcNames = function(
20999 21290             return result;
21000 21291           }
21001 21292 
21002    -1           if (nodes.indexOf(node) === -1) {
   -1 21293           if (!skipTo.tag && !skipTo.role && nodes.indexOf(node) === -1) {
21003 21294             nodes.push(node);
21004 21295           }
21005 21296 
@@ -21014,7 +21305,7 @@ window.getAccName = calcNames = function(
21014 21305           };
21015 21306 
21016 21307           var parent = refNode === node ? node : node.parentNode;
21017    -1           if (nodes.indexOf(parent) === -1) {
   -1 21308           if (!skipTo.tag && !skipTo.role && nodes.indexOf(parent) === -1) {
21018 21309             nodes.push(parent);
21019 21310             // Store the before and after pseudo element 'content' values for the current node container element
21020 21311             // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added.
@@ -21039,12 +21330,25 @@ window.getAccName = calcNames = function(
21039 21330 
21040 21331           // Process standard DOM element node
21041 21332           if (node.nodeType === 1) {
21042    -1             var aLabelledby = node.getAttribute("aria-labelledby") || "";
21043    -1             var aDescribedby = node.getAttribute("aria-describedby") || "";
21044    -1             var aLabel = node.getAttribute("aria-label") || "";
21045    -1             var nTitle = node.getAttribute("title") || "";
21046 21333             var nTag = node.nodeName.toLowerCase();
21047 21334             var nRole = getRole(node);
   -1 21335             var aLabelledby =
   -1 21336               (!skipTo.tag &&
   -1 21337                 !skipTo.role &&
   -1 21338                 node.getAttribute("aria-labelledby")) ||
   -1 21339               "";
   -1 21340             var aDescribedby =
   -1 21341               (!skipTo.tag &&
   -1 21342                 !skipTo.role &&
   -1 21343                 node.getAttribute("aria-describedby")) ||
   -1 21344               "";
   -1 21345             var aLabel =
   -1 21346               (!skipTo.tag &&
   -1 21347                 !skipTo.role &&
   -1 21348                 node.getAttribute("aria-label")) ||
   -1 21349               "";
   -1 21350             var nTitle =
   -1 21351               (!skipTo.tag && !skipTo.role && node.getAttribute("title")) || "";
21048 21352 
21049 21353             var isNativeFormField = nativeFormFields.indexOf(nTag) !== -1;
21050 21354             var isNativeButton = ["input"].indexOf(nTag) !== -1;
@@ -21063,8 +21367,11 @@ window.getAccName = calcNames = function(
21063 21367             result.isWidget = isNativeFormField || isWidgetRole;
21064 21368 
21065 21369             var hasName = false;
   -1 21370             var hasDesc = false;
21066 21371             var aOwns = node.getAttribute("aria-owns") || "";
21067 21372             var isSeparatChildFormField =
   -1 21373               !skipTo.tag &&
   -1 21374               !skipTo.role &&
21068 21375               !isEmbeddedNode &&
21069 21376               ((node !== refNode &&
21070 21377                 (isNativeFormField || isSimulatedFormField)) ||
@@ -21075,57 +21382,311 @@ window.getAccName = calcNames = function(
21075 21382                 ? true
21076 21383                 : false;
21077 21384 
21078    -1             if (!stop && node === refNode) {
21079    -1               // Check for non-empty value of aria-labelledby if current node equals reference node, follow each ID ref, then stop and process no deeper.
21080    -1               if (aLabelledby) {
21081    -1                 ids = aLabelledby.split(/\s+/);
21082    -1                 parts = [];
21083    -1                 for (i = 0; i < ids.length; i++) {
21084    -1                   element = document.getElementById(ids[i]);
21085    -1                   // Also prevent the current form field from having its value included in the naming computation if nested as a child of label
21086    -1                   parts.push(
21087    -1                     walk(element, true, skip, [node], element === refNode, {
   -1 21385             // Check for non-empty value of aria-describedby if current node equals reference node, follow each ID ref, then stop and process no deeper.
   -1 21386             if (
   -1 21387               !stop &&
   -1 21388               node === refNode &&
   -1 21389               !skipTo.tag &&
   -1 21390               !skipTo.role &&
   -1 21391               aDescribedby
   -1 21392             ) {
   -1 21393               var desc = "";
   -1 21394               ids = aDescribedby.split(/\s+/);
   -1 21395               parts = [];
   -1 21396               for (i = 0; i < ids.length; i++) {
   -1 21397                 element = docO.getElementById(ids[i]);
   -1 21398                 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label
   -1 21399                 parts.push(
   -1 21400                   walk(element, true, false, [node], false, {
   -1 21401                     ref: ownedBy,
   -1 21402                     top: element
   -1 21403                   }).name
   -1 21404                 );
   -1 21405               }
   -1 21406               // Check for blank value, since whitespace chars alone are not valid as a name
   -1 21407               desc = trim(parts.join(" "));
   -1 21408 
   -1 21409               if (trim(desc)) {
   -1 21410                 result.desc = desc;
   -1 21411                 hasDesc = true;
   -1 21412               }
   -1 21413             }
   -1 21414 
   -1 21415             // Check for non-empty value of aria-labelledby on current node, follow each ID ref, then stop and process no deeper.
   -1 21416             if (!stop && !skipTo.tag && !skipTo.role && aLabelledby) {
   -1 21417               ids = aLabelledby.split(/\s+/);
   -1 21418               parts = [];
   -1 21419               for (i = 0; i < ids.length; i++) {
   -1 21420                 element = docO.getElementById(ids[i]);
   -1 21421                 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label
   -1 21422                 parts.push(
   -1 21423                   walk(element, true, skip, [node], element === refNode, {
   -1 21424                     ref: ownedBy,
   -1 21425                     top: element
   -1 21426                   }).name
   -1 21427                 );
   -1 21428               }
   -1 21429               // Check for blank value, since whitespace chars alone are not valid as a name
   -1 21430               name = trim(parts.join(" "));
   -1 21431 
   -1 21432               if (trim(name)) {
   -1 21433                 hasName = true;
   -1 21434                 // Abort further recursion if name is valid.
   -1 21435                 result.skip = true;
   -1 21436               }
   -1 21437             }
   -1 21438 
   -1 21439             // Otherwise, if current node has a non-empty aria-label then set as name and process no deeper within the branch.
   -1 21440             if (
   -1 21441               !skipTo.tag &&
   -1 21442               !skipTo.role &&
   -1 21443               !hasName &&
   -1 21444               trim(aLabel) &&
   -1 21445               !isSeparatChildFormField
   -1 21446             ) {
   -1 21447               name = aLabel;
   -1 21448 
   -1 21449               // Check for blank value, since whitespace chars alone are not valid as a name
   -1 21450               if (trim(name)) {
   -1 21451                 hasName = true;
   -1 21452                 if (node === refNode) {
   -1 21453                   // If name is non-empty and both the current and refObject nodes match, then don't process any deeper within the branch.
   -1 21454                   skip = true;
   -1 21455                 }
   -1 21456               }
   -1 21457             }
   -1 21458 
   -1 21459             var rolePresentation =
   -1 21460               !skipTo.tag &&
   -1 21461               !skipTo.role &&
   -1 21462               !hasName &&
   -1 21463               nRole &&
   -1 21464               presentationRoles.indexOf(nRole) !== -1 &&
   -1 21465               !isFocusable(node) &&
   -1 21466               !hasGlobalAttr(node)
   -1 21467                 ? true
   -1 21468                 : false;
   -1 21469 
   -1 21470             // Otherwise, if the current node is not a nested widget control within the parent ref obj, but is instead a native markup element that includes a host-defined labelling mechanism, then set the name and description accordingly if present.
   -1 21471             if (!isSeparatChildFormField) {
   -1 21472               // Otherwise, if name is still empty and the current node matches the ref node and is a standard form field with a non-empty associated label element, process label with same naming computation algorithm.
   -1 21473               if (
   -1 21474                 !skipTo.tag &&
   -1 21475                 !skipTo.role &&
   -1 21476                 !hasName &&
   -1 21477                 node === refNode &&
   -1 21478                 isNativeFormField
   -1 21479               ) {
   -1 21480                 // Logic modified to match issue
   -1 21481                 // https://github.com/WhatSock/w3c-alternative-text-computation/issues/12 */
   -1 21482                 var labels = docO.querySelectorAll("label");
   -1 21483                 var implicitLabel = getParent(node, "label") || false;
   -1 21484                 var explicitLabel =
   -1 21485                   node.id &&
   -1 21486                   docO.querySelectorAll('label[for="' + node.id + '"]').length
   -1 21487                     ? docO.querySelector('label[for="' + node.id + '"]')
   -1 21488                     : false;
   -1 21489                 var implicitI = 0;
   -1 21490                 var explicitI = 0;
   -1 21491                 for (i = 0; i < labels.length; i++) {
   -1 21492                   if (labels[i] === implicitLabel) {
   -1 21493                     implicitI = i;
   -1 21494                   } else if (labels[i] === explicitLabel) {
   -1 21495                     explicitI = i;
   -1 21496                   }
   -1 21497                 }
   -1 21498                 var isImplicitFirst =
   -1 21499                   implicitLabel &&
   -1 21500                   implicitLabel.nodeType === 1 &&
   -1 21501                   explicitLabel &&
   -1 21502                   explicitLabel.nodeType === 1 &&
   -1 21503                   implicitI < explicitI
   -1 21504                     ? true
   -1 21505                     : false;
   -1 21506 
   -1 21507                 if (
   -1 21508                   explicitLabel &&
   -1 21509                   !isParentHidden(explicitLabel, docO.body, true)
   -1 21510                 ) {
   -1 21511                   var eLblName = trim(
   -1 21512                     walk(explicitLabel, true, skip, [node], false, {
   -1 21513                       ref: ownedBy,
   -1 21514                       top: explicitLabel
   -1 21515                     }).name
   -1 21516                   );
   -1 21517                 }
   -1 21518                 if (
   -1 21519                   implicitLabel &&
   -1 21520                   implicitLabel !== explicitLabel &&
   -1 21521                   !isParentHidden(implicitLabel, docO.body, true)
   -1 21522                 ) {
   -1 21523                   var iLblName = trim(
   -1 21524                     walk(implicitLabel, true, skip, [node], false, {
21088 21525                       ref: ownedBy,
21089    -1                       top: element
   -1 21526                       top: implicitLabel
21090 21527                     }).name
21091 21528                   );
21092 21529                 }
   -1 21530 
   -1 21531                 if (iLblName && eLblName && isImplicitFirst) {
   -1 21532                   name = iLblName + " " + eLblName;
   -1 21533                 } else if (eLblName && iLblName) {
   -1 21534                   name = eLblName + " " + iLblName;
   -1 21535                 } else if (eLblName) {
   -1 21536                   name = eLblName;
   -1 21537                 } else if (iLblName) {
   -1 21538                   name = iLblName;
   -1 21539                 }
   -1 21540 
   -1 21541                 if (trim(name)) {
   -1 21542                   hasName = true;
   -1 21543                 }
   -1 21544               }
   -1 21545 
   -1 21546               // Process native form field buttons in accordance with the HTML AAM
   -1 21547               // https://w3c.github.io/html-aam/#accessible-name-and-description-computation
   -1 21548               var btnType =
   -1 21549                 (!skipTo.tag &&
   -1 21550                   !skipTo.role &&
   -1 21551                   isNativeButton &&
   -1 21552                   node.getAttribute("type")) ||
   -1 21553                 false;
   -1 21554               var btnValue =
   -1 21555                 (!skipTo.tag &&
   -1 21556                   !skipTo.role &&
   -1 21557                   btnType &&
   -1 21558                   trim(node.getAttribute("value"))) ||
   -1 21559                 false;
   -1 21560 
   -1 21561               var nAlt = rolePresentation ? "" : trim(node.getAttribute("alt"));
   -1 21562 
   -1 21563               // Otherwise, if name is still empty and current node is a standard non-presentational img or image button with a non-empty alt attribute, set alt attribute value as the accessible name.
   -1 21564               if (
   -1 21565                 !skipTo.tag &&
   -1 21566                 !skipTo.role &&
   -1 21567                 !hasName &&
   -1 21568                 !rolePresentation &&
   -1 21569                 (nTag === "img" || btnType === "image") &&
   -1 21570                 nAlt
   -1 21571               ) {
21093 21572                 // Check for blank value, since whitespace chars alone are not valid as a name
21094    -1                 name = trim(parts.join(" "));
   -1 21573                 name = trim(nAlt);
   -1 21574                 if (trim(name)) {
   -1 21575                   hasName = true;
   -1 21576                 }
   -1 21577               }
21095 21578 
   -1 21579               if (
   -1 21580                 !skipTo.tag &&
   -1 21581                 !skipTo.role &&
   -1 21582                 !hasName &&
   -1 21583                 node === refNode &&
   -1 21584                 btnType &&
   -1 21585                 ["button", "image", "submit", "reset"].indexOf(btnType) !== -1
   -1 21586               ) {
   -1 21587                 if (btnValue) {
   -1 21588                   name = btnValue;
   -1 21589                 } else {
   -1 21590                   switch (btnType) {
   -1 21591                     case "submit":
   -1 21592                     case "image":
   -1 21593                       name = "Submit Query";
   -1 21594                       break;
   -1 21595                     case "reset":
   -1 21596                       name = "Reset";
   -1 21597                       break;
   -1 21598                     default:
   -1 21599                       name = "";
   -1 21600                   }
   -1 21601                 }
   -1 21602                 if (trim(name)) {
   -1 21603                   hasName = true;
   -1 21604                 }
   -1 21605               }
   -1 21606 
   -1 21607               if (
   -1 21608                 !skipTo.tag &&
   -1 21609                 !skipTo.role &&
   -1 21610                 hasName &&
   -1 21611                 node === refNode &&
   -1 21612                 btnType &&
   -1 21613                 ["button", "submit", "reset"].indexOf(btnType) !== -1 &&
   -1 21614                 btnValue &&
   -1 21615                 btnValue !== name &&
   -1 21616                 !result.desc
   -1 21617               ) {
   -1 21618                 result.desc = btnValue;
   -1 21619                 hasDesc = true;
   -1 21620               }
   -1 21621 
   -1 21622               var isFieldset =
   -1 21623                 !skipTo.tag &&
   -1 21624                 !skipTo.role &&
   -1 21625                 !hasName &&
   -1 21626                 node === rootNode &&
   -1 21627                 (nRole === "group" || (!nRole && nTag === "fieldset"));
   -1 21628 
   -1 21629               // Otherwise, if name is still empty and the current node matches the root node and is a standard fieldset element with a non-empty associated legend element, process legend with same naming computation algorithm.
   -1 21630               // Plus do the same for role="group" with embedded role="legend", or a combination of these.
   -1 21631               if (isFieldset) {
   -1 21632                 name = trim(
   -1 21633                   walk(
   -1 21634                     node,
   -1 21635                     stop,
   -1 21636                     false,
   -1 21637                     [],
   -1 21638                     false,
   -1 21639                     {
   -1 21640                       ref: ownedBy,
   -1 21641                       top: node
   -1 21642                     },
   -1 21643                     {
   -1 21644                       tag: "legend",
   -1 21645                       role: "legend",
   -1 21646                       go: true
   -1 21647                     }
   -1 21648                   ).name
   -1 21649                 );
21096 21650                 if (trim(name)) {
21097 21651                   hasName = true;
21098    -1                   // Abort further recursion if name is valid.
21099    -1                   skip = true;
21100 21652                 }
   -1 21653                 skip = true;
21101 21654               }
21102 21655 
21103    -1               // Check for non-empty value of aria-describedby if current node equals reference node, follow each ID ref, then stop and process no deeper.
21104    -1               if (aDescribedby) {
21105    -1                 var desc = "";
21106    -1                 ids = aDescribedby.split(/\s+/);
21107    -1                 parts = [];
21108    -1                 for (i = 0; i < ids.length; i++) {
21109    -1                   element = document.getElementById(ids[i]);
21110    -1                   // Also prevent the current form field from having its value included in the naming computation if nested as a child of label
21111    -1                   parts.push(
21112    -1                     walk(element, true, false, [node], false, {
   -1 21656               // Otherwise, if name is still empty and the root node and the current node are the same and node is an svg element, then parse the content of the title element to set the name and the desc element to set the description.
   -1 21657               if (!skipTo.tag && !skipTo.role && nTag === "svg") {
   -1 21658                 var svgT = node.querySelector("title") || false;
   -1 21659                 var svgD =
   -1 21660                   (node === rootNode && node.querySelector("desc")) || false;
   -1 21661                 if (!hasName && svgT) {
   -1 21662                   name = trim(
   -1 21663                     walk(svgT, true, false, [], false, {
21113 21664                       ref: ownedBy,
21114    -1                       top: element
   -1 21665                       top: svgT
21115 21666                     }).name
21116 21667                   );
   -1 21668                   if (trim(name)) {
   -1 21669                     hasName = true;
   -1 21670                   }
21117 21671                 }
21118    -1                 // Check for blank value, since whitespace chars alone are not valid as a name
21119    -1                 desc = trim(parts.join(" "));
21120    -1 
21121    -1                 if (trim(desc)) {
21122    -1                   result.desc = desc;
   -1 21672                 if (!hasDesc && svgD) {
   -1 21673                   var dE = trim(
   -1 21674                     walk(svgD, true, false, [], false, {
   -1 21675                       ref: ownedBy,
   -1 21676                       top: svgD
   -1 21677                     }).name
   -1 21678                   );
   -1 21679                   if (trim(dE)) {
   -1 21680                     result.desc = dE;
   -1 21681                     hasDesc = true;
   -1 21682                   }
21123 21683                 }
   -1 21684                 result.skip = true;
21124 21685               }
21125 21686             }
21126 21687 
21127 21688             // Otherwise, if the current node is a nested widget control within the parent ref obj, then add only its value and process no deeper within the branch.
21128    -1             if (isSeparatChildFormField) {
   -1 21689             if (!skipTo.tag && !skipTo.role && isSeparatChildFormField) {
21129 21690               // Prevent the referencing node from having its value included in the case of form control labels that contain the element with focus.
21130 21691               if (
21131 21692                 !(
@@ -21173,167 +21734,42 @@ window.getAccName = calcNames = function(
21173 21734               }
21174 21735             }
21175 21736 
21176    -1             // Otherwise, if current node has a non-empty aria-label then set as name and process no deeper within the branch.
21177    -1             if (!hasName && trim(aLabel) && !isSeparatChildFormField) {
21178    -1               name = aLabel;
21179    -1 
21180    -1               // Check for blank value, since whitespace chars alone are not valid as a name
21181    -1               if (trim(name)) {
21182    -1                 hasName = true;
21183    -1                 if (node === refNode) {
21184    -1                   // If name is non-empty and both the current and refObject nodes match, then don't process any deeper within the branch.
21185    -1                   skip = true;
21186    -1                 }
21187    -1               }
21188    -1             }
21189    -1 
21190    -1             // Otherwise, if name is still empty and the current node matches the ref node and is a standard form field with a non-empty associated label element, process label with same naming computation algorithm.
21191    -1             if (!hasName && node === refNode && isNativeFormField) {
21192    -1               // Logic modified to match issue
21193    -1               // https://github.com/WhatSock/w3c-alternative-text-computation/issues/12 */
21194    -1               var labels = document.querySelectorAll("label");
21195    -1               var implicitLabel = getParent(node, "label") || false;
21196    -1               var explicitLabel =
21197    -1                 node.id &&
21198    -1                 document.querySelectorAll('label[for="' + node.id + '"]').length
21199    -1                   ? document.querySelector('label[for="' + node.id + '"]')
21200    -1                   : false;
21201    -1               var implicitI = 0;
21202    -1               var explicitI = 0;
21203    -1               for (i = 0; i < labels.length; i++) {
21204    -1                 if (labels[i] === implicitLabel) {
21205    -1                   implicitI = i;
21206    -1                 } else if (labels[i] === explicitLabel) {
21207    -1                   explicitI = i;
21208    -1                 }
21209    -1               }
21210    -1               var isImplicitFirst =
21211    -1                 implicitLabel &&
21212    -1                 implicitLabel.nodeType === 1 &&
21213    -1                 explicitLabel &&
21214    -1                 explicitLabel.nodeType === 1 &&
21215    -1                 implicitI < explicitI
21216    -1                   ? true
21217    -1                   : false;
21218    -1 
21219    -1               if (explicitLabel) {
21220    -1                 var eLblName = trim(
21221    -1                   walk(explicitLabel, true, skip, [node], false, {
21222    -1                     ref: ownedBy,
21223    -1                     top: explicitLabel
21224    -1                   }).name
21225    -1                 );
21226    -1               }
21227    -1               if (implicitLabel && implicitLabel !== explicitLabel) {
21228    -1                 var iLblName = trim(
21229    -1                   walk(implicitLabel, true, skip, [node], false, {
21230    -1                     ref: ownedBy,
21231    -1                     top: implicitLabel
21232    -1                   }).name
21233    -1                 );
21234    -1               }
21235    -1 
21236    -1               if (iLblName && eLblName && isImplicitFirst) {
21237    -1                 name = iLblName + " " + eLblName;
21238    -1               } else if (eLblName && iLblName) {
21239    -1                 name = eLblName + " " + iLblName;
21240    -1               } else if (eLblName) {
21241    -1                 name = eLblName;
21242    -1               } else if (iLblName) {
21243    -1                 name = iLblName;
21244    -1               }
21245    -1 
21246    -1               if (trim(name)) {
21247    -1                 hasName = true;
21248    -1               }
21249    -1             }
21250    -1 
21251    -1             // Process native form field buttons in accordance with the HTML AAM
21252    -1             // https://w3c.github.io/html-aam/#accessible-name-and-description-computation
21253    -1             var btnType =
21254    -1               (isNativeButton && node.getAttribute("type")) || false;
21255    -1             var btnValue =
21256    -1               (btnType && trim(node.getAttribute("value"))) || false;
21257    -1 
21258    -1             var rolePresentation =
21259    -1               !hasName &&
21260    -1               nRole &&
21261    -1               presentationRoles.indexOf(nRole) !== -1 &&
21262    -1               !isFocusable(node) &&
21263    -1               !hasGlobalAttr(node)
21264    -1                 ? true
21265    -1                 : false;
21266    -1             var nAlt = rolePresentation ? "" : trim(node.getAttribute("alt"));
21267    -1 
21268    -1             // Otherwise, if name is still empty and current node is a standard non-presentational img or image button with a non-empty alt attribute, set alt attribute value as the accessible name.
   -1 21737             // Otherwise, if current node is the same as rootNode and is non-presentational and includes a non-empty title attribute, store title attribute value as the accessible name if name is still empty, or the description if not.
   -1 21738             // Processing for this is handled within the walkDOM function.
21269 21739             if (
21270    -1               !hasName &&
   -1 21740               !skipTo.tag &&
   -1 21741               !skipTo.role &&
21271 21742               !rolePresentation &&
21272    -1               (nTag === "img" || btnType === "image") &&
21273    -1               nAlt
   -1 21743               trim(nTitle)
21274 21744             ) {
21275    -1               // Check for blank value, since whitespace chars alone are not valid as a name
21276    -1               name = trim(nAlt);
21277    -1               if (trim(name)) {
21278    -1                 hasName = true;
21279    -1               }
   -1 21745               result.title = trim(nTitle);
21280 21746             }
21281 21747 
21282    -1             if (
21283    -1               !hasName &&
21284    -1               node === refNode &&
21285    -1               btnType &&
21286    -1               ["button", "image", "submit", "reset"].indexOf(btnType) !== -1
21287    -1             ) {
21288    -1               if (btnValue) {
21289    -1                 name = btnValue;
21290    -1               } else {
21291    -1                 switch (btnType) {
21292    -1                   case "submit":
21293    -1                   case "image":
21294    -1                     name = "Submit Query";
21295    -1                     break;
21296    -1                   case "reset":
21297    -1                     name = "Reset";
21298    -1                     break;
21299    -1                   default:
21300    -1                     name = "";
21301    -1                 }
21302    -1               }
   -1 21748             var isSkipTo =
   -1 21749               (skipTo.role && skipTo.role === nRole) ||
   -1 21750               (!nRole && skipTo.tag && skipTo.tag === nTag);
   -1 21751 
   -1 21752             // Process custom tag and role searches such as fieldset directing AccName to the first legend.
   -1 21753             if (isSkipTo) {
   -1 21754               name = trim(
   -1 21755                 walk(node, stop, false, [], false, {
   -1 21756                   ref: ownedBy,
   -1 21757                   top: node
   -1 21758                 }).name
   -1 21759               );
21303 21760               if (trim(name)) {
21304 21761                 hasName = true;
   -1 21762                 skip = true;
21305 21763               }
21306 21764             }
21307 21765 
21308    -1             if (
21309    -1               hasName &&
21310    -1               node === refNode &&
21311    -1               btnType &&
21312    -1               ["button", "submit", "reset"].indexOf(btnType) !== -1 &&
21313    -1               btnValue &&
21314    -1               btnValue !== name &&
21315    -1               !result.desc
21316    -1             ) {
21317    -1               result.desc = btnValue;
21318    -1             }
21319    -1 
21320    -1             // Otherwise, if current node is the same as rootNode and is non-presentational and includes a non-empty title attribute and is not a separate embedded form field, store title attribute value as the accessible name if name is still empty, or the description if not.
21321    -1             if (
21322    -1               node === rootNode &&
21323    -1               !rolePresentation &&
21324    -1               trim(nTitle) &&
21325    -1               !isSeparatChildFormField
21326    -1             ) {
21327    -1               result.title = trim(nTitle);
21328    -1             }
21329    -1 
21330 21766             // Check for non-empty value of aria-owns, follow each ID ref, then process with same naming computation.
21331 21767             // Also abort aria-owns processing if contained on an element that does not support child elements.
21332    -1             if (aOwns && !isNativeFormField && nTag !== "img") {
   -1 21768             if (!isSkipTo && aOwns && !isNativeFormField && nTag !== "img") {
21333 21769               ids = aOwns.split(/\s+/);
21334 21770               parts = [];
21335 21771               for (i = 0; i < ids.length; i++) {
21336    -1                 element = document.getElementById(ids[i]);
   -1 21772                 element = docO.getElementById(ids[i]);
21337 21773                 // Abort processing if the referenced node has already been traversed
21338 21774                 if (element && owns.indexOf(ids[i]) === -1) {
21339 21775                   owns.push(ids[i]);
@@ -21343,7 +21779,7 @@ window.getAccName = calcNames = function(
21343 21779                     node: node,
21344 21780                     target: element
21345 21781                   };
21346    -1                   if (!isParentHidden(element, document.body, true)) {
   -1 21782                   if (!isParentHidden(element, docO.body, true)) {
21347 21783                     parts.push(walk(element, true, skip, [], false, oBy).name);
21348 21784                   }
21349 21785                 }
@@ -21354,7 +21790,7 @@ window.getAccName = calcNames = function(
21354 21790           }
21355 21791 
21356 21792           // Otherwise, process text node
21357    -1           else if (node.nodeType === 3) {
   -1 21793           else if (!skipTo.tag && !skipTo.role && node.nodeType === 3) {
21358 21794             name = node.data;
21359 21795           }
21360 21796 
@@ -21397,6 +21833,7 @@ window.getAccName = calcNames = function(
21397 21833           inList(list1) ||
21398 21834           inList(list2) ||
21399 21835           inList(list3) ||
   -1 21836           inList(list4) ||
21400 21837           presentationRoles.indexOf(role) !== -1
21401 21838         ) {
21402 21839           return role;
@@ -21470,6 +21907,7 @@ window.getAccName = calcNames = function(
21470 21907     };
21471 21908     // Never include name from content when current node matches list2
21472 21909     // The rowgroup role was added to prevent 'name from content' in accordance with relevant ARIA 1.1 spec changes.
   -1 21910     // The fieldset element and group role was added to account for implicit mappings where name from content is not supported.
21473 21911     var list2 = {
21474 21912       roles: [
21475 21913         "application",
@@ -21508,7 +21946,8 @@ window.getAccName = calcNames = function(
21508 21946         "tree",
21509 21947         "treegrid",
21510 21948         "separator",
21511    -1         "rowgroup"
   -1 21949         "rowgroup",
   -1 21950         "group"
21512 21951       ],
21513 21952       tags: [
21514 21953         "article",
@@ -21533,7 +21972,8 @@ window.getAccName = calcNames = function(
21533 21972         "section",
21534 21973         "thead",
21535 21974         "tbody",
21536    -1         "tfoot"
   -1 21975         "tfoot",
   -1 21976         "fieldset"
21537 21977       ]
21538 21978     };
21539 21979     // As an override of list2, conditionally include name from content if current node is focusable, or if the current node matches list3 while the referenced parent node (root node) matches list1.
@@ -21543,7 +21983,6 @@ window.getAccName = calcNames = function(
21543 21983         "definition",
21544 21984         "directory",
21545 21985         "list",
21546    -1         "group",
21547 21986         "note",
21548 21987         "status",
21549 21988         "table",
@@ -21551,6 +21990,12 @@ window.getAccName = calcNames = function(
21551 21990       ],
21552 21991       tags: ["dl", "ul", "ol", "dd", "details", "output", "table"]
21553 21992     };
   -1 21993     // Subsequent roles added as part of the Role Parity project for ARIA 1.2.
   -1 21994     // Tracks roles that don't specifically belong within the prior process lists.
   -1 21995     var list4 = {
   -1 21996       roles: ["legend"],
   -1 21997       tags: ["legend"]
   -1 21998     };
21554 21999 
21555 22000     var nativeFormFields = ["button", "input", "select", "textarea"];
21556 22001     var rangeWidgetRoles = ["scrollbar", "slider", "spinbutton"];
@@ -21576,10 +22021,12 @@ window.getAccName = calcNames = function(
21576 22021 
21577 22022     var hasGlobalAttr = function(node) {
21578 22023       var globalPropsAndStates = [
   -1 22024         "labelledby",
   -1 22025         "label",
   -1 22026         "describedby",
21579 22027         "busy",
21580 22028         "controls",
21581 22029         "current",
21582    -1         "describedby",
21583 22030         "details",
21584 22031         "disabled",
21585 22032         "dropeffect",
@@ -21602,25 +22049,27 @@ window.getAccName = calcNames = function(
21602 22049       return false;
21603 22050     };
21604 22051 
21605    -1     var isHidden = function(node, refNode) {
21606    -1       var hidden = function(node) {
21607    -1         if (!node || node.nodeType !== 1 || node === refNode) {
   -1 22052     var isHidden =
   -1 22053       overrides.isHidden ||
   -1 22054       function(node, refNode) {
   -1 22055         var hidden = function(node) {
   -1 22056           if (!node || node.nodeType !== 1 || node === refNode) {
   -1 22057             return false;
   -1 22058           }
   -1 22059           if (node.getAttribute("aria-hidden") === "true") {
   -1 22060             return true;
   -1 22061           }
   -1 22062           if (node.getAttribute("hidden")) {
   -1 22063             return true;
   -1 22064           }
   -1 22065           var style = getStyleObject(node);
   -1 22066           if (style["display"] === "none" || style["visibility"] === "hidden") {
   -1 22067             return true;
   -1 22068           }
21608 22069           return false;
21609    -1         }
21610    -1         if (node.getAttribute("aria-hidden") === "true") {
21611    -1           return true;
21612    -1         }
21613    -1         if (node.getAttribute("hidden")) {
21614    -1           return true;
21615    -1         }
21616    -1         var style = getStyleObject(node);
21617    -1         if (style["display"] === "none" || style["visibility"] === "hidden") {
21618    -1           return true;
21619    -1         }
21620    -1         return false;
   -1 22070         };
   -1 22071         return hidden(node);
21621 22072       };
21622    -1       return hidden(node);
21623    -1     };
21624 22073 
21625 22074     var isParentHidden = function(node, refNode, skipOwned, skipCurrent) {
21626 22075       while (node && node !== refNode) {
@@ -21632,15 +22081,17 @@ window.getAccName = calcNames = function(
21632 22081       return false;
21633 22082     };
21634 22083 
21635    -1     var getStyleObject = function(node) {
21636    -1       var style = {};
21637    -1       if (document.defaultView && document.defaultView.getComputedStyle) {
21638    -1         style = document.defaultView.getComputedStyle(node, "");
21639    -1       } else if (node.currentStyle) {
21640    -1         style = node.currentStyle;
21641    -1       }
21642    -1       return style;
21643    -1     };
   -1 22084     var getStyleObject =
   -1 22085       overrides.getStyleObject ||
   -1 22086       function(node) {
   -1 22087         var style = {};
   -1 22088         if (docO.defaultView && docO.defaultView.getComputedStyle) {
   -1 22089           style = docO.defaultView.getComputedStyle(node, "");
   -1 22090         } else if (node.currentStyle) {
   -1 22091           style = node.currentStyle;
   -1 22092         }
   -1 22093         return style;
   -1 22094       };
21644 22095 
21645 22096     var cleanCSSText = function(node, text) {
21646 22097       var s = text;
@@ -21829,19 +22280,21 @@ window.getAccName = calcNames = function(
21829 22280       return parts.join(" ");
21830 22281     };
21831 22282 
21832    -1     var getPseudoElStyleObj = function(node, position) {
21833    -1       var styleObj = {};
21834    -1       for (var prop in blockStyles) {
21835    -1         styleObj[prop] = document.defaultView
   -1 22283     var getPseudoElStyleObj =
   -1 22284       overrides.getPseudoElStyleObj ||
   -1 22285       function(node, position) {
   -1 22286         var styleObj = {};
   -1 22287         for (var prop in blockStyles) {
   -1 22288           styleObj[prop] = docO.defaultView
   -1 22289             .getComputedStyle(node, position)
   -1 22290             .getPropertyValue(prop);
   -1 22291         }
   -1 22292         styleObj["content"] = docO.defaultView
21836 22293           .getComputedStyle(node, position)
21837    -1           .getPropertyValue(prop);
21838    -1       }
21839    -1       styleObj["content"] = document.defaultView
21840    -1         .getComputedStyle(node, position)
21841    -1         .getPropertyValue("content")
21842    -1         .replace(/^"|\\|"$/g, "");
21843    -1       return styleObj;
21844    -1     };
   -1 22294           .getPropertyValue("content")
   -1 22295           .replace(/^"|\\|"$/g, "");
   -1 22296         return styleObj;
   -1 22297       };
21845 22298 
21846 22299     var getText = function(node, position) {
21847 22300       if (!position && node.nodeType === 1) {
@@ -21862,30 +22315,40 @@ window.getAccName = calcNames = function(
21862 22315       return text;
21863 22316     };
21864 22317 
21865    -1     var getCSSText = function(node, refNode) {
21866    -1       if (
21867    -1         (node && node.nodeType !== 1) ||
21868    -1         node === refNode ||
21869    -1         ["input", "select", "textarea", "img", "iframe"].indexOf(
21870    -1           node.nodeName.toLowerCase()
21871    -1         ) !== -1
21872    -1       ) {
21873    -1         return { before: "", after: "" };
21874    -1       }
21875    -1       if (document.defaultView && document.defaultView.getComputedStyle) {
21876    -1         return {
21877    -1           before: cleanCSSText(node, getText(node, ":before")),
21878    -1           after: cleanCSSText(node, getText(node, ":after"))
21879    -1         };
21880    -1       } else {
21881    -1         return { before: "", after: "" };
21882    -1       }
21883    -1     };
   -1 22318     var getCSSText =
   -1 22319       overrides.getCSSText ||
   -1 22320       function(node, refNode) {
   -1 22321         if (
   -1 22322           (node && node.nodeType !== 1) ||
   -1 22323           node === refNode ||
   -1 22324           ["input", "select", "textarea", "img", "iframe"].indexOf(
   -1 22325             node.nodeName.toLowerCase()
   -1 22326           ) !== -1
   -1 22327         ) {
   -1 22328           return { before: "", after: "" };
   -1 22329         }
   -1 22330         if (docO.defaultView && docO.defaultView.getComputedStyle) {
   -1 22331           return {
   -1 22332             before: cleanCSSText(node, getText(node, ":before")),
   -1 22333             after: cleanCSSText(node, getText(node, ":after"))
   -1 22334           };
   -1 22335         } else {
   -1 22336           return { before: "", after: "" };
   -1 22337         }
   -1 22338       };
21884 22339 
21885    -1     var getParent = function(node, nTag) {
   -1 22340     var getParent = function(node, nTag, nRole, noRole) {
   -1 22341       var noRole = noRole ? true : false;
21886 22342       while (node) {
21887 22343         node = node.parentNode;
21888    -1         if (node && node.nodeName && node.nodeName.toLowerCase() === nTag) {
   -1 22344         if (
   -1 22345           node &&
   -1 22346           ((nRole && getRole(node) === nRole) ||
   -1 22347             (nTag &&
   -1 22348               node.nodeName &&
   -1 22349               node.nodeName.toLowerCase() === nTag &&
   -1 22350               (!noRole || getRole(node).length < 1)))
   -1 22351         ) {
21889 22352           return node;
21890 22353         }
21891 22354       }
@@ -21931,7 +22394,7 @@ window.getAccName = calcNames = function(
21931 22394       return str.replace(/^\s+|\s+$/g, "");
21932 22395     };
21933 22396 
21934    -1     if (isParentHidden(node, document.body, true)) {
   -1 22397     if (isParentHidden(node, docO.body, true)) {
21935 22398       return props;
21936 22399     }
21937 22400 
@@ -21965,8 +22428,8 @@ window.getAccName = calcNames = function(
21965 22428 
21966 22429 // Customize returned string for testable statements
21967 22430 
21968    -1 window.getAccNameMsg = getNames = function(node) {
21969    -1   var props = calcNames(node);
   -1 22431 window.getAccNameMsg = window.getNames = function(node, overrides) {
   -1 22432   var props = window.getAccName(node, null, false, overrides);
21970 22433   if (props.error) {
21971 22434     return (
21972 22435       props.error +
@@ -21991,12 +22454,12 @@ window.getAccNameMsg = getNames = function(node) {
21991 22454 
21992 22455 if (typeof module === "object" && module.exports) {
21993 22456   module.exports = {
21994    -1     getNames: getNames,
21995    -1     calcNames: calcNames
   -1 22457     getNames: window.getNames,
   -1 22458     calcNames: window.calcNames
21996 22459   };
21997 22460 }
21998 22461 
21999    -1 },{}],14:[function(require,module,exports){
   -1 22462 },{}],15:[function(require,module,exports){
22000 22463 (function (global){
22001 22464 global.goog = {
22002 22465 	provide: function() {},
@@ -22021,7 +22484,7 @@ require('accessibility-developer-tools/src/js/Properties');
22021 22484 module.exports = global.axs;
22022 22485 
22023 22486 }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
22024    -1 },{"accessibility-developer-tools/src/js/AccessibilityUtils":1,"accessibility-developer-tools/src/js/BrowserUtils":2,"accessibility-developer-tools/src/js/Color":3,"accessibility-developer-tools/src/js/Constants":4,"accessibility-developer-tools/src/js/DOMUtils":5,"accessibility-developer-tools/src/js/Properties":6}],15:[function(require,module,exports){
   -1 22487 },{"accessibility-developer-tools/src/js/AccessibilityUtils":1,"accessibility-developer-tools/src/js/BrowserUtils":2,"accessibility-developer-tools/src/js/Color":3,"accessibility-developer-tools/src/js/Constants":4,"accessibility-developer-tools/src/js/DOMUtils":5,"accessibility-developer-tools/src/js/Properties":6}],16:[function(require,module,exports){
22025 22488 var ariaApi = require('aria-api');
22026 22489 var accdc = require('w3c-alternative-text-computation');
22027 22490 var axe = require('axe-core');
@@ -22040,14 +22503,14 @@ var ex = function(fn, args, _this) {
22040 22503 };
22041 22504 
22042 22505 var implementations = {
22043    -1 	'aria-api (0.2.7)': function(el) {
   -1 22506 	'aria-api (0.3.0)': function(el) {
22044 22507 		return {
22045 22508 			name: ex(ariaApi.getName, [el]),
22046 22509 			desc: ex(ariaApi.getDescription, [el]),
22047 22510 			role: ex(ariaApi.getRole, [el]),
22048 22511 		};
22049 22512 	},
22050    -1 	'accdc (2.22)': accdc.calcNames,
   -1 22513 	'accdc (2.26)': accdc.calcNames,
22051 22514 	'axe (3.2.2)': function(el) {
22052 22515 		return {
22053 22516 			name: ex(function(el) {
@@ -22122,4 +22585,4 @@ try {
22122 22585 	});
22123 22586 }
22124 22587 
22125    -1 },{"./axs":14,"aria-api":7,"axe-core":12,"w3c-alternative-text-computation":13}]},{},[15]);
   -1 22588 },{"./axs":15,"aria-api":7,"axe-core":13,"w3c-alternative-text-computation":14}]},{},[16]);

diff --git a/fuzz.js b/fuzz.js

@@ -55,7 +55,7 @@ module.exports = {
   55    55 var constants = require('aria-api/lib/constants');
   56    56 
   57    57 var attributes = [
   58    -1 	['role',             Array.prototype.concat.apply([], Object.values(constants.subRoles)).filter((v, i, a) => a.indexOf(v) === i)],
   -1    58 	['role',             Object.keys(constants.roles)],
   59    59 	['hidden',           ['']],
   60    60 	['aria-hidden',      ['', 'true', 'false']],
   61    61 	['aria-label',       ['', '__random__']],
@@ -200,7 +200,7 @@ module.exports = {
  200   200 	'Element': Element,
  201   201 };
  202   202 
  203    -1 },{"aria-api/lib/constants":5}],3:[function(require,module,exports){
   -1   203 },{"aria-api/lib/constants":7}],3:[function(require,module,exports){
  204   204 var ariaApi = require('aria-api/instrumented.js');
  205   205 var accdc = require('w3c-alternative-text-computation');
  206   206 
@@ -268,7 +268,7 @@ document.addEventListener('DOMContentLoaded', function() {
  268   268 	});
  269   269 });
  270   270 
  271    -1 },{"./fuzzer":1,"./html":2,"aria-api/instrumented.js":4,"w3c-alternative-text-computation":9}],4:[function(require,module,exports){
   -1   271 },{"./fuzzer":1,"./html":2,"aria-api/instrumented.js":4,"w3c-alternative-text-computation":10}],4:[function(require,module,exports){
  272   272 var query = require('./lib/query.js');
  273   273 var name = require('./lib/name-inst.js');
  274   274 
@@ -284,7 +284,210 @@ module.exports = {
  284   284 	closest: query.closest,
  285   285 };
  286   286 
  287    -1 },{"./lib/name-inst.js":6,"./lib/query.js":7}],5:[function(require,module,exports){
   -1   287 },{"./lib/name-inst.js":8,"./lib/query.js":9}],5:[function(require,module,exports){
   -1   288 var attrs = require('./attrs');
   -1   289 
   -1   290 var _getOwner = function(node) {
   -1   291 	if (node.nodeType === node.ELEMENT_NODE && node.id) {
   -1   292 		var owner = document.querySelector('[aria-owns~="' + node.id + '"]');
   -1   293 		if (owner) {
   -1   294 			return owner;
   -1   295 		}
   -1   296 	}
   -1   297 };
   -1   298 
   -1   299 var _getParentNode = function(node) {
   -1   300 	return _getOwner(node) || node.parentNode;
   -1   301 };
   -1   302 
   -1   303 var detectLoop = function(node) {
   -1   304 	var tmp = _getParentNode(node);
   -1   305 	while (tmp) {
   -1   306 		if (tmp === node) {
   -1   307 			return true;
   -1   308 		}
   -1   309 		tmp = _getParentNode(tmp);
   -1   310 	}
   -1   311 };
   -1   312 
   -1   313 var getOwner = function(node) {
   -1   314 	if (node.nodeType === node.ELEMENT_NODE && node.id) {
   -1   315 		var owner = document.querySelector('[aria-owns~="' + node.id + '"]');
   -1   316 		if (owner && !detectLoop(node)) {
   -1   317 			return owner;
   -1   318 		}
   -1   319 	}
   -1   320 };
   -1   321 
   -1   322 var getParentNode = function(node) {
   -1   323 	return getOwner(node) || node.parentNode;
   -1   324 };
   -1   325 
   -1   326 var isHidden = function(node) {
   -1   327 	return node.nodeType === node.ELEMENT_NODE && attrs.getAttribute(node, 'hidden');
   -1   328 };
   -1   329 
   -1   330 var getChildNodes = function(node) {
   -1   331 	var childNodes = [];
   -1   332 
   -1   333 	for (var i = 0; i < node.childNodes.length; i++) {
   -1   334 		var child = node.childNodes[i];
   -1   335 		if (!getOwner(child) && !isHidden(child)) {
   -1   336 			childNodes.push(child);
   -1   337 		}
   -1   338 	}
   -1   339 
   -1   340 	if (node.nodeType === node.ELEMENT_NODE) {
   -1   341 		var owns = attrs.getAttribute(node, 'owns') || [];
   -1   342 		for (var i = 0; i < owns.length; i++) {
   -1   343 			var child = document.getElementById(owns[i]);
   -1   344 			// double check with getOwner for consistency
   -1   345 			if (child && getOwner(child) === node && !isHidden(child)) {
   -1   346 				childNodes.push(child);
   -1   347 			}
   -1   348 		}
   -1   349 	}
   -1   350 
   -1   351 	return childNodes;
   -1   352 };
   -1   353 
   -1   354 var walk = function(root, fn) {
   -1   355 	fn(root);
   -1   356 	getChildNodes(root).forEach(function(child) {
   -1   357 		walk(child, fn);
   -1   358 	});
   -1   359 };
   -1   360 
   -1   361 var searchUp = function(node, test) {
   -1   362 	var candidate = getParentNode(node);
   -1   363 	if (candidate) {
   -1   364 		if (test(candidate)) {
   -1   365 			return candidate;
   -1   366 		} else {
   -1   367 			return searchUp(candidate, test);
   -1   368 		}
   -1   369 	}
   -1   370 };
   -1   371 
   -1   372 module.exports = {
   -1   373 	'getParentNode': getParentNode,
   -1   374 	'getChildNodes': getChildNodes,
   -1   375 	'walk': walk,
   -1   376 	'searchUp': searchUp,
   -1   377 };
   -1   378 
   -1   379 },{"./attrs":6}],6:[function(require,module,exports){
   -1   380 var constants = require('./constants.js');
   -1   381 
   -1   382 // candidates can be passed for performance optimization
   -1   383 var getRole = function(el, candidates) {
   -1   384 	if (el.hasAttribute('role')) {
   -1   385 		return el.getAttribute('role');
   -1   386 	}
   -1   387 	for (var role in constants.roles) {
   -1   388 		var selector = (constants.roles[role].selectors || []).join(',');
   -1   389 		if (selector && (!candidates || candidates.indexOf(role) !== -1) && el.matches(selector)) {
   -1   390 			return role;
   -1   391 		}
   -1   392 	}
   -1   393 
   -1   394 	if (!candidates ||
   -1   395 			candidates.indexOf('banner') !== -1 ||
   -1   396 			candidates.indexOf('contentinfo') !== -1) {
   -1   397 		var scoped = el.matches(constants.scoped);
   -1   398 
   -1   399 		if (el.matches('header') && !scoped) {
   -1   400 			return 'banner';
   -1   401 		}
   -1   402 		if (el.matches('footer') && !scoped) {
   -1   403 			return 'contentinfo';
   -1   404 		}
   -1   405 	}
   -1   406 };
   -1   407 
   -1   408 var hasRole = function(el, roles) {
   -1   409 	var candidates = [].concat.apply([], roles.map(function(role) {
   -1   410 		return (constants.roles[role] || {}).subRoles || [role];
   -1   411 	}));
   -1   412 	actual = getRole(el, candidates);
   -1   413 	return candidates.indexOf(actual) !== -1;
   -1   414 };
   -1   415 
   -1   416 var getAttribute = function(el, key) {
   -1   417 	if (constants.attributeStrongMapping.hasOwnProperty(key)) {
   -1   418 		var value = el[constants.attributeStrongMapping[key]];
   -1   419 		if (value) {
   -1   420 			return value;
   -1   421 		}
   -1   422 	}
   -1   423 	if (key === 'readonly' && el.contentEditable) {
   -1   424 		return false;
   -1   425 	} else if (key === 'invalid' && el.checkValidity) {
   -1   426 		return !el.checkValidity();
   -1   427 	} else if (key === 'hidden') {
   -1   428 		var style = window.getComputedStyle(el);
   -1   429 		if (style.display === 'none' || style.visibility === 'hidden') {
   -1   430 			return true;
   -1   431 		}
   -1   432 	}
   -1   433 
   -1   434 	var type = constants.attributes[key];
   -1   435 	var raw = el.getAttribute('aria-' + key);
   -1   436 
   -1   437 	if (raw) {
   -1   438 		if (type === 'bool') {
   -1   439 			return raw === 'true';
   -1   440 		} else if (type === 'tristate') {
   -1   441 			return raw === 'true' ? true : raw === 'false' ? false : 'mixed';
   -1   442 		} else if (type === 'bool-undefined') {
   -1   443 			return raw === 'true' ? true : raw === 'false' ? false : undefined;
   -1   444 		} else if (type === 'id-list') {
   -1   445 			return raw.split(/\s+/);
   -1   446 		} else if (type === 'integer') {
   -1   447 			return parseInt(raw);
   -1   448 		} else if (type === 'number') {
   -1   449 			return parseFloat(raw);
   -1   450 		} else if (type === 'token-list') {
   -1   451 			return raw.split(/\s+/);
   -1   452 		} else {
   -1   453 			return raw;
   -1   454 		}
   -1   455 	}
   -1   456 
   -1   457 	// TODO
   -1   458 	// autocomplete
   -1   459 	// contextmenu -> aria-haspopup
   -1   460 	// indeterminate -> aria-checked="mixed"
   -1   461 	// list -> aria-controls
   -1   462 
   -1   463 	if (key === 'level') {
   -1   464 		for (var i = 1; i <= 6; i++) {
   -1   465 			if (el.tagName.toLowerCase() === 'h' + i) {
   -1   466 				return i;
   -1   467 			}
   -1   468 		}
   -1   469 	} else if (constants.attributeWeakMapping.hasOwnProperty(key)) {
   -1   470 		return el[constants.attributeWeakMapping[key]];
   -1   471 	}
   -1   472 
   -1   473 	var role = getRole(el);
   -1   474 	var defaults = (constants.roles[role] || {}).defaults;
   -1   475 	if (defaults && defaults.hasOwnProperty(key)) {
   -1   476 		return defaults[key];
   -1   477 	}
   -1   478 
   -1   479 	if (type === 'bool' || type === 'tristate') {
   -1   480 		return false;
   -1   481 	}
   -1   482 };
   -1   483 
   -1   484 module.exports = {
   -1   485 	getRole: getRole,
   -1   486 	hasRole: hasRole,
   -1   487 	getAttribute: getAttribute,
   -1   488 };
   -1   489 
   -1   490 },{"./constants.js":7}],7:[function(require,module,exports){
  288   491 exports.attributes = {
  289   492 	// widget
  290   493 	'autocomplete': 'token',
@@ -345,7 +548,6 @@ exports.attributes = {
  345   548 
  346   549 exports.attributeStrongMapping = {
  347   550 	'disabled': 'disabled',
  348    -1 	'hidden': 'hidden',
  349   551 	'placeholder': 'placeholder',
  350   552 	'readonly': 'readOnly',
  351   553 	'required': 'required',
@@ -360,202 +562,447 @@ exports.attributeWeakMapping = {
  360   562 	'selected': 'selected',
  361   563 };
  362   564 
  363    -1 // https://www.w3.org/TR/html-aria/#docconformance
  364    -1 exports.extraSelectors = {
  365    -1 	article: ['article'],
  366    -1 	button: [
  367    -1 		'button',
  368    -1 		'input[type="button"]',
  369    -1 		'input[type="image"]',
  370    -1 		'input[type="reset"]',
  371    -1 		'input[type="submit"]',
  372    -1 		'summary',
  373    -1 	],
  374    -1 	cell: ['td'],
  375    -1 	checkbox: ['input[type="checkbox"]'],
  376    -1 	combobox: [
   -1   565 // https://www.w3.org/TR/html-aam-1.0/#html-element-role-mappings
   -1   566 // https://www.w3.org/TR/wai-aria/roles
   -1   567 exports.roles = {
   -1   568 	alert: {
   -1   569 		childRoles: ['alertdialog'],
   -1   570 		defaults: {
   -1   571 			'live': 'assertive',
   -1   572 			'atomic': true,
   -1   573 		},
   -1   574 	},
   -1   575 	article: {
   -1   576 		selectors: ['article'],
   -1   577 	},
   -1   578 	button: {
   -1   579 		selectors: [
   -1   580 			'button',
   -1   581 			'input[type="button"]',
   -1   582 			'input[type="image"]',
   -1   583 			'input[type="reset"]',
   -1   584 			'input[type="submit"]',
   -1   585 			'summary',
   -1   586 		],
   -1   587 		nameFromContents: true,
   -1   588 	},
   -1   589 	cell: {
   -1   590 		selectors: ['td'],
   -1   591 		childRoles: ['gridcell', 'rowheader'],
   -1   592 	},
   -1   593 	checkbox: {
   -1   594 		selectors: ['input[type="checkbox"]'],
   -1   595 		childRoles: ['menuitemcheckbox', 'switch'],
   -1   596 		nameFromContents: true,
   -1   597 		defaults: {
   -1   598 			'checked': 'false',
   -1   599 		},
   -1   600 	},
   -1   601 	columnheader: {
   -1   602 		selectors: ['th[scope="col"]'],
   -1   603 		nameFromContents: true,
   -1   604 	},
   -1   605 	combobox: {
   -1   606 		selectors: [
  377   607 		'input:not([type])[list]',
  378    -1 		'input[type="email"][list]',
  379    -1 		'input[type="search"][list]',
  380    -1 		'input[type="tel"][list]',
  381    -1 		'input[type="text"][list]',
  382    -1 		'input[type="url"][list]',
  383    -1 		'select:not([size]):not([multiple])',
  384    -1 		'select[size="0"]:not([multiple])',
  385    -1 		'select[size="1"]:not([multiple])',
  386    -1 	],
  387    -1 	complementary: ['aside'],
  388    -1 	definition: ['dd'],
  389    -1 	dialog: ['dialog'],
  390    -1 	document: ['body'],
  391    -1 	figure: ['figure'],
  392    -1 	form: ['form[aria-label]', 'form[aria-labelledby]'],
  393    -1 	group: ['details', 'optgroup'],
  394    -1 	heading: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
  395    -1 	img: ['img:not([alt=""])', 'graphics-symbol'],
  396    -1 	link: ['a[href]', 'area[href]', 'link[href]'],
  397    -1 	list: ['dl', 'ol', 'ul'],
  398    -1 	listbox: [
  399    -1 		'select[multiple]',
  400    -1 		'select[size]:not([size="0"]):not([size="1"])',
  401    -1 	],
  402    -1 	listitem: ['dt', 'ul > li', 'ol > li'],
  403    -1 	main: ['main'],
  404    -1 	math: ['math'],
  405    -1 	menuitemcheckbox: ['menuitem[type="checkbox"]'],
  406    -1 	menuitem: ['menuitem[type="command"]'],
  407    -1 	menuitemradio: ['menuitem[type="radio"]'],
  408    -1 	menu: ['menu[type="context"]'],
  409    -1 	navigation: ['nav'],
  410    -1 	option: ['option'],
  411    -1 	progressbar: ['progress'],
  412    -1 	radio: ['input[type="radio"]'],
  413    -1 	region: ['section[aria-label]', 'section[aria-labelledby]', 'section[title]'],
  414    -1 	rowgroup: ['tbody', 'thead', 'tfoot'],
  415    -1 	row: ['tr'],
  416    -1 	searchbox: ['input[type="search"]:not([list])'],
  417    -1 	separator: ['hr'],
  418    -1 	slider: ['input[type="range"]'],
  419    -1 	spinbutton: ['input[type="number"]'],
  420    -1 	status: ['output'],
  421    -1 	table: ['table'],
  422    -1 	term: ['dfn', 'dt'],
  423    -1 	textbox: [
  424    -1 		'input:not([type]):not([list])',
  425    -1 		'input[type="email"]:not([list])',
  426    -1 		'input[type="tel"]:not([list])',
  427    -1 		'input[type="text"]:not([list])',
  428    -1 		'input[type="url"]:not([list])',
  429    -1 		'textarea',
  430    -1 	],
  431    -1 
  432    -1 	// if scope is missing, it is calculated automatically
  433    -1 	rowheader: ['th[scope="row"]'],
  434    -1 	columnheader: ['th[scope="col"]'],
   -1   608 			'input[type="email"][list]',
   -1   609 			'input[type="search"][list]',
   -1   610 			'input[type="tel"][list]',
   -1   611 			'input[type="text"][list]',
   -1   612 			'input[type="url"][list]',
   -1   613 			'select:not([size]):not([multiple])',
   -1   614 			'select[size="0"]:not([multiple])',
   -1   615 			'select[size="1"]:not([multiple])',
   -1   616 		],
   -1   617 		defaults: {
   -1   618 			'expanded': false,
   -1   619 			'haspopup': 'listbox',
   -1   620 		},
   -1   621 	},
   -1   622 	command: {
   -1   623 		childRoles: ['button', 'link', 'menuitem'],
   -1   624 	},
   -1   625 	complementary: {
   -1   626 		selectors: ['aside'],
   -1   627 	},
   -1   628 	composite: {
   -1   629 		childRoles: ['grid', 'select', 'spinbutton', 'tablist'],
   -1   630 	},
   -1   631 	definition: {
   -1   632 		selectors: ['dd'],
   -1   633 	},
   -1   634 	dialog: {
   -1   635 		selectors: ['dialog'],
   -1   636 		childRoles: ['alertdialog'],
   -1   637 	},
   -1   638 	'doc-backlink': {
   -1   639 		nameFromContents: true,
   -1   640 	},
   -1   641 	'doc-biblioref': {
   -1   642 		nameFromContents: true,
   -1   643 	},
   -1   644 	'doc-glossref': {
   -1   645 		nameFromContents: true,
   -1   646 	},
   -1   647 	'doc-noteref': {
   -1   648 		nameFromContents: true,
   -1   649 	},
   -1   650 	document: {
   -1   651 		selectors: ['body'],
   -1   652 		childRoles: ['article', 'graphics-document'],
   -1   653 	},
   -1   654 	figure: {
   -1   655 		selectors: ['figure'],
   -1   656 	},
   -1   657 	form: {
   -1   658 		selectors: ['form[aria-label]', 'form[aria-labelledby]', 'form[title]'],
   -1   659 	},
   -1   660 	grid: {
   -1   661 		childRoles: ['treegrid'],
   -1   662 	},
   -1   663 	gridcell: {
   -1   664 		childRoles: ['columnheader', 'rowheader'],
   -1   665 		nameFromContents: true,
   -1   666 	},
   -1   667 	group: {
   -1   668 		selectors: ['details', 'optgroup'],
   -1   669 		childRoles: ['row', 'select', 'toolbar', 'graphics-object'],
   -1   670 	},
   -1   671 	heading: {
   -1   672 		selectors: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
   -1   673 		nameFromContents: true,
   -1   674 		defaults: {
   -1   675 			'level': 2,
   -1   676 		},
   -1   677 	},
   -1   678 	img: {
   -1   679 		selectors: ['img:not([alt=""])', 'graphics-symbol'],
   -1   680 		childRoles: ['doc-cover'],
   -1   681 	},
   -1   682 	input: {
   -1   683 		childRoles: ['checkbox', 'option', 'radio', 'slider', 'spinbutton', 'textbox'],
   -1   684 	},
   -1   685 	landmark: {
   -1   686 		childRoles: [
   -1   687 			'banner',
   -1   688 			'complementary',
   -1   689 			'contentinfo',
   -1   690 			'doc-acknowledgments',
   -1   691 			'doc-afterword',
   -1   692 			'doc-appendix',
   -1   693 			'doc-bibliography',
   -1   694 			'doc-chapter',
   -1   695 			'doc-conclusion',
   -1   696 			'doc-credits',
   -1   697 			'doc-endnotes',
   -1   698 			'doc-epilogue',
   -1   699 			'doc-errata',
   -1   700 			'doc-foreword',
   -1   701 			'doc-glossary',
   -1   702 			'doc-introduction',
   -1   703 			'doc-part',
   -1   704 			'doc-preface',
   -1   705 			'doc-prologue',
   -1   706 			'form',
   -1   707 			'main',
   -1   708 			'navigation',
   -1   709 			'region',
   -1   710 			'search',
   -1   711 		],
   -1   712 	},
   -1   713 	link: {
   -1   714 		selectors: ['a[href]', 'area[href]', 'link[href]'],
   -1   715 		childRoles: ['doc-backlink', 'doc-biblioref', 'doc-glossref', 'doc-noteref'],
   -1   716 		nameFromContents: true,
   -1   717 	},
   -1   718 	list: {
   -1   719 		selectors: ['dl', 'ol', 'ul'],
   -1   720 		childRoles: ['directory', 'feed'],
   -1   721 	},
   -1   722 	listbox: {
   -1   723 		selectors: [
   -1   724 			'select[multiple]',
   -1   725 			'select[size]:not([size="0"]):not([size="1"])',
   -1   726 		],
   -1   727 		defaults: {
   -1   728 			'orientation': 'vertical',
   -1   729 		},
   -1   730 	},
   -1   731 	listitem: {
   -1   732 		selectors: ['dt', 'ul > li', 'ol > li'],
   -1   733 		childRoles: ['doc-biblioentry', 'doc-endnote', 'treeitem'],
   -1   734 	},
   -1   735 	log: {
   -1   736 		defaults: {
   -1   737 			'live': 'polite',
   -1   738 		},
   -1   739 	},
   -1   740 	main: {
   -1   741 		selectors: ['main'],
   -1   742 	},
   -1   743 	math: {
   -1   744 		selectors: ['math'],
   -1   745 	},
   -1   746 	menu: {
   -1   747 		selectors: ['menu[type="context"]'],
   -1   748 		childRoles: ['menubar'],
   -1   749 		defaults: {
   -1   750 			'orientation': 'vertical',
   -1   751 		},
   -1   752 	},
   -1   753 	menubar: {
   -1   754 		defaults: {
   -1   755 			'orientation': 'horizontal',
   -1   756 		},
   -1   757 	},
   -1   758 	menuitem: {
   -1   759 		selectors: ['menuitem[type="command"]'],
   -1   760 		childRoles: ['menuitemcheckbox'],
   -1   761 		nameFromContents: true,
   -1   762 	},
   -1   763 	menuitemcheckbox: {
   -1   764 		selectors: ['menuitem[type="checkbox"]'],
   -1   765 		childRoles: ['menuitemradio'],
   -1   766 		nameFromContents: true,
   -1   767 		defaults: {
   -1   768 			'checked': 'false',
   -1   769 		},
   -1   770 	},
   -1   771 	menuitemradio: {
   -1   772 		selectors: ['menuitem[type="radio"]'],
   -1   773 		nameFromContents: true,
   -1   774 		defaults: {
   -1   775 			'checked': 'false',
   -1   776 		},
   -1   777 	},
   -1   778 	navigation: {
   -1   779 		selectors: ['nav'],
   -1   780 		childRoles: ['doc-index', 'doc-pagelist', 'doc-toc'],
   -1   781 	},
   -1   782 	note: {
   -1   783 		childRoles: ['doc-notice', 'doc-tip'],
   -1   784 	},
   -1   785 	option: {
   -1   786 		selectors: ['option'],
   -1   787 		childRoles: ['treeitem'],
   -1   788 		nameFromContents: true,
   -1   789 		defaults: {
   -1   790 			'selected': 'false',
   -1   791 		},
   -1   792 	},
   -1   793 	progressbar: {
   -1   794 		selectors: ['progress'],
   -1   795 	},
   -1   796 	radio: {
   -1   797 		selectors: ['input[type="radio"]'],
   -1   798 		childRoles: ['menuitemradio'],
   -1   799 		nameFromContents: true,
   -1   800 		defaults: {
   -1   801 			'checked': 'false',
   -1   802 		},
   -1   803 	},
   -1   804 	range: {
   -1   805 		childRoles: ['progressbar', 'scrollbar', 'slider', 'spinbutton'],
   -1   806 	},
   -1   807 	region: {
   -1   808 		selectors: ['section[aria-label]', 'section[aria-labelledby]', 'section[title]'],
   -1   809 	},
   -1   810 	roletype: {
   -1   811 		childRoles: ['structure', 'widget', 'window'],
   -1   812 	},
   -1   813 	row: {
   -1   814 		selectors: ['tr'],
   -1   815 		nameFromContents: true,
   -1   816 	},
   -1   817 	rowheader: {
   -1   818 		selectors: ['th[scope="row"]'],
   -1   819 		nameFromContents: true,
   -1   820 	},
   -1   821 	rowgroup: {
   -1   822 		selectors: ['tbody', 'thead', 'tfoot'],
   -1   823 		nameFromContents: true,
   -1   824 	},
   -1   825 	scrollbar: {
   -1   826 		defaults: {
   -1   827 			'orientation': 'vertical',
   -1   828 			'valuemin': 0,
   -1   829 			'valuemax': 100,
   -1   830 			// FIXME: halfway between actual valuemin and valuemax
   -1   831 			'valuenow': 50,
   -1   832 		},
   -1   833 	},
   -1   834 	searchbox: {
   -1   835 		selectors: ['input[type="search"]:not([list])'],
   -1   836 	},
   -1   837 	section: {
   -1   838 		childRoles: [
   -1   839 			'alert',
   -1   840 			'cell',
   -1   841 			'definition',
   -1   842 			'doc-abstract',
   -1   843 			'doc-colophon',
   -1   844 			'doc-credit',
   -1   845 			'doc-dedication',
   -1   846 			'doc-epigraph',
   -1   847 			'doc-example',
   -1   848 			'doc-footnote',
   -1   849 			'doc-qna',
   -1   850 			'figure',
   -1   851 			'group',
   -1   852 			'img',
   -1   853 			'landmark',
   -1   854 			'list',
   -1   855 			'listitem',
   -1   856 			'log',
   -1   857 			'marquee',
   -1   858 			'math',
   -1   859 			'note',
   -1   860 			'status',
   -1   861 			'table',
   -1   862 			'tabpanel',
   -1   863 			'term',
   -1   864 			'tooltip',
   -1   865 		],
   -1   866 	},
   -1   867 	sectionhead: {
   -1   868 		childRoles: [
   -1   869 			'columnheader',
   -1   870 			'doc-subtitle',
   -1   871 			'heading',
   -1   872 			'rowheader',
   -1   873 			'tab',
   -1   874 		],
   -1   875 		nameFromContents: true,
   -1   876 	},
   -1   877 	select: {
   -1   878 		childRoles: ['combobox', 'listbox', 'menu', 'radiogroup', 'tree'],
   -1   879 	},
   -1   880 	separator: {
   -1   881 		selectors: ['hr'],
   -1   882 		childRoles: ['doc-pagebreak'],
   -1   883 		defaults: {
   -1   884 			'orientation': 'horizontal',
   -1   885 			'valuemin': 0,
   -1   886 			'valuemax': 100,
   -1   887 			'valuenow': 50,
   -1   888 		},
   -1   889 	},
   -1   890 	slider: {
   -1   891 		selectors: ['input[type="range"]'],
   -1   892 		defaults: {
   -1   893 			'orientation': 'horizontal',
   -1   894 			'valuemin': 0,
   -1   895 			'valuemax': 100,
   -1   896 			// FIXME: halfway between actual valuemin and valuemax
   -1   897 			'valuenow': 50,
   -1   898 		},
   -1   899 	},
   -1   900 	spinbutton: {
   -1   901 		selectors: ['input[type="number"]'],
   -1   902 		defaults: {
   -1   903 			// FIXME: no valuemin/valuemax
   -1   904 			'valuenow': 0,
   -1   905 		},
   -1   906 	},
   -1   907 	status: {
   -1   908 		selectors: ['output'],
   -1   909 		childRoles: ['timer'],
   -1   910 		defaults: {
   -1   911 			'live': 'polite',
   -1   912 			'atomic': true,
   -1   913 		},
   -1   914 	},
   -1   915 	switch: {
   -1   916 		nameFromContents: true,
   -1   917 		defaults: {
   -1   918 			'checked': false,
   -1   919 		},
   -1   920 	},
   -1   921 	structure: {
   -1   922 		childRoles: [
   -1   923 			'application',
   -1   924 			'document',
   -1   925 			'none',
   -1   926 			'presentation',
   -1   927 			'rowgroup',
   -1   928 			'section',
   -1   929 			'sectionhead',
   -1   930 			'separator',
   -1   931 		],
   -1   932 	},
   -1   933 	tab: {
   -1   934 		nameFromContents: true,
   -1   935 		defaults: {
   -1   936 			'selected': false,
   -1   937 		},
   -1   938 	},
   -1   939 	table: {
   -1   940 		selectors: ['table'],
   -1   941 		childRoles: ['grid'],
   -1   942 	},
   -1   943 	tablist: {
   -1   944 		defaults: {
   -1   945 			'orientation': 'horizontal',
   -1   946 		},
   -1   947 	},
   -1   948 	term: {
   -1   949 		selectors: ['dfn', 'dt'],
   -1   950 	},
   -1   951 	textbox: {
   -1   952 		selectors: [
   -1   953 			'input:not([type]):not([list])',
   -1   954 			'input[type="email"]:not([list])',
   -1   955 			'input[type="tel"]:not([list])',
   -1   956 			'input[type="text"]:not([list])',
   -1   957 			'input[type="url"]:not([list])',
   -1   958 			'textarea',
   -1   959 		],
   -1   960 		childRoles: ['searchbox'],
   -1   961 	},
   -1   962 	toolbar: {
   -1   963 		defaults: {
   -1   964 			'orientation': 'horizontal',
   -1   965 		},
   -1   966 	},
   -1   967 	tooltip: {
   -1   968 		nameFromContents: true,
   -1   969 	},
   -1   970 	tree: {
   -1   971 		childRoles: ['treegrid'],
   -1   972 		defaults: {
   -1   973 			'orientation': 'vertical',
   -1   974 		},
   -1   975 	},
   -1   976 	treeitem: {
   -1   977 		nameFromContents: true,
   -1   978 	},
   -1   979 	widget: {
   -1   980 		childRoles: [
   -1   981 			'command',
   -1   982 			'composite',
   -1   983 			'gridcell',
   -1   984 			'input',
   -1   985 			'range',
   -1   986 			'row',
   -1   987 			'separator',
   -1   988 			'tab',
   -1   989 		],
   -1   990 	},
   -1   991 	window: {
   -1   992 		childRoles: ['dialog'],
   -1   993 	},
  435   994 };
  436   995 
  437   996 exports.scoped = [
  438    -1 	'article *', 'aside *', 'main *', 'nav *', 'section *',
   -1   997 	'main *',
   -1   998 	// https://www.w3.org/TR/html/dom.html#sectioning-content-2
   -1   999 	'article *', 'aside *', 'nav *', 'section *',
   -1  1000 	// https://www.w3.org/TR/html/sections.html#sectioning-roots
   -1  1001 	'blockquote *', 'details *', 'dialog *', 'fieldset *', 'figure *', 'td *',
  439  1002 ].join(',');
  440  1003 
  441    -1 // https://www.w3.org/TR/wai-aria/roles
  442    -1 var subRoles = {
  443    -1 	cell: ['gridcell', 'rowheader'],
  444    -1 	command: ['button', 'link', 'menuitem'],
  445    -1 	composite: ['grid', 'select', 'spinbutton', 'tablist'],
  446    -1 	img: ['doc-cover'],
  447    -1 	input: ['checkbox', 'option', 'radio', 'slider', 'spinbutton', 'textbox'],
  448    -1 	landmark: [
  449    -1 		'banner',
  450    -1 		'complementary',
  451    -1 		'contentinfo',
  452    -1 		'doc-acknowledgments',
  453    -1 		'doc-afterword',
  454    -1 		'doc-appendix',
  455    -1 		'doc-bibliography',
  456    -1 		'doc-chapter',
  457    -1 		'doc-conclusion',
  458    -1 		'doc-credits',
  459    -1 		'doc-endnotes',
  460    -1 		'doc-epilogue',
  461    -1 		'doc-errata',
  462    -1 		'doc-foreword',
  463    -1 		'doc-glossary',
  464    -1 		'doc-introduction',
  465    -1 		'doc-part',
  466    -1 		'doc-preface',
  467    -1 		'doc-prologue',
  468    -1 		'form',
  469    -1 		'main',
  470    -1 		'navigation',
  471    -1 		'region',
  472    -1 		'search',
  473    -1 	],
  474    -1 	range: ['progressbar', 'scrollbar', 'slider', 'spinbutton'],
  475    -1 	roletype: ['structure', 'widget', 'window'],
  476    -1 	section: [
  477    -1 		'alert',
  478    -1 		'cell',
  479    -1 		'definition',
  480    -1 		'doc-abstract',
  481    -1 		'doc-colophon',
  482    -1 		'doc-credit',
  483    -1 		'doc-dedication',
  484    -1 		'doc-epigraph',
  485    -1 		'doc-example',
  486    -1 		'doc-footnote',
  487    -1 		'doc-qna',
  488    -1 		'figure',
  489    -1 		'group',
  490    -1 		'img',
  491    -1 		'landmark',
  492    -1 		'list',
  493    -1 		'listitem',
  494    -1 		'log',
  495    -1 		'marquee',
  496    -1 		'math',
  497    -1 		'note',
  498    -1 		'status',
  499    -1 		'table',
  500    -1 		'tabpanel',
  501    -1 		'term',
  502    -1 		'tooltip',
  503    -1 	],
  504    -1 	sectionhead: [
  505    -1 		'columnheader',
  506    -1 		'doc-subtitle',
  507    -1 		'heading',
  508    -1 		'rowheader',
  509    -1 		'tab',
  510    -1 	],
  511    -1 	select: ['combobox', 'listbox', 'menu', 'radiogroup', 'tree'],
  512    -1 	separator: ['doc-pagebreak'],
  513    -1 	structure: [
  514    -1 		'application',
  515    -1 		'document',
  516    -1 		'none',
  517    -1 		'presentation',
  518    -1 		'rowgroup',
  519    -1 		'section',
  520    -1 		'sectionhead',
  521    -1 		'separator',
  522    -1 	],
  523    -1 	table: ['grid'],
  524    -1 	textbox: ['searchbox'],
  525    -1 	widget: [
  526    -1 		'command',
  527    -1 		'composite',
  528    -1 		'gridcell',
  529    -1 		'input',
  530    -1 		'range',
  531    -1 		'row',
  532    -1 		'separator',
  533    -1 		'tab',
  534    -1 	],
  535    -1 	window: ['dialog'],
  536    -1 	alert: ['alertdialog'],
  537    -1 	checkbox: ['menuitemcheckbox', 'switch'],
  538    -1 	dialog: ['alertdialog'],
  539    -1 	gridcell: ['columnheader', 'rowheader'],
  540    -1 	menuitem: ['menuitemcheckbox'],
  541    -1 	menuitemcheckbox: ['menuitemradio'],
  542    -1 	option: ['treeitem'],
  543    -1 	radio: ['menuitemradio'],
  544    -1 	status: ['timer'],
  545    -1 	grid: ['treegrid'],
  546    -1 	menu: ['menubar'],
  547    -1 	tree: ['treegrid'],
  548    -1 	document: ['article', 'graphics-document'],
  549    -1 	group: ['row', 'select', 'toolbar', 'graphics-object'],
  550    -1 	link: ['doc-backlink', 'doc-biblioref', 'doc-glossref', 'doc-noteref'],
  551    -1 	list: ['directory', 'feed'],
  552    -1 	listitem: ['doc-biblioentry', 'doc-endnote', 'treeitem'],
  553    -1 	navigation: ['doc-index', 'doc-pagelist', 'doc-toc'],
  554    -1 	note: ['doc-notice', 'doc-tip'],
  555    -1 };
  556    -1 
  557  1004 var getSubRoles = function(role) {
  558    -1 	var children = subRoles[role] || [];
   -1  1005 	var children = (exports.roles[role] || {}).childRoles || [];
  559  1006 	var descendents = children.map(getSubRoles);
  560  1007 
  561  1008 	var result = [role];
@@ -571,38 +1018,13 @@ var getSubRoles = function(role) {
  571  1018 	return result;
  572  1019 };
  573  1020 
  574    -1 exports.subRoles = {};
  575    -1 for (var role in subRoles) {
  576    -1 	exports.subRoles[role] = getSubRoles(role);
   -1  1021 for (var role in exports.roles) {
   -1  1022 	exports.roles[role].subRoles = getSubRoles(role);
  577  1023 }
  578    -1 exports.subRoles['none'] = ['none', 'presentation'];
  579    -1 exports.subRoles['presentation'] = ['presentation', 'none'];
  580    -1 
  581    -1 exports.nameFromContents = [
  582    -1 	'button',
  583    -1 	'checkbox',
  584    -1 	'columnheader',
  585    -1 	'doc-backlink',
  586    -1 	'doc-biblioref',
  587    -1 	'doc-glossref',
  588    -1 	'doc-noteref',
  589    -1 	'gridcell',
  590    -1 	'heading',
  591    -1 	'link',
  592    -1 	'menuitem',
  593    -1 	'menuitemcheckbox',
  594    -1 	'menuitemradio',
  595    -1 	'option',
  596    -1 	'radio',
  597    -1 	'row',
  598    -1 	'rowgroup',
  599    -1 	'rowheader',
  600    -1 	'sectionhead',
  601    -1 	'tab',
  602    -1 	'tooltip',
  603    -1 	'treeitem',
  604    -1 	'switch',
  605    -1 ];
   -1  1024 exports.roles['none'] = exports.roles['none'] || {};
   -1  1025 exports.roles['none'].subRoles = ['none', 'presentation'];
   -1  1026 exports.roles['presentation'] = exports.roles['presentation'] || {};
   -1  1027 exports.roles['presentation'].subRoles = ['presentation', 'none'];
  606  1028 
  607  1029 exports.nameFromDescendant = {
  608  1030 	'figure': 'figcaption',
@@ -624,154 +1046,52 @@ exports.labelable = [
  624  1046 	'output',
  625  1047 	'progress',
  626  1048 	'select',
  627    -1 	'textarea',
  628    -1 ];
  629    -1 
  630    -1 },{}],6:[function(require,module,exports){
  631    -1 var cov_2q245nv9x6=function(){var path="node_modules/aria-api/lib/name.js";var hash="93a6713c2560ab0da7818aecac970728fca1f799";var Function=function(){}.constructor;var global=new Function("return this")();var gcv="__coverage__";var coverageData={path:"node_modules/aria-api/lib/name.js",statementMap:{"0":{start:{line:1,column:16},end:{line:1,column:41}},"1":{start:{line:2,column:12},end:{line:2,column:33}},"2":{start:{line:3,column:11},end:{line:3,column:31}},"3":{start:{line:5,column:23},end:{line:21,column:1}},"4":{start:{line:6,column:14},end:{line:6,column:53}},"5":{start:{line:7,column:11},end:{line:7,column:45}},"6":{start:{line:8,column:14},end:{line:8,column:54}},"7":{start:{line:9,column:1},end:{line:11,column:2}},"8":{start:{line:10,column:2},end:{line:10,column:12}},"9":{start:{line:12,column:1},end:{line:20,column:2}},"10":{start:{line:13,column:2},end:{line:13,column:12}},"11":{start:{line:15,column:2},end:{line:19,column:3}},"12":{start:{line:16,column:3},end:{line:16,column:27}},"13":{start:{line:18,column:3},end:{line:18,column:39}},"14":{start:{line:23,column:17},end:{line:61,column:1}},"15":{start:{line:24,column:16},end:{line:24,column:18}},"16":{start:{line:26,column:1},end:{line:31,column:2}},"17":{start:{line:26,column:14},end:{line:26,column:15}},"18":{start:{line:27,column:13},end:{line:27,column:31}},"19":{start:{line:28,column:2},end:{line:30,column:3}},"20":{start:{line:29,column:3},end:{line:29,column:23}},"21":{start:{line:33,column:12},end:{line:33,column:50}},"22":{start:{line:34,column:1},end:{line:40,column:2}},"23":{start:{line:34,column:14},end:{line:34,column:15}},"24":{start:{line:35,column:14},end:{line:35,column:46}},"25":{start:{line:36,column:2},end:{line:39,column:3}},"26":{start:{line:37,column:3},end:{line:37,column:24}},"27":{start:{line:38,column:3},end:{line:38,column:24}},"28":{start:{line:42,column:11},end:{line:42,column:13}},"29":{start:{line:43,column:1},end:{line:58,column:2}},"30":{start:{line:43,column:14},end:{line:43,column:15}},"31":{start:{line:44,column:13},end:{line:44,column:24}},"32":{start:{line:45,column:2},end:{line:57,column:3}},"33":{start:{line:46,column:3},end:{line:46,column:27}},"34":{start:{line:47,column:9},end:{line:57,column:3}},"35":{start:{line:48,column:3},end:{line:56,column:4}},"36":{start:{line:49,column:4},end:{line:49,column:16}},"37":{start:{line:50,column:10},end:{line:56,column:4}},"38":{start:{line:53,column:4},end:{line:53,column:50}},"39":{start:{line:55,column:4},end:{line:55,column:62}},"40":{start:{line:60,column:1},end:{line:60,column:12}},"41":{start:{line:63,column:27},end:{line:66,column:1}},"42":{start:{line:64,column:12},end:{line:64,column:29}},"43":{start:{line:65,column:1},end:{line:65,column:64}},"44":{start:{line:68,column:18},end:{line:71,column:1}},"45":{start:{line:69,column:16},end:{line:69,column:45}},"46":{start:{line:70,column:1},end:{line:70,column:29}},"47":{start:{line:74,column:20},end:{line:89,column:1}},"48":{start:{line:75,column:14},end:{line:75,column:16}},"49":{start:{line:76,column:17},end:{line:76,column:46}},"50":{start:{line:77,column:1},end:{line:87,column:4}},"51":{start:{line:78,column:2},end:{line:86,column:3}},"52":{start:{line:79,column:3},end:{line:85,column:4}},"53":{start:{line:80,column:4},end:{line:82,column:5}},"54":{start:{line:81,column:5},end:{line:81,column:23}},"55":{start:{line:83,column:10},end:{line:85,column:4}},"56":{start:{line:84,column:4},end:{line:84,column:22}},"57":{start:{line:88,column:1},end:{line:88,column:15}},"58":{start:{line:91,column:30},end:{line:95,column:1}},"59":{start:{line:92,column:13},end:{line:92,column:46}},"60":{start:{line:93,column:17},end:{line:93,column:34}},"61":{start:{line:94,column:1},end:{line:94,column:49}},"62":{start:{line:97,column:14},end:{line:197,column:1}},"63":{start:{line:98,column:11},end:{line:98,column:13}},"64":{start:{line:99,column:13},end:{line:99,column:24}},"65":{start:{line:102,column:1},end:{line:104,column:2}},"66":{start:{line:103,column:2},end:{line:103,column:12}},"67":{start:{line:107,column:1},end:{line:114,column:2}},"68":{start:{line:108,column:12},end:{line:108,column:59}},"69":{start:{line:109,column:16},end:{line:112,column:4}},"70":{start:{line:110,column:15},end:{line:110,column:42}},"71":{start:{line:111,column:3},end:{line:111,column:58}},"72":{start:{line:113,column:2},end:{line:113,column:26}},"73":{start:{line:117,column:1},end:{line:119,column:2}},"74":{start:{line:118,column:2},end:{line:118,column:38}},"75":{start:{line:122,column:1},end:{line:127,column:2}},"76":{start:{line:123,column:16},end:{line:125,column:4}},"77":{start:{line:124,column:3},end:{line:124,column:45}},"78":{start:{line:126,column:2},end:{line:126,column:26}},"79":{start:{line:128,column:1},end:{line:130,column:2}},"80":{start:{line:129,column:2},end:{line:129,column:29}},"81":{start:{line:131,column:1},end:{line:133,column:2}},"82":{start:{line:132,column:2},end:{line:132,column:21}},"83":{start:{line:134,column:1},end:{line:136,column:2}},"84":{start:{line:135,column:2},end:{line:135,column:17}},"85":{start:{line:137,column:1},end:{line:146,column:2}},"86":{start:{line:138,column:2},end:{line:145,column:3}},"87":{start:{line:139,column:3},end:{line:144,column:4}},"88":{start:{line:140,column:21},end:{line:140,column:77}},"89":{start:{line:141,column:4},end:{line:143,column:5}},"90":{start:{line:142,column:5},end:{line:142,column:56}},"91":{start:{line:149,column:1},end:{line:164,column:2}},"92":{start:{line:150,column:2},end:{line:163,column:3}},"93":{start:{line:151,column:3},end:{line:162,column:4}},"94":{start:{line:152,column:4},end:{line:152,column:37}},"95":{start:{line:153,column:10},end:{line:162,column:4}},"96":{start:{line:154,column:19},end:{line:154,column:92}},"97":{start:{line:155,column:4},end:{line:159,column:5}},"98":{start:{line:156,column:5},end:{line:156,column:59}},"99":{start:{line:158,column:5},end:{line:158,column:26}},"100":{start:{line:160,column:10},end:{line:162,column:4}},"101":{start:{line:161,column:4},end:{line:161,column:103}},"102":{start:{line:168,column:1},end:{line:170,column:2}},"103":{start:{line:169,column:2},end:{line:169,column:42}},"104":{start:{line:176,column:1},end:{line:178,column:2}},"105":{start:{line:177,column:2},end:{line:177,column:43}},"106":{start:{line:181,column:1},end:{line:187,column:2}},"107":{start:{line:182,column:2},end:{line:186,column:3}},"108":{start:{line:183,column:3},end:{line:185,column:4}},"109":{start:{line:184,column:4},end:{line:184,column:43}},"110":{start:{line:190,column:1},end:{line:192,column:2}},"111":{start:{line:191,column:2},end:{line:191,column:23}},"112":{start:{line:194,column:14},end:{line:194,column:45}},"113":{start:{line:195,column:13},end:{line:195,column:43}},"114":{start:{line:196,column:1},end:{line:196,column:29}},"115":{start:{line:199,column:21},end:{line:201,column:1}},"116":{start:{line:200,column:1},end:{line:200,column:48}},"117":{start:{line:203,column:21},end:{line:227,column:1}},"118":{start:{line:204,column:11},end:{line:204,column:13}},"119":{start:{line:205,column:13},end:{line:205,column:15}},"120":{start:{line:207,column:1},end:{line:218,column:2}},"121":{start:{line:208,column:12},end:{line:208,column:60}},"122":{start:{line:209,column:16},end:{line:212,column:4}},"123":{start:{line:210,column:15},end:{line:210,column:42}},"124":{start:{line:211,column:3},end:{line:211,column:58}},"125":{start:{line:213,column:2},end:{line:213,column:26}},"126":{start:{line:214,column:8},end:{line:218,column:2}},"127":{start:{line:215,column:2},end:{line:215,column:17}},"128":{start:{line:216,column:8},end:{line:218,column:2}},"129":{start:{line:217,column:2},end:{line:217,column:23}},"130":{start:{line:220,column:1},end:{line:220,column:47}},"131":{start:{line:222,column:1},end:{line:224,column:2}},"132":{start:{line:223,column:2},end:{line:223,column:11}},"133":{start:{line:226,column:1},end:{line:226,column:12}},"134":{start:{line:229,column:0},end:{line:232,column:2}}},fnMap:{"0":{name:"(anonymous_0)",decl:{start:{line:5,column:23},end:{line:5,column:24}},loc:{start:{line:5,column:48},end:{line:21,column:1}},line:5},"1":{name:"(anonymous_1)",decl:{start:{line:23,column:17},end:{line:23,column:18}},loc:{start:{line:23,column:51},end:{line:61,column:1}},line:23},"2":{name:"(anonymous_2)",decl:{start:{line:63,column:27},end:{line:63,column:28}},loc:{start:{line:63,column:40},end:{line:66,column:1}},line:63},"3":{name:"(anonymous_3)",decl:{start:{line:68,column:18},end:{line:68,column:19}},loc:{start:{line:68,column:31},end:{line:71,column:1}},line:68},"4":{name:"(anonymous_4)",decl:{start:{line:74,column:20},end:{line:74,column:21}},loc:{start:{line:74,column:38},end:{line:89,column:1}},line:74},"5":{name:"(anonymous_5)",decl:{start:{line:77,column:29},end:{line:77,column:30}},loc:{start:{line:77,column:44},end:{line:87,column:2}},line:77},"6":{name:"(anonymous_6)",decl:{start:{line:91,column:30},end:{line:91,column:31}},loc:{start:{line:91,column:43},end:{line:95,column:1}},line:91},"7":{name:"(anonymous_7)",decl:{start:{line:97,column:14},end:{line:97,column:15}},loc:{start:{line:97,column:57},end:{line:197,column:1}},line:97},"8":{name:"(anonymous_8)",decl:{start:{line:109,column:24},end:{line:109,column:25}},loc:{start:{line:109,column:37},end:{line:112,column:3}},line:109},"9":{name:"(anonymous_9)",decl:{start:{line:123,column:38},end:{line:123,column:39}},loc:{start:{line:123,column:54},end:{line:125,column:3}},line:123},"10":{name:"(anonymous_10)",decl:{start:{line:199,column:21},end:{line:199,column:22}},loc:{start:{line:199,column:34},end:{line:201,column:1}},line:199},"11":{name:"(anonymous_11)",decl:{start:{line:203,column:21},end:{line:203,column:22}},loc:{start:{line:203,column:34},end:{line:227,column:1}},line:203},"12":{name:"(anonymous_12)",decl:{start:{line:209,column:24},end:{line:209,column:25}},loc:{start:{line:209,column:37},end:{line:212,column:3}},line:209}},branchMap:{"0":{loc:{start:{line:9,column:1},end:{line:11,column:2}},type:"if",locations:[{start:{line:9,column:1},end:{line:11,column:2}},{start:{line:9,column:1},end:{line:11,column:2}}],line:9},"1":{loc:{start:{line:12,column:1},end:{line:20,column:2}},type:"if",locations:[{start:{line:12,column:1},end:{line:20,column:2}},{start:{line:12,column:1},end:{line:20,column:2}}],line:12},"2":{loc:{start:{line:15,column:2},end:{line:19,column:3}},type:"if",locations:[{start:{line:15,column:2},end:{line:19,column:3}},{start:{line:15,column:2},end:{line:19,column:3}}],line:15},"3":{loc:{start:{line:28,column:2},end:{line:30,column:3}},type:"if",locations:[{start:{line:28,column:2},end:{line:30,column:3}},{start:{line:28,column:2},end:{line:30,column:3}}],line:28},"4":{loc:{start:{line:28,column:6},end:{line:28,column:75}},type:"binary-expr",locations:[{start:{line:28,column:6},end:{line:28,column:14}},{start:{line:28,column:18},end:{line:28,column:75}}],line:28},"5":{loc:{start:{line:33,column:12},end:{line:33,column:50}},type:"binary-expr",locations:[{start:{line:33,column:12},end:{line:33,column:44}},{start:{line:33,column:48},end:{line:33,column:50}}],line:33},"6":{loc:{start:{line:36,column:2},end:{line:39,column:3}},type:"if",locations:[{start:{line:36,column:2},end:{line:39,column:3}},{start:{line:36,column:2},end:{line:39,column:3}}],line:36},"7":{loc:{start:{line:36,column:6},end:{line:36,column:63}},type:"binary-expr",locations:[{start:{line:36,column:6},end:{line:36,column:11}},{start:{line:36,column:15},end:{line:36,column:29}},{start:{line:36,column:33},end:{line:36,column:63}}],line:36},"8":{loc:{start:{line:45,column:2},end:{line:57,column:3}},type:"if",locations:[{start:{line:45,column:2},end:{line:57,column:3}},{start:{line:45,column:2},end:{line:57,column:3}}],line:45},"9":{loc:{start:{line:47,column:9},end:{line:57,column:3}},type:"if",locations:[{start:{line:47,column:9},end:{line:57,column:3}},{start:{line:47,column:9},end:{line:57,column:3}}],line:47},"10":{loc:{start:{line:48,column:3},end:{line:56,column:4}},type:"if",locations:[{start:{line:48,column:3},end:{line:56,column:4}},{start:{line:48,column:3},end:{line:56,column:4}}],line:48},"11":{loc:{start:{line:50,column:10},end:{line:56,column:4}},type:"if",locations:[{start:{line:50,column:10},end:{line:56,column:4}},{start:{line:50,column:10},end:{line:56,column:4}}],line:50},"12":{loc:{start:{line:50,column:14},end:{line:52,column:41}},type:"binary-expr",locations:[{start:{line:50,column:14},end:{line:50,column:77}},{start:{line:51,column:5},end:{line:51,column:43}},{start:{line:52,column:5},end:{line:52,column:41}}],line:50},"13":{loc:{start:{line:65,column:8},end:{line:65,column:63}},type:"binary-expr",locations:[{start:{line:65,column:8},end:{line:65,column:12}},{start:{line:65,column:16},end:{line:65,column:63}}],line:65},"14":{loc:{start:{line:78,column:2},end:{line:86,column:3}},type:"if",locations:[{start:{line:78,column:2},end:{line:86,column:3}},{start:{line:78,column:2},end:{line:86,column:3}}],line:78},"15":{loc:{start:{line:78,column:6},end:{line:78,column:60}},type:"binary-expr",locations:[{start:{line:78,column:6},end:{line:78,column:18}},{start:{line:78,column:22},end:{line:78,column:60}}],line:78},"16":{loc:{start:{line:79,column:3},end:{line:85,column:4}},type:"if",locations:[{start:{line:79,column:3},end:{line:85,column:4}},{start:{line:79,column:3},end:{line:85,column:4}}],line:79},"17":{loc:{start:{line:80,column:4},end:{line:82,column:5}},type:"if",locations:[{start:{line:80,column:4},end:{line:82,column:5}},{start:{line:80,column:4},end:{line:82,column:5}}],line:80},"18":{loc:{start:{line:80,column:8},end:{line:80,column:61}},type:"binary-expr",locations:[{start:{line:80,column:8},end:{line:80,column:18}},{start:{line:80,column:22},end:{line:80,column:61}}],line:80},"19":{loc:{start:{line:83,column:10},end:{line:85,column:4}},type:"if",locations:[{start:{line:83,column:10},end:{line:85,column:4}},{start:{line:83,column:10},end:{line:85,column:4}}],line:83},"20":{loc:{start:{line:94,column:8},end:{line:94,column:48}},type:"binary-expr",locations:[{start:{line:94,column:8},end:{line:94,column:13}},{start:{line:94,column:17},end:{line:94,column:48}}],line:94},"21":{loc:{start:{line:99,column:13},end:{line:99,column:24}},type:"binary-expr",locations:[{start:{line:99,column:13},end:{line:99,column:18}},{start:{line:99,column:22},end:{line:99,column:24}}],line:99},"22":{loc:{start:{line:102,column:1},end:{line:104,column:2}},type:"if",locations:[{start:{line:102,column:1},end:{line:104,column:2}},{start:{line:102,column:1},end:{line:104,column:2}}],line:102},"23":{loc:{start:{line:107,column:1},end:{line:114,column:2}},type:"if",locations:[{start:{line:107,column:1},end:{line:114,column:2}},{start:{line:107,column:1},end:{line:114,column:2}}],line:107},"24":{loc:{start:{line:107,column:5},end:{line:107,column:50}},type:"binary-expr",locations:[{start:{line:107,column:5},end:{line:107,column:15}},{start:{line:107,column:19},end:{line:107,column:50}}],line:107},"25":{loc:{start:{line:111,column:10},end:{line:111,column:57}},type:"cond-expr",locations:[{start:{line:111,column:18},end:{line:111,column:52}},{start:{line:111,column:55},end:{line:111,column:57}}],line:111},"26":{loc:{start:{line:117,column:1},end:{line:119,column:2}},type:"if",locations:[{start:{line:117,column:1},end:{line:119,column:2}},{start:{line:117,column:1},end:{line:119,column:2}}],line:117},"27":{loc:{start:{line:117,column:5},end:{line:117,column:46}},type:"binary-expr",locations:[{start:{line:117,column:5},end:{line:117,column:16}},{start:{line:117,column:20},end:{line:117,column:46}}],line:117},"28":{loc:{start:{line:122,column:1},end:{line:127,column:2}},type:"if",locations:[{start:{line:122,column:1},end:{line:127,column:2}},{start:{line:122,column:1},end:{line:127,column:2}}],line:122},"29":{loc:{start:{line:122,column:5},end:{line:122,column:49}},type:"binary-expr",locations:[{start:{line:122,column:5},end:{line:122,column:16}},{start:{line:122,column:20},end:{line:122,column:30}},{start:{line:122,column:34},end:{line:122,column:49}}],line:122},"30":{loc:{start:{line:128,column:1},end:{line:130,column:2}},type:"if",locations:[{start:{line:128,column:1},end:{line:130,column:2}},{start:{line:128,column:1},end:{line:130,column:2}}],line:128},"31":{loc:{start:{line:129,column:8},end:{line:129,column:28}},type:"binary-expr",locations:[{start:{line:129,column:8},end:{line:129,column:22}},{start:{line:129,column:26},end:{line:129,column:28}}],line:129},"32":{loc:{start:{line:131,column:1},end:{line:133,column:2}},type:"if",locations:[{start:{line:131,column:1},end:{line:133,column:2}},{start:{line:131,column:1},end:{line:133,column:2}}],line:131},"33":{loc:{start:{line:132,column:8},end:{line:132,column:20}},type:"binary-expr",locations:[{start:{line:132,column:8},end:{line:132,column:14}},{start:{line:132,column:18},end:{line:132,column:20}}],line:132},"34":{loc:{start:{line:134,column:1},end:{line:136,column:2}},type:"if",locations:[{start:{line:134,column:1},end:{line:136,column:2}},{start:{line:134,column:1},end:{line:136,column:2}}],line:134},"35":{loc:{start:{line:134,column:5},end:{line:134,column:58}},type:"binary-expr",locations:[{start:{line:134,column:5},end:{line:134,column:16}},{start:{line:134,column:20},end:{line:134,column:46}},{start:{line:134,column:50},end:{line:134,column:58}}],line:134},"36":{loc:{start:{line:137,column:1},end:{line:146,column:2}},type:"if",locations:[{start:{line:137,column:1},end:{line:146,column:2}},{start:{line:137,column:1},end:{line:146,column:2}}],line:137},"37":{loc:{start:{line:139,column:3},end:{line:144,column:4}},type:"if",locations:[{start:{line:139,column:3},end:{line:144,column:4}},{start:{line:139,column:3},end:{line:144,column:4}}],line:139},"38":{loc:{start:{line:141,column:4},end:{line:143,column:5}},type:"if",locations:[{start:{line:141,column:4},end:{line:143,column:5}},{start:{line:141,column:4},end:{line:143,column:5}}],line:141},"39":{loc:{start:{line:149,column:1},end:{line:164,column:2}},type:"if",locations:[{start:{line:149,column:1},end:{line:164,column:2}},{start:{line:149,column:1},end:{line:164,column:2}}],line:149},"40":{loc:{start:{line:149,column:5},end:{line:149,column:93}},type:"binary-expr",locations:[{start:{line:149,column:5},end:{line:149,column:16}},{start:{line:149,column:21},end:{line:149,column:30}},{start:{line:149,column:34},end:{line:149,column:61}},{start:{line:149,column:65},end:{line:149,column:92}}],line:149},"41":{loc:{start:{line:150,column:2},end:{line:163,column:3}},type:"if",locations:[{start:{line:150,column:2},end:{line:163,column:3}},{start:{line:150,column:2},end:{line:163,column:3}}],line:150},"42":{loc:{start:{line:151,column:3},end:{line:162,column:4}},type:"if",locations:[{start:{line:151,column:3},end:{line:162,column:4}},{start:{line:151,column:3},end:{line:162,column:4}}],line:151},"43":{loc:{start:{line:152,column:10},end:{line:152,column:36}},type:"binary-expr",locations:[{start:{line:152,column:10},end:{line:152,column:18}},{start:{line:152,column:22},end:{line:152,column:36}}],line:152},"44":{loc:{start:{line:153,column:10},end:{line:162,column:4}},type:"if",locations:[{start:{line:153,column:10},end:{line:162,column:4}},{start:{line:153,column:10},end:{line:162,column:4}}],line:153},"45":{loc:{start:{line:154,column:19},end:{line:154,column:92}},type:"binary-expr",locations:[{start:{line:154,column:19},end:{line:154,column:55}},{start:{line:154,column:59},end:{line:154,column:92}}],line:154},"46":{loc:{start:{line:155,column:4},end:{line:159,column:5}},type:"if",locations:[{start:{line:155,column:4},end:{line:159,column:5}},{start:{line:155,column:4},end:{line:159,column:5}}],line:155},"47":{loc:{start:{line:158,column:11},end:{line:158,column:25}},type:"binary-expr",locations:[{start:{line:158,column:11},end:{line:158,column:19}},{start:{line:158,column:23},end:{line:158,column:25}}],line:158},"48":{loc:{start:{line:160,column:10},end:{line:162,column:4}},type:"if",locations:[{start:{line:160,column:10},end:{line:162,column:4}},{start:{line:160,column:10},end:{line:162,column:4}}],line:160},"49":{loc:{start:{line:161,column:16},end:{line:161,column:101}},type:"binary-expr",locations:[{start:{line:161,column:16},end:{line:161,column:51}},{start:{line:161,column:55},end:{line:161,column:89}},{start:{line:161,column:93},end:{line:161,column:101}}],line:161},"50":{loc:{start:{line:168,column:1},end:{line:170,column:2}},type:"if",locations:[{start:{line:168,column:1},end:{line:170,column:2}},{start:{line:168,column:1},end:{line:170,column:2}}],line:168},"51":{loc:{start:{line:168,column:5},end:{line:168,column:112}},type:"binary-expr",locations:[{start:{line:168,column:5},end:{line:168,column:16}},{start:{line:168,column:21},end:{line:168,column:30}},{start:{line:168,column:34},end:{line:168,column:58}},{start:{line:168,column:62},end:{line:168,column:81}},{start:{line:168,column:86},end:{line:168,column:112}}],line:168},"52":{loc:{start:{line:176,column:1},end:{line:178,column:2}},type:"if",locations:[{start:{line:176,column:1},end:{line:178,column:2}},{start:{line:176,column:1},end:{line:178,column:2}}],line:176},"53":{loc:{start:{line:176,column:5},end:{line:176,column:53}},type:"binary-expr",locations:[{start:{line:176,column:5},end:{line:176,column:16}},{start:{line:176,column:20},end:{line:176,column:53}}],line:176},"54":{loc:{start:{line:181,column:1},end:{line:187,column:2}},type:"if",locations:[{start:{line:181,column:1},end:{line:187,column:2}},{start:{line:181,column:1},end:{line:187,column:2}}],line:181},"55":{loc:{start:{line:183,column:3},end:{line:185,column:4}},type:"if",locations:[{start:{line:183,column:3},end:{line:185,column:4}},{start:{line:183,column:3},end:{line:185,column:4}}],line:183},"56":{loc:{start:{line:190,column:1},end:{line:192,column:2}},type:"if",locations:[{start:{line:190,column:1},end:{line:192,column:2}},{start:{line:190,column:1},end:{line:192,column:2}}],line:190},"57":{loc:{start:{line:191,column:8},end:{line:191,column:22}},type:"binary-expr",locations:[{start:{line:191,column:8},end:{line:191,column:16}},{start:{line:191,column:20},end:{line:191,column:22}}],line:191},"58":{loc:{start:{line:207,column:1},end:{line:218,column:2}},type:"if",locations:[{start:{line:207,column:1},end:{line:218,column:2}},{start:{line:207,column:1},end:{line:218,column:2}}],line:207},"59":{loc:{start:{line:211,column:10},end:{line:211,column:57}},type:"cond-expr",locations:[{start:{line:211,column:18},end:{line:211,column:52}},{start:{line:211,column:55},end:{line:211,column:57}}],line:211},"60":{loc:{start:{line:214,column:8},end:{line:218,column:2}},type:"if",locations:[{start:{line:214,column:8},end:{line:218,column:2}},{start:{line:214,column:8},end:{line:218,column:2}}],line:214},"61":{loc:{start:{line:216,column:8},end:{line:218,column:2}},type:"if",locations:[{start:{line:216,column:8},end:{line:218,column:2}},{start:{line:216,column:8},end:{line:218,column:2}}],line:216},"62":{loc:{start:{line:220,column:8},end:{line:220,column:17}},type:"binary-expr",locations:[{start:{line:220,column:8},end:{line:220,column:11}},{start:{line:220,column:15},end:{line:220,column:17}}],line:220},"63":{loc:{start:{line:222,column:1},end:{line:224,column:2}},type:"if",locations:[{start:{line:222,column:1},end:{line:224,column:2}},{start:{line:222,column:1},end:{line:224,column:2}}],line:222}},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0},f:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0},b:{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0,0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0,0],"50":[0,0],"51":[0,0,0,0,0],"52":[0,0],"53":[0,0],"54":[0,0],"55":[0,0],"56":[0,0],"57":[0,0],"58":[0,0],"59":[0,0],"60":[0,0],"61":[0,0],"62":[0,0],"63":[0,0]},_coverageSchema:"43e27e138ebf9cfc5966b082cf9a028302ed4184"};var coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();var constants=(cov_2q245nv9x6.s[0]++,require('./constants.js'));var query=(cov_2q245nv9x6.s[1]++,require('./query.js'));var util=(cov_2q245nv9x6.s[2]++,require('./util.js'));cov_2q245nv9x6.s[3]++;var getPseudoContent=function(node,selector){cov_2q245nv9x6.f[0]++;var styles=(cov_2q245nv9x6.s[4]++,window.getComputedStyle(node,selector));var ret=(cov_2q245nv9x6.s[5]++,styles.getPropertyValue('content'));var inline=(cov_2q245nv9x6.s[6]++,styles.display.substr(0,6)==='inline');cov_2q245nv9x6.s[7]++;if(!ret){cov_2q245nv9x6.b[0][0]++;cov_2q245nv9x6.s[8]++;return'';}else{cov_2q245nv9x6.b[0][1]++;}cov_2q245nv9x6.s[9]++;if(ret.substr(0,1)!=='"'){cov_2q245nv9x6.b[1][0]++;cov_2q245nv9x6.s[10]++;return'';}else{cov_2q245nv9x6.b[1][1]++;cov_2q245nv9x6.s[11]++;if(inline){cov_2q245nv9x6.b[2][0]++;cov_2q245nv9x6.s[12]++;return ret.slice(1,-1);}else{cov_2q245nv9x6.b[2][1]++;cov_2q245nv9x6.s[13]++;return' '+ret.slice(1,-1)+' ';}}};cov_2q245nv9x6.s[14]++;var getContent=function(root,referenced,owned){cov_2q245nv9x6.f[1]++;var children=(cov_2q245nv9x6.s[15]++,[]);cov_2q245nv9x6.s[16]++;for(var i=(cov_2q245nv9x6.s[17]++,0);i<root.childNodes.length;i++){var node=(cov_2q245nv9x6.s[18]++,root.childNodes[i]);cov_2q245nv9x6.s[19]++;if((cov_2q245nv9x6.b[4][0]++,!node.id)||(cov_2q245nv9x6.b[4][1]++,!document.querySelector('[aria-owns~="'+node.id+'"]'))){cov_2q245nv9x6.b[3][0]++;cov_2q245nv9x6.s[20]++;children.push(node);}else{cov_2q245nv9x6.b[3][1]++;}}var owns=(cov_2q245nv9x6.s[21]++,(cov_2q245nv9x6.b[5][0]++,query.getAttribute(root,'owns'))||(cov_2q245nv9x6.b[5][1]++,[]));cov_2q245nv9x6.s[22]++;for(var i=(cov_2q245nv9x6.s[23]++,0);i<owns.length;i++){var child=(cov_2q245nv9x6.s[24]++,document.getElementById(owns[i]));cov_2q245nv9x6.s[25]++;if((cov_2q245nv9x6.b[7][0]++,child)&&(cov_2q245nv9x6.b[7][1]++,child!==root)&&(cov_2q245nv9x6.b[7][2]++,owned.indexOf(child.id)===-1)){cov_2q245nv9x6.b[6][0]++;cov_2q245nv9x6.s[26]++;children.push(child);cov_2q245nv9x6.s[27]++;owned.push(child.id);}else{cov_2q245nv9x6.b[6][1]++;}}var ret=(cov_2q245nv9x6.s[28]++,'');cov_2q245nv9x6.s[29]++;for(var i=(cov_2q245nv9x6.s[30]++,0);i<children.length;i++){var node=(cov_2q245nv9x6.s[31]++,children[i]);cov_2q245nv9x6.s[32]++;if(node.nodeType===node.TEXT_NODE){cov_2q245nv9x6.b[8][0]++;cov_2q245nv9x6.s[33]++;ret+=node.textContent;}else{cov_2q245nv9x6.b[8][1]++;cov_2q245nv9x6.s[34]++;if(node.nodeType===node.ELEMENT_NODE){cov_2q245nv9x6.b[9][0]++;cov_2q245nv9x6.s[35]++;if(node.tagName.toLowerCase()==='br'){cov_2q245nv9x6.b[10][0]++;cov_2q245nv9x6.s[36]++;ret+='\n';}else{cov_2q245nv9x6.b[10][1]++;cov_2q245nv9x6.s[37]++;if((cov_2q245nv9x6.b[12][0]++,window.getComputedStyle(node).display.substr(0,6)==='inline')&&(cov_2q245nv9x6.b[12][1]++,node.tagName.toLowerCase()!=='input')&&(cov_2q245nv9x6.b[12][2]++,node.tagName.toLowerCase()!=='img')){cov_2q245nv9x6.b[11][0]++;cov_2q245nv9x6.s[38]++;// https://github.com/w3c/accname/issues/3
  632    -1 ret+=getName(node,true,referenced,owned);}else{cov_2q245nv9x6.b[11][1]++;cov_2q245nv9x6.s[39]++;ret+=' '+getName(node,true,referenced,owned)+' ';}}}else{cov_2q245nv9x6.b[9][1]++;}}}cov_2q245nv9x6.s[40]++;return ret;};cov_2q245nv9x6.s[41]++;var allowNameFromContent=function(el){cov_2q245nv9x6.f[2]++;var role=(cov_2q245nv9x6.s[42]++,query.getRole(el));cov_2q245nv9x6.s[43]++;return(cov_2q245nv9x6.b[13][0]++,role)&&(cov_2q245nv9x6.b[13][1]++,constants.nameFromContents.indexOf(role)!==-1);};cov_2q245nv9x6.s[44]++;var isLabelable=function(el){cov_2q245nv9x6.f[3]++;var selector=(cov_2q245nv9x6.s[45]++,constants.labelable.join(','));cov_2q245nv9x6.s[46]++;return el.matches(selector);};// Control.labels is part of the standard, but not supported in most browsers
  633    -1 cov_2q245nv9x6.s[47]++;var getLabelNodes=function(element){cov_2q245nv9x6.f[4]++;var labels=(cov_2q245nv9x6.s[48]++,[]);var labelable=(cov_2q245nv9x6.s[49]++,constants.labelable.join(','));cov_2q245nv9x6.s[50]++;util.walkDOM(document.body,function(node){cov_2q245nv9x6.f[5]++;cov_2q245nv9x6.s[51]++;if((cov_2q245nv9x6.b[15][0]++,node.tagName)&&(cov_2q245nv9x6.b[15][1]++,node.tagName.toLowerCase()==='label')){cov_2q245nv9x6.b[14][0]++;cov_2q245nv9x6.s[52]++;if(node.getAttribute('for')){cov_2q245nv9x6.b[16][0]++;cov_2q245nv9x6.s[53]++;if((cov_2q245nv9x6.b[18][0]++,element.id)&&(cov_2q245nv9x6.b[18][1]++,node.getAttribute('for')===element.id)){cov_2q245nv9x6.b[17][0]++;cov_2q245nv9x6.s[54]++;labels.push(node);}else{cov_2q245nv9x6.b[17][1]++;}}else{cov_2q245nv9x6.b[16][1]++;cov_2q245nv9x6.s[55]++;if(node.querySelector(labelable)===element){cov_2q245nv9x6.b[19][0]++;cov_2q245nv9x6.s[56]++;labels.push(node);}else{cov_2q245nv9x6.b[19][1]++;}}}else{cov_2q245nv9x6.b[14][1]++;}});cov_2q245nv9x6.s[57]++;return labels;};cov_2q245nv9x6.s[58]++;var isInLabelForOtherWidget=function(el){cov_2q245nv9x6.f[6]++;var label=(cov_2q245nv9x6.s[59]++,el.parentElement.closest('label'));var ownLabels=(cov_2q245nv9x6.s[60]++,getLabelNodes(el));cov_2q245nv9x6.s[61]++;return(cov_2q245nv9x6.b[20][0]++,label)&&(cov_2q245nv9x6.b[20][1]++,ownLabels.indexOf(label)===-1);};cov_2q245nv9x6.s[62]++;var getName=function(el,recursive,referenced,owned){cov_2q245nv9x6.f[7]++;var ret=(cov_2q245nv9x6.s[63]++,'');var owned=(cov_2q245nv9x6.s[64]++,(cov_2q245nv9x6.b[21][0]++,owned)||(cov_2q245nv9x6.b[21][1]++,[]));// A
  634    -1 cov_2q245nv9x6.s[65]++;if(query.getAttribute(el,'hidden',referenced)){cov_2q245nv9x6.b[22][0]++;cov_2q245nv9x6.s[66]++;return'';}else{cov_2q245nv9x6.b[22][1]++;}// B
  635    -1 cov_2q245nv9x6.s[67]++;if((cov_2q245nv9x6.b[24][0]++,!recursive)&&(cov_2q245nv9x6.b[24][1]++,el.matches('[aria-labelledby]'))){cov_2q245nv9x6.b[23][0]++;var ids=(cov_2q245nv9x6.s[68]++,el.getAttribute('aria-labelledby').split(/\s+/));var strings=(cov_2q245nv9x6.s[69]++,ids.map(function(id){cov_2q245nv9x6.f[8]++;var label=(cov_2q245nv9x6.s[70]++,document.getElementById(id));cov_2q245nv9x6.s[71]++;return label?(cov_2q245nv9x6.b[25][0]++,getName(label,true,label,owned)):(cov_2q245nv9x6.b[25][1]++,'');}));cov_2q245nv9x6.s[72]++;ret=strings.join(' ');}else{cov_2q245nv9x6.b[23][1]++;}// C
  636    -1 cov_2q245nv9x6.s[73]++;if((cov_2q245nv9x6.b[27][0]++,!ret.trim())&&(cov_2q245nv9x6.b[27][1]++,el.matches('[aria-label]'))){cov_2q245nv9x6.b[26][0]++;cov_2q245nv9x6.s[74]++;ret=el.getAttribute('aria-label');}else{cov_2q245nv9x6.b[26][1]++;}// D
  637    -1 cov_2q245nv9x6.s[75]++;if((cov_2q245nv9x6.b[29][0]++,!ret.trim())&&(cov_2q245nv9x6.b[29][1]++,!recursive)&&(cov_2q245nv9x6.b[29][2]++,isLabelable(el))){cov_2q245nv9x6.b[28][0]++;var strings=(cov_2q245nv9x6.s[76]++,getLabelNodes(el).map(function(label){cov_2q245nv9x6.f[9]++;cov_2q245nv9x6.s[77]++;return getName(label,true,label,owned);}));cov_2q245nv9x6.s[78]++;ret=strings.join(' ');}else{cov_2q245nv9x6.b[28][1]++;}cov_2q245nv9x6.s[79]++;if(!ret.trim()){cov_2q245nv9x6.b[30][0]++;cov_2q245nv9x6.s[80]++;ret=(cov_2q245nv9x6.b[31][0]++,el.placeholder)||(cov_2q245nv9x6.b[31][1]++,'');}else{cov_2q245nv9x6.b[30][1]++;}cov_2q245nv9x6.s[81]++;if(!ret.trim()){cov_2q245nv9x6.b[32][0]++;cov_2q245nv9x6.s[82]++;ret=(cov_2q245nv9x6.b[33][0]++,el.alt)||(cov_2q245nv9x6.b[33][1]++,'');}else{cov_2q245nv9x6.b[32][1]++;}cov_2q245nv9x6.s[83]++;if((cov_2q245nv9x6.b[35][0]++,!ret.trim())&&(cov_2q245nv9x6.b[35][1]++,el.matches('abbr,acronym'))&&(cov_2q245nv9x6.b[35][2]++,el.title)){cov_2q245nv9x6.b[34][0]++;cov_2q245nv9x6.s[84]++;ret=el.title;}else{cov_2q245nv9x6.b[34][1]++;}cov_2q245nv9x6.s[85]++;if(!ret.trim()){cov_2q245nv9x6.b[36][0]++;cov_2q245nv9x6.s[86]++;for(var selector in constants.nameFromDescendant){cov_2q245nv9x6.s[87]++;if(el.matches(selector)){cov_2q245nv9x6.b[37][0]++;var descendant=(cov_2q245nv9x6.s[88]++,el.querySelector(constants.nameFromDescendant[selector]));cov_2q245nv9x6.s[89]++;if(descendant){cov_2q245nv9x6.b[38][0]++;cov_2q245nv9x6.s[90]++;ret=getName(descendant,true,descendant,owned);}else{cov_2q245nv9x6.b[38][1]++;}}else{cov_2q245nv9x6.b[37][1]++;}}}else{cov_2q245nv9x6.b[36][1]++;}// E
  638    -1 cov_2q245nv9x6.s[91]++;if((cov_2q245nv9x6.b[40][0]++,!ret.trim())&&((cov_2q245nv9x6.b[40][1]++,recursive)||(cov_2q245nv9x6.b[40][2]++,isInLabelForOtherWidget(el))||(cov_2q245nv9x6.b[40][3]++,query.matches(el,'button')))){cov_2q245nv9x6.b[39][0]++;cov_2q245nv9x6.s[92]++;if(query.matches(el,'textbox,button,combobox,listbox,range')){cov_2q245nv9x6.b[41][0]++;cov_2q245nv9x6.s[93]++;if(query.matches(el,'textbox,button')){cov_2q245nv9x6.b[42][0]++;cov_2q245nv9x6.s[94]++;ret=(cov_2q245nv9x6.b[43][0]++,el.value)||(cov_2q245nv9x6.b[43][1]++,el.textContent);}else{cov_2q245nv9x6.b[42][1]++;cov_2q245nv9x6.s[95]++;if(query.matches(el,'combobox,listbox')){cov_2q245nv9x6.b[44][0]++;var selected=(cov_2q245nv9x6.s[96]++,(cov_2q245nv9x6.b[45][0]++,query.querySelector(el,':selected'))||(cov_2q245nv9x6.b[45][1]++,query.querySelector(el,'option')));cov_2q245nv9x6.s[97]++;if(selected){cov_2q245nv9x6.b[46][0]++;cov_2q245nv9x6.s[98]++;ret=getName(selected,recursive,referenced,owned);}else{cov_2q245nv9x6.b[46][1]++;cov_2q245nv9x6.s[99]++;ret=(cov_2q245nv9x6.b[47][0]++,el.value)||(cov_2q245nv9x6.b[47][1]++,'');}}else{cov_2q245nv9x6.b[44][1]++;cov_2q245nv9x6.s[100]++;if(query.matches(el,'range')){cov_2q245nv9x6.b[48][0]++;cov_2q245nv9x6.s[101]++;ret=''+((cov_2q245nv9x6.b[49][0]++,query.getAttribute(el,'valuetext'))||(cov_2q245nv9x6.b[49][1]++,query.getAttribute(el,'valuenow'))||(cov_2q245nv9x6.b[49][2]++,el.value));}else{cov_2q245nv9x6.b[48][1]++;}}}}else{cov_2q245nv9x6.b[41][1]++;}}else{cov_2q245nv9x6.b[39][1]++;}// F
  639    -1 // FIXME: menu is not mentioned in the spec
  640    -1 cov_2q245nv9x6.s[102]++;if((cov_2q245nv9x6.b[51][0]++,!ret.trim())&&((cov_2q245nv9x6.b[51][1]++,recursive)||(cov_2q245nv9x6.b[51][2]++,allowNameFromContent(el))||(cov_2q245nv9x6.b[51][3]++,el.closest('label')))&&(cov_2q245nv9x6.b[51][4]++,!query.matches(el,'menu'))){cov_2q245nv9x6.b[50][0]++;cov_2q245nv9x6.s[103]++;ret=getContent(el,referenced,owned);}else{cov_2q245nv9x6.b[50][1]++;}// TODO: G
  641    -1 // TODO: H
  642    -1 // FIXME: not mentioned in the spec
  643    -1 cov_2q245nv9x6.s[104]++;if((cov_2q245nv9x6.b[53][0]++,!ret.trim())&&(cov_2q245nv9x6.b[53][1]++,query.matches(el,'presentation'))){cov_2q245nv9x6.b[52][0]++;cov_2q245nv9x6.s[105]++;return getContent(el,referenced,owned);}else{cov_2q245nv9x6.b[52][1]++;}// FIXME: not mentioned in the spec
  644    -1 cov_2q245nv9x6.s[106]++;if(!ret.trim()){cov_2q245nv9x6.b[54][0]++;cov_2q245nv9x6.s[107]++;for(var selector in constants.nameDefaults){cov_2q245nv9x6.s[108]++;if(el.matches(selector)){cov_2q245nv9x6.b[55][0]++;cov_2q245nv9x6.s[109]++;ret=constants.nameDefaults[selector];}else{cov_2q245nv9x6.b[55][1]++;}}}else{cov_2q245nv9x6.b[54][1]++;}// I
  645    -1 cov_2q245nv9x6.s[110]++;if(!ret.trim()){cov_2q245nv9x6.b[56][0]++;cov_2q245nv9x6.s[111]++;ret=(cov_2q245nv9x6.b[57][0]++,el.title)||(cov_2q245nv9x6.b[57][1]++,'');}else{cov_2q245nv9x6.b[56][1]++;}var before=(cov_2q245nv9x6.s[112]++,getPseudoContent(el,':before'));var after=(cov_2q245nv9x6.s[113]++,getPseudoContent(el,':after'));cov_2q245nv9x6.s[114]++;return before+ret+after;};cov_2q245nv9x6.s[115]++;var getNameTrimmed=function(el){cov_2q245nv9x6.f[10]++;cov_2q245nv9x6.s[116]++;return getName(el).replace(/\s+/g,' ').trim();};cov_2q245nv9x6.s[117]++;var getDescription=function(el){cov_2q245nv9x6.f[11]++;var ret=(cov_2q245nv9x6.s[118]++,'');var owned=(cov_2q245nv9x6.s[119]++,[]);cov_2q245nv9x6.s[120]++;if(el.matches('[aria-describedby]')){cov_2q245nv9x6.b[58][0]++;var ids=(cov_2q245nv9x6.s[121]++,el.getAttribute('aria-describedby').split(/\s+/));var strings=(cov_2q245nv9x6.s[122]++,ids.map(function(id){cov_2q245nv9x6.f[12]++;var label=(cov_2q245nv9x6.s[123]++,document.getElementById(id));cov_2q245nv9x6.s[124]++;return label?(cov_2q245nv9x6.b[59][0]++,getName(label,true,label,owned)):(cov_2q245nv9x6.b[59][1]++,'');}));cov_2q245nv9x6.s[125]++;ret=strings.join(' ');}else{cov_2q245nv9x6.b[58][1]++;cov_2q245nv9x6.s[126]++;if(el.title){cov_2q245nv9x6.b[60][0]++;cov_2q245nv9x6.s[127]++;ret=el.title;}else{cov_2q245nv9x6.b[60][1]++;cov_2q245nv9x6.s[128]++;if(el.placeholder){cov_2q245nv9x6.b[61][0]++;cov_2q245nv9x6.s[129]++;ret=el.placeholder;}else{cov_2q245nv9x6.b[61][1]++;}}}cov_2q245nv9x6.s[130]++;ret=((cov_2q245nv9x6.b[62][0]++,ret)||(cov_2q245nv9x6.b[62][1]++,'')).trim().replace(/\s+/g,' ');cov_2q245nv9x6.s[131]++;if(ret===getNameTrimmed(el)){cov_2q245nv9x6.b[63][0]++;cov_2q245nv9x6.s[132]++;ret='';}else{cov_2q245nv9x6.b[63][1]++;}cov_2q245nv9x6.s[133]++;return ret;};cov_2q245nv9x6.s[134]++;module.exports={getName:getNameTrimmed,getDescription:getDescription};
  646    -1 
  647    -1 },{"./constants.js":5,"./query.js":7,"./util.js":8}],7:[function(require,module,exports){
  648    -1 var constants = require('./constants.js');
  649    -1 var util = require('./util.js');
  650    -1 
  651    -1 var getSubRoles = function(roles) {
  652    -1 	return [].concat.apply([], roles.map(function(role) {
  653    -1 		return constants.subRoles[role] || [role];
  654    -1 	}));
  655    -1 };
  656    -1 
  657    -1 // candidates can be passed for performance optimization
  658    -1 var _getRole = function(el, candidates) {
  659    -1 	if (el.hasAttribute('role')) {
  660    -1 		return el.getAttribute('role');
  661    -1 	}
  662    -1 	for (var role in constants.extraSelectors) {
  663    -1 		var selector = constants.extraSelectors[role].join(',');
  664    -1 		if ((!candidates || candidates.indexOf(role) !== -1) && el.matches(selector)) {
  665    -1 			return role;
  666    -1 		}
  667    -1 	}
  668    -1 
  669    -1 	if (!candidates ||
  670    -1 			candidates.indexOf('banner') !== -1 ||
  671    -1 			candidates.indexOf('contentinfo') !== -1) {
  672    -1 		var scoped = el.matches(constants.scoped);
  673    -1 
  674    -1 		if (el.matches('header') && !scoped) {
  675    -1 			return 'banner';
  676    -1 		}
  677    -1 		if (el.matches('footer') && !scoped) {
  678    -1 			return 'contentinfo';
  679    -1 		}
  680    -1 	}
  681    -1 };
  682    -1 
  683    -1 var getAttribute = function(el, key, _hiddenRoot) {
  684    -1 	if (key === 'hidden' && el === _hiddenRoot) {  // used for name calculation
  685    -1 		return false;
  686    -1 	}
  687    -1 
  688    -1 	if (constants.attributeStrongMapping.hasOwnProperty(key)) {
  689    -1 		var value = el[constants.attributeStrongMapping[key]];
  690    -1 		if (value) {
  691    -1 			return value;
  692    -1 		}
  693    -1 	}
  694    -1 	if (key === 'readonly' && el.contentEditable) {
  695    -1 		return false;
  696    -1 	} else if (key === 'invalid' && el.checkValidity) {
  697    -1 		return !el.checkValidity();
  698    -1 	} else if (key === 'hidden') {
  699    -1 		var style = window.getComputedStyle(el);
  700    -1 		if (style.display === 'none' || style.visibility === 'hidden') {
  701    -1 			return true;
  702    -1 		}
  703    -1 	}
  704    -1 
  705    -1 	var type = constants.attributes[key];
  706    -1 	var raw = el.getAttribute('aria-' + key);
  707    -1 
  708    -1 	if (raw) {
  709    -1 		if (type === 'bool') {
  710    -1 			return raw === 'true';
  711    -1 		} else if (type === 'tristate') {
  712    -1 			return raw === 'true' ? true : raw === 'false' ? false : 'mixed';
  713    -1 		} else if (type === 'bool-undefined') {
  714    -1 			return raw === 'true' ? true : raw === 'false' ? false : undefined;
  715    -1 		} else if (type === 'id-list') {
  716    -1 			return raw.split(/\s+/);
  717    -1 		} else if (type === 'integer') {
  718    -1 			return parseInt(raw);
  719    -1 		} else if (type === 'number') {
  720    -1 			return parseFloat(raw);
  721    -1 		} else if (type === 'token-list') {
  722    -1 			return raw.split(/\s+/);
  723    -1 		} else {
  724    -1 			return raw;
  725    -1 		}
  726    -1 	}
   -1  1049 	'textarea',
   -1  1050 ];
  727  1051 
  728    -1 	// TODO
  729    -1 	// autocomplete
  730    -1 	// contextmenu -> aria-haspopup
  731    -1 	// indeterminate -> aria-checked="mixed"
  732    -1 	// list -> aria-controls
   -1  1052 },{}],8:[function(require,module,exports){
   -1  1053 var cov_22i8nvh4cs=function(){var path="node_modules/aria-api/lib/name.js";var hash="5101a9b8358270f08e855ff19ea691a5651f4ed4";var global=new Function("return this")();var gcv="__coverage__";var coverageData={path:"/home/tobias/code/a11y/babelacc/node_modules/aria-api/lib/name.js",statementMap:{"0":{start:{line:1,column:16},end:{line:1,column:41}},"1":{start:{line:2,column:12},end:{line:2,column:33}},"2":{start:{line:3,column:12},end:{line:3,column:33}},"3":{start:{line:5,column:23},end:{line:21,column:1}},"4":{start:{line:6,column:14},end:{line:6,column:53}},"5":{start:{line:7,column:11},end:{line:7,column:45}},"6":{start:{line:8,column:14},end:{line:8,column:54}},"7":{start:{line:9,column:1},end:{line:11,column:2}},"8":{start:{line:10,column:2},end:{line:10,column:12}},"9":{start:{line:12,column:1},end:{line:20,column:2}},"10":{start:{line:13,column:2},end:{line:13,column:12}},"11":{start:{line:15,column:2},end:{line:19,column:3}},"12":{start:{line:16,column:3},end:{line:16,column:27}},"13":{start:{line:18,column:3},end:{line:18,column:39}},"14":{start:{line:23,column:17},end:{line:45,column:1}},"15":{start:{line:24,column:16},end:{line:24,column:41}},"16":{start:{line:26,column:11},end:{line:26,column:13}},"17":{start:{line:27,column:1},end:{line:42,column:2}},"18":{start:{line:27,column:14},end:{line:27,column:15}},"19":{start:{line:28,column:13},end:{line:28,column:24}},"20":{start:{line:29,column:2},end:{line:41,column:3}},"21":{start:{line:30,column:3},end:{line:30,column:27}},"22":{start:{line:31,column:9},end:{line:41,column:3}},"23":{start:{line:32,column:3},end:{line:40,column:4}},"24":{start:{line:33,column:4},end:{line:33,column:16}},"25":{start:{line:34,column:10},end:{line:40,column:4}},"26":{start:{line:37,column:4},end:{line:37,column:40}},"27":{start:{line:39,column:4},end:{line:39,column:52}},"28":{start:{line:44,column:1},end:{line:44,column:12}},"29":{start:{line:47,column:27},end:{line:50,column:1}},"30":{start:{line:48,column:12},end:{line:48,column:29}},"31":{start:{line:49,column:1},end:{line:49,column:55}},"32":{start:{line:52,column:18},end:{line:55,column:1}},"33":{start:{line:53,column:16},end:{line:53,column:45}},"34":{start:{line:54,column:1},end:{line:54,column:29}},"35":{start:{line:58,column:20},end:{line:71,column:1}},"36":{start:{line:59,column:14},end:{line:59,column:16}},"37":{start:{line:60,column:17},end:{line:60,column:46}},"38":{start:{line:61,column:1},end:{line:69,column:4}},"39":{start:{line:62,column:2},end:{line:68,column:3}},"40":{start:{line:63,column:3},end:{line:65,column:4}},"41":{start:{line:64,column:4},end:{line:64,column:22}},"42":{start:{line:66,column:9},end:{line:68,column:3}},"43":{start:{line:67,column:3},end:{line:67,column:21}},"44":{start:{line:70,column:1},end:{line:70,column:15}},"45":{start:{line:73,column:30},end:{line:77,column:1}},"46":{start:{line:74,column:13},end:{line:74,column:46}},"47":{start:{line:75,column:17},end:{line:75,column:34}},"48":{start:{line:76,column:1},end:{line:76,column:49}},"49":{start:{line:79,column:14},end:{line:181,column:1}},"50":{start:{line:80,column:11},end:{line:80,column:13}},"51":{start:{line:82,column:1},end:{line:82,column:25}},"52":{start:{line:83,column:1},end:{line:89,column:2}},"53":{start:{line:84,column:2},end:{line:86,column:3}},"54":{start:{line:85,column:3},end:{line:85,column:13}},"55":{start:{line:88,column:2},end:{line:88,column:19}},"56":{start:{line:95,column:1},end:{line:102,column:2}},"57":{start:{line:96,column:12},end:{line:96,column:59}},"58":{start:{line:97,column:16},end:{line:100,column:4}},"59":{start:{line:98,column:15},end:{line:98,column:42}},"60":{start:{line:99,column:3},end:{line:99,column:59}},"61":{start:{line:101,column:2},end:{line:101,column:26}},"62":{start:{line:105,column:1},end:{line:108,column:2}},"63":{start:{line:107,column:2},end:{line:107,column:38}},"64":{start:{line:111,column:1},end:{line:116,column:2}},"65":{start:{line:112,column:16},end:{line:114,column:4}},"66":{start:{line:113,column:3},end:{line:113,column:40}},"67":{start:{line:115,column:2},end:{line:115,column:26}},"68":{start:{line:117,column:1},end:{line:119,column:2}},"69":{start:{line:118,column:2},end:{line:118,column:29}},"70":{start:{line:120,column:1},end:{line:122,column:2}},"71":{start:{line:121,column:2},end:{line:121,column:21}},"72":{start:{line:123,column:1},end:{line:125,column:2}},"73":{start:{line:124,column:2},end:{line:124,column:17}},"74":{start:{line:126,column:1},end:{line:135,column:2}},"75":{start:{line:127,column:2},end:{line:134,column:3}},"76":{start:{line:128,column:3},end:{line:133,column:4}},"77":{start:{line:129,column:21},end:{line:129,column:77}},"78":{start:{line:130,column:4},end:{line:132,column:5}},"79":{start:{line:131,column:5},end:{line:131,column:46}},"80":{start:{line:138,column:1},end:{line:153,column:2}},"81":{start:{line:139,column:2},end:{line:152,column:3}},"82":{start:{line:140,column:3},end:{line:151,column:4}},"83":{start:{line:141,column:4},end:{line:141,column:37}},"84":{start:{line:142,column:10},end:{line:151,column:4}},"85":{start:{line:143,column:19},end:{line:143,column:92}},"86":{start:{line:144,column:4},end:{line:148,column:5}},"87":{start:{line:145,column:5},end:{line:145,column:49}},"88":{start:{line:147,column:5},end:{line:147,column:26}},"89":{start:{line:149,column:10},end:{line:151,column:4}},"90":{start:{line:150,column:4},end:{line:150,column:103}},"91":{start:{line:157,column:1},end:{line:159,column:2}},"92":{start:{line:158,column:2},end:{line:158,column:32}},"93":{start:{line:161,column:1},end:{line:167,column:2}},"94":{start:{line:162,column:2},end:{line:166,column:3}},"95":{start:{line:163,column:3},end:{line:165,column:4}},"96":{start:{line:164,column:4},end:{line:164,column:43}},"97":{start:{line:174,column:1},end:{line:176,column:2}},"98":{start:{line:175,column:2},end:{line:175,column:23}},"99":{start:{line:178,column:14},end:{line:178,column:45}},"100":{start:{line:179,column:13},end:{line:179,column:43}},"101":{start:{line:180,column:1},end:{line:180,column:29}},"102":{start:{line:183,column:21},end:{line:185,column:1}},"103":{start:{line:184,column:1},end:{line:184,column:48}},"104":{start:{line:187,column:21},end:{line:210,column:1}},"105":{start:{line:188,column:11},end:{line:188,column:13}},"106":{start:{line:190,column:1},end:{line:201,column:2}},"107":{start:{line:191,column:12},end:{line:191,column:60}},"108":{start:{line:192,column:16},end:{line:195,column:4}},"109":{start:{line:193,column:15},end:{line:193,column:42}},"110":{start:{line:194,column:3},end:{line:194,column:44}},"111":{start:{line:196,column:2},end:{line:196,column:26}},"112":{start:{line:197,column:8},end:{line:201,column:2}},"113":{start:{line:198,column:2},end:{line:198,column:17}},"114":{start:{line:199,column:8},end:{line:201,column:2}},"115":{start:{line:200,column:2},end:{line:200,column:23}},"116":{start:{line:203,column:1},end:{line:203,column:47}},"117":{start:{line:205,column:1},end:{line:207,column:2}},"118":{start:{line:206,column:2},end:{line:206,column:11}},"119":{start:{line:209,column:1},end:{line:209,column:12}},"120":{start:{line:212,column:0},end:{line:215,column:2}}},fnMap:{"0":{name:"(anonymous_0)",decl:{start:{line:5,column:23},end:{line:5,column:24}},loc:{start:{line:5,column:48},end:{line:21,column:1}},line:5},"1":{name:"(anonymous_1)",decl:{start:{line:23,column:17},end:{line:23,column:18}},loc:{start:{line:23,column:41},end:{line:45,column:1}},line:23},"2":{name:"(anonymous_2)",decl:{start:{line:47,column:27},end:{line:47,column:28}},loc:{start:{line:47,column:40},end:{line:50,column:1}},line:47},"3":{name:"(anonymous_3)",decl:{start:{line:52,column:18},end:{line:52,column:19}},loc:{start:{line:52,column:31},end:{line:55,column:1}},line:52},"4":{name:"(anonymous_4)",decl:{start:{line:58,column:20},end:{line:58,column:21}},loc:{start:{line:58,column:38},end:{line:71,column:1}},line:58},"5":{name:"(anonymous_5)",decl:{start:{line:61,column:44},end:{line:61,column:45}},loc:{start:{line:61,column:59},end:{line:69,column:2}},line:61},"6":{name:"(anonymous_6)",decl:{start:{line:73,column:30},end:{line:73,column:31}},loc:{start:{line:73,column:43},end:{line:77,column:1}},line:73},"7":{name:"(anonymous_7)",decl:{start:{line:79,column:14},end:{line:79,column:15}},loc:{start:{line:79,column:64},end:{line:181,column:1}},line:79},"8":{name:"(anonymous_8)",decl:{start:{line:97,column:24},end:{line:97,column:25}},loc:{start:{line:97,column:37},end:{line:100,column:3}},line:97},"9":{name:"(anonymous_9)",decl:{start:{line:112,column:38},end:{line:112,column:39}},loc:{start:{line:112,column:54},end:{line:114,column:3}},line:112},"10":{name:"(anonymous_10)",decl:{start:{line:183,column:21},end:{line:183,column:22}},loc:{start:{line:183,column:34},end:{line:185,column:1}},line:183},"11":{name:"(anonymous_11)",decl:{start:{line:187,column:21},end:{line:187,column:22}},loc:{start:{line:187,column:34},end:{line:210,column:1}},line:187},"12":{name:"(anonymous_12)",decl:{start:{line:192,column:24},end:{line:192,column:25}},loc:{start:{line:192,column:37},end:{line:195,column:3}},line:192}},branchMap:{"0":{loc:{start:{line:9,column:1},end:{line:11,column:2}},type:"if",locations:[{start:{line:9,column:1},end:{line:11,column:2}},{start:{line:9,column:1},end:{line:11,column:2}}],line:9},"1":{loc:{start:{line:12,column:1},end:{line:20,column:2}},type:"if",locations:[{start:{line:12,column:1},end:{line:20,column:2}},{start:{line:12,column:1},end:{line:20,column:2}}],line:12},"2":{loc:{start:{line:15,column:2},end:{line:19,column:3}},type:"if",locations:[{start:{line:15,column:2},end:{line:19,column:3}},{start:{line:15,column:2},end:{line:19,column:3}}],line:15},"3":{loc:{start:{line:29,column:2},end:{line:41,column:3}},type:"if",locations:[{start:{line:29,column:2},end:{line:41,column:3}},{start:{line:29,column:2},end:{line:41,column:3}}],line:29},"4":{loc:{start:{line:31,column:9},end:{line:41,column:3}},type:"if",locations:[{start:{line:31,column:9},end:{line:41,column:3}},{start:{line:31,column:9},end:{line:41,column:3}}],line:31},"5":{loc:{start:{line:32,column:3},end:{line:40,column:4}},type:"if",locations:[{start:{line:32,column:3},end:{line:40,column:4}},{start:{line:32,column:3},end:{line:40,column:4}}],line:32},"6":{loc:{start:{line:34,column:10},end:{line:40,column:4}},type:"if",locations:[{start:{line:34,column:10},end:{line:40,column:4}},{start:{line:34,column:10},end:{line:40,column:4}}],line:34},"7":{loc:{start:{line:34,column:14},end:{line:36,column:41}},type:"binary-expr",locations:[{start:{line:34,column:14},end:{line:34,column:77}},{start:{line:35,column:5},end:{line:35,column:43}},{start:{line:36,column:5},end:{line:36,column:41}}],line:34},"8":{loc:{start:{line:49,column:9},end:{line:49,column:36}},type:"binary-expr",locations:[{start:{line:49,column:9},end:{line:49,column:30}},{start:{line:49,column:34},end:{line:49,column:36}}],line:49},"9":{loc:{start:{line:62,column:2},end:{line:68,column:3}},type:"if",locations:[{start:{line:62,column:2},end:{line:68,column:3}},{start:{line:62,column:2},end:{line:68,column:3}}],line:62},"10":{loc:{start:{line:63,column:3},end:{line:65,column:4}},type:"if",locations:[{start:{line:63,column:3},end:{line:65,column:4}},{start:{line:63,column:3},end:{line:65,column:4}}],line:63},"11":{loc:{start:{line:63,column:7},end:{line:63,column:60}},type:"binary-expr",locations:[{start:{line:63,column:7},end:{line:63,column:17}},{start:{line:63,column:21},end:{line:63,column:60}}],line:63},"12":{loc:{start:{line:66,column:9},end:{line:68,column:3}},type:"if",locations:[{start:{line:66,column:9},end:{line:68,column:3}},{start:{line:66,column:9},end:{line:68,column:3}}],line:66},"13":{loc:{start:{line:76,column:8},end:{line:76,column:48}},type:"binary-expr",locations:[{start:{line:76,column:8},end:{line:76,column:13}},{start:{line:76,column:17},end:{line:76,column:48}}],line:76},"14":{loc:{start:{line:82,column:11},end:{line:82,column:24}},type:"binary-expr",locations:[{start:{line:82,column:11},end:{line:82,column:18}},{start:{line:82,column:22},end:{line:82,column:24}}],line:82},"15":{loc:{start:{line:83,column:1},end:{line:89,column:2}},type:"if",locations:[{start:{line:83,column:1},end:{line:89,column:2}},{start:{line:83,column:1},end:{line:89,column:2}}],line:83},"16":{loc:{start:{line:84,column:2},end:{line:86,column:3}},type:"if",locations:[{start:{line:84,column:2},end:{line:86,column:3}},{start:{line:84,column:2},end:{line:86,column:3}}],line:84},"17":{loc:{start:{line:95,column:1},end:{line:102,column:2}},type:"if",locations:[{start:{line:95,column:1},end:{line:102,column:2}},{start:{line:95,column:1},end:{line:102,column:2}}],line:95},"18":{loc:{start:{line:95,column:5},end:{line:95,column:50}},type:"binary-expr",locations:[{start:{line:95,column:5},end:{line:95,column:15}},{start:{line:95,column:19},end:{line:95,column:50}}],line:95},"19":{loc:{start:{line:99,column:10},end:{line:99,column:58}},type:"cond-expr",locations:[{start:{line:99,column:18},end:{line:99,column:53}},{start:{line:99,column:56},end:{line:99,column:58}}],line:99},"20":{loc:{start:{line:105,column:1},end:{line:108,column:2}},type:"if",locations:[{start:{line:105,column:1},end:{line:108,column:2}},{start:{line:105,column:1},end:{line:108,column:2}}],line:105},"21":{loc:{start:{line:105,column:5},end:{line:105,column:46}},type:"binary-expr",locations:[{start:{line:105,column:5},end:{line:105,column:16}},{start:{line:105,column:20},end:{line:105,column:46}}],line:105},"22":{loc:{start:{line:111,column:1},end:{line:116,column:2}},type:"if",locations:[{start:{line:111,column:1},end:{line:116,column:2}},{start:{line:111,column:1},end:{line:116,column:2}}],line:111},"23":{loc:{start:{line:111,column:5},end:{line:111,column:49}},type:"binary-expr",locations:[{start:{line:111,column:5},end:{line:111,column:16}},{start:{line:111,column:20},end:{line:111,column:30}},{start:{line:111,column:34},end:{line:111,column:49}}],line:111},"24":{loc:{start:{line:117,column:1},end:{line:119,column:2}},type:"if",locations:[{start:{line:117,column:1},end:{line:119,column:2}},{start:{line:117,column:1},end:{line:119,column:2}}],line:117},"25":{loc:{start:{line:118,column:8},end:{line:118,column:28}},type:"binary-expr",locations:[{start:{line:118,column:8},end:{line:118,column:22}},{start:{line:118,column:26},end:{line:118,column:28}}],line:118},"26":{loc:{start:{line:120,column:1},end:{line:122,column:2}},type:"if",locations:[{start:{line:120,column:1},end:{line:122,column:2}},{start:{line:120,column:1},end:{line:122,column:2}}],line:120},"27":{loc:{start:{line:121,column:8},end:{line:121,column:20}},type:"binary-expr",locations:[{start:{line:121,column:8},end:{line:121,column:14}},{start:{line:121,column:18},end:{line:121,column:20}}],line:121},"28":{loc:{start:{line:123,column:1},end:{line:125,column:2}},type:"if",locations:[{start:{line:123,column:1},end:{line:125,column:2}},{start:{line:123,column:1},end:{line:125,column:2}}],line:123},"29":{loc:{start:{line:123,column:5},end:{line:123,column:58}},type:"binary-expr",locations:[{start:{line:123,column:5},end:{line:123,column:16}},{start:{line:123,column:20},end:{line:123,column:46}},{start:{line:123,column:50},end:{line:123,column:58}}],line:123},"30":{loc:{start:{line:126,column:1},end:{line:135,column:2}},type:"if",locations:[{start:{line:126,column:1},end:{line:135,column:2}},{start:{line:126,column:1},end:{line:135,column:2}}],line:126},"31":{loc:{start:{line:128,column:3},end:{line:133,column:4}},type:"if",locations:[{start:{line:128,column:3},end:{line:133,column:4}},{start:{line:128,column:3},end:{line:133,column:4}}],line:128},"32":{loc:{start:{line:130,column:4},end:{line:132,column:5}},type:"if",locations:[{start:{line:130,column:4},end:{line:132,column:5}},{start:{line:130,column:4},end:{line:132,column:5}}],line:130},"33":{loc:{start:{line:138,column:1},end:{line:153,column:2}},type:"if",locations:[{start:{line:138,column:1},end:{line:153,column:2}},{start:{line:138,column:1},end:{line:153,column:2}}],line:138},"34":{loc:{start:{line:138,column:5},end:{line:138,column:93}},type:"binary-expr",locations:[{start:{line:138,column:5},end:{line:138,column:16}},{start:{line:138,column:21},end:{line:138,column:30}},{start:{line:138,column:34},end:{line:138,column:61}},{start:{line:138,column:65},end:{line:138,column:92}}],line:138},"35":{loc:{start:{line:139,column:2},end:{line:152,column:3}},type:"if",locations:[{start:{line:139,column:2},end:{line:152,column:3}},{start:{line:139,column:2},end:{line:152,column:3}}],line:139},"36":{loc:{start:{line:140,column:3},end:{line:151,column:4}},type:"if",locations:[{start:{line:140,column:3},end:{line:151,column:4}},{start:{line:140,column:3},end:{line:151,column:4}}],line:140},"37":{loc:{start:{line:141,column:10},end:{line:141,column:36}},type:"binary-expr",locations:[{start:{line:141,column:10},end:{line:141,column:18}},{start:{line:141,column:22},end:{line:141,column:36}}],line:141},"38":{loc:{start:{line:142,column:10},end:{line:151,column:4}},type:"if",locations:[{start:{line:142,column:10},end:{line:151,column:4}},{start:{line:142,column:10},end:{line:151,column:4}}],line:142},"39":{loc:{start:{line:143,column:19},end:{line:143,column:92}},type:"binary-expr",locations:[{start:{line:143,column:19},end:{line:143,column:55}},{start:{line:143,column:59},end:{line:143,column:92}}],line:143},"40":{loc:{start:{line:144,column:4},end:{line:148,column:5}},type:"if",locations:[{start:{line:144,column:4},end:{line:148,column:5}},{start:{line:144,column:4},end:{line:148,column:5}}],line:144},"41":{loc:{start:{line:147,column:11},end:{line:147,column:25}},type:"binary-expr",locations:[{start:{line:147,column:11},end:{line:147,column:19}},{start:{line:147,column:23},end:{line:147,column:25}}],line:147},"42":{loc:{start:{line:149,column:10},end:{line:151,column:4}},type:"if",locations:[{start:{line:149,column:10},end:{line:151,column:4}},{start:{line:149,column:10},end:{line:151,column:4}}],line:149},"43":{loc:{start:{line:150,column:16},end:{line:150,column:101}},type:"binary-expr",locations:[{start:{line:150,column:16},end:{line:150,column:51}},{start:{line:150,column:55},end:{line:150,column:89}},{start:{line:150,column:93},end:{line:150,column:101}}],line:150},"44":{loc:{start:{line:157,column:1},end:{line:159,column:2}},type:"if",locations:[{start:{line:157,column:1},end:{line:159,column:2}},{start:{line:157,column:1},end:{line:159,column:2}}],line:157},"45":{loc:{start:{line:157,column:5},end:{line:157,column:112}},type:"binary-expr",locations:[{start:{line:157,column:5},end:{line:157,column:16}},{start:{line:157,column:21},end:{line:157,column:30}},{start:{line:157,column:34},end:{line:157,column:58}},{start:{line:157,column:62},end:{line:157,column:81}},{start:{line:157,column:86},end:{line:157,column:112}}],line:157},"46":{loc:{start:{line:161,column:1},end:{line:167,column:2}},type:"if",locations:[{start:{line:161,column:1},end:{line:167,column:2}},{start:{line:161,column:1},end:{line:167,column:2}}],line:161},"47":{loc:{start:{line:163,column:3},end:{line:165,column:4}},type:"if",locations:[{start:{line:163,column:3},end:{line:165,column:4}},{start:{line:163,column:3},end:{line:165,column:4}}],line:163},"48":{loc:{start:{line:174,column:1},end:{line:176,column:2}},type:"if",locations:[{start:{line:174,column:1},end:{line:176,column:2}},{start:{line:174,column:1},end:{line:176,column:2}}],line:174},"49":{loc:{start:{line:174,column:5},end:{line:174,column:54}},type:"binary-expr",locations:[{start:{line:174,column:5},end:{line:174,column:16}},{start:{line:174,column:20},end:{line:174,column:54}}],line:174},"50":{loc:{start:{line:175,column:8},end:{line:175,column:22}},type:"binary-expr",locations:[{start:{line:175,column:8},end:{line:175,column:16}},{start:{line:175,column:20},end:{line:175,column:22}}],line:175},"51":{loc:{start:{line:190,column:1},end:{line:201,column:2}},type:"if",locations:[{start:{line:190,column:1},end:{line:201,column:2}},{start:{line:190,column:1},end:{line:201,column:2}}],line:190},"52":{loc:{start:{line:194,column:10},end:{line:194,column:43}},type:"cond-expr",locations:[{start:{line:194,column:18},end:{line:194,column:38}},{start:{line:194,column:41},end:{line:194,column:43}}],line:194},"53":{loc:{start:{line:197,column:8},end:{line:201,column:2}},type:"if",locations:[{start:{line:197,column:8},end:{line:201,column:2}},{start:{line:197,column:8},end:{line:201,column:2}}],line:197},"54":{loc:{start:{line:199,column:8},end:{line:201,column:2}},type:"if",locations:[{start:{line:199,column:8},end:{line:201,column:2}},{start:{line:199,column:8},end:{line:201,column:2}}],line:199},"55":{loc:{start:{line:203,column:8},end:{line:203,column:17}},type:"binary-expr",locations:[{start:{line:203,column:8},end:{line:203,column:11}},{start:{line:203,column:15},end:{line:203,column:17}}],line:203},"56":{loc:{start:{line:205,column:1},end:{line:207,column:2}},type:"if",locations:[{start:{line:205,column:1},end:{line:207,column:2}},{start:{line:205,column:1},end:{line:207,column:2}}],line:205}},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0},f:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0},b:{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0,0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0,0],"44":[0,0],"45":[0,0,0,0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0],"50":[0,0],"51":[0,0],"52":[0,0],"53":[0,0],"54":[0,0],"55":[0,0],"56":[0,0]},_coverageSchema:"43e27e138ebf9cfc5966b082cf9a028302ed4184",hash:"5101a9b8358270f08e855ff19ea691a5651f4ed4"};var coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}return coverage[path]=coverageData;}();var constants=(cov_22i8nvh4cs.s[0]++,require('./constants.js'));var atree=(cov_22i8nvh4cs.s[1]++,require('./atree.js'));var query=(cov_22i8nvh4cs.s[2]++,require('./query.js'));cov_22i8nvh4cs.s[3]++;var getPseudoContent=function(node,selector){cov_22i8nvh4cs.f[0]++;var styles=(cov_22i8nvh4cs.s[4]++,window.getComputedStyle(node,selector));var ret=(cov_22i8nvh4cs.s[5]++,styles.getPropertyValue('content'));var inline=(cov_22i8nvh4cs.s[6]++,styles.display.substr(0,6)==='inline');cov_22i8nvh4cs.s[7]++;if(!ret){cov_22i8nvh4cs.b[0][0]++;cov_22i8nvh4cs.s[8]++;return'';}else{cov_22i8nvh4cs.b[0][1]++;}cov_22i8nvh4cs.s[9]++;if(ret.substr(0,1)!=='"'){cov_22i8nvh4cs.b[1][0]++;cov_22i8nvh4cs.s[10]++;return'';}else{cov_22i8nvh4cs.b[1][1]++;cov_22i8nvh4cs.s[11]++;if(inline){cov_22i8nvh4cs.b[2][0]++;cov_22i8nvh4cs.s[12]++;return ret.slice(1,-1);}else{cov_22i8nvh4cs.b[2][1]++;cov_22i8nvh4cs.s[13]++;return' '+ret.slice(1,-1)+' ';}}};cov_22i8nvh4cs.s[14]++;var getContent=function(root,visited){cov_22i8nvh4cs.f[1]++;var children=(cov_22i8nvh4cs.s[15]++,atree.getChildNodes(root));var ret=(cov_22i8nvh4cs.s[16]++,'');cov_22i8nvh4cs.s[17]++;for(var i=(cov_22i8nvh4cs.s[18]++,0);i<children.length;i++){var node=(cov_22i8nvh4cs.s[19]++,children[i]);cov_22i8nvh4cs.s[20]++;if(node.nodeType===node.TEXT_NODE){cov_22i8nvh4cs.b[3][0]++;cov_22i8nvh4cs.s[21]++;ret+=node.textContent;}else{cov_22i8nvh4cs.b[3][1]++;cov_22i8nvh4cs.s[22]++;if(node.nodeType===node.ELEMENT_NODE){cov_22i8nvh4cs.b[4][0]++;cov_22i8nvh4cs.s[23]++;if(node.tagName.toLowerCase()==='br'){cov_22i8nvh4cs.b[5][0]++;cov_22i8nvh4cs.s[24]++;ret+='\n';}else{cov_22i8nvh4cs.b[5][1]++;cov_22i8nvh4cs.s[25]++;if((cov_22i8nvh4cs.b[7][0]++,window.getComputedStyle(node).display.substr(0,6)==='inline')&&(cov_22i8nvh4cs.b[7][1]++,node.tagName.toLowerCase()!=='input')&&(cov_22i8nvh4cs.b[7][2]++,node.tagName.toLowerCase()!=='img')){cov_22i8nvh4cs.b[6][0]++;cov_22i8nvh4cs.s[26]++;// https://github.com/w3c/accname/issues/3
   -1  1054 ret+=getName(node,true,visited);}else{cov_22i8nvh4cs.b[6][1]++;cov_22i8nvh4cs.s[27]++;ret+=' '+getName(node,true,visited)+' ';}}}else{cov_22i8nvh4cs.b[4][1]++;}}}cov_22i8nvh4cs.s[28]++;return ret;};cov_22i8nvh4cs.s[29]++;var allowNameFromContent=function(el){cov_22i8nvh4cs.f[2]++;var role=(cov_22i8nvh4cs.s[30]++,query.getRole(el));cov_22i8nvh4cs.s[31]++;return((cov_22i8nvh4cs.b[8][0]++,constants.roles[role])||(cov_22i8nvh4cs.b[8][1]++,{})).nameFromContents;};cov_22i8nvh4cs.s[32]++;var isLabelable=function(el){cov_22i8nvh4cs.f[3]++;var selector=(cov_22i8nvh4cs.s[33]++,constants.labelable.join(','));cov_22i8nvh4cs.s[34]++;return el.matches(selector);};// Control.labels is part of the standard, but not supported in most browsers
   -1  1055 cov_22i8nvh4cs.s[35]++;var getLabelNodes=function(element){cov_22i8nvh4cs.f[4]++;var labels=(cov_22i8nvh4cs.s[36]++,[]);var labelable=(cov_22i8nvh4cs.s[37]++,constants.labelable.join(','));cov_22i8nvh4cs.s[38]++;document.querySelectorAll('label').forEach(function(node){cov_22i8nvh4cs.f[5]++;cov_22i8nvh4cs.s[39]++;if(node.getAttribute('for')){cov_22i8nvh4cs.b[9][0]++;cov_22i8nvh4cs.s[40]++;if((cov_22i8nvh4cs.b[11][0]++,element.id)&&(cov_22i8nvh4cs.b[11][1]++,node.getAttribute('for')===element.id)){cov_22i8nvh4cs.b[10][0]++;cov_22i8nvh4cs.s[41]++;labels.push(node);}else{cov_22i8nvh4cs.b[10][1]++;}}else{cov_22i8nvh4cs.b[9][1]++;cov_22i8nvh4cs.s[42]++;if(node.querySelector(labelable)===element){cov_22i8nvh4cs.b[12][0]++;cov_22i8nvh4cs.s[43]++;labels.push(node);}else{cov_22i8nvh4cs.b[12][1]++;}}});cov_22i8nvh4cs.s[44]++;return labels;};cov_22i8nvh4cs.s[45]++;var isInLabelForOtherWidget=function(el){cov_22i8nvh4cs.f[6]++;var label=(cov_22i8nvh4cs.s[46]++,el.parentElement.closest('label'));var ownLabels=(cov_22i8nvh4cs.s[47]++,getLabelNodes(el));cov_22i8nvh4cs.s[48]++;return(cov_22i8nvh4cs.b[13][0]++,label)&&(cov_22i8nvh4cs.b[13][1]++,ownLabels.indexOf(label)===-1);};cov_22i8nvh4cs.s[49]++;var getName=function(el,recursive,visited,directReference){cov_22i8nvh4cs.f[7]++;var ret=(cov_22i8nvh4cs.s[50]++,'');cov_22i8nvh4cs.s[51]++;visited=(cov_22i8nvh4cs.b[14][0]++,visited)||(cov_22i8nvh4cs.b[14][1]++,[]);cov_22i8nvh4cs.s[52]++;if(visited.includes(el)){cov_22i8nvh4cs.b[15][0]++;cov_22i8nvh4cs.s[53]++;if(!directReference){cov_22i8nvh4cs.b[16][0]++;cov_22i8nvh4cs.s[54]++;return'';}else{cov_22i8nvh4cs.b[16][1]++;}}else{cov_22i8nvh4cs.b[15][1]++;cov_22i8nvh4cs.s[55]++;visited.push(el);}// A
   -1  1056 // handled in atree
   -1  1057 // B
   -1  1058 cov_22i8nvh4cs.s[56]++;if((cov_22i8nvh4cs.b[18][0]++,!recursive)&&(cov_22i8nvh4cs.b[18][1]++,el.matches('[aria-labelledby]'))){cov_22i8nvh4cs.b[17][0]++;var ids=(cov_22i8nvh4cs.s[57]++,el.getAttribute('aria-labelledby').split(/\s+/));var strings=(cov_22i8nvh4cs.s[58]++,ids.map(function(id){cov_22i8nvh4cs.f[8]++;var label=(cov_22i8nvh4cs.s[59]++,document.getElementById(id));cov_22i8nvh4cs.s[60]++;return label?(cov_22i8nvh4cs.b[19][0]++,getName(label,true,visited,true)):(cov_22i8nvh4cs.b[19][1]++,'');}));cov_22i8nvh4cs.s[61]++;ret=strings.join(' ');}else{cov_22i8nvh4cs.b[17][1]++;}// C
   -1  1059 cov_22i8nvh4cs.s[62]++;if((cov_22i8nvh4cs.b[21][0]++,!ret.trim())&&(cov_22i8nvh4cs.b[21][1]++,el.matches('[aria-label]'))){cov_22i8nvh4cs.b[20][0]++;cov_22i8nvh4cs.s[63]++;// FIXME: may skip to 2E
   -1  1060 ret=el.getAttribute('aria-label');}else{cov_22i8nvh4cs.b[20][1]++;}// D
   -1  1061 cov_22i8nvh4cs.s[64]++;if((cov_22i8nvh4cs.b[23][0]++,!ret.trim())&&(cov_22i8nvh4cs.b[23][1]++,!recursive)&&(cov_22i8nvh4cs.b[23][2]++,isLabelable(el))){cov_22i8nvh4cs.b[22][0]++;var strings=(cov_22i8nvh4cs.s[65]++,getLabelNodes(el).map(function(label){cov_22i8nvh4cs.f[9]++;cov_22i8nvh4cs.s[66]++;return getName(label,true,visited);}));cov_22i8nvh4cs.s[67]++;ret=strings.join(' ');}else{cov_22i8nvh4cs.b[22][1]++;}cov_22i8nvh4cs.s[68]++;if(!ret.trim()){cov_22i8nvh4cs.b[24][0]++;cov_22i8nvh4cs.s[69]++;ret=(cov_22i8nvh4cs.b[25][0]++,el.placeholder)||(cov_22i8nvh4cs.b[25][1]++,'');}else{cov_22i8nvh4cs.b[24][1]++;}cov_22i8nvh4cs.s[70]++;if(!ret.trim()){cov_22i8nvh4cs.b[26][0]++;cov_22i8nvh4cs.s[71]++;ret=(cov_22i8nvh4cs.b[27][0]++,el.alt)||(cov_22i8nvh4cs.b[27][1]++,'');}else{cov_22i8nvh4cs.b[26][1]++;}cov_22i8nvh4cs.s[72]++;if((cov_22i8nvh4cs.b[29][0]++,!ret.trim())&&(cov_22i8nvh4cs.b[29][1]++,el.matches('abbr,acronym'))&&(cov_22i8nvh4cs.b[29][2]++,el.title)){cov_22i8nvh4cs.b[28][0]++;cov_22i8nvh4cs.s[73]++;ret=el.title;}else{cov_22i8nvh4cs.b[28][1]++;}cov_22i8nvh4cs.s[74]++;if(!ret.trim()){cov_22i8nvh4cs.b[30][0]++;cov_22i8nvh4cs.s[75]++;for(var selector in constants.nameFromDescendant){cov_22i8nvh4cs.s[76]++;if(el.matches(selector)){cov_22i8nvh4cs.b[31][0]++;var descendant=(cov_22i8nvh4cs.s[77]++,el.querySelector(constants.nameFromDescendant[selector]));cov_22i8nvh4cs.s[78]++;if(descendant){cov_22i8nvh4cs.b[32][0]++;cov_22i8nvh4cs.s[79]++;ret=getName(descendant,true,visited);}else{cov_22i8nvh4cs.b[32][1]++;}}else{cov_22i8nvh4cs.b[31][1]++;}}}else{cov_22i8nvh4cs.b[30][1]++;}// E
   -1  1062 cov_22i8nvh4cs.s[80]++;if((cov_22i8nvh4cs.b[34][0]++,!ret.trim())&&((cov_22i8nvh4cs.b[34][1]++,recursive)||(cov_22i8nvh4cs.b[34][2]++,isInLabelForOtherWidget(el))||(cov_22i8nvh4cs.b[34][3]++,query.matches(el,'button')))){cov_22i8nvh4cs.b[33][0]++;cov_22i8nvh4cs.s[81]++;if(query.matches(el,'textbox,button,combobox,listbox,range')){cov_22i8nvh4cs.b[35][0]++;cov_22i8nvh4cs.s[82]++;if(query.matches(el,'textbox,button')){cov_22i8nvh4cs.b[36][0]++;cov_22i8nvh4cs.s[83]++;ret=(cov_22i8nvh4cs.b[37][0]++,el.value)||(cov_22i8nvh4cs.b[37][1]++,el.textContent);}else{cov_22i8nvh4cs.b[36][1]++;cov_22i8nvh4cs.s[84]++;if(query.matches(el,'combobox,listbox')){cov_22i8nvh4cs.b[38][0]++;var selected=(cov_22i8nvh4cs.s[85]++,(cov_22i8nvh4cs.b[39][0]++,query.querySelector(el,':selected'))||(cov_22i8nvh4cs.b[39][1]++,query.querySelector(el,'option')));cov_22i8nvh4cs.s[86]++;if(selected){cov_22i8nvh4cs.b[40][0]++;cov_22i8nvh4cs.s[87]++;ret=getName(selected,recursive,visited);}else{cov_22i8nvh4cs.b[40][1]++;cov_22i8nvh4cs.s[88]++;ret=(cov_22i8nvh4cs.b[41][0]++,el.value)||(cov_22i8nvh4cs.b[41][1]++,'');}}else{cov_22i8nvh4cs.b[38][1]++;cov_22i8nvh4cs.s[89]++;if(query.matches(el,'range')){cov_22i8nvh4cs.b[42][0]++;cov_22i8nvh4cs.s[90]++;ret=''+((cov_22i8nvh4cs.b[43][0]++,query.getAttribute(el,'valuetext'))||(cov_22i8nvh4cs.b[43][1]++,query.getAttribute(el,'valuenow'))||(cov_22i8nvh4cs.b[43][2]++,el.value));}else{cov_22i8nvh4cs.b[42][1]++;}}}}else{cov_22i8nvh4cs.b[35][1]++;}}else{cov_22i8nvh4cs.b[33][1]++;}// F
   -1  1063 // FIXME: menu is not mentioned in the spec
   -1  1064 cov_22i8nvh4cs.s[91]++;if((cov_22i8nvh4cs.b[45][0]++,!ret.trim())&&((cov_22i8nvh4cs.b[45][1]++,recursive)||(cov_22i8nvh4cs.b[45][2]++,allowNameFromContent(el))||(cov_22i8nvh4cs.b[45][3]++,el.closest('label')))&&(cov_22i8nvh4cs.b[45][4]++,!query.matches(el,'menu'))){cov_22i8nvh4cs.b[44][0]++;cov_22i8nvh4cs.s[92]++;ret=getContent(el,visited);}else{cov_22i8nvh4cs.b[44][1]++;}cov_22i8nvh4cs.s[93]++;if(!ret.trim()){cov_22i8nvh4cs.b[46][0]++;cov_22i8nvh4cs.s[94]++;for(var selector in constants.nameDefaults){cov_22i8nvh4cs.s[95]++;if(el.matches(selector)){cov_22i8nvh4cs.b[47][0]++;cov_22i8nvh4cs.s[96]++;ret=constants.nameDefaults[selector];}else{cov_22i8nvh4cs.b[47][1]++;}}}else{cov_22i8nvh4cs.b[46][1]++;}// G/H
   -1  1065 // handled in getContent
   -1  1066 // I
   -1  1067 // FIXME: presentation not mentioned in the spec
   -1  1068 cov_22i8nvh4cs.s[97]++;if((cov_22i8nvh4cs.b[49][0]++,!ret.trim())&&(cov_22i8nvh4cs.b[49][1]++,!query.matches(el,'presentation'))){cov_22i8nvh4cs.b[48][0]++;cov_22i8nvh4cs.s[98]++;ret=(cov_22i8nvh4cs.b[50][0]++,el.title)||(cov_22i8nvh4cs.b[50][1]++,'');}else{cov_22i8nvh4cs.b[48][1]++;}var before=(cov_22i8nvh4cs.s[99]++,getPseudoContent(el,':before'));var after=(cov_22i8nvh4cs.s[100]++,getPseudoContent(el,':after'));cov_22i8nvh4cs.s[101]++;return before+ret+after;};cov_22i8nvh4cs.s[102]++;var getNameTrimmed=function(el){cov_22i8nvh4cs.f[10]++;cov_22i8nvh4cs.s[103]++;return getName(el).replace(/\s+/g,' ').trim();};cov_22i8nvh4cs.s[104]++;var getDescription=function(el){cov_22i8nvh4cs.f[11]++;var ret=(cov_22i8nvh4cs.s[105]++,'');cov_22i8nvh4cs.s[106]++;if(el.matches('[aria-describedby]')){cov_22i8nvh4cs.b[51][0]++;var ids=(cov_22i8nvh4cs.s[107]++,el.getAttribute('aria-describedby').split(/\s+/));var strings=(cov_22i8nvh4cs.s[108]++,ids.map(function(id){cov_22i8nvh4cs.f[12]++;var label=(cov_22i8nvh4cs.s[109]++,document.getElementById(id));cov_22i8nvh4cs.s[110]++;return label?(cov_22i8nvh4cs.b[52][0]++,getName(label,true)):(cov_22i8nvh4cs.b[52][1]++,'');}));cov_22i8nvh4cs.s[111]++;ret=strings.join(' ');}else{cov_22i8nvh4cs.b[51][1]++;cov_22i8nvh4cs.s[112]++;if(el.title){cov_22i8nvh4cs.b[53][0]++;cov_22i8nvh4cs.s[113]++;ret=el.title;}else{cov_22i8nvh4cs.b[53][1]++;cov_22i8nvh4cs.s[114]++;if(el.placeholder){cov_22i8nvh4cs.b[54][0]++;cov_22i8nvh4cs.s[115]++;ret=el.placeholder;}else{cov_22i8nvh4cs.b[54][1]++;}}}cov_22i8nvh4cs.s[116]++;ret=((cov_22i8nvh4cs.b[55][0]++,ret)||(cov_22i8nvh4cs.b[55][1]++,'')).trim().replace(/\s+/g,' ');cov_22i8nvh4cs.s[117]++;if(ret===getNameTrimmed(el)){cov_22i8nvh4cs.b[56][0]++;cov_22i8nvh4cs.s[118]++;ret='';}else{cov_22i8nvh4cs.b[56][1]++;}cov_22i8nvh4cs.s[119]++;return ret;};cov_22i8nvh4cs.s[120]++;module.exports={getName:getNameTrimmed,getDescription:getDescription};
  733  1069 
  734    -1 	if (key === 'level') {
  735    -1 		for (var i = 1; i <= 6; i++) {
  736    -1 			if (el.tagName.toLowerCase() === 'h' + i) {
  737    -1 				return i;
  738    -1 			}
  739    -1 		}
  740    -1 	} else if (key === 'hidden') {
  741    -1 		if (el.clientHeight === 0) {  // rough check for performance
  742    -1 			return el.parentNode && getAttribute(el.parentNode, 'hidden', _hiddenRoot);
  743    -1 		}
  744    -1 	} else if (constants.attributeWeakMapping.hasOwnProperty(key)) {
  745    -1 		return el[constants.attributeWeakMapping[key]];
  746    -1 	}
   -1  1070 },{"./atree.js":5,"./constants.js":7,"./query.js":9}],9:[function(require,module,exports){
   -1  1071 var attrs = require('./attrs.js');
   -1  1072 var atree = require('./atree.js');
  747  1073 
  748    -1 	if (type === 'bool' || type === 'tristate') {
  749    -1 		return false;
  750    -1 	}
  751    -1 };
  752  1074 
  753  1075 var matches = function(el, selector) {
  754  1076 	var actual;
  755  1077 
  756  1078 	if (selector.substr(0, 1) === ':') {
  757  1079 		var attr = selector.substr(1);
  758    -1 		return getAttribute(el, attr);
   -1  1080 		return attrs.getAttribute(el, attr);
  759  1081 	} else if (selector.substr(0, 1) === '[') {
  760  1082 		var match = /\[([a-z]+)="(.*)"\]/.exec(selector);
  761    -1 		actual = getAttribute(el, match[1]);
   -1  1083 		actual = attrs.getAttribute(el, match[1]);
  762  1084 		var rawValue = match[2];
  763  1085 		return actual.toString() == rawValue;
  764  1086 	} else {
  765    -1 		var candidates = getSubRoles(selector.split(','));
  766    -1 		actual = _getRole(el, candidates);
  767    -1 		return candidates.indexOf(actual) !== -1;
   -1  1087 		return attrs.hasRole(el, selector.split(','));
  768  1088 	}
  769  1089 };
  770  1090 
  771  1091 var _querySelector = function(all) {
  772  1092 	return function(root, role) {
  773  1093 		var results = [];
  774    -1 		util.walkDOM(root, function(node) {
   -1  1094 		atree.walk(root, function(node) {
  775  1095 			if (node.nodeType === node.ELEMENT_NODE) {
  776  1096 				// FIXME: skip hidden elements
  777  1097 				if (matches(node, role)) {
@@ -787,54 +1107,26 @@ var _querySelector = function(all) {
  787  1107 };
  788  1108 
  789  1109 var closest = function(el, selector) {
  790    -1 	return util.searchUp(el, function(candidate) {
  791    -1 		return matches(candidate, selector);
   -1  1110 	return atree.searchUp(el, function(candidate) {
   -1  1111 		if (candidate.nodeType === candidate.ELEMENT_NODE) {
   -1  1112 			return matches(candidate, selector);
   -1  1113 		}
  792  1114 	});
  793  1115 };
  794  1116 
  795  1117 module.exports = {
  796  1118 	getRole: function(el) {
  797    -1 		return _getRole(el);
   -1  1119 		return attrs.getRole(el);
  798  1120 	},
  799    -1 	getAttribute: getAttribute,
   -1  1121 	getAttribute: attrs.getAttribute,
  800  1122 	matches: matches,
  801  1123 	querySelector: _querySelector(),
  802  1124 	querySelectorAll: _querySelector(true),
  803  1125 	closest: closest,
  804  1126 };
  805  1127 
  806    -1 },{"./constants.js":5,"./util.js":8}],8:[function(require,module,exports){
  807    -1 var walkDOM = function(root, fn) {
  808    -1 	if (fn(root) === false) {
  809    -1 		return false;
  810    -1 	}
  811    -1 	var node = root.firstChild;
  812    -1 	while (node) {
  813    -1 		if (walkDOM(node, fn) === false) {
  814    -1 			return false;
  815    -1 		}
  816    -1 		node = node.nextSibling;
  817    -1 	}
  818    -1 };
  819    -1 
  820    -1 var searchUp = function(el, test) {
  821    -1 	var candidate = el.parentElement;
  822    -1 	if (candidate) {
  823    -1 		if (test(candidate)) {
  824    -1 			return candidate;
  825    -1 		} else {
  826    -1 			return searchUp(candidate, test);
  827    -1 		}
  828    -1 	}
  829    -1 };
  830    -1 
  831    -1 module.exports = {
  832    -1 	walkDOM: walkDOM,
  833    -1 	searchUp: searchUp,
  834    -1 };
  835    -1 
  836    -1 },{}],9:[function(require,module,exports){
  837    -1 window.getAccNameVersion = "2.22";
   -1  1128 },{"./atree.js":5,"./attrs.js":6}],10:[function(require,module,exports){
   -1  1129 window.getAccNameVersion = "2.26";
  838  1130 
  839  1131 /*!
  840  1132 CalcNames: The AccName Computation Prototype, compute the Name and Description property values for a DOM node
@@ -847,11 +1139,14 @@ Distributed under the terms of the Open Source Initiative OSI - MIT License
  847  1139 */
  848  1140 
  849  1141 // AccName Computation Prototype
  850    -1 window.getAccName = calcNames = function(
   -1  1142 window.getAccName = window.calcNames = function(
  851  1143   node,
  852  1144   fnc,
  853    -1   preventVisualARIASelfCSSRef
   -1  1145   preventVisualARIASelfCSSRef,
   -1  1146   overrides
  854  1147 ) {
   -1  1148   overrides = overrides || {};
   -1  1149   var docO = overrides.document || document;
  855  1150   var props = { name: "", desc: "", error: "" };
  856  1151   try {
  857  1152     if (!node || node.nodeType !== 1) {
@@ -871,8 +1166,13 @@ window.getAccName = calcNames = function(
  871  1166       skip,
  872  1167       nodesToIgnoreValues,
  873  1168       skipAbort,
  874    -1       ownedBy
   -1  1169       ownedBy,
   -1  1170       skipTo
  875  1171     ) {
   -1  1172       skipTo = skipTo || {};
   -1  1173       skipTo.tag = skipTo.tag || false;
   -1  1174       skipTo.role = skipTo.role || false;
   -1  1175       skipTo.go = skipTo.go || false;
  876  1176       var fullResult = {
  877  1177         name: "",
  878  1178         title: ""
@@ -882,6 +1182,7 @@ window.getAccName = calcNames = function(
  882  1182   ARIA Role Exception Rule Set 1.1
  883  1183   The following Role Exception Rule Set is based on the following ARIA Working Group discussion involving all relevant browser venders.
  884  1184   https://lists.w3.org/Archives/Public/public-aria/2017Jun/0057.html
   -1  1185 Plus roles extended for the Role Parity project.
  885  1186   */
  886  1187       var isException = function(node, refNode) {
  887  1188         if (
@@ -920,8 +1221,9 @@ window.getAccName = calcNames = function(
  920  1221         }
  921  1222         // Otherwise process list2 to identify roles to ignore processing name from content.
  922  1223         else if (
  923    -1           inList(node, list2) ||
  924    -1           (node === rootNode && !inList(node, list1))
   -1  1224           (inList(node, list2) ||
   -1  1225             (node === rootNode && !inList(node, list1))) &&
   -1  1226           !skipTo.go
  925  1227         ) {
  926  1228           return true;
  927  1229         } else {
@@ -945,7 +1247,7 @@ window.getAccName = calcNames = function(
  945  1247           }
  946  1248           if (node && node === parent) {
  947  1249             return true;
  948    -1           } else if (!node || node === ownedBy.top || node === document.body) {
   -1  1250           } else if (!node || node === ownedBy.top || node === docO.body) {
  949  1251             return false;
  950  1252           }
  951  1253         }
@@ -959,16 +1261,16 @@ window.getAccName = calcNames = function(
  959  1261       };
  960  1262 
  961  1263       if (ownedBy.ref) {
  962    -1         if (isParentHidden(refNode, document.body, true, true)) {
   -1  1264         if (isParentHidden(refNode, docO.body, true, true)) {
  963  1265           // If referenced via aria-labelledby or aria-describedby, do not return a name or description if a parent node is hidden.
  964  1266           return fullResult;
  965    -1         } else if (isHidden(refNode, document.body)) {
   -1  1267         } else if (isHidden(refNode, docO.body)) {
  966  1268           // Otherwise, if aria-labelledby or aria-describedby reference a node that is explicitly hidden, then process all children regardless of their individual hidden states.
  967  1269           var ignoreHidden = true;
  968  1270         }
  969  1271       }
  970  1272 
  971    -1       if (nodes.indexOf(refNode) === -1) {
   -1  1273       if (!skipTo.tag && !skipTo.role && nodes.indexOf(refNode) === -1) {
  972  1274         // Store the before and after pseudo element 'content' values for the top level DOM node
  973  1275         // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added.
  974  1276         cssOP = getCSSText(refNode, null);
@@ -1003,11 +1305,13 @@ window.getAccName = calcNames = function(
 1003  1305           node && node.nodeType === 1 && isBlockLevelElement(node)
 1004  1306             ? true
 1005  1307             : false;
   -1  1308         var currentNode = node;
 1006  1309         var fResult = fn(node) || {};
 1007  1310         if (fResult.name && fResult.name.length) {
 1008  1311           res.name += fResult.name;
 1009  1312         }
 1010    -1         if (!isException(node, ownedBy.top, ownedBy)) {
   -1  1313         if (!fResult.skip && !isException(node, ownedBy.top)) {
   -1  1314           if (skipTo.go) skipTo.go = false;
 1011  1315           node = node.firstChild;
 1012  1316           while (node) {
 1013  1317             res.name += walkDOM(node, fn, refNode).name;
@@ -1015,12 +1319,16 @@ window.getAccName = calcNames = function(
 1015  1319           }
 1016  1320         }
 1017  1321         res.name += fResult.owns || "";
 1018    -1         if (rootNode === refNode && !trim(res.name) && trim(fResult.title)) {
   -1  1322         if (
   -1  1323           rootNode === currentNode &&
   -1  1324           !trim(res.name) &&
   -1  1325           trim(fResult.title)
   -1  1326         ) {
 1019  1327           res.name = addSpacing(fResult.title);
 1020    -1         } else if (rootNode === refNode && trim(fResult.title)) {
   -1  1328         } else if (rootNode === currentNode && trim(fResult.title)) {
 1021  1329           res.title = addSpacing(fResult.title);
 1022  1330         }
 1023    -1         if (rootNode === refNode && trim(fResult.desc)) {
   -1  1331         if (rootNode === currentNode && trim(fResult.desc)) {
 1024  1332           res.title = addSpacing(fResult.desc);
 1025  1333         }
 1026  1334         if (nodeIsBlock || fResult.isWidget) {
@@ -1039,7 +1347,8 @@ window.getAccName = calcNames = function(
 1039  1347           var result = {
 1040  1348             name: "",
 1041  1349             title: "",
 1042    -1             owns: ""
   -1  1350             owns: "",
   -1  1351             skip: false
 1043  1352           };
 1044  1353           var isEmbeddedNode =
 1045  1354             node &&
@@ -1064,7 +1373,7 @@ window.getAccName = calcNames = function(
 1064  1373             return result;
 1065  1374           }
 1066  1375 
 1067    -1           if (nodes.indexOf(node) === -1) {
   -1  1376           if (!skipTo.tag && !skipTo.role && nodes.indexOf(node) === -1) {
 1068  1377             nodes.push(node);
 1069  1378           }
 1070  1379 
@@ -1079,7 +1388,7 @@ window.getAccName = calcNames = function(
 1079  1388           };
 1080  1389 
 1081  1390           var parent = refNode === node ? node : node.parentNode;
 1082    -1           if (nodes.indexOf(parent) === -1) {
   -1  1391           if (!skipTo.tag && !skipTo.role && nodes.indexOf(parent) === -1) {
 1083  1392             nodes.push(parent);
 1084  1393             // Store the before and after pseudo element 'content' values for the current node container element
 1085  1394             // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added.
@@ -1104,12 +1413,25 @@ window.getAccName = calcNames = function(
 1104  1413 
 1105  1414           // Process standard DOM element node
 1106  1415           if (node.nodeType === 1) {
 1107    -1             var aLabelledby = node.getAttribute("aria-labelledby") || "";
 1108    -1             var aDescribedby = node.getAttribute("aria-describedby") || "";
 1109    -1             var aLabel = node.getAttribute("aria-label") || "";
 1110    -1             var nTitle = node.getAttribute("title") || "";
 1111  1416             var nTag = node.nodeName.toLowerCase();
 1112  1417             var nRole = getRole(node);
   -1  1418             var aLabelledby =
   -1  1419               (!skipTo.tag &&
   -1  1420                 !skipTo.role &&
   -1  1421                 node.getAttribute("aria-labelledby")) ||
   -1  1422               "";
   -1  1423             var aDescribedby =
   -1  1424               (!skipTo.tag &&
   -1  1425                 !skipTo.role &&
   -1  1426                 node.getAttribute("aria-describedby")) ||
   -1  1427               "";
   -1  1428             var aLabel =
   -1  1429               (!skipTo.tag &&
   -1  1430                 !skipTo.role &&
   -1  1431                 node.getAttribute("aria-label")) ||
   -1  1432               "";
   -1  1433             var nTitle =
   -1  1434               (!skipTo.tag && !skipTo.role && node.getAttribute("title")) || "";
 1113  1435 
 1114  1436             var isNativeFormField = nativeFormFields.indexOf(nTag) !== -1;
 1115  1437             var isNativeButton = ["input"].indexOf(nTag) !== -1;
@@ -1128,8 +1450,11 @@ window.getAccName = calcNames = function(
 1128  1450             result.isWidget = isNativeFormField || isWidgetRole;
 1129  1451 
 1130  1452             var hasName = false;
   -1  1453             var hasDesc = false;
 1131  1454             var aOwns = node.getAttribute("aria-owns") || "";
 1132  1455             var isSeparatChildFormField =
   -1  1456               !skipTo.tag &&
   -1  1457               !skipTo.role &&
 1133  1458               !isEmbeddedNode &&
 1134  1459               ((node !== refNode &&
 1135  1460                 (isNativeFormField || isSimulatedFormField)) ||
@@ -1140,57 +1465,311 @@ window.getAccName = calcNames = function(
 1140  1465                 ? true
 1141  1466                 : false;
 1142  1467 
 1143    -1             if (!stop && node === refNode) {
 1144    -1               // Check for non-empty value of aria-labelledby if current node equals reference node, follow each ID ref, then stop and process no deeper.
 1145    -1               if (aLabelledby) {
 1146    -1                 ids = aLabelledby.split(/\s+/);
 1147    -1                 parts = [];
 1148    -1                 for (i = 0; i < ids.length; i++) {
 1149    -1                   element = document.getElementById(ids[i]);
 1150    -1                   // Also prevent the current form field from having its value included in the naming computation if nested as a child of label
 1151    -1                   parts.push(
 1152    -1                     walk(element, true, skip, [node], element === refNode, {
   -1  1468             // Check for non-empty value of aria-describedby if current node equals reference node, follow each ID ref, then stop and process no deeper.
   -1  1469             if (
   -1  1470               !stop &&
   -1  1471               node === refNode &&
   -1  1472               !skipTo.tag &&
   -1  1473               !skipTo.role &&
   -1  1474               aDescribedby
   -1  1475             ) {
   -1  1476               var desc = "";
   -1  1477               ids = aDescribedby.split(/\s+/);
   -1  1478               parts = [];
   -1  1479               for (i = 0; i < ids.length; i++) {
   -1  1480                 element = docO.getElementById(ids[i]);
   -1  1481                 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label
   -1  1482                 parts.push(
   -1  1483                   walk(element, true, false, [node], false, {
   -1  1484                     ref: ownedBy,
   -1  1485                     top: element
   -1  1486                   }).name
   -1  1487                 );
   -1  1488               }
   -1  1489               // Check for blank value, since whitespace chars alone are not valid as a name
   -1  1490               desc = trim(parts.join(" "));
   -1  1491 
   -1  1492               if (trim(desc)) {
   -1  1493                 result.desc = desc;
   -1  1494                 hasDesc = true;
   -1  1495               }
   -1  1496             }
   -1  1497 
   -1  1498             // Check for non-empty value of aria-labelledby on current node, follow each ID ref, then stop and process no deeper.
   -1  1499             if (!stop && !skipTo.tag && !skipTo.role && aLabelledby) {
   -1  1500               ids = aLabelledby.split(/\s+/);
   -1  1501               parts = [];
   -1  1502               for (i = 0; i < ids.length; i++) {
   -1  1503                 element = docO.getElementById(ids[i]);
   -1  1504                 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label
   -1  1505                 parts.push(
   -1  1506                   walk(element, true, skip, [node], element === refNode, {
   -1  1507                     ref: ownedBy,
   -1  1508                     top: element
   -1  1509                   }).name
   -1  1510                 );
   -1  1511               }
   -1  1512               // Check for blank value, since whitespace chars alone are not valid as a name
   -1  1513               name = trim(parts.join(" "));
   -1  1514 
   -1  1515               if (trim(name)) {
   -1  1516                 hasName = true;
   -1  1517                 // Abort further recursion if name is valid.
   -1  1518                 result.skip = true;
   -1  1519               }
   -1  1520             }
   -1  1521 
   -1  1522             // Otherwise, if current node has a non-empty aria-label then set as name and process no deeper within the branch.
   -1  1523             if (
   -1  1524               !skipTo.tag &&
   -1  1525               !skipTo.role &&
   -1  1526               !hasName &&
   -1  1527               trim(aLabel) &&
   -1  1528               !isSeparatChildFormField
   -1  1529             ) {
   -1  1530               name = aLabel;
   -1  1531 
   -1  1532               // Check for blank value, since whitespace chars alone are not valid as a name
   -1  1533               if (trim(name)) {
   -1  1534                 hasName = true;
   -1  1535                 if (node === refNode) {
   -1  1536                   // If name is non-empty and both the current and refObject nodes match, then don't process any deeper within the branch.
   -1  1537                   skip = true;
   -1  1538                 }
   -1  1539               }
   -1  1540             }
   -1  1541 
   -1  1542             var rolePresentation =
   -1  1543               !skipTo.tag &&
   -1  1544               !skipTo.role &&
   -1  1545               !hasName &&
   -1  1546               nRole &&
   -1  1547               presentationRoles.indexOf(nRole) !== -1 &&
   -1  1548               !isFocusable(node) &&
   -1  1549               !hasGlobalAttr(node)
   -1  1550                 ? true
   -1  1551                 : false;
   -1  1552 
   -1  1553             // Otherwise, if the current node is not a nested widget control within the parent ref obj, but is instead a native markup element that includes a host-defined labelling mechanism, then set the name and description accordingly if present.
   -1  1554             if (!isSeparatChildFormField) {
   -1  1555               // Otherwise, if name is still empty and the current node matches the ref node and is a standard form field with a non-empty associated label element, process label with same naming computation algorithm.
   -1  1556               if (
   -1  1557                 !skipTo.tag &&
   -1  1558                 !skipTo.role &&
   -1  1559                 !hasName &&
   -1  1560                 node === refNode &&
   -1  1561                 isNativeFormField
   -1  1562               ) {
   -1  1563                 // Logic modified to match issue
   -1  1564                 // https://github.com/WhatSock/w3c-alternative-text-computation/issues/12 */
   -1  1565                 var labels = docO.querySelectorAll("label");
   -1  1566                 var implicitLabel = getParent(node, "label") || false;
   -1  1567                 var explicitLabel =
   -1  1568                   node.id &&
   -1  1569                   docO.querySelectorAll('label[for="' + node.id + '"]').length
   -1  1570                     ? docO.querySelector('label[for="' + node.id + '"]')
   -1  1571                     : false;
   -1  1572                 var implicitI = 0;
   -1  1573                 var explicitI = 0;
   -1  1574                 for (i = 0; i < labels.length; i++) {
   -1  1575                   if (labels[i] === implicitLabel) {
   -1  1576                     implicitI = i;
   -1  1577                   } else if (labels[i] === explicitLabel) {
   -1  1578                     explicitI = i;
   -1  1579                   }
   -1  1580                 }
   -1  1581                 var isImplicitFirst =
   -1  1582                   implicitLabel &&
   -1  1583                   implicitLabel.nodeType === 1 &&
   -1  1584                   explicitLabel &&
   -1  1585                   explicitLabel.nodeType === 1 &&
   -1  1586                   implicitI < explicitI
   -1  1587                     ? true
   -1  1588                     : false;
   -1  1589 
   -1  1590                 if (
   -1  1591                   explicitLabel &&
   -1  1592                   !isParentHidden(explicitLabel, docO.body, true)
   -1  1593                 ) {
   -1  1594                   var eLblName = trim(
   -1  1595                     walk(explicitLabel, true, skip, [node], false, {
 1153  1596                       ref: ownedBy,
 1154    -1                       top: element
   -1  1597                       top: explicitLabel
 1155  1598                     }).name
 1156  1599                   );
 1157  1600                 }
   -1  1601                 if (
   -1  1602                   implicitLabel &&
   -1  1603                   implicitLabel !== explicitLabel &&
   -1  1604                   !isParentHidden(implicitLabel, docO.body, true)
   -1  1605                 ) {
   -1  1606                   var iLblName = trim(
   -1  1607                     walk(implicitLabel, true, skip, [node], false, {
   -1  1608                       ref: ownedBy,
   -1  1609                       top: implicitLabel
   -1  1610                     }).name
   -1  1611                   );
   -1  1612                 }
   -1  1613 
   -1  1614                 if (iLblName && eLblName && isImplicitFirst) {
   -1  1615                   name = iLblName + " " + eLblName;
   -1  1616                 } else if (eLblName && iLblName) {
   -1  1617                   name = eLblName + " " + iLblName;
   -1  1618                 } else if (eLblName) {
   -1  1619                   name = eLblName;
   -1  1620                 } else if (iLblName) {
   -1  1621                   name = iLblName;
   -1  1622                 }
   -1  1623 
   -1  1624                 if (trim(name)) {
   -1  1625                   hasName = true;
   -1  1626                 }
   -1  1627               }
   -1  1628 
   -1  1629               // Process native form field buttons in accordance with the HTML AAM
   -1  1630               // https://w3c.github.io/html-aam/#accessible-name-and-description-computation
   -1  1631               var btnType =
   -1  1632                 (!skipTo.tag &&
   -1  1633                   !skipTo.role &&
   -1  1634                   isNativeButton &&
   -1  1635                   node.getAttribute("type")) ||
   -1  1636                 false;
   -1  1637               var btnValue =
   -1  1638                 (!skipTo.tag &&
   -1  1639                   !skipTo.role &&
   -1  1640                   btnType &&
   -1  1641                   trim(node.getAttribute("value"))) ||
   -1  1642                 false;
   -1  1643 
   -1  1644               var nAlt = rolePresentation ? "" : trim(node.getAttribute("alt"));
   -1  1645 
   -1  1646               // Otherwise, if name is still empty and current node is a standard non-presentational img or image button with a non-empty alt attribute, set alt attribute value as the accessible name.
   -1  1647               if (
   -1  1648                 !skipTo.tag &&
   -1  1649                 !skipTo.role &&
   -1  1650                 !hasName &&
   -1  1651                 !rolePresentation &&
   -1  1652                 (nTag === "img" || btnType === "image") &&
   -1  1653                 nAlt
   -1  1654               ) {
 1158  1655                 // Check for blank value, since whitespace chars alone are not valid as a name
 1159    -1                 name = trim(parts.join(" "));
   -1  1656                 name = trim(nAlt);
   -1  1657                 if (trim(name)) {
   -1  1658                   hasName = true;
   -1  1659                 }
   -1  1660               }
 1160  1661 
   -1  1662               if (
   -1  1663                 !skipTo.tag &&
   -1  1664                 !skipTo.role &&
   -1  1665                 !hasName &&
   -1  1666                 node === refNode &&
   -1  1667                 btnType &&
   -1  1668                 ["button", "image", "submit", "reset"].indexOf(btnType) !== -1
   -1  1669               ) {
   -1  1670                 if (btnValue) {
   -1  1671                   name = btnValue;
   -1  1672                 } else {
   -1  1673                   switch (btnType) {
   -1  1674                     case "submit":
   -1  1675                     case "image":
   -1  1676                       name = "Submit Query";
   -1  1677                       break;
   -1  1678                     case "reset":
   -1  1679                       name = "Reset";
   -1  1680                       break;
   -1  1681                     default:
   -1  1682                       name = "";
   -1  1683                   }
   -1  1684                 }
 1161  1685                 if (trim(name)) {
 1162  1686                   hasName = true;
 1163    -1                   // Abort further recursion if name is valid.
 1164    -1                   skip = true;
 1165  1687                 }
 1166  1688               }
 1167  1689 
 1168    -1               // Check for non-empty value of aria-describedby if current node equals reference node, follow each ID ref, then stop and process no deeper.
 1169    -1               if (aDescribedby) {
 1170    -1                 var desc = "";
 1171    -1                 ids = aDescribedby.split(/\s+/);
 1172    -1                 parts = [];
 1173    -1                 for (i = 0; i < ids.length; i++) {
 1174    -1                   element = document.getElementById(ids[i]);
 1175    -1                   // Also prevent the current form field from having its value included in the naming computation if nested as a child of label
 1176    -1                   parts.push(
 1177    -1                     walk(element, true, false, [node], false, {
   -1  1690               if (
   -1  1691                 !skipTo.tag &&
   -1  1692                 !skipTo.role &&
   -1  1693                 hasName &&
   -1  1694                 node === refNode &&
   -1  1695                 btnType &&
   -1  1696                 ["button", "submit", "reset"].indexOf(btnType) !== -1 &&
   -1  1697                 btnValue &&
   -1  1698                 btnValue !== name &&
   -1  1699                 !result.desc
   -1  1700               ) {
   -1  1701                 result.desc = btnValue;
   -1  1702                 hasDesc = true;
   -1  1703               }
   -1  1704 
   -1  1705               var isFieldset =
   -1  1706                 !skipTo.tag &&
   -1  1707                 !skipTo.role &&
   -1  1708                 !hasName &&
   -1  1709                 node === rootNode &&
   -1  1710                 (nRole === "group" || (!nRole && nTag === "fieldset"));
   -1  1711 
   -1  1712               // Otherwise, if name is still empty and the current node matches the root node and is a standard fieldset element with a non-empty associated legend element, process legend with same naming computation algorithm.
   -1  1713               // Plus do the same for role="group" with embedded role="legend", or a combination of these.
   -1  1714               if (isFieldset) {
   -1  1715                 name = trim(
   -1  1716                   walk(
   -1  1717                     node,
   -1  1718                     stop,
   -1  1719                     false,
   -1  1720                     [],
   -1  1721                     false,
   -1  1722                     {
   -1  1723                       ref: ownedBy,
   -1  1724                       top: node
   -1  1725                     },
   -1  1726                     {
   -1  1727                       tag: "legend",
   -1  1728                       role: "legend",
   -1  1729                       go: true
   -1  1730                     }
   -1  1731                   ).name
   -1  1732                 );
   -1  1733                 if (trim(name)) {
   -1  1734                   hasName = true;
   -1  1735                 }
   -1  1736                 skip = true;
   -1  1737               }
   -1  1738 
   -1  1739               // Otherwise, if name is still empty and the root node and the current node are the same and node is an svg element, then parse the content of the title element to set the name and the desc element to set the description.
   -1  1740               if (!skipTo.tag && !skipTo.role && nTag === "svg") {
   -1  1741                 var svgT = node.querySelector("title") || false;
   -1  1742                 var svgD =
   -1  1743                   (node === rootNode && node.querySelector("desc")) || false;
   -1  1744                 if (!hasName && svgT) {
   -1  1745                   name = trim(
   -1  1746                     walk(svgT, true, false, [], false, {
 1178  1747                       ref: ownedBy,
 1179    -1                       top: element
   -1  1748                       top: svgT
 1180  1749                     }).name
 1181  1750                   );
   -1  1751                   if (trim(name)) {
   -1  1752                     hasName = true;
   -1  1753                   }
 1182  1754                 }
 1183    -1                 // Check for blank value, since whitespace chars alone are not valid as a name
 1184    -1                 desc = trim(parts.join(" "));
 1185    -1 
 1186    -1                 if (trim(desc)) {
 1187    -1                   result.desc = desc;
   -1  1755                 if (!hasDesc && svgD) {
   -1  1756                   var dE = trim(
   -1  1757                     walk(svgD, true, false, [], false, {
   -1  1758                       ref: ownedBy,
   -1  1759                       top: svgD
   -1  1760                     }).name
   -1  1761                   );
   -1  1762                   if (trim(dE)) {
   -1  1763                     result.desc = dE;
   -1  1764                     hasDesc = true;
   -1  1765                   }
 1188  1766                 }
   -1  1767                 result.skip = true;
 1189  1768               }
 1190  1769             }
 1191  1770 
 1192  1771             // Otherwise, if the current node is a nested widget control within the parent ref obj, then add only its value and process no deeper within the branch.
 1193    -1             if (isSeparatChildFormField) {
   -1  1772             if (!skipTo.tag && !skipTo.role && isSeparatChildFormField) {
 1194  1773               // Prevent the referencing node from having its value included in the case of form control labels that contain the element with focus.
 1195  1774               if (
 1196  1775                 !(
@@ -1238,167 +1817,42 @@ window.getAccName = calcNames = function(
 1238  1817               }
 1239  1818             }
 1240  1819 
 1241    -1             // Otherwise, if current node has a non-empty aria-label then set as name and process no deeper within the branch.
 1242    -1             if (!hasName && trim(aLabel) && !isSeparatChildFormField) {
 1243    -1               name = aLabel;
 1244    -1 
 1245    -1               // Check for blank value, since whitespace chars alone are not valid as a name
 1246    -1               if (trim(name)) {
 1247    -1                 hasName = true;
 1248    -1                 if (node === refNode) {
 1249    -1                   // If name is non-empty and both the current and refObject nodes match, then don't process any deeper within the branch.
 1250    -1                   skip = true;
 1251    -1                 }
 1252    -1               }
 1253    -1             }
 1254    -1 
 1255    -1             // Otherwise, if name is still empty and the current node matches the ref node and is a standard form field with a non-empty associated label element, process label with same naming computation algorithm.
 1256    -1             if (!hasName && node === refNode && isNativeFormField) {
 1257    -1               // Logic modified to match issue
 1258    -1               // https://github.com/WhatSock/w3c-alternative-text-computation/issues/12 */
 1259    -1               var labels = document.querySelectorAll("label");
 1260    -1               var implicitLabel = getParent(node, "label") || false;
 1261    -1               var explicitLabel =
 1262    -1                 node.id &&
 1263    -1                 document.querySelectorAll('label[for="' + node.id + '"]').length
 1264    -1                   ? document.querySelector('label[for="' + node.id + '"]')
 1265    -1                   : false;
 1266    -1               var implicitI = 0;
 1267    -1               var explicitI = 0;
 1268    -1               for (i = 0; i < labels.length; i++) {
 1269    -1                 if (labels[i] === implicitLabel) {
 1270    -1                   implicitI = i;
 1271    -1                 } else if (labels[i] === explicitLabel) {
 1272    -1                   explicitI = i;
 1273    -1                 }
 1274    -1               }
 1275    -1               var isImplicitFirst =
 1276    -1                 implicitLabel &&
 1277    -1                 implicitLabel.nodeType === 1 &&
 1278    -1                 explicitLabel &&
 1279    -1                 explicitLabel.nodeType === 1 &&
 1280    -1                 implicitI < explicitI
 1281    -1                   ? true
 1282    -1                   : false;
 1283    -1 
 1284    -1               if (explicitLabel) {
 1285    -1                 var eLblName = trim(
 1286    -1                   walk(explicitLabel, true, skip, [node], false, {
 1287    -1                     ref: ownedBy,
 1288    -1                     top: explicitLabel
 1289    -1                   }).name
 1290    -1                 );
 1291    -1               }
 1292    -1               if (implicitLabel && implicitLabel !== explicitLabel) {
 1293    -1                 var iLblName = trim(
 1294    -1                   walk(implicitLabel, true, skip, [node], false, {
 1295    -1                     ref: ownedBy,
 1296    -1                     top: implicitLabel
 1297    -1                   }).name
 1298    -1                 );
 1299    -1               }
 1300    -1 
 1301    -1               if (iLblName && eLblName && isImplicitFirst) {
 1302    -1                 name = iLblName + " " + eLblName;
 1303    -1               } else if (eLblName && iLblName) {
 1304    -1                 name = eLblName + " " + iLblName;
 1305    -1               } else if (eLblName) {
 1306    -1                 name = eLblName;
 1307    -1               } else if (iLblName) {
 1308    -1                 name = iLblName;
 1309    -1               }
 1310    -1 
 1311    -1               if (trim(name)) {
 1312    -1                 hasName = true;
 1313    -1               }
 1314    -1             }
 1315    -1 
 1316    -1             // Process native form field buttons in accordance with the HTML AAM
 1317    -1             // https://w3c.github.io/html-aam/#accessible-name-and-description-computation
 1318    -1             var btnType =
 1319    -1               (isNativeButton && node.getAttribute("type")) || false;
 1320    -1             var btnValue =
 1321    -1               (btnType && trim(node.getAttribute("value"))) || false;
 1322    -1 
 1323    -1             var rolePresentation =
 1324    -1               !hasName &&
 1325    -1               nRole &&
 1326    -1               presentationRoles.indexOf(nRole) !== -1 &&
 1327    -1               !isFocusable(node) &&
 1328    -1               !hasGlobalAttr(node)
 1329    -1                 ? true
 1330    -1                 : false;
 1331    -1             var nAlt = rolePresentation ? "" : trim(node.getAttribute("alt"));
 1332    -1 
 1333    -1             // Otherwise, if name is still empty and current node is a standard non-presentational img or image button with a non-empty alt attribute, set alt attribute value as the accessible name.
   -1  1820             // Otherwise, if current node is the same as rootNode and is non-presentational and includes a non-empty title attribute, store title attribute value as the accessible name if name is still empty, or the description if not.
   -1  1821             // Processing for this is handled within the walkDOM function.
 1334  1822             if (
 1335    -1               !hasName &&
   -1  1823               !skipTo.tag &&
   -1  1824               !skipTo.role &&
 1336  1825               !rolePresentation &&
 1337    -1               (nTag === "img" || btnType === "image") &&
 1338    -1               nAlt
   -1  1826               trim(nTitle)
 1339  1827             ) {
 1340    -1               // Check for blank value, since whitespace chars alone are not valid as a name
 1341    -1               name = trim(nAlt);
 1342    -1               if (trim(name)) {
 1343    -1                 hasName = true;
 1344    -1               }
   -1  1828               result.title = trim(nTitle);
 1345  1829             }
 1346  1830 
 1347    -1             if (
 1348    -1               !hasName &&
 1349    -1               node === refNode &&
 1350    -1               btnType &&
 1351    -1               ["button", "image", "submit", "reset"].indexOf(btnType) !== -1
 1352    -1             ) {
 1353    -1               if (btnValue) {
 1354    -1                 name = btnValue;
 1355    -1               } else {
 1356    -1                 switch (btnType) {
 1357    -1                   case "submit":
 1358    -1                   case "image":
 1359    -1                     name = "Submit Query";
 1360    -1                     break;
 1361    -1                   case "reset":
 1362    -1                     name = "Reset";
 1363    -1                     break;
 1364    -1                   default:
 1365    -1                     name = "";
 1366    -1                 }
 1367    -1               }
   -1  1831             var isSkipTo =
   -1  1832               (skipTo.role && skipTo.role === nRole) ||
   -1  1833               (!nRole && skipTo.tag && skipTo.tag === nTag);
   -1  1834 
   -1  1835             // Process custom tag and role searches such as fieldset directing AccName to the first legend.
   -1  1836             if (isSkipTo) {
   -1  1837               name = trim(
   -1  1838                 walk(node, stop, false, [], false, {
   -1  1839                   ref: ownedBy,
   -1  1840                   top: node
   -1  1841                 }).name
   -1  1842               );
 1368  1843               if (trim(name)) {
 1369  1844                 hasName = true;
   -1  1845                 skip = true;
 1370  1846               }
 1371  1847             }
 1372  1848 
 1373    -1             if (
 1374    -1               hasName &&
 1375    -1               node === refNode &&
 1376    -1               btnType &&
 1377    -1               ["button", "submit", "reset"].indexOf(btnType) !== -1 &&
 1378    -1               btnValue &&
 1379    -1               btnValue !== name &&
 1380    -1               !result.desc
 1381    -1             ) {
 1382    -1               result.desc = btnValue;
 1383    -1             }
 1384    -1 
 1385    -1             // Otherwise, if current node is the same as rootNode and is non-presentational and includes a non-empty title attribute and is not a separate embedded form field, store title attribute value as the accessible name if name is still empty, or the description if not.
 1386    -1             if (
 1387    -1               node === rootNode &&
 1388    -1               !rolePresentation &&
 1389    -1               trim(nTitle) &&
 1390    -1               !isSeparatChildFormField
 1391    -1             ) {
 1392    -1               result.title = trim(nTitle);
 1393    -1             }
 1394    -1 
 1395  1849             // Check for non-empty value of aria-owns, follow each ID ref, then process with same naming computation.
 1396  1850             // Also abort aria-owns processing if contained on an element that does not support child elements.
 1397    -1             if (aOwns && !isNativeFormField && nTag !== "img") {
   -1  1851             if (!isSkipTo && aOwns && !isNativeFormField && nTag !== "img") {
 1398  1852               ids = aOwns.split(/\s+/);
 1399  1853               parts = [];
 1400  1854               for (i = 0; i < ids.length; i++) {
 1401    -1                 element = document.getElementById(ids[i]);
   -1  1855                 element = docO.getElementById(ids[i]);
 1402  1856                 // Abort processing if the referenced node has already been traversed
 1403  1857                 if (element && owns.indexOf(ids[i]) === -1) {
 1404  1858                   owns.push(ids[i]);
@@ -1408,7 +1862,7 @@ window.getAccName = calcNames = function(
 1408  1862                     node: node,
 1409  1863                     target: element
 1410  1864                   };
 1411    -1                   if (!isParentHidden(element, document.body, true)) {
   -1  1865                   if (!isParentHidden(element, docO.body, true)) {
 1412  1866                     parts.push(walk(element, true, skip, [], false, oBy).name);
 1413  1867                   }
 1414  1868                 }
@@ -1419,7 +1873,7 @@ window.getAccName = calcNames = function(
 1419  1873           }
 1420  1874 
 1421  1875           // Otherwise, process text node
 1422    -1           else if (node.nodeType === 3) {
   -1  1876           else if (!skipTo.tag && !skipTo.role && node.nodeType === 3) {
 1423  1877             name = node.data;
 1424  1878           }
 1425  1879 
@@ -1462,6 +1916,7 @@ window.getAccName = calcNames = function(
 1462  1916           inList(list1) ||
 1463  1917           inList(list2) ||
 1464  1918           inList(list3) ||
   -1  1919           inList(list4) ||
 1465  1920           presentationRoles.indexOf(role) !== -1
 1466  1921         ) {
 1467  1922           return role;
@@ -1535,6 +1990,7 @@ window.getAccName = calcNames = function(
 1535  1990     };
 1536  1991     // Never include name from content when current node matches list2
 1537  1992     // The rowgroup role was added to prevent 'name from content' in accordance with relevant ARIA 1.1 spec changes.
   -1  1993     // The fieldset element and group role was added to account for implicit mappings where name from content is not supported.
 1538  1994     var list2 = {
 1539  1995       roles: [
 1540  1996         "application",
@@ -1573,7 +2029,8 @@ window.getAccName = calcNames = function(
 1573  2029         "tree",
 1574  2030         "treegrid",
 1575  2031         "separator",
 1576    -1         "rowgroup"
   -1  2032         "rowgroup",
   -1  2033         "group"
 1577  2034       ],
 1578  2035       tags: [
 1579  2036         "article",
@@ -1598,7 +2055,8 @@ window.getAccName = calcNames = function(
 1598  2055         "section",
 1599  2056         "thead",
 1600  2057         "tbody",
 1601    -1         "tfoot"
   -1  2058         "tfoot",
   -1  2059         "fieldset"
 1602  2060       ]
 1603  2061     };
 1604  2062     // As an override of list2, conditionally include name from content if current node is focusable, or if the current node matches list3 while the referenced parent node (root node) matches list1.
@@ -1608,7 +2066,6 @@ window.getAccName = calcNames = function(
 1608  2066         "definition",
 1609  2067         "directory",
 1610  2068         "list",
 1611    -1         "group",
 1612  2069         "note",
 1613  2070         "status",
 1614  2071         "table",
@@ -1616,6 +2073,12 @@ window.getAccName = calcNames = function(
 1616  2073       ],
 1617  2074       tags: ["dl", "ul", "ol", "dd", "details", "output", "table"]
 1618  2075     };
   -1  2076     // Subsequent roles added as part of the Role Parity project for ARIA 1.2.
   -1  2077     // Tracks roles that don't specifically belong within the prior process lists.
   -1  2078     var list4 = {
   -1  2079       roles: ["legend"],
   -1  2080       tags: ["legend"]
   -1  2081     };
 1619  2082 
 1620  2083     var nativeFormFields = ["button", "input", "select", "textarea"];
 1621  2084     var rangeWidgetRoles = ["scrollbar", "slider", "spinbutton"];
@@ -1641,10 +2104,12 @@ window.getAccName = calcNames = function(
 1641  2104 
 1642  2105     var hasGlobalAttr = function(node) {
 1643  2106       var globalPropsAndStates = [
   -1  2107         "labelledby",
   -1  2108         "label",
   -1  2109         "describedby",
 1644  2110         "busy",
 1645  2111         "controls",
 1646  2112         "current",
 1647    -1         "describedby",
 1648  2113         "details",
 1649  2114         "disabled",
 1650  2115         "dropeffect",
@@ -1667,25 +2132,27 @@ window.getAccName = calcNames = function(
 1667  2132       return false;
 1668  2133     };
 1669  2134 
 1670    -1     var isHidden = function(node, refNode) {
 1671    -1       var hidden = function(node) {
 1672    -1         if (!node || node.nodeType !== 1 || node === refNode) {
   -1  2135     var isHidden =
   -1  2136       overrides.isHidden ||
   -1  2137       function(node, refNode) {
   -1  2138         var hidden = function(node) {
   -1  2139           if (!node || node.nodeType !== 1 || node === refNode) {
   -1  2140             return false;
   -1  2141           }
   -1  2142           if (node.getAttribute("aria-hidden") === "true") {
   -1  2143             return true;
   -1  2144           }
   -1  2145           if (node.getAttribute("hidden")) {
   -1  2146             return true;
   -1  2147           }
   -1  2148           var style = getStyleObject(node);
   -1  2149           if (style["display"] === "none" || style["visibility"] === "hidden") {
   -1  2150             return true;
   -1  2151           }
 1673  2152           return false;
 1674    -1         }
 1675    -1         if (node.getAttribute("aria-hidden") === "true") {
 1676    -1           return true;
 1677    -1         }
 1678    -1         if (node.getAttribute("hidden")) {
 1679    -1           return true;
 1680    -1         }
 1681    -1         var style = getStyleObject(node);
 1682    -1         if (style["display"] === "none" || style["visibility"] === "hidden") {
 1683    -1           return true;
 1684    -1         }
 1685    -1         return false;
   -1  2153         };
   -1  2154         return hidden(node);
 1686  2155       };
 1687    -1       return hidden(node);
 1688    -1     };
 1689  2156 
 1690  2157     var isParentHidden = function(node, refNode, skipOwned, skipCurrent) {
 1691  2158       while (node && node !== refNode) {
@@ -1697,15 +2164,17 @@ window.getAccName = calcNames = function(
 1697  2164       return false;
 1698  2165     };
 1699  2166 
 1700    -1     var getStyleObject = function(node) {
 1701    -1       var style = {};
 1702    -1       if (document.defaultView && document.defaultView.getComputedStyle) {
 1703    -1         style = document.defaultView.getComputedStyle(node, "");
 1704    -1       } else if (node.currentStyle) {
 1705    -1         style = node.currentStyle;
 1706    -1       }
 1707    -1       return style;
 1708    -1     };
   -1  2167     var getStyleObject =
   -1  2168       overrides.getStyleObject ||
   -1  2169       function(node) {
   -1  2170         var style = {};
   -1  2171         if (docO.defaultView && docO.defaultView.getComputedStyle) {
   -1  2172           style = docO.defaultView.getComputedStyle(node, "");
   -1  2173         } else if (node.currentStyle) {
   -1  2174           style = node.currentStyle;
   -1  2175         }
   -1  2176         return style;
   -1  2177       };
 1709  2178 
 1710  2179     var cleanCSSText = function(node, text) {
 1711  2180       var s = text;
@@ -1894,19 +2363,21 @@ window.getAccName = calcNames = function(
 1894  2363       return parts.join(" ");
 1895  2364     };
 1896  2365 
 1897    -1     var getPseudoElStyleObj = function(node, position) {
 1898    -1       var styleObj = {};
 1899    -1       for (var prop in blockStyles) {
 1900    -1         styleObj[prop] = document.defaultView
   -1  2366     var getPseudoElStyleObj =
   -1  2367       overrides.getPseudoElStyleObj ||
   -1  2368       function(node, position) {
   -1  2369         var styleObj = {};
   -1  2370         for (var prop in blockStyles) {
   -1  2371           styleObj[prop] = docO.defaultView
   -1  2372             .getComputedStyle(node, position)
   -1  2373             .getPropertyValue(prop);
   -1  2374         }
   -1  2375         styleObj["content"] = docO.defaultView
 1901  2376           .getComputedStyle(node, position)
 1902    -1           .getPropertyValue(prop);
 1903    -1       }
 1904    -1       styleObj["content"] = document.defaultView
 1905    -1         .getComputedStyle(node, position)
 1906    -1         .getPropertyValue("content")
 1907    -1         .replace(/^"|\\|"$/g, "");
 1908    -1       return styleObj;
 1909    -1     };
   -1  2377           .getPropertyValue("content")
   -1  2378           .replace(/^"|\\|"$/g, "");
   -1  2379         return styleObj;
   -1  2380       };
 1910  2381 
 1911  2382     var getText = function(node, position) {
 1912  2383       if (!position && node.nodeType === 1) {
@@ -1927,30 +2398,40 @@ window.getAccName = calcNames = function(
 1927  2398       return text;
 1928  2399     };
 1929  2400 
 1930    -1     var getCSSText = function(node, refNode) {
 1931    -1       if (
 1932    -1         (node && node.nodeType !== 1) ||
 1933    -1         node === refNode ||
 1934    -1         ["input", "select", "textarea", "img", "iframe"].indexOf(
 1935    -1           node.nodeName.toLowerCase()
 1936    -1         ) !== -1
 1937    -1       ) {
 1938    -1         return { before: "", after: "" };
 1939    -1       }
 1940    -1       if (document.defaultView && document.defaultView.getComputedStyle) {
 1941    -1         return {
 1942    -1           before: cleanCSSText(node, getText(node, ":before")),
 1943    -1           after: cleanCSSText(node, getText(node, ":after"))
 1944    -1         };
 1945    -1       } else {
 1946    -1         return { before: "", after: "" };
 1947    -1       }
 1948    -1     };
   -1  2401     var getCSSText =
   -1  2402       overrides.getCSSText ||
   -1  2403       function(node, refNode) {
   -1  2404         if (
   -1  2405           (node && node.nodeType !== 1) ||
   -1  2406           node === refNode ||
   -1  2407           ["input", "select", "textarea", "img", "iframe"].indexOf(
   -1  2408             node.nodeName.toLowerCase()
   -1  2409           ) !== -1
   -1  2410         ) {
   -1  2411           return { before: "", after: "" };
   -1  2412         }
   -1  2413         if (docO.defaultView && docO.defaultView.getComputedStyle) {
   -1  2414           return {
   -1  2415             before: cleanCSSText(node, getText(node, ":before")),
   -1  2416             after: cleanCSSText(node, getText(node, ":after"))
   -1  2417           };
   -1  2418         } else {
   -1  2419           return { before: "", after: "" };
   -1  2420         }
   -1  2421       };
 1949  2422 
 1950    -1     var getParent = function(node, nTag) {
   -1  2423     var getParent = function(node, nTag, nRole, noRole) {
   -1  2424       var noRole = noRole ? true : false;
 1951  2425       while (node) {
 1952  2426         node = node.parentNode;
 1953    -1         if (node && node.nodeName && node.nodeName.toLowerCase() === nTag) {
   -1  2427         if (
   -1  2428           node &&
   -1  2429           ((nRole && getRole(node) === nRole) ||
   -1  2430             (nTag &&
   -1  2431               node.nodeName &&
   -1  2432               node.nodeName.toLowerCase() === nTag &&
   -1  2433               (!noRole || getRole(node).length < 1)))
   -1  2434         ) {
 1954  2435           return node;
 1955  2436         }
 1956  2437       }
@@ -1996,7 +2477,7 @@ window.getAccName = calcNames = function(
 1996  2477       return str.replace(/^\s+|\s+$/g, "");
 1997  2478     };
 1998  2479 
 1999    -1     if (isParentHidden(node, document.body, true)) {
   -1  2480     if (isParentHidden(node, docO.body, true)) {
 2000  2481       return props;
 2001  2482     }
 2002  2483 
@@ -2030,8 +2511,8 @@ window.getAccName = calcNames = function(
 2030  2511 
 2031  2512 // Customize returned string for testable statements
 2032  2513 
 2033    -1 window.getAccNameMsg = getNames = function(node) {
 2034    -1   var props = calcNames(node);
   -1  2514 window.getAccNameMsg = window.getNames = function(node, overrides) {
   -1  2515   var props = window.getAccName(node, null, false, overrides);
 2035  2516   if (props.error) {
 2036  2517     return (
 2037  2518       props.error +
@@ -2056,8 +2537,8 @@ window.getAccNameMsg = getNames = function(node) {
 2056  2537 
 2057  2538 if (typeof module === "object" && module.exports) {
 2058  2539   module.exports = {
 2059    -1     getNames: getNames,
 2060    -1     calcNames: calcNames
   -1  2540     getNames: window.getNames,
   -1  2541     calcNames: window.calcNames
 2061  2542   };
 2062  2543 }
 2063  2544 

diff --git a/package.json b/package.json

@@ -6,7 +6,7 @@
    6     6     "accessibility-developer-tools": "^2.12.0",
    7     7     "aria-api": "^0.3.0",
    8     8     "axe-core": "^3.2.2",
    9    -1     "nyc": "^13.3.0",
   -1     9     "nyc": "^14.1.1",
   10    10     "w3c-alternative-text-computation": "github:accdc/w3c-alternative-text-computation"
   11    11   },
   12    12   "repository": {

diff --git a/src/babel.js b/src/babel.js

@@ -16,14 +16,14 @@ var ex = function(fn, args, _this) {
   16    16 };
   17    17 
   18    18 var implementations = {
   19    -1 	'aria-api (0.2.7)': function(el) {
   -1    19 	'aria-api (0.3.0)': function(el) {
   20    20 		return {
   21    21 			name: ex(ariaApi.getName, [el]),
   22    22 			desc: ex(ariaApi.getDescription, [el]),
   23    23 			role: ex(ariaApi.getRole, [el]),
   24    24 		};
   25    25 	},
   26    -1 	'accdc (2.22)': accdc.calcNames,
   -1    26 	'accdc (2.26)': accdc.calcNames,
   27    27 	'axe (3.2.2)': function(el) {
   28    28 		return {
   29    29 			name: ex(function(el) {