source: frontend/node_modules/axe-core/axe.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.2 MB
Line 
1/*! axe v4.11.4
2 * Copyright (c) 2015 - 2026 Deque Systems, Inc.
3 *
4 * Your use of this Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 *
8 * This entire copyright notice must appear in every copy of this file you
9 * distribute or in any file that contains substantial portions of this source
10 * code.
11 */
12(function axeFunction(window) {
13 var global = window;
14 var document = window.document;
15 'use strict';
16 function _typeof(o) {
17 '@babel/helpers - typeof';
18 return _typeof = 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator ? function(o) {
19 return typeof o;
20 } : function(o) {
21 return o && 'function' == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? 'symbol' : typeof o;
22 }, _typeof(o);
23 }
24 var axe = axe || {};
25 axe.version = '4.11.4';
26 if (typeof define === 'function' && define.amd) {
27 define('axe-core', [], function() {
28 return axe;
29 });
30 }
31 if ((typeof module === 'undefined' ? 'undefined' : _typeof(module)) === 'object' && module.exports && typeof axeFunction.toString === 'function') {
32 axe.source = '(' + axeFunction.toString() + ')(typeof window === "object" ? window : this);';
33 module.exports = axe;
34 }
35 if (typeof window.getComputedStyle === 'function') {
36 window.axe = axe;
37 }
38 var commons;
39 'use strict';
40 var _excluded = [ 'precision', 'format', 'inGamut' ], _excluded2 = [ 'space' ], _excluded3 = [ 'algorithm' ], _excluded4 = [ 'method' ], _excluded5 = [ 'maxDeltaE', 'deltaEMethod', 'steps', 'maxSteps' ], _excluded6 = [ 'node' ], _excluded7 = [ 'relatedNodes' ], _excluded8 = [ 'node' ], _excluded9 = [ 'variant' ], _excluded0 = [ 'matches' ], _excluded1 = [ 'chromium' ], _excluded10 = [ 'noImplicit' ], _excluded11 = [ 'noPresentational' ], _excluded12 = [ 'node' ], _excluded13 = [ 'environmentData' ], _excluded14 = [ 'environmentData' ], _excluded15 = [ 'environmentData' ], _excluded16 = [ 'environmentData' ], _excluded17 = [ 'environmentData' ];
41 function _toArray(r) {
42 return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest();
43 }
44 function _wrapNativeSuper(t) {
45 var r = 'function' == typeof Map ? new Map() : void 0;
46 return _wrapNativeSuper = function _wrapNativeSuper(t) {
47 if (null === t || !_isNativeFunction(t)) {
48 return t;
49 }
50 if ('function' != typeof t) {
51 throw new TypeError('Super expression must either be null or a function');
52 }
53 if (void 0 !== r) {
54 if (r.has(t)) {
55 return r.get(t);
56 }
57 r.set(t, Wrapper);
58 }
59 function Wrapper() {
60 return _construct(t, arguments, _getPrototypeOf(this).constructor);
61 }
62 return Wrapper.prototype = Object.create(t.prototype, {
63 constructor: {
64 value: Wrapper,
65 enumerable: !1,
66 writable: !0,
67 configurable: !0
68 }
69 }), _setPrototypeOf(Wrapper, t);
70 }, _wrapNativeSuper(t);
71 }
72 function _isNativeFunction(t) {
73 try {
74 return -1 !== Function.toString.call(t).indexOf('[native code]');
75 } catch (n) {
76 return 'function' == typeof t;
77 }
78 }
79 function _defineProperty(e, r, t) {
80 return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
81 value: t,
82 enumerable: !0,
83 configurable: !0,
84 writable: !0
85 }) : e[r] = t, e;
86 }
87 function _construct(t, e, r) {
88 if (_isNativeReflectConstruct()) {
89 return Reflect.construct.apply(null, arguments);
90 }
91 var o = [ null ];
92 o.push.apply(o, e);
93 var p = new (t.bind.apply(t, o))();
94 return r && _setPrototypeOf(p, r.prototype), p;
95 }
96 function _objectWithoutProperties(e, t) {
97 if (null == e) {
98 return {};
99 }
100 var o, r, i = _objectWithoutPropertiesLoose(e, t);
101 if (Object.getOwnPropertySymbols) {
102 var n = Object.getOwnPropertySymbols(e);
103 for (r = 0; r < n.length; r++) {
104 o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
105 }
106 }
107 return i;
108 }
109 function _objectWithoutPropertiesLoose(r, e) {
110 if (null == r) {
111 return {};
112 }
113 var t = {};
114 for (var n in r) {
115 if ({}.hasOwnProperty.call(r, n)) {
116 if (-1 !== e.indexOf(n)) {
117 continue;
118 }
119 t[n] = r[n];
120 }
121 }
122 return t;
123 }
124 function _callSuper(t, o, e) {
125 return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
126 }
127 function _possibleConstructorReturn(t, e) {
128 if (e && ('object' == _typeof(e) || 'function' == typeof e)) {
129 return e;
130 }
131 if (void 0 !== e) {
132 throw new TypeError('Derived constructors may only return object or undefined');
133 }
134 return _assertThisInitialized(t);
135 }
136 function _assertThisInitialized(e) {
137 if (void 0 === e) {
138 throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');
139 }
140 return e;
141 }
142 function _isNativeReflectConstruct() {
143 try {
144 var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
145 } catch (t) {}
146 return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
147 return !!t;
148 })();
149 }
150 function _getPrototypeOf(t) {
151 return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
152 return t.__proto__ || Object.getPrototypeOf(t);
153 }, _getPrototypeOf(t);
154 }
155 function _inherits(t, e) {
156 if ('function' != typeof e && null !== e) {
157 throw new TypeError('Super expression must either be null or a function');
158 }
159 t.prototype = Object.create(e && e.prototype, {
160 constructor: {
161 value: t,
162 writable: !0,
163 configurable: !0
164 }
165 }), Object.defineProperty(t, 'prototype', {
166 writable: !1
167 }), e && _setPrototypeOf(t, e);
168 }
169 function _setPrototypeOf(t, e) {
170 return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
171 return t.__proto__ = e, t;
172 }, _setPrototypeOf(t, e);
173 }
174 function _extends() {
175 return _extends = Object.assign ? Object.assign.bind() : function(n) {
176 for (var e = 1; e < arguments.length; e++) {
177 var t = arguments[e];
178 for (var r in t) {
179 ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
180 }
181 }
182 return n;
183 }, _extends.apply(null, arguments);
184 }
185 function _toConsumableArray(r) {
186 return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
187 }
188 function _nonIterableSpread() {
189 throw new TypeError('Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
190 }
191 function _iterableToArray(r) {
192 if ('undefined' != typeof Symbol && null != r[Symbol.iterator] || null != r['@@iterator']) {
193 return Array.from(r);
194 }
195 }
196 function _arrayWithoutHoles(r) {
197 if (Array.isArray(r)) {
198 return _arrayLikeToArray(r);
199 }
200 }
201 function _classPrivateFieldInitSpec(e, t, a) {
202 _checkPrivateRedeclaration(e, t), t.set(e, a);
203 }
204 function _classPrivateMethodInitSpec(e, a) {
205 _checkPrivateRedeclaration(e, a), a.add(e);
206 }
207 function _checkPrivateRedeclaration(e, t) {
208 if (t.has(e)) {
209 throw new TypeError('Cannot initialize the same private elements twice on an object');
210 }
211 }
212 function _classPrivateFieldGet(s, a) {
213 return s.get(_assertClassBrand(s, a));
214 }
215 function _classPrivateFieldSet(s, a, r) {
216 return s.set(_assertClassBrand(s, a), r), r;
217 }
218 function _assertClassBrand(e, t, n) {
219 if ('function' == typeof e ? e === t : e.has(t)) {
220 return arguments.length < 3 ? t : n;
221 }
222 throw new TypeError('Private element is not present on this object');
223 }
224 function _slicedToArray(r, e) {
225 return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
226 }
227 function _nonIterableRest() {
228 throw new TypeError('Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
229 }
230 function _iterableToArrayLimit(r, l) {
231 var t = null == r ? null : 'undefined' != typeof Symbol && r[Symbol.iterator] || r['@@iterator'];
232 if (null != t) {
233 var e, n, i, u, a = [], f = !0, o = !1;
234 try {
235 if (i = (t = t.call(r)).next, 0 === l) {
236 if (Object(t) !== t) {
237 return;
238 }
239 f = !1;
240 } else {
241 for (;!(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) {}
242 }
243 } catch (r) {
244 o = !0, n = r;
245 } finally {
246 try {
247 if (!f && null != t['return'] && (u = t['return'](), Object(u) !== u)) {
248 return;
249 }
250 } finally {
251 if (o) {
252 throw n;
253 }
254 }
255 }
256 return a;
257 }
258 }
259 function _arrayWithHoles(r) {
260 if (Array.isArray(r)) {
261 return r;
262 }
263 }
264 function _classCallCheck(a, n) {
265 if (!(a instanceof n)) {
266 throw new TypeError('Cannot call a class as a function');
267 }
268 }
269 function _defineProperties(e, r) {
270 for (var t = 0; t < r.length; t++) {
271 var o = r[t];
272 o.enumerable = o.enumerable || !1, o.configurable = !0, 'value' in o && (o.writable = !0),
273 Object.defineProperty(e, _toPropertyKey(o.key), o);
274 }
275 }
276 function _createClass(e, r, t) {
277 return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t),
278 Object.defineProperty(e, 'prototype', {
279 writable: !1
280 }), e;
281 }
282 function _toPropertyKey(t) {
283 var i = _toPrimitive(t, 'string');
284 return 'symbol' == _typeof(i) ? i : i + '';
285 }
286 function _toPrimitive(t, r) {
287 if ('object' != _typeof(t) || !t) {
288 return t;
289 }
290 var e = t[Symbol.toPrimitive];
291 if (void 0 !== e) {
292 var i = e.call(t, r || 'default');
293 if ('object' != _typeof(i)) {
294 return i;
295 }
296 throw new TypeError('@@toPrimitive must return a primitive value.');
297 }
298 return ('string' === r ? String : Number)(t);
299 }
300 function _createForOfIteratorHelper(r, e) {
301 var t = 'undefined' != typeof Symbol && r[Symbol.iterator] || r['@@iterator'];
302 if (!t) {
303 if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && 'number' == typeof r.length) {
304 t && (r = t);
305 var _n = 0, F = function F() {};
306 return {
307 s: F,
308 n: function n() {
309 return _n >= r.length ? {
310 done: !0
311 } : {
312 done: !1,
313 value: r[_n++]
314 };
315 },
316 e: function e(r) {
317 throw r;
318 },
319 f: F
320 };
321 }
322 throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
323 }
324 var o, a = !0, u = !1;
325 return {
326 s: function s() {
327 t = t.call(r);
328 },
329 n: function n() {
330 var r = t.next();
331 return a = r.done, r;
332 },
333 e: function e(r) {
334 u = !0, o = r;
335 },
336 f: function f() {
337 try {
338 a || null == t['return'] || t['return']();
339 } finally {
340 if (u) {
341 throw o;
342 }
343 }
344 }
345 };
346 }
347 function _unsupportedIterableToArray(r, a) {
348 if (r) {
349 if ('string' == typeof r) {
350 return _arrayLikeToArray(r, a);
351 }
352 var t = {}.toString.call(r).slice(8, -1);
353 return 'Object' === t && r.constructor && (t = r.constructor.name), 'Map' === t || 'Set' === t ? Array.from(r) : 'Arguments' === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
354 }
355 }
356 function _arrayLikeToArray(r, a) {
357 (null == a || a > r.length) && (a = r.length);
358 for (var e = 0, n = Array(a); e < a; e++) {
359 n[e] = r[e];
360 }
361 return n;
362 }
363 function _typeof(o) {
364 '@babel/helpers - typeof';
365 return _typeof = 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator ? function(o) {
366 return typeof o;
367 } : function(o) {
368 return o && 'function' == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? 'symbol' : typeof o;
369 }, _typeof(o);
370 }
371 (function(_Class_brand, _path, _CSS, _space, _r, _g, _b, _red, _green, _blue, _Class3_brand) {
372 var __create = Object.create;
373 var __defProp = Object.defineProperty;
374 var __getProtoOf = Object.getPrototypeOf;
375 var __hasOwnProp = Object.prototype.hasOwnProperty;
376 var __getOwnPropNames = Object.getOwnPropertyNames;
377 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
378 var __defNormalProp = function __defNormalProp(obj, key, value) {
379 return key in obj ? __defProp(obj, key, {
380 enumerable: true,
381 configurable: true,
382 writable: true,
383 value: value
384 }) : obj[key] = value;
385 };
386 var __markAsModule = function __markAsModule(target) {
387 return __defProp(target, '__esModule', {
388 value: true
389 });
390 };
391 var __commonJS = function __commonJS(cb, mod) {
392 return function() {
393 return mod || cb((mod = {
394 exports: {}
395 }).exports, mod), mod.exports;
396 };
397 };
398 var __export = function __export(target, all) {
399 for (var name in all) {
400 __defProp(target, name, {
401 get: all[name],
402 enumerable: true
403 });
404 }
405 };
406 var __exportStar = function __exportStar(target, module, desc) {
407 if (module && _typeof(module) === 'object' || typeof module === 'function') {
408 var _iterator = _createForOfIteratorHelper(__getOwnPropNames(module)), _step;
409 try {
410 var _loop = function _loop() {
411 var key = _step.value;
412 if (!__hasOwnProp.call(target, key) && key !== 'default') {
413 __defProp(target, key, {
414 get: function get() {
415 return module[key];
416 },
417 enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable
418 });
419 }
420 };
421 for (_iterator.s(); !(_step = _iterator.n()).done; ) {
422 _loop();
423 }
424 } catch (err) {
425 _iterator.e(err);
426 } finally {
427 _iterator.f();
428 }
429 }
430 return target;
431 };
432 var __toModule = function __toModule(module) {
433 return __exportStar(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, 'default', module && module.__esModule && 'default' in module ? {
434 get: function get() {
435 return module['default'];
436 },
437 enumerable: true
438 } : {
439 value: module,
440 enumerable: true
441 })), module);
442 };
443 var __publicField = function __publicField(obj, key, value) {
444 __defNormalProp(obj, _typeof(key) !== 'symbol' ? key + '' : key, value);
445 return value;
446 };
447 var require_es6_promise = __commonJS(function(exports, module) {
448 (function(global2, factory) {
449 _typeof(exports) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global2.ES6Promise = factory();
450 })(exports, function() {
451 'use strict';
452 function objectOrFunction(x) {
453 var type2 = _typeof(x);
454 return x !== null && (type2 === 'object' || type2 === 'function');
455 }
456 function isFunction(x) {
457 return typeof x === 'function';
458 }
459 var _isArray = void 0;
460 if (Array.isArray) {
461 _isArray = Array.isArray;
462 } else {
463 _isArray = function _isArray(x) {
464 return Object.prototype.toString.call(x) === '[object Array]';
465 };
466 }
467 var isArray = _isArray;
468 var len = 0;
469 var vertxNext = void 0;
470 var customSchedulerFn = void 0;
471 var asap = function asap2(callback, arg) {
472 queue2[len] = callback;
473 queue2[len + 1] = arg;
474 len += 2;
475 if (len === 2) {
476 if (customSchedulerFn) {
477 customSchedulerFn(flush);
478 } else {
479 scheduleFlush();
480 }
481 }
482 };
483 function setScheduler(scheduleFn) {
484 customSchedulerFn = scheduleFn;
485 }
486 function setAsap(asapFn) {
487 asap = asapFn;
488 }
489 var browserWindow = typeof window !== 'undefined' ? window : void 0;
490 var browserGlobal = browserWindow || {};
491 var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
492 var isNode2 = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
493 var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
494 function useNextTick() {
495 return function() {
496 return process.nextTick(flush);
497 };
498 }
499 function useVertxTimer() {
500 if (typeof vertxNext !== 'undefined') {
501 return function() {
502 vertxNext(flush);
503 };
504 }
505 return useSetTimeout();
506 }
507 function useMutationObserver() {
508 var iterations = 0;
509 var observer = new BrowserMutationObserver(flush);
510 var node = document.createTextNode('');
511 observer.observe(node, {
512 characterData: true
513 });
514 return function() {
515 node.data = iterations = ++iterations % 2;
516 };
517 }
518 function useMessageChannel() {
519 var channel = new MessageChannel();
520 channel.port1.onmessage = flush;
521 return function() {
522 return channel.port2.postMessage(0);
523 };
524 }
525 function useSetTimeout() {
526 var globalSetTimeout = setTimeout;
527 return function() {
528 return globalSetTimeout(flush, 1);
529 };
530 }
531 var queue2 = new Array(1e3);
532 function flush() {
533 for (var i = 0; i < len; i += 2) {
534 var callback = queue2[i];
535 var arg = queue2[i + 1];
536 callback(arg);
537 queue2[i] = void 0;
538 queue2[i + 1] = void 0;
539 }
540 len = 0;
541 }
542 function attemptVertx() {
543 try {
544 var vertx = Function('return this')().require('vertx');
545 vertxNext = vertx.runOnLoop || vertx.runOnContext;
546 return useVertxTimer();
547 } catch (e) {
548 return useSetTimeout();
549 }
550 }
551 var scheduleFlush = void 0;
552 if (isNode2) {
553 scheduleFlush = useNextTick();
554 } else if (BrowserMutationObserver) {
555 scheduleFlush = useMutationObserver();
556 } else if (isWorker) {
557 scheduleFlush = useMessageChannel();
558 } else if (browserWindow === void 0 && true) {
559 scheduleFlush = attemptVertx();
560 } else {
561 scheduleFlush = useSetTimeout();
562 }
563 function then(onFulfillment, onRejection) {
564 var parent = this;
565 var child = new this.constructor(noop3);
566 if (child[PROMISE_ID] === void 0) {
567 makePromise(child);
568 }
569 var _state = parent._state;
570 if (_state) {
571 var callback = arguments[_state - 1];
572 asap(function() {
573 return invokeCallback(_state, child, callback, parent._result);
574 });
575 } else {
576 subscribe2(parent, child, onFulfillment, onRejection);
577 }
578 return child;
579 }
580 function resolve$1(object) {
581 var Constructor = this;
582 if (object && _typeof(object) === 'object' && object.constructor === Constructor) {
583 return object;
584 }
585 var promise = new Constructor(noop3);
586 resolve(promise, object);
587 return promise;
588 }
589 var PROMISE_ID = Math.random().toString(36).substring(2);
590 function noop3() {}
591 var PENDING = void 0;
592 var FULFILLED = 1;
593 var REJECTED = 2;
594 function selfFulfillment() {
595 return new TypeError('You cannot resolve a promise with itself');
596 }
597 function cannotReturnOwn() {
598 return new TypeError('A promises callback cannot return that same promise.');
599 }
600 function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
601 try {
602 then$$1.call(value, fulfillmentHandler, rejectionHandler);
603 } catch (e) {
604 return e;
605 }
606 }
607 function handleForeignThenable(promise, thenable, then$$1) {
608 asap(function(promise2) {
609 var sealed = false;
610 var error = tryThen(then$$1, thenable, function(value) {
611 if (sealed) {
612 return;
613 }
614 sealed = true;
615 if (thenable !== value) {
616 resolve(promise2, value);
617 } else {
618 fulfill(promise2, value);
619 }
620 }, function(reason) {
621 if (sealed) {
622 return;
623 }
624 sealed = true;
625 reject(promise2, reason);
626 }, 'Settle: ' + (promise2._label || ' unknown promise'));
627 if (!sealed && error) {
628 sealed = true;
629 reject(promise2, error);
630 }
631 }, promise);
632 }
633 function handleOwnThenable(promise, thenable) {
634 if (thenable._state === FULFILLED) {
635 fulfill(promise, thenable._result);
636 } else if (thenable._state === REJECTED) {
637 reject(promise, thenable._result);
638 } else {
639 subscribe2(thenable, void 0, function(value) {
640 return resolve(promise, value);
641 }, function(reason) {
642 return reject(promise, reason);
643 });
644 }
645 }
646 function handleMaybeThenable(promise, maybeThenable, then$$1) {
647 if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
648 handleOwnThenable(promise, maybeThenable);
649 } else {
650 if (then$$1 === void 0) {
651 fulfill(promise, maybeThenable);
652 } else if (isFunction(then$$1)) {
653 handleForeignThenable(promise, maybeThenable, then$$1);
654 } else {
655 fulfill(promise, maybeThenable);
656 }
657 }
658 }
659 function resolve(promise, value) {
660 if (promise === value) {
661 reject(promise, selfFulfillment());
662 } else if (objectOrFunction(value)) {
663 var then$$1 = void 0;
664 try {
665 then$$1 = value.then;
666 } catch (error) {
667 reject(promise, error);
668 return;
669 }
670 handleMaybeThenable(promise, value, then$$1);
671 } else {
672 fulfill(promise, value);
673 }
674 }
675 function publishRejection(promise) {
676 if (promise._onerror) {
677 promise._onerror(promise._result);
678 }
679 publish(promise);
680 }
681 function fulfill(promise, value) {
682 if (promise._state !== PENDING) {
683 return;
684 }
685 promise._result = value;
686 promise._state = FULFILLED;
687 if (promise._subscribers.length !== 0) {
688 asap(publish, promise);
689 }
690 }
691 function reject(promise, reason) {
692 if (promise._state !== PENDING) {
693 return;
694 }
695 promise._state = REJECTED;
696 promise._result = reason;
697 asap(publishRejection, promise);
698 }
699 function subscribe2(parent, child, onFulfillment, onRejection) {
700 var _subscribers = parent._subscribers;
701 var length = _subscribers.length;
702 parent._onerror = null;
703 _subscribers[length] = child;
704 _subscribers[length + FULFILLED] = onFulfillment;
705 _subscribers[length + REJECTED] = onRejection;
706 if (length === 0 && parent._state) {
707 asap(publish, parent);
708 }
709 }
710 function publish(promise) {
711 var subscribers = promise._subscribers;
712 var settled = promise._state;
713 if (subscribers.length === 0) {
714 return;
715 }
716 var child = void 0, callback = void 0, detail = promise._result;
717 for (var i = 0; i < subscribers.length; i += 3) {
718 child = subscribers[i];
719 callback = subscribers[i + settled];
720 if (child) {
721 invokeCallback(settled, child, callback, detail);
722 } else {
723 callback(detail);
724 }
725 }
726 promise._subscribers.length = 0;
727 }
728 function invokeCallback(settled, promise, callback, detail) {
729 var hasCallback = isFunction(callback), value = void 0, error = void 0, succeeded = true;
730 if (hasCallback) {
731 try {
732 value = callback(detail);
733 } catch (e) {
734 succeeded = false;
735 error = e;
736 }
737 if (promise === value) {
738 reject(promise, cannotReturnOwn());
739 return;
740 }
741 } else {
742 value = detail;
743 }
744 if (promise._state !== PENDING) {} else if (hasCallback && succeeded) {
745 resolve(promise, value);
746 } else if (succeeded === false) {
747 reject(promise, error);
748 } else if (settled === FULFILLED) {
749 fulfill(promise, value);
750 } else if (settled === REJECTED) {
751 reject(promise, value);
752 }
753 }
754 function initializePromise(promise, resolver) {
755 try {
756 resolver(function resolvePromise(value) {
757 resolve(promise, value);
758 }, function rejectPromise(reason) {
759 reject(promise, reason);
760 });
761 } catch (e) {
762 reject(promise, e);
763 }
764 }
765 var id = 0;
766 function nextId() {
767 return id++;
768 }
769 function makePromise(promise) {
770 promise[PROMISE_ID] = id++;
771 promise._state = void 0;
772 promise._result = void 0;
773 promise._subscribers = [];
774 }
775 function validationError() {
776 return new Error('Array Methods must be provided an Array');
777 }
778 var Enumerator = function() {
779 function Enumerator2(Constructor, input) {
780 this._instanceConstructor = Constructor;
781 this.promise = new Constructor(noop3);
782 if (!this.promise[PROMISE_ID]) {
783 makePromise(this.promise);
784 }
785 if (isArray(input)) {
786 this.length = input.length;
787 this._remaining = input.length;
788 this._result = new Array(this.length);
789 if (this.length === 0) {
790 fulfill(this.promise, this._result);
791 } else {
792 this.length = this.length || 0;
793 this._enumerate(input);
794 if (this._remaining === 0) {
795 fulfill(this.promise, this._result);
796 }
797 }
798 } else {
799 reject(this.promise, validationError());
800 }
801 }
802 Enumerator2.prototype._enumerate = function _enumerate(input) {
803 for (var i = 0; this._state === PENDING && i < input.length; i++) {
804 this._eachEntry(input[i], i);
805 }
806 };
807 Enumerator2.prototype._eachEntry = function _eachEntry(entry, i) {
808 var c4 = this._instanceConstructor;
809 var resolve$$1 = c4.resolve;
810 if (resolve$$1 === resolve$1) {
811 var _then = void 0;
812 var error = void 0;
813 var didError = false;
814 try {
815 _then = entry.then;
816 } catch (e) {
817 didError = true;
818 error = e;
819 }
820 if (_then === then && entry._state !== PENDING) {
821 this._settledAt(entry._state, i, entry._result);
822 } else if (typeof _then !== 'function') {
823 this._remaining--;
824 this._result[i] = entry;
825 } else if (c4 === Promise$1) {
826 var promise = new c4(noop3);
827 if (didError) {
828 reject(promise, error);
829 } else {
830 handleMaybeThenable(promise, entry, _then);
831 }
832 this._willSettleAt(promise, i);
833 } else {
834 this._willSettleAt(new c4(function(resolve$$12) {
835 return resolve$$12(entry);
836 }), i);
837 }
838 } else {
839 this._willSettleAt(resolve$$1(entry), i);
840 }
841 };
842 Enumerator2.prototype._settledAt = function _settledAt(state, i, value) {
843 var promise = this.promise;
844 if (promise._state === PENDING) {
845 this._remaining--;
846 if (state === REJECTED) {
847 reject(promise, value);
848 } else {
849 this._result[i] = value;
850 }
851 }
852 if (this._remaining === 0) {
853 fulfill(promise, this._result);
854 }
855 };
856 Enumerator2.prototype._willSettleAt = function _willSettleAt(promise, i) {
857 var enumerator = this;
858 subscribe2(promise, void 0, function(value) {
859 return enumerator._settledAt(FULFILLED, i, value);
860 }, function(reason) {
861 return enumerator._settledAt(REJECTED, i, reason);
862 });
863 };
864 return Enumerator2;
865 }();
866 function all(entries) {
867 return new Enumerator(this, entries).promise;
868 }
869 function race(entries) {
870 var Constructor = this;
871 if (!isArray(entries)) {
872 return new Constructor(function(_, reject2) {
873 return reject2(new TypeError('You must pass an array to race.'));
874 });
875 } else {
876 return new Constructor(function(resolve2, reject2) {
877 var length = entries.length;
878 for (var i = 0; i < length; i++) {
879 Constructor.resolve(entries[i]).then(resolve2, reject2);
880 }
881 });
882 }
883 }
884 function reject$1(reason) {
885 var Constructor = this;
886 var promise = new Constructor(noop3);
887 reject(promise, reason);
888 return promise;
889 }
890 function needsResolver() {
891 throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
892 }
893 function needsNew() {
894 throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.');
895 }
896 var Promise$1 = function() {
897 function Promise2(resolver) {
898 this[PROMISE_ID] = nextId();
899 this._result = this._state = void 0;
900 this._subscribers = [];
901 if (noop3 !== resolver) {
902 typeof resolver !== 'function' && needsResolver();
903 this instanceof Promise2 ? initializePromise(this, resolver) : needsNew();
904 }
905 }
906 Promise2.prototype['catch'] = function _catch(onRejection) {
907 return this.then(null, onRejection);
908 };
909 Promise2.prototype['finally'] = function _finally(callback) {
910 var promise = this;
911 var constructor = promise.constructor;
912 if (isFunction(callback)) {
913 return promise.then(function(value) {
914 return constructor.resolve(callback()).then(function() {
915 return value;
916 });
917 }, function(reason) {
918 return constructor.resolve(callback()).then(function() {
919 throw reason;
920 });
921 });
922 }
923 return promise.then(callback, callback);
924 };
925 return Promise2;
926 }();
927 Promise$1.prototype.then = then;
928 Promise$1.all = all;
929 Promise$1.race = race;
930 Promise$1.resolve = resolve$1;
931 Promise$1.reject = reject$1;
932 Promise$1._setScheduler = setScheduler;
933 Promise$1._setAsap = setAsap;
934 Promise$1._asap = asap;
935 function polyfill() {
936 var local = void 0;
937 if (typeof global !== 'undefined') {
938 local = global;
939 } else if (typeof self !== 'undefined') {
940 local = self;
941 } else {
942 try {
943 local = Function('return this')();
944 } catch (e) {
945 throw new Error('polyfill failed because global object is unavailable in this environment');
946 }
947 }
948 var P = local.Promise;
949 if (P) {
950 var promiseToString = null;
951 try {
952 promiseToString = Object.prototype.toString.call(P.resolve());
953 } catch (e) {}
954 if (promiseToString === '[object Promise]' && !P.cast) {
955 return;
956 }
957 }
958 local.Promise = Promise$1;
959 }
960 Promise$1.polyfill = polyfill;
961 Promise$1.Promise = Promise$1;
962 return Promise$1;
963 });
964 });
965 var require_typedarray = __commonJS(function(exports) {
966 var MAX_ARRAY_LENGTH = 1e5;
967 var ECMAScript = function() {
968 var opts = Object.prototype.toString;
969 var ophop = Object.prototype.hasOwnProperty;
970 return {
971 Class: function Class(v) {
972 return opts.call(v).replace(/^\[object *|\]$/g, '');
973 },
974 HasProperty: function HasProperty(o, p2) {
975 return p2 in o;
976 },
977 HasOwnProperty: function HasOwnProperty(o, p2) {
978 return ophop.call(o, p2);
979 },
980 IsCallable: function IsCallable(o) {
981 return typeof o === 'function';
982 },
983 ToInt32: function ToInt32(v) {
984 return v >> 0;
985 },
986 ToUint32: function ToUint32(v) {
987 return v >>> 0;
988 }
989 };
990 }();
991 var LN2 = Math.LN2;
992 var abs = Math.abs;
993 var floor = Math.floor;
994 var log2 = Math.log;
995 var min = Math.min;
996 var pow = Math.pow;
997 var round = Math.round;
998 function clamp3(v, minimum, max2) {
999 return v < minimum ? minimum : v > max2 ? max2 : v;
1000 }
1001 var getOwnPropNames = Object.getOwnPropertyNames || function(o) {
1002 if (o !== Object(o)) {
1003 throw new TypeError('Object.getOwnPropertyNames called on non-object');
1004 }
1005 var props = [], p2;
1006 for (p2 in o) {
1007 if (ECMAScript.HasOwnProperty(o, p2)) {
1008 props.push(p2);
1009 }
1010 }
1011 return props;
1012 };
1013 var defineProp;
1014 if (Object.defineProperty && function() {
1015 try {
1016 Object.defineProperty({}, 'x', {});
1017 return true;
1018 } catch (e) {
1019 return false;
1020 }
1021 }()) {
1022 defineProp = Object.defineProperty;
1023 } else {
1024 defineProp = function defineProp(o, p2, desc) {
1025 if (!o === Object(o)) {
1026 throw new TypeError('Object.defineProperty called on non-object');
1027 }
1028 if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) {
1029 Object.prototype.__defineGetter__.call(o, p2, desc.get);
1030 }
1031 if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) {
1032 Object.prototype.__defineSetter__.call(o, p2, desc.set);
1033 }
1034 if (ECMAScript.HasProperty(desc, 'value')) {
1035 o[p2] = desc.value;
1036 }
1037 return o;
1038 };
1039 }
1040 function configureProperties(obj) {
1041 if (getOwnPropNames && defineProp) {
1042 var props = getOwnPropNames(obj), i;
1043 for (i = 0; i < props.length; i += 1) {
1044 defineProp(obj, props[i], {
1045 value: obj[props[i]],
1046 writable: false,
1047 enumerable: false,
1048 configurable: false
1049 });
1050 }
1051 }
1052 }
1053 function makeArrayAccessors(obj) {
1054 if (!defineProp) {
1055 return;
1056 }
1057 if (obj.length > MAX_ARRAY_LENGTH) {
1058 throw new RangeError('Array too large for polyfill');
1059 }
1060 function makeArrayAccessor(index) {
1061 defineProp(obj, index, {
1062 get: function get() {
1063 return obj._getter(index);
1064 },
1065 set: function set(v) {
1066 obj._setter(index, v);
1067 },
1068 enumerable: true,
1069 configurable: false
1070 });
1071 }
1072 var i;
1073 for (i = 0; i < obj.length; i += 1) {
1074 makeArrayAccessor(i);
1075 }
1076 }
1077 function as_signed(value, bits) {
1078 var s = 32 - bits;
1079 return value << s >> s;
1080 }
1081 function as_unsigned(value, bits) {
1082 var s = 32 - bits;
1083 return value << s >>> s;
1084 }
1085 function packI8(n2) {
1086 return [ n2 & 255 ];
1087 }
1088 function unpackI8(bytes) {
1089 return as_signed(bytes[0], 8);
1090 }
1091 function packU8(n2) {
1092 return [ n2 & 255 ];
1093 }
1094 function unpackU8(bytes) {
1095 return as_unsigned(bytes[0], 8);
1096 }
1097 function packU8Clamped(n2) {
1098 n2 = round(Number(n2));
1099 return [ n2 < 0 ? 0 : n2 > 255 ? 255 : n2 & 255 ];
1100 }
1101 function packI16(n2) {
1102 return [ n2 >> 8 & 255, n2 & 255 ];
1103 }
1104 function unpackI16(bytes) {
1105 return as_signed(bytes[0] << 8 | bytes[1], 16);
1106 }
1107 function packU16(n2) {
1108 return [ n2 >> 8 & 255, n2 & 255 ];
1109 }
1110 function unpackU16(bytes) {
1111 return as_unsigned(bytes[0] << 8 | bytes[1], 16);
1112 }
1113 function packI32(n2) {
1114 return [ n2 >> 24 & 255, n2 >> 16 & 255, n2 >> 8 & 255, n2 & 255 ];
1115 }
1116 function unpackI32(bytes) {
1117 return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32);
1118 }
1119 function packU32(n2) {
1120 return [ n2 >> 24 & 255, n2 >> 16 & 255, n2 >> 8 & 255, n2 & 255 ];
1121 }
1122 function unpackU32(bytes) {
1123 return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32);
1124 }
1125 function packIEEE754(v, ebits, fbits) {
1126 var bias = (1 << ebits - 1) - 1;
1127 var s, e, f, i, bits, str, bytes;
1128 function roundToEven(n2) {
1129 var w = floor(n2);
1130 var fl = n2 - w;
1131 if (fl < .5) {
1132 return w;
1133 }
1134 if (fl > .5) {
1135 return w + 1;
1136 }
1137 return w % 2 ? w + 1 : w;
1138 }
1139 if (v !== v) {
1140 e = (1 << ebits) - 1;
1141 f = pow(2, fbits - 1);
1142 s = 0;
1143 } else if (v === Infinity || v === -Infinity) {
1144 e = (1 << ebits) - 1;
1145 f = 0;
1146 s = v < 0 ? 1 : 0;
1147 } else if (v === 0) {
1148 e = 0;
1149 f = 0;
1150 s = 1 / v === -Infinity ? 1 : 0;
1151 } else {
1152 s = v < 0;
1153 v = abs(v);
1154 if (v >= pow(2, 1 - bias)) {
1155 e = min(floor(log2(v) / LN2), 1023);
1156 f = roundToEven(v / pow(2, e) * pow(2, fbits));
1157 if (f / pow(2, fbits) >= 2) {
1158 e = e + 1;
1159 f = 1;
1160 }
1161 if (e > bias) {
1162 e = (1 << ebits) - 1;
1163 f = 0;
1164 } else {
1165 e = e + bias;
1166 f = f - pow(2, fbits);
1167 }
1168 } else {
1169 e = 0;
1170 f = roundToEven(v / pow(2, 1 - bias - fbits));
1171 }
1172 }
1173 bits = [];
1174 for (i = fbits; i; i -= 1) {
1175 bits.push(f % 2 ? 1 : 0);
1176 f = floor(f / 2);
1177 }
1178 for (i = ebits; i; i -= 1) {
1179 bits.push(e % 2 ? 1 : 0);
1180 e = floor(e / 2);
1181 }
1182 bits.push(s ? 1 : 0);
1183 bits.reverse();
1184 str = bits.join('');
1185 bytes = [];
1186 while (str.length) {
1187 bytes.push(parseInt(str.substring(0, 8), 2));
1188 str = str.substring(8);
1189 }
1190 return bytes;
1191 }
1192 function unpackIEEE754(bytes, ebits, fbits) {
1193 var bits = [], i, j, b2, str, bias, s, e, f;
1194 for (i = bytes.length; i; i -= 1) {
1195 b2 = bytes[i - 1];
1196 for (j = 8; j; j -= 1) {
1197 bits.push(b2 % 2 ? 1 : 0);
1198 b2 = b2 >> 1;
1199 }
1200 }
1201 bits.reverse();
1202 str = bits.join('');
1203 bias = (1 << ebits - 1) - 1;
1204 s = parseInt(str.substring(0, 1), 2) ? -1 : 1;
1205 e = parseInt(str.substring(1, 1 + ebits), 2);
1206 f = parseInt(str.substring(1 + ebits), 2);
1207 if (e === (1 << ebits) - 1) {
1208 return f === 0 ? s * Infinity : NaN;
1209 } else if (e > 0) {
1210 return s * pow(2, e - bias) * (1 + f / pow(2, fbits));
1211 } else if (f !== 0) {
1212 return s * pow(2, -(bias - 1)) * (f / pow(2, fbits));
1213 }
1214 return s < 0 ? -0 : 0;
1215 }
1216 function unpackF64(b2) {
1217 return unpackIEEE754(b2, 11, 52);
1218 }
1219 function packF64(v) {
1220 return packIEEE754(v, 11, 52);
1221 }
1222 function unpackF32(b2) {
1223 return unpackIEEE754(b2, 8, 23);
1224 }
1225 function packF32(v) {
1226 return packIEEE754(v, 8, 23);
1227 }
1228 (function() {
1229 function ArrayBuffer(length) {
1230 length = ECMAScript.ToInt32(length);
1231 if (length < 0) {
1232 throw new RangeError('ArrayBuffer size is not a small enough positive integer');
1233 }
1234 this.byteLength = length;
1235 this._bytes = [];
1236 this._bytes.length = length;
1237 var i;
1238 for (i = 0; i < this.byteLength; i += 1) {
1239 this._bytes[i] = 0;
1240 }
1241 configureProperties(this);
1242 }
1243 exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer;
1244 function ArrayBufferView() {}
1245 function makeConstructor(bytesPerElement, pack, unpack) {
1246 var _ctor;
1247 _ctor = function ctor(buffer, byteOffset, length) {
1248 var array, sequence, i, s;
1249 if (!arguments.length || typeof arguments[0] === 'number') {
1250 this.length = ECMAScript.ToInt32(arguments[0]);
1251 if (length < 0) {
1252 throw new RangeError('ArrayBufferView size is not a small enough positive integer');
1253 }
1254 this.byteLength = this.length * this.BYTES_PER_ELEMENT;
1255 this.buffer = new ArrayBuffer(this.byteLength);
1256 this.byteOffset = 0;
1257 } else if (_typeof(arguments[0]) === 'object' && arguments[0].constructor === _ctor) {
1258 array = arguments[0];
1259 this.length = array.length;
1260 this.byteLength = this.length * this.BYTES_PER_ELEMENT;
1261 this.buffer = new ArrayBuffer(this.byteLength);
1262 this.byteOffset = 0;
1263 for (i = 0; i < this.length; i += 1) {
1264 this._setter(i, array._getter(i));
1265 }
1266 } else if (_typeof(arguments[0]) === 'object' && !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
1267 sequence = arguments[0];
1268 this.length = ECMAScript.ToUint32(sequence.length);
1269 this.byteLength = this.length * this.BYTES_PER_ELEMENT;
1270 this.buffer = new ArrayBuffer(this.byteLength);
1271 this.byteOffset = 0;
1272 for (i = 0; i < this.length; i += 1) {
1273 s = sequence[i];
1274 this._setter(i, Number(s));
1275 }
1276 } else if (_typeof(arguments[0]) === 'object' && (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
1277 this.buffer = buffer;
1278 this.byteOffset = ECMAScript.ToUint32(byteOffset);
1279 if (this.byteOffset > this.buffer.byteLength) {
1280 throw new RangeError('byteOffset out of range');
1281 }
1282 if (this.byteOffset % this.BYTES_PER_ELEMENT) {
1283 throw new RangeError('ArrayBuffer length minus the byteOffset is not a multiple of the element size.');
1284 }
1285 if (arguments.length < 3) {
1286 this.byteLength = this.buffer.byteLength - this.byteOffset;
1287 if (this.byteLength % this.BYTES_PER_ELEMENT) {
1288 throw new RangeError('length of buffer minus byteOffset not a multiple of the element size');
1289 }
1290 this.length = this.byteLength / this.BYTES_PER_ELEMENT;
1291 } else {
1292 this.length = ECMAScript.ToUint32(length);
1293 this.byteLength = this.length * this.BYTES_PER_ELEMENT;
1294 }
1295 if (this.byteOffset + this.byteLength > this.buffer.byteLength) {
1296 throw new RangeError('byteOffset and length reference an area beyond the end of the buffer');
1297 }
1298 } else {
1299 throw new TypeError('Unexpected argument type(s)');
1300 }
1301 this.constructor = _ctor;
1302 configureProperties(this);
1303 makeArrayAccessors(this);
1304 };
1305 _ctor.prototype = new ArrayBufferView();
1306 _ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement;
1307 _ctor.prototype._pack = pack;
1308 _ctor.prototype._unpack = unpack;
1309 _ctor.BYTES_PER_ELEMENT = bytesPerElement;
1310 _ctor.prototype._getter = function(index) {
1311 if (arguments.length < 1) {
1312 throw new SyntaxError('Not enough arguments');
1313 }
1314 index = ECMAScript.ToUint32(index);
1315 if (index >= this.length) {
1316 return void 0;
1317 }
1318 var bytes = [];
1319 for (var i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1,
1320 o += 1) {
1321 bytes.push(this.buffer._bytes[o]);
1322 }
1323 return this._unpack(bytes);
1324 };
1325 _ctor.prototype.get = _ctor.prototype._getter;
1326 _ctor.prototype._setter = function(index, value) {
1327 if (arguments.length < 2) {
1328 throw new SyntaxError('Not enough arguments');
1329 }
1330 index = ECMAScript.ToUint32(index);
1331 if (index < this.length) {
1332 var bytes = this._pack(value);
1333 var i;
1334 var o;
1335 for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1,
1336 o += 1) {
1337 this.buffer._bytes[o] = bytes[i];
1338 }
1339 }
1340 };
1341 _ctor.prototype.set = function(index, value) {
1342 if (arguments.length < 1) {
1343 throw new SyntaxError('Not enough arguments');
1344 }
1345 var array, sequence, offset, len, i, s, d2, byteOffset, byteLength, tmp;
1346 if (_typeof(arguments[0]) === 'object' && arguments[0].constructor === this.constructor) {
1347 array = arguments[0];
1348 offset = ECMAScript.ToUint32(arguments[1]);
1349 if (offset + array.length > this.length) {
1350 throw new RangeError('Offset plus length of array is out of range');
1351 }
1352 byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT;
1353 byteLength = array.length * this.BYTES_PER_ELEMENT;
1354 if (array.buffer === this.buffer) {
1355 tmp = [];
1356 for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) {
1357 tmp[i] = array.buffer._bytes[s];
1358 }
1359 for (i = 0, d2 = byteOffset; i < byteLength; i += 1, d2 += 1) {
1360 this.buffer._bytes[d2] = tmp[i];
1361 }
1362 } else {
1363 for (i = 0, s = array.byteOffset, d2 = byteOffset; i < byteLength; i += 1,
1364 s += 1, d2 += 1) {
1365 this.buffer._bytes[d2] = array.buffer._bytes[s];
1366 }
1367 }
1368 } else if (_typeof(arguments[0]) === 'object' && typeof arguments[0].length !== 'undefined') {
1369 sequence = arguments[0];
1370 len = ECMAScript.ToUint32(sequence.length);
1371 offset = ECMAScript.ToUint32(arguments[1]);
1372 if (offset + len > this.length) {
1373 throw new RangeError('Offset plus length of array is out of range');
1374 }
1375 for (i = 0; i < len; i += 1) {
1376 s = sequence[i];
1377 this._setter(offset + i, Number(s));
1378 }
1379 } else {
1380 throw new TypeError('Unexpected argument type(s)');
1381 }
1382 };
1383 _ctor.prototype.subarray = function(start, end) {
1384 start = ECMAScript.ToInt32(start);
1385 end = ECMAScript.ToInt32(end);
1386 if (arguments.length < 1) {
1387 start = 0;
1388 }
1389 if (arguments.length < 2) {
1390 end = this.length;
1391 }
1392 if (start < 0) {
1393 start = this.length + start;
1394 }
1395 if (end < 0) {
1396 end = this.length + end;
1397 }
1398 start = clamp3(start, 0, this.length);
1399 end = clamp3(end, 0, this.length);
1400 var len = end - start;
1401 if (len < 0) {
1402 len = 0;
1403 }
1404 return new this.constructor(this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len);
1405 };
1406 return _ctor;
1407 }
1408 var Int8Array = makeConstructor(1, packI8, unpackI8);
1409 var Uint8Array2 = makeConstructor(1, packU8, unpackU8);
1410 var Uint8ClampedArray2 = makeConstructor(1, packU8Clamped, unpackU8);
1411 var Int16Array = makeConstructor(2, packI16, unpackI16);
1412 var Uint16Array = makeConstructor(2, packU16, unpackU16);
1413 var Int32Array = makeConstructor(4, packI32, unpackI32);
1414 var Uint32Array3 = makeConstructor(4, packU32, unpackU32);
1415 var Float32Array = makeConstructor(4, packF32, unpackF32);
1416 var Float64Array = makeConstructor(8, packF64, unpackF64);
1417 exports.Int8Array = exports.Int8Array || Int8Array;
1418 exports.Uint8Array = exports.Uint8Array || Uint8Array2;
1419 exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray2;
1420 exports.Int16Array = exports.Int16Array || Int16Array;
1421 exports.Uint16Array = exports.Uint16Array || Uint16Array;
1422 exports.Int32Array = exports.Int32Array || Int32Array;
1423 exports.Uint32Array = exports.Uint32Array || Uint32Array3;
1424 exports.Float32Array = exports.Float32Array || Float32Array;
1425 exports.Float64Array = exports.Float64Array || Float64Array;
1426 })();
1427 (function() {
1428 function r(array, index) {
1429 return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index];
1430 }
1431 var IS_BIG_ENDIAN = function() {
1432 var u16array = new exports.Uint16Array([ 4660 ]), u8array = new exports.Uint8Array(u16array.buffer);
1433 return r(u8array, 0) === 18;
1434 }();
1435 function DataView(buffer, byteOffset, byteLength) {
1436 if (arguments.length === 0) {
1437 buffer = new exports.ArrayBuffer(0);
1438 } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) {
1439 throw new TypeError('TypeError');
1440 }
1441 this.buffer = buffer || new exports.ArrayBuffer(0);
1442 this.byteOffset = ECMAScript.ToUint32(byteOffset);
1443 if (this.byteOffset > this.buffer.byteLength) {
1444 throw new RangeError('byteOffset out of range');
1445 }
1446 if (arguments.length < 3) {
1447 this.byteLength = this.buffer.byteLength - this.byteOffset;
1448 } else {
1449 this.byteLength = ECMAScript.ToUint32(byteLength);
1450 }
1451 if (this.byteOffset + this.byteLength > this.buffer.byteLength) {
1452 throw new RangeError('byteOffset and length reference an area beyond the end of the buffer');
1453 }
1454 configureProperties(this);
1455 }
1456 function makeGetter(arrayType) {
1457 return function(byteOffset, littleEndian) {
1458 byteOffset = ECMAScript.ToUint32(byteOffset);
1459 if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
1460 throw new RangeError('Array index out of range');
1461 }
1462 byteOffset += this.byteOffset;
1463 var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT), bytes = [], i;
1464 for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
1465 bytes.push(r(uint8Array, i));
1466 }
1467 if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
1468 bytes.reverse();
1469 }
1470 return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0);
1471 };
1472 }
1473 DataView.prototype.getUint8 = makeGetter(exports.Uint8Array);
1474 DataView.prototype.getInt8 = makeGetter(exports.Int8Array);
1475 DataView.prototype.getUint16 = makeGetter(exports.Uint16Array);
1476 DataView.prototype.getInt16 = makeGetter(exports.Int16Array);
1477 DataView.prototype.getUint32 = makeGetter(exports.Uint32Array);
1478 DataView.prototype.getInt32 = makeGetter(exports.Int32Array);
1479 DataView.prototype.getFloat32 = makeGetter(exports.Float32Array);
1480 DataView.prototype.getFloat64 = makeGetter(exports.Float64Array);
1481 function makeSetter(arrayType) {
1482 return function(byteOffset, value, littleEndian) {
1483 byteOffset = ECMAScript.ToUint32(byteOffset);
1484 if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
1485 throw new RangeError('Array index out of range');
1486 }
1487 var typeArray = new arrayType([ value ]), byteArray = new exports.Uint8Array(typeArray.buffer), bytes = [], i, byteView;
1488 for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
1489 bytes.push(r(byteArray, i));
1490 }
1491 if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
1492 bytes.reverse();
1493 }
1494 byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT);
1495 byteView.set(bytes);
1496 };
1497 }
1498 DataView.prototype.setUint8 = makeSetter(exports.Uint8Array);
1499 DataView.prototype.setInt8 = makeSetter(exports.Int8Array);
1500 DataView.prototype.setUint16 = makeSetter(exports.Uint16Array);
1501 DataView.prototype.setInt16 = makeSetter(exports.Int16Array);
1502 DataView.prototype.setUint32 = makeSetter(exports.Uint32Array);
1503 DataView.prototype.setInt32 = makeSetter(exports.Int32Array);
1504 DataView.prototype.setFloat32 = makeSetter(exports.Float32Array);
1505 DataView.prototype.setFloat64 = makeSetter(exports.Float64Array);
1506 exports.DataView = exports.DataView || DataView;
1507 })();
1508 });
1509 var require_weakmap_polyfill = __commonJS(function(exports) {
1510 (function(self2) {
1511 'use strict';
1512 if (self2.WeakMap) {
1513 return;
1514 }
1515 var hasOwnProperty2 = Object.prototype.hasOwnProperty;
1516 var hasDefine = Object.defineProperty && function() {
1517 try {
1518 return Object.defineProperty({}, 'x', {
1519 value: 1
1520 }).x === 1;
1521 } catch (e) {}
1522 }();
1523 var defineProperty = function defineProperty(object, name, value) {
1524 if (hasDefine) {
1525 Object.defineProperty(object, name, {
1526 configurable: true,
1527 writable: true,
1528 value: value
1529 });
1530 } else {
1531 object[name] = value;
1532 }
1533 };
1534 self2.WeakMap = function() {
1535 function WeakMap2() {
1536 if (this === void 0) {
1537 throw new TypeError('Constructor WeakMap requires \'new\'');
1538 }
1539 defineProperty(this, '_id', genId('_WeakMap'));
1540 if (arguments.length > 0) {
1541 throw new TypeError('WeakMap iterable is not supported');
1542 }
1543 }
1544 defineProperty(WeakMap2.prototype, 'delete', function(key) {
1545 checkInstance(this, 'delete');
1546 if (!isObject(key)) {
1547 return false;
1548 }
1549 var entry = key[this._id];
1550 if (entry && entry[0] === key) {
1551 delete key[this._id];
1552 return true;
1553 }
1554 return false;
1555 });
1556 defineProperty(WeakMap2.prototype, 'get', function(key) {
1557 checkInstance(this, 'get');
1558 if (!isObject(key)) {
1559 return void 0;
1560 }
1561 var entry = key[this._id];
1562 if (entry && entry[0] === key) {
1563 return entry[1];
1564 }
1565 return void 0;
1566 });
1567 defineProperty(WeakMap2.prototype, 'has', function(key) {
1568 checkInstance(this, 'has');
1569 if (!isObject(key)) {
1570 return false;
1571 }
1572 var entry = key[this._id];
1573 if (entry && entry[0] === key) {
1574 return true;
1575 }
1576 return false;
1577 });
1578 defineProperty(WeakMap2.prototype, 'set', function(key, value) {
1579 checkInstance(this, 'set');
1580 if (!isObject(key)) {
1581 throw new TypeError('Invalid value used as weak map key');
1582 }
1583 var entry = key[this._id];
1584 if (entry && entry[0] === key) {
1585 entry[1] = value;
1586 return this;
1587 }
1588 defineProperty(key, this._id, [ key, value ]);
1589 return this;
1590 });
1591 function checkInstance(x, methodName) {
1592 if (!isObject(x) || !hasOwnProperty2.call(x, '_id')) {
1593 throw new TypeError(methodName + ' method called on incompatible receiver ' + _typeof(x));
1594 }
1595 }
1596 function genId(prefix) {
1597 return prefix + '_' + rand() + '.' + rand();
1598 }
1599 function rand() {
1600 return Math.random().toString().substring(2);
1601 }
1602 defineProperty(WeakMap2, '_polyfill', true);
1603 return WeakMap2;
1604 }();
1605 function isObject(x) {
1606 return Object(x) === x;
1607 }
1608 })(typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : exports);
1609 });
1610 var require_global_this = __commonJS(function(exports, module) {
1611 'use strict';
1612 var check = function check(it) {
1613 return it && it.Math === Math && it;
1614 };
1615 module.exports = check((typeof globalThis === 'undefined' ? 'undefined' : _typeof(globalThis)) == 'object' && globalThis) || check((typeof window === 'undefined' ? 'undefined' : _typeof(window)) == 'object' && window) || check((typeof self === 'undefined' ? 'undefined' : _typeof(self)) == 'object' && self) || check((typeof global === 'undefined' ? 'undefined' : _typeof(global)) == 'object' && global) || check(_typeof(exports) == 'object' && exports) || function() {
1616 return this;
1617 }() || Function('return this')();
1618 });
1619 var require_fails = __commonJS(function(exports, module) {
1620 'use strict';
1621 module.exports = function(exec) {
1622 try {
1623 return !!exec();
1624 } catch (error) {
1625 return true;
1626 }
1627 };
1628 });
1629 var require_function_bind_native = __commonJS(function(exports, module) {
1630 'use strict';
1631 var fails = require_fails();
1632 module.exports = !fails(function() {
1633 var test = function() {}.bind();
1634 return typeof test != 'function' || test.hasOwnProperty('prototype');
1635 });
1636 });
1637 var require_function_apply = __commonJS(function(exports, module) {
1638 'use strict';
1639 var NATIVE_BIND = require_function_bind_native();
1640 var FunctionPrototype = Function.prototype;
1641 var apply = FunctionPrototype.apply;
1642 var call = FunctionPrototype.call;
1643 module.exports = (typeof Reflect === 'undefined' ? 'undefined' : _typeof(Reflect)) == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function() {
1644 return call.apply(apply, arguments);
1645 });
1646 });
1647 var require_function_uncurry_this = __commonJS(function(exports, module) {
1648 'use strict';
1649 var NATIVE_BIND = require_function_bind_native();
1650 var FunctionPrototype = Function.prototype;
1651 var call = FunctionPrototype.call;
1652 var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
1653 module.exports = NATIVE_BIND ? uncurryThisWithBind : function(fn) {
1654 return function() {
1655 return call.apply(fn, arguments);
1656 };
1657 };
1658 });
1659 var require_classof_raw = __commonJS(function(exports, module) {
1660 'use strict';
1661 var uncurryThis = require_function_uncurry_this();
1662 var toString = uncurryThis({}.toString);
1663 var stringSlice = uncurryThis(''.slice);
1664 module.exports = function(it) {
1665 return stringSlice(toString(it), 8, -1);
1666 };
1667 });
1668 var require_function_uncurry_this_clause = __commonJS(function(exports, module) {
1669 'use strict';
1670 var classofRaw = require_classof_raw();
1671 var uncurryThis = require_function_uncurry_this();
1672 module.exports = function(fn) {
1673 if (classofRaw(fn) === 'Function') {
1674 return uncurryThis(fn);
1675 }
1676 };
1677 });
1678 var require_is_callable = __commonJS(function(exports, module) {
1679 'use strict';
1680 var documentAll = (typeof document === 'undefined' ? 'undefined' : _typeof(document)) == 'object' && document.all;
1681 module.exports = typeof documentAll == 'undefined' && documentAll !== void 0 ? function(argument) {
1682 return typeof argument == 'function' || argument === documentAll;
1683 } : function(argument) {
1684 return typeof argument == 'function';
1685 };
1686 });
1687 var require_descriptors = __commonJS(function(exports, module) {
1688 'use strict';
1689 var fails = require_fails();
1690 module.exports = !fails(function() {
1691 return Object.defineProperty({}, 1, {
1692 get: function get() {
1693 return 7;
1694 }
1695 })[1] !== 7;
1696 });
1697 });
1698 var require_function_call = __commonJS(function(exports, module) {
1699 'use strict';
1700 var NATIVE_BIND = require_function_bind_native();
1701 var call = Function.prototype.call;
1702 module.exports = NATIVE_BIND ? call.bind(call) : function() {
1703 return call.apply(call, arguments);
1704 };
1705 });
1706 var require_object_property_is_enumerable = __commonJS(function(exports) {
1707 'use strict';
1708 var $propertyIsEnumerable = {}.propertyIsEnumerable;
1709 var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
1710 var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({
1711 1: 2
1712 }, 1);
1713 exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
1714 var descriptor = getOwnPropertyDescriptor(this, V);
1715 return !!descriptor && descriptor.enumerable;
1716 } : $propertyIsEnumerable;
1717 });
1718 var require_create_property_descriptor = __commonJS(function(exports, module) {
1719 'use strict';
1720 module.exports = function(bitmap, value) {
1721 return {
1722 enumerable: !(bitmap & 1),
1723 configurable: !(bitmap & 2),
1724 writable: !(bitmap & 4),
1725 value: value
1726 };
1727 };
1728 });
1729 var require_indexed_object = __commonJS(function(exports, module) {
1730 'use strict';
1731 var uncurryThis = require_function_uncurry_this();
1732 var fails = require_fails();
1733 var classof = require_classof_raw();
1734 var $Object = Object;
1735 var split = uncurryThis(''.split);
1736 module.exports = fails(function() {
1737 return !$Object('z').propertyIsEnumerable(0);
1738 }) ? function(it) {
1739 return classof(it) === 'String' ? split(it, '') : $Object(it);
1740 } : $Object;
1741 });
1742 var require_is_null_or_undefined = __commonJS(function(exports, module) {
1743 'use strict';
1744 module.exports = function(it) {
1745 return it === null || it === void 0;
1746 };
1747 });
1748 var require_require_object_coercible = __commonJS(function(exports, module) {
1749 'use strict';
1750 var isNullOrUndefined = require_is_null_or_undefined();
1751 var $TypeError = TypeError;
1752 module.exports = function(it) {
1753 if (isNullOrUndefined(it)) {
1754 throw new $TypeError('Can\'t call method on ' + it);
1755 }
1756 return it;
1757 };
1758 });
1759 var require_to_indexed_object = __commonJS(function(exports, module) {
1760 'use strict';
1761 var IndexedObject = require_indexed_object();
1762 var requireObjectCoercible = require_require_object_coercible();
1763 module.exports = function(it) {
1764 return IndexedObject(requireObjectCoercible(it));
1765 };
1766 });
1767 var require_is_object = __commonJS(function(exports, module) {
1768 'use strict';
1769 var isCallable = require_is_callable();
1770 module.exports = function(it) {
1771 return _typeof(it) == 'object' ? it !== null : isCallable(it);
1772 };
1773 });
1774 var require_path = __commonJS(function(exports, module) {
1775 'use strict';
1776 module.exports = {};
1777 });
1778 var require_get_built_in = __commonJS(function(exports, module) {
1779 'use strict';
1780 var path = require_path();
1781 var globalThis2 = require_global_this();
1782 var isCallable = require_is_callable();
1783 var aFunction = function aFunction(variable) {
1784 return isCallable(variable) ? variable : void 0;
1785 };
1786 module.exports = function(namespace, method) {
1787 return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(globalThis2[namespace]) : path[namespace] && path[namespace][method] || globalThis2[namespace] && globalThis2[namespace][method];
1788 };
1789 });
1790 var require_object_is_prototype_of = __commonJS(function(exports, module) {
1791 'use strict';
1792 var uncurryThis = require_function_uncurry_this();
1793 module.exports = uncurryThis({}.isPrototypeOf);
1794 });
1795 var require_environment_user_agent = __commonJS(function(exports, module) {
1796 'use strict';
1797 var globalThis2 = require_global_this();
1798 var navigator = globalThis2.navigator;
1799 var userAgent = navigator && navigator.userAgent;
1800 module.exports = userAgent ? String(userAgent) : '';
1801 });
1802 var require_environment_v8_version = __commonJS(function(exports, module) {
1803 'use strict';
1804 var globalThis2 = require_global_this();
1805 var userAgent = require_environment_user_agent();
1806 var process2 = globalThis2.process;
1807 var Deno = globalThis2.Deno;
1808 var versions = process2 && process2.versions || Deno && Deno.version;
1809 var v8 = versions && versions.v8;
1810 var match;
1811 var version;
1812 if (v8) {
1813 match = v8.split('.');
1814 version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
1815 }
1816 if (!version && userAgent) {
1817 match = userAgent.match(/Edge\/(\d+)/);
1818 if (!match || match[1] >= 74) {
1819 match = userAgent.match(/Chrome\/(\d+)/);
1820 if (match) {
1821 version = +match[1];
1822 }
1823 }
1824 }
1825 module.exports = version;
1826 });
1827 var require_symbol_constructor_detection = __commonJS(function(exports, module) {
1828 'use strict';
1829 var V8_VERSION = require_environment_v8_version();
1830 var fails = require_fails();
1831 var globalThis2 = require_global_this();
1832 var $String = globalThis2.String;
1833 module.exports = !!Object.getOwnPropertySymbols && !fails(function() {
1834 var symbol = Symbol('symbol detection');
1835 return !$String(symbol) || !(Object(symbol) instanceof Symbol) || !Symbol.sham && V8_VERSION && V8_VERSION < 41;
1836 });
1837 });
1838 var require_use_symbol_as_uid = __commonJS(function(exports, module) {
1839 'use strict';
1840 var NATIVE_SYMBOL = require_symbol_constructor_detection();
1841 module.exports = NATIVE_SYMBOL && !Symbol.sham && _typeof(Symbol.iterator) == 'symbol';
1842 });
1843 var require_is_symbol = __commonJS(function(exports, module) {
1844 'use strict';
1845 var getBuiltIn = require_get_built_in();
1846 var isCallable = require_is_callable();
1847 var isPrototypeOf = require_object_is_prototype_of();
1848 var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
1849 var $Object = Object;
1850 module.exports = USE_SYMBOL_AS_UID ? function(it) {
1851 return _typeof(it) == 'symbol';
1852 } : function(it) {
1853 var $Symbol = getBuiltIn('Symbol');
1854 return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
1855 };
1856 });
1857 var require_try_to_string = __commonJS(function(exports, module) {
1858 'use strict';
1859 var $String = String;
1860 module.exports = function(argument) {
1861 try {
1862 return $String(argument);
1863 } catch (error) {
1864 return 'Object';
1865 }
1866 };
1867 });
1868 var require_a_callable = __commonJS(function(exports, module) {
1869 'use strict';
1870 var isCallable = require_is_callable();
1871 var tryToString = require_try_to_string();
1872 var $TypeError = TypeError;
1873 module.exports = function(argument) {
1874 if (isCallable(argument)) {
1875 return argument;
1876 }
1877 throw new $TypeError(tryToString(argument) + ' is not a function');
1878 };
1879 });
1880 var require_get_method = __commonJS(function(exports, module) {
1881 'use strict';
1882 var aCallable = require_a_callable();
1883 var isNullOrUndefined = require_is_null_or_undefined();
1884 module.exports = function(V, P) {
1885 var func = V[P];
1886 return isNullOrUndefined(func) ? void 0 : aCallable(func);
1887 };
1888 });
1889 var require_ordinary_to_primitive = __commonJS(function(exports, module) {
1890 'use strict';
1891 var call = require_function_call();
1892 var isCallable = require_is_callable();
1893 var isObject = require_is_object();
1894 var $TypeError = TypeError;
1895 module.exports = function(input, pref) {
1896 var fn, val;
1897 if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) {
1898 return val;
1899 }
1900 if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) {
1901 return val;
1902 }
1903 if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) {
1904 return val;
1905 }
1906 throw new $TypeError('Can\'t convert object to primitive value');
1907 };
1908 });
1909 var require_is_pure = __commonJS(function(exports, module) {
1910 'use strict';
1911 module.exports = true;
1912 });
1913 var require_define_global_property = __commonJS(function(exports, module) {
1914 'use strict';
1915 var globalThis2 = require_global_this();
1916 var defineProperty = Object.defineProperty;
1917 module.exports = function(key, value) {
1918 try {
1919 defineProperty(globalThis2, key, {
1920 value: value,
1921 configurable: true,
1922 writable: true
1923 });
1924 } catch (error) {
1925 globalThis2[key] = value;
1926 }
1927 return value;
1928 };
1929 });
1930 var require_shared_store = __commonJS(function(exports, module) {
1931 'use strict';
1932 var IS_PURE = require_is_pure();
1933 var globalThis2 = require_global_this();
1934 var defineGlobalProperty = require_define_global_property();
1935 var SHARED = '__core-js_shared__';
1936 var store = module.exports = globalThis2[SHARED] || defineGlobalProperty(SHARED, {});
1937 (store.versions || (store.versions = [])).push({
1938 version: '3.48.0',
1939 mode: IS_PURE ? 'pure' : 'global',
1940 copyright: '\xa9 2013\u20132025 Denis Pushkarev (zloirock.ru), 2025\u20132026 CoreJS Company (core-js.io). All rights reserved.',
1941 license: 'https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE',
1942 source: 'https://github.com/zloirock/core-js'
1943 });
1944 });
1945 var require_shared = __commonJS(function(exports, module) {
1946 'use strict';
1947 var store = require_shared_store();
1948 module.exports = function(key, value) {
1949 return store[key] || (store[key] = value || {});
1950 };
1951 });
1952 var require_to_object = __commonJS(function(exports, module) {
1953 'use strict';
1954 var requireObjectCoercible = require_require_object_coercible();
1955 var $Object = Object;
1956 module.exports = function(argument) {
1957 return $Object(requireObjectCoercible(argument));
1958 };
1959 });
1960 var require_has_own_property = __commonJS(function(exports, module) {
1961 'use strict';
1962 var uncurryThis = require_function_uncurry_this();
1963 var toObject = require_to_object();
1964 var hasOwnProperty2 = uncurryThis({}.hasOwnProperty);
1965 module.exports = Object.hasOwn || function hasOwn2(it, key) {
1966 return hasOwnProperty2(toObject(it), key);
1967 };
1968 });
1969 var require_uid = __commonJS(function(exports, module) {
1970 'use strict';
1971 var uncurryThis = require_function_uncurry_this();
1972 var id = 0;
1973 var postfix = Math.random();
1974 var toString = uncurryThis(1.1.toString);
1975 module.exports = function(key) {
1976 return 'Symbol(' + (key === void 0 ? '' : key) + ')_' + toString(++id + postfix, 36);
1977 };
1978 });
1979 var require_well_known_symbol = __commonJS(function(exports, module) {
1980 'use strict';
1981 var globalThis2 = require_global_this();
1982 var shared = require_shared();
1983 var hasOwn2 = require_has_own_property();
1984 var uid = require_uid();
1985 var NATIVE_SYMBOL = require_symbol_constructor_detection();
1986 var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
1987 var Symbol2 = globalThis2.Symbol;
1988 var WellKnownSymbolsStore = shared('wks');
1989 var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol2['for'] || Symbol2 : Symbol2 && Symbol2.withoutSetter || uid;
1990 module.exports = function(name) {
1991 if (!hasOwn2(WellKnownSymbolsStore, name)) {
1992 WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn2(Symbol2, name) ? Symbol2[name] : createWellKnownSymbol('Symbol.' + name);
1993 }
1994 return WellKnownSymbolsStore[name];
1995 };
1996 });
1997 var require_to_primitive = __commonJS(function(exports, module) {
1998 'use strict';
1999 var call = require_function_call();
2000 var isObject = require_is_object();
2001 var isSymbol = require_is_symbol();
2002 var getMethod = require_get_method();
2003 var ordinaryToPrimitive = require_ordinary_to_primitive();
2004 var wellKnownSymbol = require_well_known_symbol();
2005 var $TypeError = TypeError;
2006 var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
2007 module.exports = function(input, pref) {
2008 if (!isObject(input) || isSymbol(input)) {
2009 return input;
2010 }
2011 var exoticToPrim = getMethod(input, TO_PRIMITIVE);
2012 var result;
2013 if (exoticToPrim) {
2014 if (pref === void 0) {
2015 pref = 'default';
2016 }
2017 result = call(exoticToPrim, input, pref);
2018 if (!isObject(result) || isSymbol(result)) {
2019 return result;
2020 }
2021 throw new $TypeError('Can\'t convert object to primitive value');
2022 }
2023 if (pref === void 0) {
2024 pref = 'number';
2025 }
2026 return ordinaryToPrimitive(input, pref);
2027 };
2028 });
2029 var require_to_property_key = __commonJS(function(exports, module) {
2030 'use strict';
2031 var toPrimitive = require_to_primitive();
2032 var isSymbol = require_is_symbol();
2033 module.exports = function(argument) {
2034 var key = toPrimitive(argument, 'string');
2035 return isSymbol(key) ? key : key + '';
2036 };
2037 });
2038 var require_document_create_element = __commonJS(function(exports, module) {
2039 'use strict';
2040 var globalThis2 = require_global_this();
2041 var isObject = require_is_object();
2042 var document2 = globalThis2.document;
2043 var EXISTS = isObject(document2) && isObject(document2.createElement);
2044 module.exports = function(it) {
2045 return EXISTS ? document2.createElement(it) : {};
2046 };
2047 });
2048 var require_ie8_dom_define = __commonJS(function(exports, module) {
2049 'use strict';
2050 var DESCRIPTORS = require_descriptors();
2051 var fails = require_fails();
2052 var createElement = require_document_create_element();
2053 module.exports = !DESCRIPTORS && !fails(function() {
2054 return Object.defineProperty(createElement('div'), 'a', {
2055 get: function get() {
2056 return 7;
2057 }
2058 }).a !== 7;
2059 });
2060 });
2061 var require_object_get_own_property_descriptor = __commonJS(function(exports) {
2062 'use strict';
2063 var DESCRIPTORS = require_descriptors();
2064 var call = require_function_call();
2065 var propertyIsEnumerableModule = require_object_property_is_enumerable();
2066 var createPropertyDescriptor = require_create_property_descriptor();
2067 var toIndexedObject = require_to_indexed_object();
2068 var toPropertyKey = require_to_property_key();
2069 var hasOwn2 = require_has_own_property();
2070 var IE8_DOM_DEFINE = require_ie8_dom_define();
2071 var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2072 exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
2073 O = toIndexedObject(O);
2074 P = toPropertyKey(P);
2075 if (IE8_DOM_DEFINE) {
2076 try {
2077 return $getOwnPropertyDescriptor(O, P);
2078 } catch (error) {}
2079 }
2080 if (hasOwn2(O, P)) {
2081 return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
2082 }
2083 };
2084 });
2085 var require_is_forced = __commonJS(function(exports, module) {
2086 'use strict';
2087 var fails = require_fails();
2088 var isCallable = require_is_callable();
2089 var replacement = /#|\.prototype\./;
2090 var isForced = function isForced(feature, detection) {
2091 var value = data[normalize(feature)];
2092 return value === POLYFILL ? true : value === NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
2093 };
2094 var normalize = isForced.normalize = function(string) {
2095 return String(string).replace(replacement, '.').toLowerCase();
2096 };
2097 var data = isForced.data = {};
2098 var NATIVE = isForced.NATIVE = 'N';
2099 var POLYFILL = isForced.POLYFILL = 'P';
2100 module.exports = isForced;
2101 });
2102 var require_function_bind_context = __commonJS(function(exports, module) {
2103 'use strict';
2104 var uncurryThis = require_function_uncurry_this_clause();
2105 var aCallable = require_a_callable();
2106 var NATIVE_BIND = require_function_bind_native();
2107 var bind = uncurryThis(uncurryThis.bind);
2108 module.exports = function(fn, that) {
2109 aCallable(fn);
2110 return that === void 0 ? fn : NATIVE_BIND ? bind(fn, that) : function() {
2111 return fn.apply(that, arguments);
2112 };
2113 };
2114 });
2115 var require_v8_prototype_define_bug = __commonJS(function(exports, module) {
2116 'use strict';
2117 var DESCRIPTORS = require_descriptors();
2118 var fails = require_fails();
2119 module.exports = DESCRIPTORS && fails(function() {
2120 return Object.defineProperty(function() {}, 'prototype', {
2121 value: 42,
2122 writable: false
2123 }).prototype !== 42;
2124 });
2125 });
2126 var require_an_object = __commonJS(function(exports, module) {
2127 'use strict';
2128 var isObject = require_is_object();
2129 var $String = String;
2130 var $TypeError = TypeError;
2131 module.exports = function(argument) {
2132 if (isObject(argument)) {
2133 return argument;
2134 }
2135 throw new $TypeError($String(argument) + ' is not an object');
2136 };
2137 });
2138 var require_object_define_property = __commonJS(function(exports) {
2139 'use strict';
2140 var DESCRIPTORS = require_descriptors();
2141 var IE8_DOM_DEFINE = require_ie8_dom_define();
2142 var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
2143 var anObject = require_an_object();
2144 var toPropertyKey = require_to_property_key();
2145 var $TypeError = TypeError;
2146 var $defineProperty = Object.defineProperty;
2147 var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2148 var ENUMERABLE = 'enumerable';
2149 var CONFIGURABLE = 'configurable';
2150 var WRITABLE = 'writable';
2151 exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
2152 anObject(O);
2153 P = toPropertyKey(P);
2154 anObject(Attributes);
2155 if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
2156 var current = $getOwnPropertyDescriptor(O, P);
2157 if (current && current[WRITABLE]) {
2158 O[P] = Attributes.value;
2159 Attributes = {
2160 configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
2161 enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
2162 writable: false
2163 };
2164 }
2165 }
2166 return $defineProperty(O, P, Attributes);
2167 } : $defineProperty : function defineProperty(O, P, Attributes) {
2168 anObject(O);
2169 P = toPropertyKey(P);
2170 anObject(Attributes);
2171 if (IE8_DOM_DEFINE) {
2172 try {
2173 return $defineProperty(O, P, Attributes);
2174 } catch (error) {}
2175 }
2176 if ('get' in Attributes || 'set' in Attributes) {
2177 throw new $TypeError('Accessors not supported');
2178 }
2179 if ('value' in Attributes) {
2180 O[P] = Attributes.value;
2181 }
2182 return O;
2183 };
2184 });
2185 var require_create_non_enumerable_property = __commonJS(function(exports, module) {
2186 'use strict';
2187 var DESCRIPTORS = require_descriptors();
2188 var definePropertyModule = require_object_define_property();
2189 var createPropertyDescriptor = require_create_property_descriptor();
2190 module.exports = DESCRIPTORS ? function(object, key, value) {
2191 return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
2192 } : function(object, key, value) {
2193 object[key] = value;
2194 return object;
2195 };
2196 });
2197 var require_export = __commonJS(function(exports, module) {
2198 'use strict';
2199 var globalThis2 = require_global_this();
2200 var apply = require_function_apply();
2201 var uncurryThis = require_function_uncurry_this_clause();
2202 var isCallable = require_is_callable();
2203 var getOwnPropertyDescriptor = require_object_get_own_property_descriptor().f;
2204 var isForced = require_is_forced();
2205 var path = require_path();
2206 var bind = require_function_bind_context();
2207 var createNonEnumerableProperty = require_create_non_enumerable_property();
2208 var hasOwn2 = require_has_own_property();
2209 require_shared_store();
2210 var wrapConstructor = function wrapConstructor(NativeConstructor) {
2211 var _Wrapper = function Wrapper(a2, b2, c4) {
2212 if (this instanceof _Wrapper) {
2213 switch (arguments.length) {
2214 case 0:
2215 return new NativeConstructor();
2216
2217 case 1:
2218 return new NativeConstructor(a2);
2219
2220 case 2:
2221 return new NativeConstructor(a2, b2);
2222 }
2223 return new NativeConstructor(a2, b2, c4);
2224 }
2225 return apply(NativeConstructor, this, arguments);
2226 };
2227 _Wrapper.prototype = NativeConstructor.prototype;
2228 return _Wrapper;
2229 };
2230 module.exports = function(options, source) {
2231 var TARGET = options.target;
2232 var GLOBAL = options.global;
2233 var STATIC = options.stat;
2234 var PROTO = options.proto;
2235 var nativeSource = GLOBAL ? globalThis2 : STATIC ? globalThis2[TARGET] : globalThis2[TARGET] && globalThis2[TARGET].prototype;
2236 var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];
2237 var targetPrototype = target.prototype;
2238 var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;
2239 var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;
2240 for (key in source) {
2241 FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
2242 USE_NATIVE = !FORCED && nativeSource && hasOwn2(nativeSource, key);
2243 targetProperty = target[key];
2244 if (USE_NATIVE) {
2245 if (options.dontCallGetSet) {
2246 descriptor = getOwnPropertyDescriptor(nativeSource, key);
2247 nativeProperty = descriptor && descriptor.value;
2248 } else {
2249 nativeProperty = nativeSource[key];
2250 }
2251 }
2252 sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key];
2253 if (!FORCED && !PROTO && _typeof(targetProperty) == _typeof(sourceProperty)) {
2254 continue;
2255 }
2256 if (options.bind && USE_NATIVE) {
2257 resultProperty = bind(sourceProperty, globalThis2);
2258 } else if (options.wrap && USE_NATIVE) {
2259 resultProperty = wrapConstructor(sourceProperty);
2260 } else if (PROTO && isCallable(sourceProperty)) {
2261 resultProperty = uncurryThis(sourceProperty);
2262 } else {
2263 resultProperty = sourceProperty;
2264 }
2265 if (options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) {
2266 createNonEnumerableProperty(resultProperty, 'sham', true);
2267 }
2268 createNonEnumerableProperty(target, key, resultProperty);
2269 if (PROTO) {
2270 VIRTUAL_PROTOTYPE = TARGET + 'Prototype';
2271 if (!hasOwn2(path, VIRTUAL_PROTOTYPE)) {
2272 createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});
2273 }
2274 createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty);
2275 if (options.real && targetPrototype && (FORCED || !targetPrototype[key])) {
2276 createNonEnumerableProperty(targetPrototype, key, sourceProperty);
2277 }
2278 }
2279 }
2280 };
2281 });
2282 var require_es_object_has_own = __commonJS(function() {
2283 'use strict';
2284 var $ = require_export();
2285 var hasOwn2 = require_has_own_property();
2286 $({
2287 target: 'Object',
2288 stat: true
2289 }, {
2290 hasOwn: hasOwn2
2291 });
2292 });
2293 var require_has_own = __commonJS(function(exports, module) {
2294 'use strict';
2295 require_es_object_has_own();
2296 var path = require_path();
2297 module.exports = path.Object.hasOwn;
2298 });
2299 var require_has_own2 = __commonJS(function(exports, module) {
2300 'use strict';
2301 var parent = require_has_own();
2302 module.exports = parent;
2303 });
2304 var require_has_own3 = __commonJS(function(exports, module) {
2305 'use strict';
2306 var parent = require_has_own2();
2307 module.exports = parent;
2308 });
2309 var require_shared_key = __commonJS(function(exports, module) {
2310 'use strict';
2311 var shared = require_shared();
2312 var uid = require_uid();
2313 var keys = shared('keys');
2314 module.exports = function(key) {
2315 return keys[key] || (keys[key] = uid(key));
2316 };
2317 });
2318 var require_correct_prototype_getter = __commonJS(function(exports, module) {
2319 'use strict';
2320 var fails = require_fails();
2321 module.exports = !fails(function() {
2322 function F() {}
2323 F.prototype.constructor = null;
2324 return Object.getPrototypeOf(new F()) !== F.prototype;
2325 });
2326 });
2327 var require_object_get_prototype_of = __commonJS(function(exports, module) {
2328 'use strict';
2329 var hasOwn2 = require_has_own_property();
2330 var isCallable = require_is_callable();
2331 var toObject = require_to_object();
2332 var sharedKey = require_shared_key();
2333 var CORRECT_PROTOTYPE_GETTER = require_correct_prototype_getter();
2334 var IE_PROTO = sharedKey('IE_PROTO');
2335 var $Object = Object;
2336 var ObjectPrototype = $Object.prototype;
2337 module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function(O) {
2338 var object = toObject(O);
2339 if (hasOwn2(object, IE_PROTO)) {
2340 return object[IE_PROTO];
2341 }
2342 var constructor = object.constructor;
2343 if (isCallable(constructor) && object instanceof constructor) {
2344 return constructor.prototype;
2345 }
2346 return object instanceof $Object ? ObjectPrototype : null;
2347 };
2348 });
2349 var require_math_trunc = __commonJS(function(exports, module) {
2350 'use strict';
2351 var ceil = Math.ceil;
2352 var floor = Math.floor;
2353 module.exports = Math.trunc || function trunc(x) {
2354 var n2 = +x;
2355 return (n2 > 0 ? floor : ceil)(n2);
2356 };
2357 });
2358 var require_to_integer_or_infinity = __commonJS(function(exports, module) {
2359 'use strict';
2360 var trunc = require_math_trunc();
2361 module.exports = function(argument) {
2362 var number = +argument;
2363 return number !== number || number === 0 ? 0 : trunc(number);
2364 };
2365 });
2366 var require_to_absolute_index = __commonJS(function(exports, module) {
2367 'use strict';
2368 var toIntegerOrInfinity = require_to_integer_or_infinity();
2369 var max2 = Math.max;
2370 var min = Math.min;
2371 module.exports = function(index, length) {
2372 var integer = toIntegerOrInfinity(index);
2373 return integer < 0 ? max2(integer + length, 0) : min(integer, length);
2374 };
2375 });
2376 var require_to_length = __commonJS(function(exports, module) {
2377 'use strict';
2378 var toIntegerOrInfinity = require_to_integer_or_infinity();
2379 var min = Math.min;
2380 module.exports = function(argument) {
2381 var len = toIntegerOrInfinity(argument);
2382 return len > 0 ? min(len, 9007199254740991) : 0;
2383 };
2384 });
2385 var require_length_of_array_like = __commonJS(function(exports, module) {
2386 'use strict';
2387 var toLength = require_to_length();
2388 module.exports = function(obj) {
2389 return toLength(obj.length);
2390 };
2391 });
2392 var require_array_includes = __commonJS(function(exports, module) {
2393 'use strict';
2394 var toIndexedObject = require_to_indexed_object();
2395 var toAbsoluteIndex = require_to_absolute_index();
2396 var lengthOfArrayLike = require_length_of_array_like();
2397 var createMethod = function createMethod(IS_INCLUDES) {
2398 return function($this, el, fromIndex) {
2399 var O = toIndexedObject($this);
2400 var length = lengthOfArrayLike(O);
2401 if (length === 0) {
2402 return !IS_INCLUDES && -1;
2403 }
2404 var index = toAbsoluteIndex(fromIndex, length);
2405 var value;
2406 if (IS_INCLUDES && el !== el) {
2407 while (length > index) {
2408 value = O[index++];
2409 if (value !== value) {
2410 return true;
2411 }
2412 }
2413 } else {
2414 for (;length > index; index++) {
2415 if ((IS_INCLUDES || index in O) && O[index] === el) {
2416 return IS_INCLUDES || index || 0;
2417 }
2418 }
2419 }
2420 return !IS_INCLUDES && -1;
2421 };
2422 };
2423 module.exports = {
2424 includes: createMethod(true),
2425 indexOf: createMethod(false)
2426 };
2427 });
2428 var require_hidden_keys = __commonJS(function(exports, module) {
2429 'use strict';
2430 module.exports = {};
2431 });
2432 var require_object_keys_internal = __commonJS(function(exports, module) {
2433 'use strict';
2434 var uncurryThis = require_function_uncurry_this();
2435 var hasOwn2 = require_has_own_property();
2436 var toIndexedObject = require_to_indexed_object();
2437 var indexOf = require_array_includes().indexOf;
2438 var hiddenKeys = require_hidden_keys();
2439 var push = uncurryThis([].push);
2440 module.exports = function(object, names) {
2441 var O = toIndexedObject(object);
2442 var i = 0;
2443 var result = [];
2444 var key;
2445 for (key in O) {
2446 !hasOwn2(hiddenKeys, key) && hasOwn2(O, key) && push(result, key);
2447 }
2448 while (names.length > i) {
2449 if (hasOwn2(O, key = names[i++])) {
2450 ~indexOf(result, key) || push(result, key);
2451 }
2452 }
2453 return result;
2454 };
2455 });
2456 var require_enum_bug_keys = __commonJS(function(exports, module) {
2457 'use strict';
2458 module.exports = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ];
2459 });
2460 var require_object_keys = __commonJS(function(exports, module) {
2461 'use strict';
2462 var internalObjectKeys = require_object_keys_internal();
2463 var enumBugKeys = require_enum_bug_keys();
2464 module.exports = Object.keys || function keys(O) {
2465 return internalObjectKeys(O, enumBugKeys);
2466 };
2467 });
2468 var require_object_to_array = __commonJS(function(exports, module) {
2469 'use strict';
2470 var DESCRIPTORS = require_descriptors();
2471 var fails = require_fails();
2472 var uncurryThis = require_function_uncurry_this();
2473 var objectGetPrototypeOf = require_object_get_prototype_of();
2474 var objectKeys = require_object_keys();
2475 var toIndexedObject = require_to_indexed_object();
2476 var $propertyIsEnumerable = require_object_property_is_enumerable().f;
2477 var propertyIsEnumerable = uncurryThis($propertyIsEnumerable);
2478 var push = uncurryThis([].push);
2479 var IE_BUG = DESCRIPTORS && fails(function() {
2480 var O = Object.create(null);
2481 O[2] = 2;
2482 return !propertyIsEnumerable(O, 2);
2483 });
2484 var createMethod = function createMethod(TO_ENTRIES) {
2485 return function(it) {
2486 var O = toIndexedObject(it);
2487 var keys = objectKeys(O);
2488 var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null;
2489 var length = keys.length;
2490 var i = 0;
2491 var result = [];
2492 var key;
2493 while (length > i) {
2494 key = keys[i++];
2495 if (!DESCRIPTORS || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) {
2496 push(result, TO_ENTRIES ? [ key, O[key] ] : O[key]);
2497 }
2498 }
2499 return result;
2500 };
2501 };
2502 module.exports = {
2503 entries: createMethod(true),
2504 values: createMethod(false)
2505 };
2506 });
2507 var require_es_object_values = __commonJS(function() {
2508 'use strict';
2509 var $ = require_export();
2510 var $values = require_object_to_array().values;
2511 $({
2512 target: 'Object',
2513 stat: true
2514 }, {
2515 values: function values2(O) {
2516 return $values(O);
2517 }
2518 });
2519 });
2520 var require_values = __commonJS(function(exports, module) {
2521 'use strict';
2522 require_es_object_values();
2523 var path = require_path();
2524 module.exports = path.Object.values;
2525 });
2526 var require_values2 = __commonJS(function(exports, module) {
2527 'use strict';
2528 var parent = require_values();
2529 module.exports = parent;
2530 });
2531 var require_values3 = __commonJS(function(exports, module) {
2532 'use strict';
2533 var parent = require_values2();
2534 module.exports = parent;
2535 });
2536 var require_to_string_tag_support = __commonJS(function(exports, module) {
2537 'use strict';
2538 var wellKnownSymbol = require_well_known_symbol();
2539 var TO_STRING_TAG = wellKnownSymbol('toStringTag');
2540 var test = {};
2541 test[TO_STRING_TAG] = 'z';
2542 module.exports = String(test) === '[object z]';
2543 });
2544 var require_classof = __commonJS(function(exports, module) {
2545 'use strict';
2546 var TO_STRING_TAG_SUPPORT = require_to_string_tag_support();
2547 var isCallable = require_is_callable();
2548 var classofRaw = require_classof_raw();
2549 var wellKnownSymbol = require_well_known_symbol();
2550 var TO_STRING_TAG = wellKnownSymbol('toStringTag');
2551 var $Object = Object;
2552 var CORRECT_ARGUMENTS = classofRaw(function() {
2553 return arguments;
2554 }()) === 'Arguments';
2555 var tryGet = function tryGet(it, key) {
2556 try {
2557 return it[key];
2558 } catch (error) {}
2559 };
2560 module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function(it) {
2561 var O, tag, result;
2562 return it === void 0 ? 'Undefined' : it === null ? 'Null' : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
2563 };
2564 });
2565 var require_to_string = __commonJS(function(exports, module) {
2566 'use strict';
2567 var classof = require_classof();
2568 var $String = String;
2569 module.exports = function(argument) {
2570 if (classof(argument) === 'Symbol') {
2571 throw new TypeError('Cannot convert a Symbol value to a string');
2572 }
2573 return $String(argument);
2574 };
2575 });
2576 var require_string_multibyte = __commonJS(function(exports, module) {
2577 'use strict';
2578 var uncurryThis = require_function_uncurry_this();
2579 var toIntegerOrInfinity = require_to_integer_or_infinity();
2580 var toString = require_to_string();
2581 var requireObjectCoercible = require_require_object_coercible();
2582 var charAt = uncurryThis(''.charAt);
2583 var charCodeAt = uncurryThis(''.charCodeAt);
2584 var stringSlice = uncurryThis(''.slice);
2585 var createMethod = function createMethod(CONVERT_TO_STRING) {
2586 return function($this, pos) {
2587 var S = toString(requireObjectCoercible($this));
2588 var position = toIntegerOrInfinity(pos);
2589 var size = S.length;
2590 var first, second;
2591 if (position < 0 || position >= size) {
2592 return CONVERT_TO_STRING ? '' : void 0;
2593 }
2594 first = charCodeAt(S, position);
2595 return first < 55296 || first > 56319 || position + 1 === size || (second = charCodeAt(S, position + 1)) < 56320 || second > 57343 ? CONVERT_TO_STRING ? charAt(S, position) : first : CONVERT_TO_STRING ? stringSlice(S, position, position + 2) : (first - 55296 << 10) + (second - 56320) + 65536;
2596 };
2597 };
2598 module.exports = {
2599 codeAt: createMethod(false),
2600 charAt: createMethod(true)
2601 };
2602 });
2603 var require_weak_map_basic_detection = __commonJS(function(exports, module) {
2604 'use strict';
2605 var globalThis2 = require_global_this();
2606 var isCallable = require_is_callable();
2607 var WeakMap2 = globalThis2.WeakMap;
2608 module.exports = isCallable(WeakMap2) && /native code/.test(String(WeakMap2));
2609 });
2610 var require_internal_state = __commonJS(function(exports, module) {
2611 'use strict';
2612 var NATIVE_WEAK_MAP = require_weak_map_basic_detection();
2613 var globalThis2 = require_global_this();
2614 var isObject = require_is_object();
2615 var createNonEnumerableProperty = require_create_non_enumerable_property();
2616 var hasOwn2 = require_has_own_property();
2617 var shared = require_shared_store();
2618 var sharedKey = require_shared_key();
2619 var hiddenKeys = require_hidden_keys();
2620 var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
2621 var TypeError2 = globalThis2.TypeError;
2622 var WeakMap2 = globalThis2.WeakMap;
2623 var set2;
2624 var get2;
2625 var has;
2626 var enforce = function enforce(it) {
2627 return has(it) ? get2(it) : set2(it, {});
2628 };
2629 var getterFor = function getterFor(TYPE) {
2630 return function(it) {
2631 var state;
2632 if (!isObject(it) || (state = get2(it)).type !== TYPE) {
2633 throw new TypeError2('Incompatible receiver, ' + TYPE + ' required');
2634 }
2635 return state;
2636 };
2637 };
2638 if (NATIVE_WEAK_MAP || shared.state) {
2639 store = shared.state || (shared.state = new WeakMap2());
2640 store.get = store.get;
2641 store.has = store.has;
2642 store.set = store.set;
2643 set2 = function set2(it, metadata) {
2644 if (store.has(it)) {
2645 throw new TypeError2(OBJECT_ALREADY_INITIALIZED);
2646 }
2647 metadata.facade = it;
2648 store.set(it, metadata);
2649 return metadata;
2650 };
2651 get2 = function get2(it) {
2652 return store.get(it) || {};
2653 };
2654 has = function has(it) {
2655 return store.has(it);
2656 };
2657 } else {
2658 STATE = sharedKey('state');
2659 hiddenKeys[STATE] = true;
2660 set2 = function set2(it, metadata) {
2661 if (hasOwn2(it, STATE)) {
2662 throw new TypeError2(OBJECT_ALREADY_INITIALIZED);
2663 }
2664 metadata.facade = it;
2665 createNonEnumerableProperty(it, STATE, metadata);
2666 return metadata;
2667 };
2668 get2 = function get2(it) {
2669 return hasOwn2(it, STATE) ? it[STATE] : {};
2670 };
2671 has = function has(it) {
2672 return hasOwn2(it, STATE);
2673 };
2674 }
2675 var store;
2676 var STATE;
2677 module.exports = {
2678 set: set2,
2679 get: get2,
2680 has: has,
2681 enforce: enforce,
2682 getterFor: getterFor
2683 };
2684 });
2685 var require_function_name = __commonJS(function(exports, module) {
2686 'use strict';
2687 var DESCRIPTORS = require_descriptors();
2688 var hasOwn2 = require_has_own_property();
2689 var FunctionPrototype = Function.prototype;
2690 var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
2691 var EXISTS = hasOwn2(FunctionPrototype, 'name');
2692 var PROPER = EXISTS && function something() {}.name === 'something';
2693 var CONFIGURABLE = EXISTS && (!DESCRIPTORS || DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable);
2694 module.exports = {
2695 EXISTS: EXISTS,
2696 PROPER: PROPER,
2697 CONFIGURABLE: CONFIGURABLE
2698 };
2699 });
2700 var require_object_define_properties = __commonJS(function(exports) {
2701 'use strict';
2702 var DESCRIPTORS = require_descriptors();
2703 var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
2704 var definePropertyModule = require_object_define_property();
2705 var anObject = require_an_object();
2706 var toIndexedObject = require_to_indexed_object();
2707 var objectKeys = require_object_keys();
2708 exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
2709 anObject(O);
2710 var props = toIndexedObject(Properties);
2711 var keys = objectKeys(Properties);
2712 var length = keys.length;
2713 var index = 0;
2714 var key;
2715 while (length > index) {
2716 definePropertyModule.f(O, key = keys[index++], props[key]);
2717 }
2718 return O;
2719 };
2720 });
2721 var require_html = __commonJS(function(exports, module) {
2722 'use strict';
2723 var getBuiltIn = require_get_built_in();
2724 module.exports = getBuiltIn('document', 'documentElement');
2725 });
2726 var require_object_create = __commonJS(function(exports, module) {
2727 'use strict';
2728 var anObject = require_an_object();
2729 var definePropertiesModule = require_object_define_properties();
2730 var enumBugKeys = require_enum_bug_keys();
2731 var hiddenKeys = require_hidden_keys();
2732 var html = require_html();
2733 var documentCreateElement = require_document_create_element();
2734 var sharedKey = require_shared_key();
2735 var GT = '>';
2736 var LT = '<';
2737 var PROTOTYPE = 'prototype';
2738 var SCRIPT = 'script';
2739 var IE_PROTO = sharedKey('IE_PROTO');
2740 var EmptyConstructor = function EmptyConstructor() {};
2741 var scriptTag = function scriptTag(content) {
2742 return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
2743 };
2744 var NullProtoObjectViaActiveX = function NullProtoObjectViaActiveX(activeXDocument2) {
2745 activeXDocument2.write(scriptTag(''));
2746 activeXDocument2.close();
2747 var temp = activeXDocument2.parentWindow.Object;
2748 activeXDocument2 = null;
2749 return temp;
2750 };
2751 var NullProtoObjectViaIFrame = function NullProtoObjectViaIFrame() {
2752 var iframe = documentCreateElement('iframe');
2753 var JS = 'java' + SCRIPT + ':';
2754 var iframeDocument;
2755 iframe.style.display = 'none';
2756 html.appendChild(iframe);
2757 iframe.src = String(JS);
2758 iframeDocument = iframe.contentWindow.document;
2759 iframeDocument.open();
2760 iframeDocument.write(scriptTag('document.F=Object'));
2761 iframeDocument.close();
2762 return iframeDocument.F;
2763 };
2764 var activeXDocument;
2765 var _NullProtoObject = function NullProtoObject() {
2766 try {
2767 activeXDocument = new ActiveXObject('htmlfile');
2768 } catch (error) {}
2769 _NullProtoObject = typeof document != 'undefined' ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument);
2770 var length = enumBugKeys.length;
2771 while (length--) {
2772 delete _NullProtoObject[PROTOTYPE][enumBugKeys[length]];
2773 }
2774 return _NullProtoObject();
2775 };
2776 hiddenKeys[IE_PROTO] = true;
2777 module.exports = Object.create || function create(O, Properties) {
2778 var result;
2779 if (O !== null) {
2780 EmptyConstructor[PROTOTYPE] = anObject(O);
2781 result = new EmptyConstructor();
2782 EmptyConstructor[PROTOTYPE] = null;
2783 result[IE_PROTO] = O;
2784 } else {
2785 result = _NullProtoObject();
2786 }
2787 return Properties === void 0 ? result : definePropertiesModule.f(result, Properties);
2788 };
2789 });
2790 var require_define_built_in = __commonJS(function(exports, module) {
2791 'use strict';
2792 var createNonEnumerableProperty = require_create_non_enumerable_property();
2793 module.exports = function(target, key, value, options) {
2794 if (options && options.enumerable) {
2795 target[key] = value;
2796 } else {
2797 createNonEnumerableProperty(target, key, value);
2798 }
2799 return target;
2800 };
2801 });
2802 var require_iterators_core = __commonJS(function(exports, module) {
2803 'use strict';
2804 var fails = require_fails();
2805 var isCallable = require_is_callable();
2806 var isObject = require_is_object();
2807 var create = require_object_create();
2808 var getPrototypeOf = require_object_get_prototype_of();
2809 var defineBuiltIn = require_define_built_in();
2810 var wellKnownSymbol = require_well_known_symbol();
2811 var IS_PURE = require_is_pure();
2812 var ITERATOR = wellKnownSymbol('iterator');
2813 var BUGGY_SAFARI_ITERATORS = false;
2814 var IteratorPrototype;
2815 var PrototypeOfArrayIteratorPrototype;
2816 var arrayIterator;
2817 if ([].keys) {
2818 arrayIterator = [].keys();
2819 if (!('next' in arrayIterator)) {
2820 BUGGY_SAFARI_ITERATORS = true;
2821 } else {
2822 PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
2823 if (PrototypeOfArrayIteratorPrototype !== Object.prototype) {
2824 IteratorPrototype = PrototypeOfArrayIteratorPrototype;
2825 }
2826 }
2827 }
2828 var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function() {
2829 var test = {};
2830 return IteratorPrototype[ITERATOR].call(test) !== test;
2831 });
2832 if (NEW_ITERATOR_PROTOTYPE) {
2833 IteratorPrototype = {};
2834 } else if (IS_PURE) {
2835 IteratorPrototype = create(IteratorPrototype);
2836 }
2837 if (!isCallable(IteratorPrototype[ITERATOR])) {
2838 defineBuiltIn(IteratorPrototype, ITERATOR, function() {
2839 return this;
2840 });
2841 }
2842 module.exports = {
2843 IteratorPrototype: IteratorPrototype,
2844 BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
2845 };
2846 });
2847 var require_object_to_string = __commonJS(function(exports, module) {
2848 'use strict';
2849 var TO_STRING_TAG_SUPPORT = require_to_string_tag_support();
2850 var classof = require_classof();
2851 module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
2852 return '[object ' + classof(this) + ']';
2853 };
2854 });
2855 var require_set_to_string_tag = __commonJS(function(exports, module) {
2856 'use strict';
2857 var TO_STRING_TAG_SUPPORT = require_to_string_tag_support();
2858 var defineProperty = require_object_define_property().f;
2859 var createNonEnumerableProperty = require_create_non_enumerable_property();
2860 var hasOwn2 = require_has_own_property();
2861 var toString = require_object_to_string();
2862 var wellKnownSymbol = require_well_known_symbol();
2863 var TO_STRING_TAG = wellKnownSymbol('toStringTag');
2864 module.exports = function(it, TAG, STATIC, SET_METHOD) {
2865 var target = STATIC ? it : it && it.prototype;
2866 if (target) {
2867 if (!hasOwn2(target, TO_STRING_TAG)) {
2868 defineProperty(target, TO_STRING_TAG, {
2869 configurable: true,
2870 value: TAG
2871 });
2872 }
2873 if (SET_METHOD && !TO_STRING_TAG_SUPPORT) {
2874 createNonEnumerableProperty(target, 'toString', toString);
2875 }
2876 }
2877 };
2878 });
2879 var require_iterators = __commonJS(function(exports, module) {
2880 'use strict';
2881 module.exports = {};
2882 });
2883 var require_iterator_create_constructor = __commonJS(function(exports, module) {
2884 'use strict';
2885 var IteratorPrototype = require_iterators_core().IteratorPrototype;
2886 var create = require_object_create();
2887 var createPropertyDescriptor = require_create_property_descriptor();
2888 var setToStringTag = require_set_to_string_tag();
2889 var Iterators = require_iterators();
2890 var returnThis = function returnThis() {
2891 return this;
2892 };
2893 module.exports = function(IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
2894 var TO_STRING_TAG = NAME + ' Iterator';
2895 IteratorConstructor.prototype = create(IteratorPrototype, {
2896 next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next)
2897 });
2898 setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
2899 Iterators[TO_STRING_TAG] = returnThis;
2900 return IteratorConstructor;
2901 };
2902 });
2903 var require_function_uncurry_this_accessor = __commonJS(function(exports, module) {
2904 'use strict';
2905 var uncurryThis = require_function_uncurry_this();
2906 var aCallable = require_a_callable();
2907 module.exports = function(object, key, method) {
2908 try {
2909 return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
2910 } catch (error) {}
2911 };
2912 });
2913 var require_is_possible_prototype = __commonJS(function(exports, module) {
2914 'use strict';
2915 var isObject = require_is_object();
2916 module.exports = function(argument) {
2917 return isObject(argument) || argument === null;
2918 };
2919 });
2920 var require_a_possible_prototype = __commonJS(function(exports, module) {
2921 'use strict';
2922 var isPossiblePrototype = require_is_possible_prototype();
2923 var $String = String;
2924 var $TypeError = TypeError;
2925 module.exports = function(argument) {
2926 if (isPossiblePrototype(argument)) {
2927 return argument;
2928 }
2929 throw new $TypeError('Can\'t set ' + $String(argument) + ' as a prototype');
2930 };
2931 });
2932 var require_object_set_prototype_of = __commonJS(function(exports, module) {
2933 'use strict';
2934 var uncurryThisAccessor = require_function_uncurry_this_accessor();
2935 var isObject = require_is_object();
2936 var requireObjectCoercible = require_require_object_coercible();
2937 var aPossiblePrototype = require_a_possible_prototype();
2938 module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function() {
2939 var CORRECT_SETTER = false;
2940 var test = {};
2941 var setter;
2942 try {
2943 setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
2944 setter(test, []);
2945 CORRECT_SETTER = test instanceof Array;
2946 } catch (error) {}
2947 return function setPrototypeOf(O, proto) {
2948 requireObjectCoercible(O);
2949 aPossiblePrototype(proto);
2950 if (!isObject(O)) {
2951 return O;
2952 }
2953 if (CORRECT_SETTER) {
2954 setter(O, proto);
2955 } else {
2956 O.__proto__ = proto;
2957 }
2958 return O;
2959 };
2960 }() : void 0);
2961 });
2962 var require_iterator_define = __commonJS(function(exports, module) {
2963 'use strict';
2964 var $ = require_export();
2965 var call = require_function_call();
2966 var IS_PURE = require_is_pure();
2967 var FunctionName = require_function_name();
2968 var isCallable = require_is_callable();
2969 var createIteratorConstructor = require_iterator_create_constructor();
2970 var getPrototypeOf = require_object_get_prototype_of();
2971 var setPrototypeOf = require_object_set_prototype_of();
2972 var setToStringTag = require_set_to_string_tag();
2973 var createNonEnumerableProperty = require_create_non_enumerable_property();
2974 var defineBuiltIn = require_define_built_in();
2975 var wellKnownSymbol = require_well_known_symbol();
2976 var Iterators = require_iterators();
2977 var IteratorsCore = require_iterators_core();
2978 var PROPER_FUNCTION_NAME = FunctionName.PROPER;
2979 var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
2980 var IteratorPrototype = IteratorsCore.IteratorPrototype;
2981 var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
2982 var ITERATOR = wellKnownSymbol('iterator');
2983 var KEYS = 'keys';
2984 var VALUES = 'values';
2985 var ENTRIES = 'entries';
2986 var returnThis = function returnThis() {
2987 return this;
2988 };
2989 module.exports = function(Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
2990 createIteratorConstructor(IteratorConstructor, NAME, next);
2991 var getIterationMethod = function getIterationMethod(KIND) {
2992 if (KIND === DEFAULT && defaultIterator) {
2993 return defaultIterator;
2994 }
2995 if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) {
2996 return IterablePrototype[KIND];
2997 }
2998 switch (KIND) {
2999 case KEYS:
3000 return function keys() {
3001 return new IteratorConstructor(this, KIND);
3002 };
3003
3004 case VALUES:
3005 return function values2() {
3006 return new IteratorConstructor(this, KIND);
3007 };
3008
3009 case ENTRIES:
3010 return function entries() {
3011 return new IteratorConstructor(this, KIND);
3012 };
3013 }
3014 return function() {
3015 return new IteratorConstructor(this);
3016 };
3017 };
3018 var TO_STRING_TAG = NAME + ' Iterator';
3019 var INCORRECT_VALUES_NAME = false;
3020 var IterablePrototype = Iterable.prototype;
3021 var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT];
3022 var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
3023 var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
3024 var CurrentIteratorPrototype, methods, KEY;
3025 if (anyNativeIterator) {
3026 CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
3027 if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
3028 if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
3029 if (setPrototypeOf) {
3030 setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
3031 } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {
3032 defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis);
3033 }
3034 }
3035 setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
3036 if (IS_PURE) {
3037 Iterators[TO_STRING_TAG] = returnThis;
3038 }
3039 }
3040 }
3041 if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
3042 if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {
3043 createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
3044 } else {
3045 INCORRECT_VALUES_NAME = true;
3046 defaultIterator = function values2() {
3047 return call(nativeIterator, this);
3048 };
3049 }
3050 }
3051 if (DEFAULT) {
3052 methods = {
3053 values: getIterationMethod(VALUES),
3054 keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
3055 entries: getIterationMethod(ENTRIES)
3056 };
3057 if (FORCED) {
3058 for (KEY in methods) {
3059 if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
3060 defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
3061 }
3062 }
3063 } else {
3064 $({
3065 target: NAME,
3066 proto: true,
3067 forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME
3068 }, methods);
3069 }
3070 }
3071 if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
3072 defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, {
3073 name: DEFAULT
3074 });
3075 }
3076 Iterators[NAME] = defaultIterator;
3077 return methods;
3078 };
3079 });
3080 var require_create_iter_result_object = __commonJS(function(exports, module) {
3081 'use strict';
3082 module.exports = function(value, done) {
3083 return {
3084 value: value,
3085 done: done
3086 };
3087 };
3088 });
3089 var require_es_string_iterator = __commonJS(function() {
3090 'use strict';
3091 var charAt = require_string_multibyte().charAt;
3092 var toString = require_to_string();
3093 var InternalStateModule = require_internal_state();
3094 var defineIterator = require_iterator_define();
3095 var createIterResultObject = require_create_iter_result_object();
3096 var STRING_ITERATOR = 'String Iterator';
3097 var setInternalState = InternalStateModule.set;
3098 var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
3099 defineIterator(String, 'String', function(iterated) {
3100 setInternalState(this, {
3101 type: STRING_ITERATOR,
3102 string: toString(iterated),
3103 index: 0
3104 });
3105 }, function next() {
3106 var state = getInternalState(this);
3107 var string = state.string;
3108 var index = state.index;
3109 var point;
3110 if (index >= string.length) {
3111 return createIterResultObject(void 0, true);
3112 }
3113 point = charAt(string, index);
3114 state.index += point.length;
3115 return createIterResultObject(point, false);
3116 });
3117 });
3118 var require_iterator_close = __commonJS(function(exports, module) {
3119 'use strict';
3120 var call = require_function_call();
3121 var anObject = require_an_object();
3122 var getMethod = require_get_method();
3123 module.exports = function(iterator, kind, value) {
3124 var innerResult, innerError;
3125 anObject(iterator);
3126 try {
3127 innerResult = getMethod(iterator, 'return');
3128 if (!innerResult) {
3129 if (kind === 'throw') {
3130 throw value;
3131 }
3132 return value;
3133 }
3134 innerResult = call(innerResult, iterator);
3135 } catch (error) {
3136 innerError = true;
3137 innerResult = error;
3138 }
3139 if (kind === 'throw') {
3140 throw value;
3141 }
3142 if (innerError) {
3143 throw innerResult;
3144 }
3145 anObject(innerResult);
3146 return value;
3147 };
3148 });
3149 var require_call_with_safe_iteration_closing = __commonJS(function(exports, module) {
3150 'use strict';
3151 var anObject = require_an_object();
3152 var iteratorClose = require_iterator_close();
3153 module.exports = function(iterator, fn, value, ENTRIES) {
3154 try {
3155 return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
3156 } catch (error) {
3157 iteratorClose(iterator, 'throw', error);
3158 }
3159 };
3160 });
3161 var require_is_array_iterator_method = __commonJS(function(exports, module) {
3162 'use strict';
3163 var wellKnownSymbol = require_well_known_symbol();
3164 var Iterators = require_iterators();
3165 var ITERATOR = wellKnownSymbol('iterator');
3166 var ArrayPrototype = Array.prototype;
3167 module.exports = function(it) {
3168 return it !== void 0 && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
3169 };
3170 });
3171 var require_inspect_source = __commonJS(function(exports, module) {
3172 'use strict';
3173 var uncurryThis = require_function_uncurry_this();
3174 var isCallable = require_is_callable();
3175 var store = require_shared_store();
3176 var functionToString = uncurryThis(Function.toString);
3177 if (!isCallable(store.inspectSource)) {
3178 store.inspectSource = function(it) {
3179 return functionToString(it);
3180 };
3181 }
3182 module.exports = store.inspectSource;
3183 });
3184 var require_is_constructor = __commonJS(function(exports, module) {
3185 'use strict';
3186 var uncurryThis = require_function_uncurry_this();
3187 var fails = require_fails();
3188 var isCallable = require_is_callable();
3189 var classof = require_classof();
3190 var getBuiltIn = require_get_built_in();
3191 var inspectSource = require_inspect_source();
3192 var noop3 = function noop3() {};
3193 var construct = getBuiltIn('Reflect', 'construct');
3194 var constructorRegExp = /^\s*(?:class|function)\b/;
3195 var exec = uncurryThis(constructorRegExp.exec);
3196 var INCORRECT_TO_STRING = !constructorRegExp.test(noop3);
3197 var isConstructorModern = function isConstructor(argument) {
3198 if (!isCallable(argument)) {
3199 return false;
3200 }
3201 try {
3202 construct(noop3, [], argument);
3203 return true;
3204 } catch (error) {
3205 return false;
3206 }
3207 };
3208 var isConstructorLegacy = function isConstructor(argument) {
3209 if (!isCallable(argument)) {
3210 return false;
3211 }
3212 switch (classof(argument)) {
3213 case 'AsyncFunction':
3214 case 'GeneratorFunction':
3215 case 'AsyncGeneratorFunction':
3216 return false;
3217 }
3218 try {
3219 return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
3220 } catch (error) {
3221 return true;
3222 }
3223 };
3224 isConstructorLegacy.sham = true;
3225 module.exports = !construct || fails(function() {
3226 var called;
3227 return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function() {
3228 called = true;
3229 }) || called;
3230 }) ? isConstructorLegacy : isConstructorModern;
3231 });
3232 var require_create_property = __commonJS(function(exports, module) {
3233 'use strict';
3234 var DESCRIPTORS = require_descriptors();
3235 var definePropertyModule = require_object_define_property();
3236 var createPropertyDescriptor = require_create_property_descriptor();
3237 module.exports = function(object, key, value) {
3238 if (DESCRIPTORS) {
3239 definePropertyModule.f(object, key, createPropertyDescriptor(0, value));
3240 } else {
3241 object[key] = value;
3242 }
3243 };
3244 });
3245 var require_is_array = __commonJS(function(exports, module) {
3246 'use strict';
3247 var classof = require_classof_raw();
3248 module.exports = Array.isArray || function isArray(argument) {
3249 return classof(argument) === 'Array';
3250 };
3251 });
3252 var require_array_set_length = __commonJS(function(exports, module) {
3253 'use strict';
3254 var DESCRIPTORS = require_descriptors();
3255 var isArray = require_is_array();
3256 var $TypeError = TypeError;
3257 var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
3258 var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function() {
3259 if (this !== void 0) {
3260 return true;
3261 }
3262 try {
3263 Object.defineProperty([], 'length', {
3264 writable: false
3265 }).length = 1;
3266 } catch (error) {
3267 return error instanceof TypeError;
3268 }
3269 }();
3270 module.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function(O, length) {
3271 if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
3272 throw new $TypeError('Cannot set read only .length');
3273 }
3274 return O.length = length;
3275 } : function(O, length) {
3276 return O.length = length;
3277 };
3278 });
3279 var require_get_iterator_method = __commonJS(function(exports, module) {
3280 'use strict';
3281 var classof = require_classof();
3282 var getMethod = require_get_method();
3283 var isNullOrUndefined = require_is_null_or_undefined();
3284 var Iterators = require_iterators();
3285 var wellKnownSymbol = require_well_known_symbol();
3286 var ITERATOR = wellKnownSymbol('iterator');
3287 module.exports = function(it) {
3288 if (!isNullOrUndefined(it)) {
3289 return getMethod(it, ITERATOR) || getMethod(it, '@@iterator') || Iterators[classof(it)];
3290 }
3291 };
3292 });
3293 var require_get_iterator = __commonJS(function(exports, module) {
3294 'use strict';
3295 var call = require_function_call();
3296 var aCallable = require_a_callable();
3297 var anObject = require_an_object();
3298 var tryToString = require_try_to_string();
3299 var getIteratorMethod = require_get_iterator_method();
3300 var $TypeError = TypeError;
3301 module.exports = function(argument, usingIterator) {
3302 var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
3303 if (aCallable(iteratorMethod)) {
3304 return anObject(call(iteratorMethod, argument));
3305 }
3306 throw new $TypeError(tryToString(argument) + ' is not iterable');
3307 };
3308 });
3309 var require_array_from = __commonJS(function(exports, module) {
3310 'use strict';
3311 var bind = require_function_bind_context();
3312 var call = require_function_call();
3313 var toObject = require_to_object();
3314 var callWithSafeIterationClosing = require_call_with_safe_iteration_closing();
3315 var isArrayIteratorMethod = require_is_array_iterator_method();
3316 var isConstructor = require_is_constructor();
3317 var lengthOfArrayLike = require_length_of_array_like();
3318 var createProperty = require_create_property();
3319 var setArrayLength = require_array_set_length();
3320 var getIterator = require_get_iterator();
3321 var getIteratorMethod = require_get_iterator_method();
3322 var $Array = Array;
3323 module.exports = function from(arrayLike) {
3324 var O = toObject(arrayLike);
3325 var IS_CONSTRUCTOR = isConstructor(this);
3326 var argumentsLength = arguments.length;
3327 var mapfn = argumentsLength > 1 ? arguments[1] : void 0;
3328 var mapping = mapfn !== void 0;
3329 if (mapping) {
3330 mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : void 0);
3331 }
3332 var iteratorMethod = getIteratorMethod(O);
3333 var index = 0;
3334 var length, result, step, iterator, next, value;
3335 if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {
3336 result = IS_CONSTRUCTOR ? new this() : [];
3337 iterator = getIterator(O, iteratorMethod);
3338 next = iterator.next;
3339 for (;!(step = call(next, iterator)).done; index++) {
3340 value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [ step.value, index ], true) : step.value;
3341 createProperty(result, index, value);
3342 }
3343 } else {
3344 length = lengthOfArrayLike(O);
3345 result = IS_CONSTRUCTOR ? new this(length) : $Array(length);
3346 for (;length > index; index++) {
3347 value = mapping ? mapfn(O[index], index) : O[index];
3348 createProperty(result, index, value);
3349 }
3350 }
3351 setArrayLength(result, index);
3352 return result;
3353 };
3354 });
3355 var require_check_correctness_of_iteration = __commonJS(function(exports, module) {
3356 'use strict';
3357 var wellKnownSymbol = require_well_known_symbol();
3358 var ITERATOR = wellKnownSymbol('iterator');
3359 var SAFE_CLOSING = false;
3360 try {
3361 called = 0;
3362 iteratorWithReturn = {
3363 next: function next() {
3364 return {
3365 done: !!called++
3366 };
3367 },
3368 return: function _return() {
3369 SAFE_CLOSING = true;
3370 }
3371 };
3372 iteratorWithReturn[ITERATOR] = function() {
3373 return this;
3374 };
3375 Array.from(iteratorWithReturn, function() {
3376 throw 2;
3377 });
3378 } catch (error) {}
3379 var called;
3380 var iteratorWithReturn;
3381 module.exports = function(exec, SKIP_CLOSING) {
3382 try {
3383 if (!SKIP_CLOSING && !SAFE_CLOSING) {
3384 return false;
3385 }
3386 } catch (error) {
3387 return false;
3388 }
3389 var ITERATION_SUPPORT = false;
3390 try {
3391 var object = {};
3392 object[ITERATOR] = function() {
3393 return {
3394 next: function next() {
3395 return {
3396 done: ITERATION_SUPPORT = true
3397 };
3398 }
3399 };
3400 };
3401 exec(object);
3402 } catch (error) {}
3403 return ITERATION_SUPPORT;
3404 };
3405 });
3406 var require_es_array_from = __commonJS(function() {
3407 'use strict';
3408 var $ = require_export();
3409 var from = require_array_from();
3410 var checkCorrectnessOfIteration = require_check_correctness_of_iteration();
3411 var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function(iterable) {
3412 Array.from(iterable);
3413 });
3414 $({
3415 target: 'Array',
3416 stat: true,
3417 forced: INCORRECT_ITERATION
3418 }, {
3419 from: from
3420 });
3421 });
3422 var require_from = __commonJS(function(exports, module) {
3423 'use strict';
3424 require_es_string_iterator();
3425 require_es_array_from();
3426 var path = require_path();
3427 module.exports = path.Array.from;
3428 });
3429 var require_from2 = __commonJS(function(exports, module) {
3430 'use strict';
3431 var parent = require_from();
3432 module.exports = parent;
3433 });
3434 var require_from3 = __commonJS(function(exports, module) {
3435 'use strict';
3436 var parent = require_from2();
3437 module.exports = parent;
3438 });
3439 var require_utils = __commonJS(function(exports) {
3440 'use strict';
3441 Object.defineProperty(exports, '__esModule', {
3442 value: true
3443 });
3444 function isIdentStart(c4) {
3445 return c4 >= 'a' && c4 <= 'z' || c4 >= 'A' && c4 <= 'Z' || c4 === '-' || c4 === '_';
3446 }
3447 exports.isIdentStart = isIdentStart;
3448 function isIdent(c4) {
3449 return c4 >= 'a' && c4 <= 'z' || c4 >= 'A' && c4 <= 'Z' || c4 >= '0' && c4 <= '9' || c4 === '-' || c4 === '_';
3450 }
3451 exports.isIdent = isIdent;
3452 function isHex(c4) {
3453 return c4 >= 'a' && c4 <= 'f' || c4 >= 'A' && c4 <= 'F' || c4 >= '0' && c4 <= '9';
3454 }
3455 exports.isHex = isHex;
3456 function escapeIdentifier(s) {
3457 var len = s.length;
3458 var result = '';
3459 var i = 0;
3460 while (i < len) {
3461 var chr = s.charAt(i);
3462 if (exports.identSpecialChars[chr]) {
3463 result += '\\' + chr;
3464 } else {
3465 if (!(chr === '_' || chr === '-' || chr >= 'A' && chr <= 'Z' || chr >= 'a' && chr <= 'z' || i !== 0 && chr >= '0' && chr <= '9')) {
3466 var charCode = chr.charCodeAt(0);
3467 if ((charCode & 63488) === 55296) {
3468 var extraCharCode = s.charCodeAt(i++);
3469 if ((charCode & 64512) !== 55296 || (extraCharCode & 64512) !== 56320) {
3470 throw Error('UCS-2(decode): illegal sequence');
3471 }
3472 charCode = ((charCode & 1023) << 10) + (extraCharCode & 1023) + 65536;
3473 }
3474 result += '\\' + charCode.toString(16) + ' ';
3475 } else {
3476 result += chr;
3477 }
3478 }
3479 i++;
3480 }
3481 return result;
3482 }
3483 exports.escapeIdentifier = escapeIdentifier;
3484 function escapeStr(s) {
3485 var len = s.length;
3486 var result = '';
3487 var i = 0;
3488 var replacement;
3489 while (i < len) {
3490 var chr = s.charAt(i);
3491 if (chr === '"') {
3492 chr = '\\"';
3493 } else if (chr === '\\') {
3494 chr = '\\\\';
3495 } else if ((replacement = exports.strReplacementsRev[chr]) !== void 0) {
3496 chr = replacement;
3497 }
3498 result += chr;
3499 i++;
3500 }
3501 return '"' + result + '"';
3502 }
3503 exports.escapeStr = escapeStr;
3504 exports.identSpecialChars = {
3505 '!': true,
3506 '"': true,
3507 '#': true,
3508 $: true,
3509 '%': true,
3510 '&': true,
3511 '\'': true,
3512 '(': true,
3513 ')': true,
3514 '*': true,
3515 '+': true,
3516 ',': true,
3517 '.': true,
3518 '/': true,
3519 ';': true,
3520 '<': true,
3521 '=': true,
3522 '>': true,
3523 '?': true,
3524 '@': true,
3525 '[': true,
3526 '\\': true,
3527 ']': true,
3528 '^': true,
3529 '`': true,
3530 '{': true,
3531 '|': true,
3532 '}': true,
3533 '~': true
3534 };
3535 exports.strReplacementsRev = {
3536 '\n': '\\n',
3537 '\r': '\\r',
3538 '\t': '\\t',
3539 '\f': '\\f',
3540 '\v': '\\v'
3541 };
3542 exports.singleQuoteEscapeChars = {
3543 n: '\n',
3544 r: '\r',
3545 t: '\t',
3546 f: '\f',
3547 '\\': '\\',
3548 '\'': '\''
3549 };
3550 exports.doubleQuotesEscapeChars = {
3551 n: '\n',
3552 r: '\r',
3553 t: '\t',
3554 f: '\f',
3555 '\\': '\\',
3556 '"': '"'
3557 };
3558 });
3559 var require_parser_context = __commonJS(function(exports) {
3560 'use strict';
3561 Object.defineProperty(exports, '__esModule', {
3562 value: true
3563 });
3564 var utils_1 = require_utils();
3565 function parseCssSelector(str, pos, pseudos, attrEqualityMods, ruleNestingOperators, substitutesEnabled) {
3566 var l = str.length;
3567 var chr = '';
3568 function getStr(quote, escapeTable) {
3569 var result = '';
3570 pos++;
3571 chr = str.charAt(pos);
3572 while (pos < l) {
3573 if (chr === quote) {
3574 pos++;
3575 return result;
3576 } else if (chr === '\\') {
3577 pos++;
3578 chr = str.charAt(pos);
3579 var esc = void 0;
3580 if (chr === quote) {
3581 result += quote;
3582 } else if ((esc = escapeTable[chr]) !== void 0) {
3583 result += esc;
3584 } else if (utils_1.isHex(chr)) {
3585 var hex = chr;
3586 pos++;
3587 chr = str.charAt(pos);
3588 while (utils_1.isHex(chr)) {
3589 hex += chr;
3590 pos++;
3591 chr = str.charAt(pos);
3592 }
3593 if (chr === ' ') {
3594 pos++;
3595 chr = str.charAt(pos);
3596 }
3597 result += String.fromCharCode(parseInt(hex, 16));
3598 continue;
3599 } else {
3600 result += chr;
3601 }
3602 } else {
3603 result += chr;
3604 }
3605 pos++;
3606 chr = str.charAt(pos);
3607 }
3608 return result;
3609 }
3610 function getIdent() {
3611 var result = '';
3612 chr = str.charAt(pos);
3613 while (pos < l) {
3614 if (utils_1.isIdent(chr)) {
3615 result += chr;
3616 } else if (chr === '\\') {
3617 pos++;
3618 if (pos >= l) {
3619 throw Error('Expected symbol but end of file reached.');
3620 }
3621 chr = str.charAt(pos);
3622 if (utils_1.identSpecialChars[chr]) {
3623 result += chr;
3624 } else if (utils_1.isHex(chr)) {
3625 var hex = chr;
3626 pos++;
3627 chr = str.charAt(pos);
3628 while (utils_1.isHex(chr)) {
3629 hex += chr;
3630 pos++;
3631 chr = str.charAt(pos);
3632 }
3633 if (chr === ' ') {
3634 pos++;
3635 chr = str.charAt(pos);
3636 }
3637 result += String.fromCharCode(parseInt(hex, 16));
3638 continue;
3639 } else {
3640 result += chr;
3641 }
3642 } else {
3643 return result;
3644 }
3645 pos++;
3646 chr = str.charAt(pos);
3647 }
3648 return result;
3649 }
3650 function skipWhitespace() {
3651 chr = str.charAt(pos);
3652 var result = false;
3653 while (chr === ' ' || chr === '\t' || chr === '\n' || chr === '\r' || chr === '\f') {
3654 result = true;
3655 pos++;
3656 chr = str.charAt(pos);
3657 }
3658 return result;
3659 }
3660 function parse3() {
3661 var res = parseSelector();
3662 if (pos < l) {
3663 throw Error('Rule expected but "' + str.charAt(pos) + '" found.');
3664 }
3665 return res;
3666 }
3667 function parseSelector() {
3668 var selector = parseSingleSelector();
3669 if (!selector) {
3670 return null;
3671 }
3672 var res = selector;
3673 chr = str.charAt(pos);
3674 while (chr === ',') {
3675 pos++;
3676 skipWhitespace();
3677 if (res.type !== 'selectors') {
3678 res = {
3679 type: 'selectors',
3680 selectors: [ selector ]
3681 };
3682 }
3683 selector = parseSingleSelector();
3684 if (!selector) {
3685 throw Error('Rule expected after ",".');
3686 }
3687 res.selectors.push(selector);
3688 }
3689 return res;
3690 }
3691 function parseSingleSelector() {
3692 skipWhitespace();
3693 var selector = {
3694 type: 'ruleSet'
3695 };
3696 var rule = parseRule();
3697 if (!rule) {
3698 return null;
3699 }
3700 var currentRule = selector;
3701 while (rule) {
3702 rule.type = 'rule';
3703 currentRule.rule = rule;
3704 currentRule = rule;
3705 skipWhitespace();
3706 chr = str.charAt(pos);
3707 if (pos >= l || chr === ',' || chr === ')') {
3708 break;
3709 }
3710 if (ruleNestingOperators[chr]) {
3711 var op = chr;
3712 pos++;
3713 skipWhitespace();
3714 rule = parseRule();
3715 if (!rule) {
3716 throw Error('Rule expected after "' + op + '".');
3717 }
3718 rule.nestingOperator = op;
3719 } else {
3720 rule = parseRule();
3721 if (rule) {
3722 rule.nestingOperator = null;
3723 }
3724 }
3725 }
3726 return selector;
3727 }
3728 function parseRule() {
3729 var rule = null;
3730 while (pos < l) {
3731 chr = str.charAt(pos);
3732 if (chr === '*') {
3733 pos++;
3734 (rule = rule || {}).tagName = '*';
3735 } else if (utils_1.isIdentStart(chr) || chr === '\\') {
3736 (rule = rule || {}).tagName = getIdent();
3737 } else if (chr === '.') {
3738 pos++;
3739 rule = rule || {};
3740 (rule.classNames = rule.classNames || []).push(getIdent());
3741 } else if (chr === '#') {
3742 pos++;
3743 (rule = rule || {}).id = getIdent();
3744 } else if (chr === '[') {
3745 pos++;
3746 skipWhitespace();
3747 var attr = {
3748 name: getIdent()
3749 };
3750 skipWhitespace();
3751 if (chr === ']') {
3752 pos++;
3753 } else {
3754 var operator = '';
3755 if (attrEqualityMods[chr]) {
3756 operator = chr;
3757 pos++;
3758 chr = str.charAt(pos);
3759 }
3760 if (pos >= l) {
3761 throw Error('Expected "=" but end of file reached.');
3762 }
3763 if (chr !== '=') {
3764 throw Error('Expected "=" but "' + chr + '" found.');
3765 }
3766 attr.operator = operator + '=';
3767 pos++;
3768 skipWhitespace();
3769 var attrValue = '';
3770 attr.valueType = 'string';
3771 if (chr === '"') {
3772 attrValue = getStr('"', utils_1.doubleQuotesEscapeChars);
3773 } else if (chr === '\'') {
3774 attrValue = getStr('\'', utils_1.singleQuoteEscapeChars);
3775 } else if (substitutesEnabled && chr === '$') {
3776 pos++;
3777 attrValue = getIdent();
3778 attr.valueType = 'substitute';
3779 } else {
3780 while (pos < l) {
3781 if (chr === ']') {
3782 break;
3783 }
3784 attrValue += chr;
3785 pos++;
3786 chr = str.charAt(pos);
3787 }
3788 attrValue = attrValue.trim();
3789 }
3790 skipWhitespace();
3791 if (pos >= l) {
3792 throw Error('Expected "]" but end of file reached.');
3793 }
3794 if (chr !== ']') {
3795 throw Error('Expected "]" but "' + chr + '" found.');
3796 }
3797 pos++;
3798 attr.value = attrValue;
3799 }
3800 rule = rule || {};
3801 (rule.attrs = rule.attrs || []).push(attr);
3802 } else if (chr === ':') {
3803 pos++;
3804 var pseudoName = getIdent();
3805 var pseudo = {
3806 name: pseudoName
3807 };
3808 if (chr === '(') {
3809 pos++;
3810 var value = '';
3811 skipWhitespace();
3812 if (pseudos[pseudoName] === 'selector') {
3813 pseudo.valueType = 'selector';
3814 value = parseSelector();
3815 } else {
3816 pseudo.valueType = pseudos[pseudoName] || 'string';
3817 if (chr === '"') {
3818 value = getStr('"', utils_1.doubleQuotesEscapeChars);
3819 } else if (chr === '\'') {
3820 value = getStr('\'', utils_1.singleQuoteEscapeChars);
3821 } else if (substitutesEnabled && chr === '$') {
3822 pos++;
3823 value = getIdent();
3824 pseudo.valueType = 'substitute';
3825 } else {
3826 while (pos < l) {
3827 if (chr === ')') {
3828 break;
3829 }
3830 value += chr;
3831 pos++;
3832 chr = str.charAt(pos);
3833 }
3834 value = value.trim();
3835 }
3836 skipWhitespace();
3837 }
3838 if (pos >= l) {
3839 throw Error('Expected ")" but end of file reached.');
3840 }
3841 if (chr !== ')') {
3842 throw Error('Expected ")" but "' + chr + '" found.');
3843 }
3844 pos++;
3845 pseudo.value = value;
3846 }
3847 rule = rule || {};
3848 (rule.pseudos = rule.pseudos || []).push(pseudo);
3849 } else {
3850 break;
3851 }
3852 }
3853 return rule;
3854 }
3855 return parse3();
3856 }
3857 exports.parseCssSelector = parseCssSelector;
3858 });
3859 var require_render = __commonJS(function(exports) {
3860 'use strict';
3861 Object.defineProperty(exports, '__esModule', {
3862 value: true
3863 });
3864 var utils_1 = require_utils();
3865 function renderEntity(entity) {
3866 var res = '';
3867 switch (entity.type) {
3868 case 'ruleSet':
3869 var currentEntity = entity.rule;
3870 var parts = [];
3871 while (currentEntity) {
3872 if (currentEntity.nestingOperator) {
3873 parts.push(currentEntity.nestingOperator);
3874 }
3875 parts.push(renderEntity(currentEntity));
3876 currentEntity = currentEntity.rule;
3877 }
3878 res = parts.join(' ');
3879 break;
3880
3881 case 'selectors':
3882 res = entity.selectors.map(renderEntity).join(', ');
3883 break;
3884
3885 case 'rule':
3886 if (entity.tagName) {
3887 if (entity.tagName === '*') {
3888 res = '*';
3889 } else {
3890 res = utils_1.escapeIdentifier(entity.tagName);
3891 }
3892 }
3893 if (entity.id) {
3894 res += '#' + utils_1.escapeIdentifier(entity.id);
3895 }
3896 if (entity.classNames) {
3897 res += entity.classNames.map(function(cn) {
3898 return '.' + utils_1.escapeIdentifier(cn);
3899 }).join('');
3900 }
3901 if (entity.attrs) {
3902 res += entity.attrs.map(function(attr) {
3903 if ('operator' in attr) {
3904 if (attr.valueType === 'substitute') {
3905 return '[' + utils_1.escapeIdentifier(attr.name) + attr.operator + '$' + attr.value + ']';
3906 } else {
3907 return '[' + utils_1.escapeIdentifier(attr.name) + attr.operator + utils_1.escapeStr(attr.value) + ']';
3908 }
3909 } else {
3910 return '[' + utils_1.escapeIdentifier(attr.name) + ']';
3911 }
3912 }).join('');
3913 }
3914 if (entity.pseudos) {
3915 res += entity.pseudos.map(function(pseudo) {
3916 if (pseudo.valueType) {
3917 if (pseudo.valueType === 'selector') {
3918 return ':' + utils_1.escapeIdentifier(pseudo.name) + '(' + renderEntity(pseudo.value) + ')';
3919 } else if (pseudo.valueType === 'substitute') {
3920 return ':' + utils_1.escapeIdentifier(pseudo.name) + '($' + pseudo.value + ')';
3921 } else if (pseudo.valueType === 'numeric') {
3922 return ':' + utils_1.escapeIdentifier(pseudo.name) + '(' + pseudo.value + ')';
3923 } else {
3924 return ':' + utils_1.escapeIdentifier(pseudo.name) + '(' + utils_1.escapeIdentifier(pseudo.value) + ')';
3925 }
3926 } else {
3927 return ':' + utils_1.escapeIdentifier(pseudo.name);
3928 }
3929 }).join('');
3930 }
3931 break;
3932
3933 default:
3934 throw Error('Unknown entity type: "' + entity.type + '".');
3935 }
3936 return res;
3937 }
3938 exports.renderEntity = renderEntity;
3939 });
3940 var require_lib = __commonJS(function(exports) {
3941 'use strict';
3942 Object.defineProperty(exports, '__esModule', {
3943 value: true
3944 });
3945 var parser_context_1 = require_parser_context();
3946 var render_1 = require_render();
3947 var CssSelectorParser2 = function() {
3948 function CssSelectorParser3() {
3949 this.pseudos = {};
3950 this.attrEqualityMods = {};
3951 this.ruleNestingOperators = {};
3952 this.substitutesEnabled = false;
3953 }
3954 CssSelectorParser3.prototype.registerSelectorPseudos = function() {
3955 var pseudos = [];
3956 for (var _i = 0; _i < arguments.length; _i++) {
3957 pseudos[_i] = arguments[_i];
3958 }
3959 for (var _a = 0, pseudos_1 = pseudos; _a < pseudos_1.length; _a++) {
3960 var pseudo = pseudos_1[_a];
3961 this.pseudos[pseudo] = 'selector';
3962 }
3963 return this;
3964 };
3965 CssSelectorParser3.prototype.unregisterSelectorPseudos = function() {
3966 var pseudos = [];
3967 for (var _i = 0; _i < arguments.length; _i++) {
3968 pseudos[_i] = arguments[_i];
3969 }
3970 for (var _a = 0, pseudos_2 = pseudos; _a < pseudos_2.length; _a++) {
3971 var pseudo = pseudos_2[_a];
3972 delete this.pseudos[pseudo];
3973 }
3974 return this;
3975 };
3976 CssSelectorParser3.prototype.registerNumericPseudos = function() {
3977 var pseudos = [];
3978 for (var _i = 0; _i < arguments.length; _i++) {
3979 pseudos[_i] = arguments[_i];
3980 }
3981 for (var _a = 0, pseudos_3 = pseudos; _a < pseudos_3.length; _a++) {
3982 var pseudo = pseudos_3[_a];
3983 this.pseudos[pseudo] = 'numeric';
3984 }
3985 return this;
3986 };
3987 CssSelectorParser3.prototype.unregisterNumericPseudos = function() {
3988 var pseudos = [];
3989 for (var _i = 0; _i < arguments.length; _i++) {
3990 pseudos[_i] = arguments[_i];
3991 }
3992 for (var _a = 0, pseudos_4 = pseudos; _a < pseudos_4.length; _a++) {
3993 var pseudo = pseudos_4[_a];
3994 delete this.pseudos[pseudo];
3995 }
3996 return this;
3997 };
3998 CssSelectorParser3.prototype.registerNestingOperators = function() {
3999 var operators = [];
4000 for (var _i = 0; _i < arguments.length; _i++) {
4001 operators[_i] = arguments[_i];
4002 }
4003 for (var _a = 0, operators_1 = operators; _a < operators_1.length; _a++) {
4004 var operator = operators_1[_a];
4005 this.ruleNestingOperators[operator] = true;
4006 }
4007 return this;
4008 };
4009 CssSelectorParser3.prototype.unregisterNestingOperators = function() {
4010 var operators = [];
4011 for (var _i = 0; _i < arguments.length; _i++) {
4012 operators[_i] = arguments[_i];
4013 }
4014 for (var _a = 0, operators_2 = operators; _a < operators_2.length; _a++) {
4015 var operator = operators_2[_a];
4016 delete this.ruleNestingOperators[operator];
4017 }
4018 return this;
4019 };
4020 CssSelectorParser3.prototype.registerAttrEqualityMods = function() {
4021 var mods = [];
4022 for (var _i = 0; _i < arguments.length; _i++) {
4023 mods[_i] = arguments[_i];
4024 }
4025 for (var _a = 0, mods_1 = mods; _a < mods_1.length; _a++) {
4026 var mod = mods_1[_a];
4027 this.attrEqualityMods[mod] = true;
4028 }
4029 return this;
4030 };
4031 CssSelectorParser3.prototype.unregisterAttrEqualityMods = function() {
4032 var mods = [];
4033 for (var _i = 0; _i < arguments.length; _i++) {
4034 mods[_i] = arguments[_i];
4035 }
4036 for (var _a = 0, mods_2 = mods; _a < mods_2.length; _a++) {
4037 var mod = mods_2[_a];
4038 delete this.attrEqualityMods[mod];
4039 }
4040 return this;
4041 };
4042 CssSelectorParser3.prototype.enableSubstitutes = function() {
4043 this.substitutesEnabled = true;
4044 return this;
4045 };
4046 CssSelectorParser3.prototype.disableSubstitutes = function() {
4047 this.substitutesEnabled = false;
4048 return this;
4049 };
4050 CssSelectorParser3.prototype.parse = function(str) {
4051 return parser_context_1.parseCssSelector(str, 0, this.pseudos, this.attrEqualityMods, this.ruleNestingOperators, this.substitutesEnabled);
4052 };
4053 CssSelectorParser3.prototype.render = function(path) {
4054 return render_1.renderEntity(path).trim();
4055 };
4056 return CssSelectorParser3;
4057 }();
4058 exports.CssSelectorParser = CssSelectorParser2;
4059 });
4060 var require_doT = __commonJS(function(exports, module) {
4061 (function() {
4062 'use strict';
4063 var doT2 = {
4064 name: 'doT',
4065 version: '1.1.1',
4066 templateSettings: {
4067 evaluate: /\{\{([\s\S]+?(\}?)+)\}\}/g,
4068 interpolate: /\{\{=([\s\S]+?)\}\}/g,
4069 encode: /\{\{!([\s\S]+?)\}\}/g,
4070 use: /\{\{#([\s\S]+?)\}\}/g,
4071 useParams: /(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g,
4072 define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,
4073 defineParams: /^\s*([\w$]+):([\s\S]+)/,
4074 conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g,
4075 iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g,
4076 varname: 'it',
4077 strip: true,
4078 append: true,
4079 selfcontained: false,
4080 doNotSkipEncoded: false
4081 },
4082 template: void 0,
4083 compile: void 0,
4084 log: true
4085 };
4086 (function() {
4087 if ((typeof globalThis === 'undefined' ? 'undefined' : _typeof(globalThis)) === 'object') {
4088 return;
4089 }
4090 try {
4091 Object.defineProperty(Object.prototype, '__magic__', {
4092 get: function get() {
4093 return this;
4094 },
4095 configurable: true
4096 });
4097 __magic__.globalThis = __magic__;
4098 delete Object.prototype.__magic__;
4099 } catch (e) {
4100 window.globalThis = function() {
4101 if (typeof self !== 'undefined') {
4102 return self;
4103 }
4104 if (typeof window !== 'undefined') {
4105 return window;
4106 }
4107 if (typeof global !== 'undefined') {
4108 return global;
4109 }
4110 if (typeof this !== 'undefined') {
4111 return this;
4112 }
4113 throw new Error('Unable to locate global `this`');
4114 }();
4115 }
4116 })();
4117 doT2.encodeHTMLSource = function(doNotSkipEncoded) {
4118 var encodeHTMLRules = {
4119 '&': '&#38;',
4120 '<': '&#60;',
4121 '>': '&#62;',
4122 '"': '&#34;',
4123 '\'': '&#39;',
4124 '/': '&#47;'
4125 }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
4126 return function(code) {
4127 return code ? code.toString().replace(matchHTML, function(m3) {
4128 return encodeHTMLRules[m3] || m3;
4129 }) : '';
4130 };
4131 };
4132 if (typeof module !== 'undefined' && module.exports) {
4133 module.exports = doT2;
4134 } else if (typeof define === 'function' && define.amd) {
4135 define(function() {
4136 return doT2;
4137 });
4138 } else {
4139 globalThis.doT = doT2;
4140 }
4141 var startend = {
4142 append: {
4143 start: '\'+(',
4144 end: ')+\'',
4145 startencode: '\'+encodeHTML('
4146 },
4147 split: {
4148 start: '\';out+=(',
4149 end: ');out+=\'',
4150 startencode: '\';out+=encodeHTML('
4151 }
4152 }, skip = /$^/;
4153 function resolveDefs(c4, block, def) {
4154 return (typeof block === 'string' ? block : block.toString()).replace(c4.define || skip, function(m3, code, assign, value) {
4155 if (code.indexOf('def.') === 0) {
4156 code = code.substring(4);
4157 }
4158 if (!(code in def)) {
4159 if (assign === ':') {
4160 if (c4.defineParams) {
4161 value.replace(c4.defineParams, function(m4, param, v) {
4162 def[code] = {
4163 arg: param,
4164 text: v
4165 };
4166 });
4167 }
4168 if (!(code in def)) {
4169 def[code] = value;
4170 }
4171 } else {
4172 new Function('def', 'def[\'' + code + '\']=' + value)(def);
4173 }
4174 }
4175 return '';
4176 }).replace(c4.use || skip, function(m3, code) {
4177 if (c4.useParams) {
4178 code = code.replace(c4.useParams, function(m4, s, d2, param) {
4179 if (def[d2] && def[d2].arg && param) {
4180 var rw = (d2 + ':' + param).replace(/'|\\/g, '_');
4181 def.__exp = def.__exp || {};
4182 def.__exp[rw] = def[d2].text.replace(new RegExp('(^|[^\\w$])' + def[d2].arg + '([^\\w$])', 'g'), '$1' + param + '$2');
4183 return s + 'def.__exp[\'' + rw + '\']';
4184 }
4185 });
4186 }
4187 var v = new Function('def', 'return ' + code)(def);
4188 return v ? resolveDefs(c4, v, def) : v;
4189 });
4190 }
4191 function unescape(code) {
4192 return code.replace(/\\('|\\)/g, '$1').replace(/[\r\t\n]/g, ' ');
4193 }
4194 doT2.template = function(tmpl, c4, def) {
4195 c4 = c4 || doT2.templateSettings;
4196 var cse = c4.append ? startend.append : startend.split, needhtmlencode, sid = 0, indv, str = c4.use || c4.define ? resolveDefs(c4, tmpl, def || {}) : tmpl;
4197 str = ('var out=\'' + (c4.strip ? str.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g, ' ').replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g, '') : str).replace(/'|\\/g, '\\$&').replace(c4.interpolate || skip, function(m3, code) {
4198 return cse.start + unescape(code) + cse.end;
4199 }).replace(c4.encode || skip, function(m3, code) {
4200 needhtmlencode = true;
4201 return cse.startencode + unescape(code) + cse.end;
4202 }).replace(c4.conditional || skip, function(m3, elsecase, code) {
4203 return elsecase ? code ? '\';}else if(' + unescape(code) + '){out+=\'' : '\';}else{out+=\'' : code ? '\';if(' + unescape(code) + '){out+=\'' : '\';}out+=\'';
4204 }).replace(c4.iterate || skip, function(m3, iterate, vname, iname) {
4205 if (!iterate) {
4206 return '\';} } out+=\'';
4207 }
4208 sid += 1;
4209 indv = iname || 'i' + sid;
4210 iterate = unescape(iterate);
4211 return '\';var arr' + sid + '=' + iterate + ';if(arr' + sid + '){var ' + vname + ',' + indv + '=-1,l' + sid + '=arr' + sid + '.length-1;while(' + indv + '<l' + sid + '){' + vname + '=arr' + sid + '[' + indv + '+=1];out+=\'';
4212 }).replace(c4.evaluate || skip, function(m3, code) {
4213 return '\';' + unescape(code) + 'out+=\'';
4214 }) + '\';return out;').replace(/\n/g, '\\n').replace(/\t/g, '\\t').replace(/\r/g, '\\r').replace(/(\s|;|\}|^|\{)out\+='';/g, '$1').replace(/\+''/g, '');
4215 if (needhtmlencode) {
4216 if (!c4.selfcontained && globalThis && !globalThis._encodeHTML) {
4217 globalThis._encodeHTML = doT2.encodeHTMLSource(c4.doNotSkipEncoded);
4218 }
4219 str = 'var encodeHTML = typeof _encodeHTML !== \'undefined\' ? _encodeHTML : (' + doT2.encodeHTMLSource.toString() + '(' + (c4.doNotSkipEncoded || '') + '));' + str;
4220 }
4221 try {
4222 return new Function(c4.varname, str);
4223 } catch (e) {
4224 if (typeof console !== 'undefined') {
4225 console.log('Could not create a template function: ' + str);
4226 }
4227 throw e;
4228 }
4229 };
4230 doT2.compile = function(tmpl, def) {
4231 return doT2.template(tmpl, null, def);
4232 };
4233 })();
4234 });
4235 var require_noop = __commonJS(function(exports, module) {
4236 'use strict';
4237 module.exports = function() {};
4238 });
4239 var require_is_value = __commonJS(function(exports, module) {
4240 'use strict';
4241 var _undefined = require_noop()();
4242 module.exports = function(val) {
4243 return val !== _undefined && val !== null;
4244 };
4245 });
4246 var require_normalize_options = __commonJS(function(exports, module) {
4247 'use strict';
4248 var isValue = require_is_value();
4249 var forEach = Array.prototype.forEach;
4250 var create = Object.create;
4251 var process2 = function process2(src, obj) {
4252 var key;
4253 for (key in src) {
4254 obj[key] = src[key];
4255 }
4256 };
4257 module.exports = function(opts1) {
4258 var result = create(null);
4259 forEach.call(arguments, function(options) {
4260 if (!isValue(options)) {
4261 return;
4262 }
4263 process2(Object(options), result);
4264 });
4265 return result;
4266 };
4267 });
4268 var require_is_implemented = __commonJS(function(exports, module) {
4269 'use strict';
4270 module.exports = function() {
4271 var sign = Math.sign;
4272 if (typeof sign !== 'function') {
4273 return false;
4274 }
4275 return sign(10) === 1 && sign(-20) === -1;
4276 };
4277 });
4278 var require_shim = __commonJS(function(exports, module) {
4279 'use strict';
4280 module.exports = function(value) {
4281 value = Number(value);
4282 if (isNaN(value) || value === 0) {
4283 return value;
4284 }
4285 return value > 0 ? 1 : -1;
4286 };
4287 });
4288 var require_sign = __commonJS(function(exports, module) {
4289 'use strict';
4290 module.exports = require_is_implemented()() ? Math.sign : require_shim();
4291 });
4292 var require_to_integer = __commonJS(function(exports, module) {
4293 'use strict';
4294 var sign = require_sign();
4295 var abs = Math.abs;
4296 var floor = Math.floor;
4297 module.exports = function(value) {
4298 if (isNaN(value)) {
4299 return 0;
4300 }
4301 value = Number(value);
4302 if (value === 0 || !isFinite(value)) {
4303 return value;
4304 }
4305 return sign(value) * floor(abs(value));
4306 };
4307 });
4308 var require_to_pos_integer = __commonJS(function(exports, module) {
4309 'use strict';
4310 var toInteger = require_to_integer();
4311 var max2 = Math.max;
4312 module.exports = function(value) {
4313 return max2(0, toInteger(value));
4314 };
4315 });
4316 var require_resolve_length = __commonJS(function(exports, module) {
4317 'use strict';
4318 var toPosInt = require_to_pos_integer();
4319 module.exports = function(optsLength, fnLength, isAsync) {
4320 var length;
4321 if (isNaN(optsLength)) {
4322 length = fnLength;
4323 if (!(length >= 0)) {
4324 return 1;
4325 }
4326 if (isAsync && length) {
4327 return length - 1;
4328 }
4329 return length;
4330 }
4331 if (optsLength === false) {
4332 return false;
4333 }
4334 return toPosInt(optsLength);
4335 };
4336 });
4337 var require_valid_callable = __commonJS(function(exports, module) {
4338 'use strict';
4339 module.exports = function(fn) {
4340 if (typeof fn !== 'function') {
4341 throw new TypeError(fn + ' is not a function');
4342 }
4343 return fn;
4344 };
4345 });
4346 var require_valid_value = __commonJS(function(exports, module) {
4347 'use strict';
4348 var isValue = require_is_value();
4349 module.exports = function(value) {
4350 if (!isValue(value)) {
4351 throw new TypeError('Cannot use null or undefined');
4352 }
4353 return value;
4354 };
4355 });
4356 var require_iterate = __commonJS(function(exports, module) {
4357 'use strict';
4358 var callable = require_valid_callable();
4359 var value = require_valid_value();
4360 var bind = Function.prototype.bind;
4361 var call = Function.prototype.call;
4362 var keys = Object.keys;
4363 var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;
4364 module.exports = function(method, defVal) {
4365 return function(obj, cb) {
4366 var list, thisArg = arguments[2], compareFn = arguments[3];
4367 obj = Object(value(obj));
4368 callable(cb);
4369 list = keys(obj);
4370 if (compareFn) {
4371 list.sort(typeof compareFn === 'function' ? bind.call(compareFn, obj) : void 0);
4372 }
4373 if (typeof method !== 'function') {
4374 method = list[method];
4375 }
4376 return call.call(method, list, function(key, index) {
4377 if (!objPropertyIsEnumerable.call(obj, key)) {
4378 return defVal;
4379 }
4380 return call.call(cb, thisArg, obj[key], key, obj, index);
4381 });
4382 };
4383 };
4384 });
4385 var require_for_each = __commonJS(function(exports, module) {
4386 'use strict';
4387 module.exports = require_iterate()('forEach');
4388 });
4389 var require_registered_extensions = __commonJS(function() {
4390 'use strict';
4391 });
4392 var require_is_implemented2 = __commonJS(function(exports, module) {
4393 'use strict';
4394 module.exports = function() {
4395 var assign = Object.assign, obj;
4396 if (typeof assign !== 'function') {
4397 return false;
4398 }
4399 obj = {
4400 foo: 'raz'
4401 };
4402 assign(obj, {
4403 bar: 'dwa'
4404 }, {
4405 trzy: 'trzy'
4406 });
4407 return obj.foo + obj.bar + obj.trzy === 'razdwatrzy';
4408 };
4409 });
4410 var require_is_implemented3 = __commonJS(function(exports, module) {
4411 'use strict';
4412 module.exports = function() {
4413 try {
4414 Object.keys('primitive');
4415 return true;
4416 } catch (e) {
4417 return false;
4418 }
4419 };
4420 });
4421 var require_shim2 = __commonJS(function(exports, module) {
4422 'use strict';
4423 var isValue = require_is_value();
4424 var keys = Object.keys;
4425 module.exports = function(object) {
4426 return keys(isValue(object) ? Object(object) : object);
4427 };
4428 });
4429 var require_keys = __commonJS(function(exports, module) {
4430 'use strict';
4431 module.exports = require_is_implemented3()() ? Object.keys : require_shim2();
4432 });
4433 var require_shim3 = __commonJS(function(exports, module) {
4434 'use strict';
4435 var keys = require_keys();
4436 var value = require_valid_value();
4437 var max2 = Math.max;
4438 module.exports = function(dest, src) {
4439 var error, i, length = max2(arguments.length, 2), assign;
4440 dest = Object(value(dest));
4441 assign = function assign(key) {
4442 try {
4443 dest[key] = src[key];
4444 } catch (e) {
4445 if (!error) {
4446 error = e;
4447 }
4448 }
4449 };
4450 for (i = 1; i < length; ++i) {
4451 src = arguments[i];
4452 keys(src).forEach(assign);
4453 }
4454 if (error !== void 0) {
4455 throw error;
4456 }
4457 return dest;
4458 };
4459 });
4460 var require_assign = __commonJS(function(exports, module) {
4461 'use strict';
4462 module.exports = require_is_implemented2()() ? Object.assign : require_shim3();
4463 });
4464 var require_is_object2 = __commonJS(function(exports, module) {
4465 'use strict';
4466 var isValue = require_is_value();
4467 var map = {
4468 function: true,
4469 object: true
4470 };
4471 module.exports = function(value) {
4472 return isValue(value) && map[_typeof(value)] || false;
4473 };
4474 });
4475 var require_custom = __commonJS(function(exports, module) {
4476 'use strict';
4477 var assign = require_assign();
4478 var isObject = require_is_object2();
4479 var isValue = require_is_value();
4480 var captureStackTrace = Error.captureStackTrace;
4481 module.exports = function(message) {
4482 var err2 = new Error(message), code = arguments[1], ext = arguments[2];
4483 if (!isValue(ext)) {
4484 if (isObject(code)) {
4485 ext = code;
4486 code = null;
4487 }
4488 }
4489 if (isValue(ext)) {
4490 assign(err2, ext);
4491 }
4492 if (isValue(code)) {
4493 err2.code = code;
4494 }
4495 if (captureStackTrace) {
4496 captureStackTrace(err2, module.exports);
4497 }
4498 return err2;
4499 };
4500 });
4501 var require_mixin = __commonJS(function(exports, module) {
4502 'use strict';
4503 var value = require_valid_value();
4504 var defineProperty = Object.defineProperty;
4505 var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
4506 var getOwnPropertyNames = Object.getOwnPropertyNames;
4507 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
4508 module.exports = function(target, source) {
4509 var error, sourceObject = Object(value(source));
4510 target = Object(value(target));
4511 getOwnPropertyNames(sourceObject).forEach(function(name) {
4512 try {
4513 defineProperty(target, name, getOwnPropertyDescriptor(source, name));
4514 } catch (e) {
4515 error = e;
4516 }
4517 });
4518 if (typeof getOwnPropertySymbols === 'function') {
4519 getOwnPropertySymbols(sourceObject).forEach(function(symbol) {
4520 try {
4521 defineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol));
4522 } catch (e) {
4523 error = e;
4524 }
4525 });
4526 }
4527 if (error !== void 0) {
4528 throw error;
4529 }
4530 return target;
4531 };
4532 });
4533 var require_define_length = __commonJS(function(exports, module) {
4534 'use strict';
4535 var toPosInt = require_to_pos_integer();
4536 var test = function test(arg1, arg2) {
4537 return arg2;
4538 };
4539 var desc;
4540 var defineProperty;
4541 var generate;
4542 var mixin;
4543 try {
4544 Object.defineProperty(test, 'length', {
4545 configurable: true,
4546 writable: false,
4547 enumerable: false,
4548 value: 1
4549 });
4550 } catch (ignore) {}
4551 if (test.length === 1) {
4552 desc = {
4553 configurable: true,
4554 writable: false,
4555 enumerable: false
4556 };
4557 defineProperty = Object.defineProperty;
4558 module.exports = function(fn, length) {
4559 length = toPosInt(length);
4560 if (fn.length === length) {
4561 return fn;
4562 }
4563 desc.value = length;
4564 return defineProperty(fn, 'length', desc);
4565 };
4566 } else {
4567 mixin = require_mixin();
4568 generate = function() {
4569 var cache2 = [];
4570 return function(length) {
4571 var args, i = 0;
4572 if (cache2[length]) {
4573 return cache2[length];
4574 }
4575 args = [];
4576 while (length--) {
4577 args.push('a' + (++i).toString(36));
4578 }
4579 return new Function('fn', 'return function (' + args.join(', ') + ') { return fn.apply(this, arguments); };');
4580 };
4581 }();
4582 module.exports = function(src, length) {
4583 var target;
4584 length = toPosInt(length);
4585 if (src.length === length) {
4586 return src;
4587 }
4588 target = generate(length)(src);
4589 try {
4590 mixin(target, src);
4591 } catch (ignore) {}
4592 return target;
4593 };
4594 }
4595 });
4596 var require_is = __commonJS(function(exports, module) {
4597 'use strict';
4598 var _undefined = void 0;
4599 module.exports = function(value) {
4600 return value !== _undefined && value !== null;
4601 };
4602 });
4603 var require_is2 = __commonJS(function(exports, module) {
4604 'use strict';
4605 var isValue = require_is();
4606 var possibleTypes = {
4607 object: true,
4608 function: true,
4609 undefined: true
4610 };
4611 module.exports = function(value) {
4612 if (!isValue(value)) {
4613 return false;
4614 }
4615 return hasOwnProperty.call(possibleTypes, _typeof(value));
4616 };
4617 });
4618 var require_is3 = __commonJS(function(exports, module) {
4619 'use strict';
4620 var isObject = require_is2();
4621 module.exports = function(value) {
4622 if (!isObject(value)) {
4623 return false;
4624 }
4625 try {
4626 if (!value.constructor) {
4627 return false;
4628 }
4629 return value.constructor.prototype === value;
4630 } catch (error) {
4631 return false;
4632 }
4633 };
4634 });
4635 var require_is4 = __commonJS(function(exports, module) {
4636 'use strict';
4637 var isPrototype = require_is3();
4638 module.exports = function(value) {
4639 if (typeof value !== 'function') {
4640 return false;
4641 }
4642 if (!hasOwnProperty.call(value, 'length')) {
4643 return false;
4644 }
4645 try {
4646 if (typeof value.length !== 'number') {
4647 return false;
4648 }
4649 if (typeof value.call !== 'function') {
4650 return false;
4651 }
4652 if (typeof value.apply !== 'function') {
4653 return false;
4654 }
4655 } catch (error) {
4656 return false;
4657 }
4658 return !isPrototype(value);
4659 };
4660 });
4661 var require_is5 = __commonJS(function(exports, module) {
4662 'use strict';
4663 var isFunction = require_is4();
4664 var classRe = /^\s*class[\s{/}]/;
4665 var functionToString = Function.prototype.toString;
4666 module.exports = function(value) {
4667 if (!isFunction(value)) {
4668 return false;
4669 }
4670 if (classRe.test(functionToString.call(value))) {
4671 return false;
4672 }
4673 return true;
4674 };
4675 });
4676 var require_is_implemented4 = __commonJS(function(exports, module) {
4677 'use strict';
4678 var str = 'razdwatrzy';
4679 module.exports = function() {
4680 if (typeof str.contains !== 'function') {
4681 return false;
4682 }
4683 return str.contains('dwa') === true && str.contains('foo') === false;
4684 };
4685 });
4686 var require_shim4 = __commonJS(function(exports, module) {
4687 'use strict';
4688 var indexOf = String.prototype.indexOf;
4689 module.exports = function(searchString) {
4690 return indexOf.call(this, searchString, arguments[1]) > -1;
4691 };
4692 });
4693 var require_contains = __commonJS(function(exports, module) {
4694 'use strict';
4695 module.exports = require_is_implemented4()() ? String.prototype.contains : require_shim4();
4696 });
4697 var require_d = __commonJS(function(exports, module) {
4698 'use strict';
4699 var isValue = require_is();
4700 var isPlainFunction = require_is5();
4701 var assign = require_assign();
4702 var normalizeOpts = require_normalize_options();
4703 var contains3 = require_contains();
4704 var d2 = module.exports = function(dscr, value) {
4705 var c4, e, w, options, desc;
4706 if (arguments.length < 2 || typeof dscr !== 'string') {
4707 options = value;
4708 value = dscr;
4709 dscr = null;
4710 } else {
4711 options = arguments[2];
4712 }
4713 if (isValue(dscr)) {
4714 c4 = contains3.call(dscr, 'c');
4715 e = contains3.call(dscr, 'e');
4716 w = contains3.call(dscr, 'w');
4717 } else {
4718 c4 = w = true;
4719 e = false;
4720 }
4721 desc = {
4722 value: value,
4723 configurable: c4,
4724 enumerable: e,
4725 writable: w
4726 };
4727 return !options ? desc : assign(normalizeOpts(options), desc);
4728 };
4729 d2.gs = function(dscr, get2, set2) {
4730 var c4, e, options, desc;
4731 if (typeof dscr !== 'string') {
4732 options = set2;
4733 set2 = get2;
4734 get2 = dscr;
4735 dscr = null;
4736 } else {
4737 options = arguments[3];
4738 }
4739 if (!isValue(get2)) {
4740 get2 = void 0;
4741 } else if (!isPlainFunction(get2)) {
4742 options = get2;
4743 get2 = set2 = void 0;
4744 } else if (!isValue(set2)) {
4745 set2 = void 0;
4746 } else if (!isPlainFunction(set2)) {
4747 options = set2;
4748 set2 = void 0;
4749 }
4750 if (isValue(dscr)) {
4751 c4 = contains3.call(dscr, 'c');
4752 e = contains3.call(dscr, 'e');
4753 } else {
4754 c4 = true;
4755 e = false;
4756 }
4757 desc = {
4758 get: get2,
4759 set: set2,
4760 configurable: c4,
4761 enumerable: e
4762 };
4763 return !options ? desc : assign(normalizeOpts(options), desc);
4764 };
4765 });
4766 var require_event_emitter = __commonJS(function(exports, module) {
4767 'use strict';
4768 var d2 = require_d();
4769 var callable = require_valid_callable();
4770 var apply = Function.prototype.apply;
4771 var call = Function.prototype.call;
4772 var create = Object.create;
4773 var defineProperty = Object.defineProperty;
4774 var defineProperties = Object.defineProperties;
4775 var hasOwnProperty2 = Object.prototype.hasOwnProperty;
4776 var descriptor = {
4777 configurable: true,
4778 enumerable: false,
4779 writable: true
4780 };
4781 var on;
4782 var once;
4783 var off;
4784 var emit;
4785 var methods;
4786 var descriptors;
4787 var base;
4788 on = function on(type2, listener) {
4789 var data;
4790 callable(listener);
4791 if (!hasOwnProperty2.call(this, '__ee__')) {
4792 data = descriptor.value = create(null);
4793 defineProperty(this, '__ee__', descriptor);
4794 descriptor.value = null;
4795 } else {
4796 data = this.__ee__;
4797 }
4798 if (!data[type2]) {
4799 data[type2] = listener;
4800 } else if (_typeof(data[type2]) === 'object') {
4801 data[type2].push(listener);
4802 } else {
4803 data[type2] = [ data[type2], listener ];
4804 }
4805 return this;
4806 };
4807 once = function once(type2, listener) {
4808 var _once, self2;
4809 callable(listener);
4810 self2 = this;
4811 on.call(this, type2, _once = function once2() {
4812 off.call(self2, type2, _once);
4813 apply.call(listener, this, arguments);
4814 });
4815 _once.__eeOnceListener__ = listener;
4816 return this;
4817 };
4818 off = function off(type2, listener) {
4819 var data, listeners, candidate, i;
4820 callable(listener);
4821 if (!hasOwnProperty2.call(this, '__ee__')) {
4822 return this;
4823 }
4824 data = this.__ee__;
4825 if (!data[type2]) {
4826 return this;
4827 }
4828 listeners = data[type2];
4829 if (_typeof(listeners) === 'object') {
4830 for (i = 0; candidate = listeners[i]; ++i) {
4831 if (candidate === listener || candidate.__eeOnceListener__ === listener) {
4832 if (listeners.length === 2) {
4833 data[type2] = listeners[i ? 0 : 1];
4834 } else {
4835 listeners.splice(i, 1);
4836 }
4837 }
4838 }
4839 } else {
4840 if (listeners === listener || listeners.__eeOnceListener__ === listener) {
4841 delete data[type2];
4842 }
4843 }
4844 return this;
4845 };
4846 emit = function emit(type2) {
4847 var i, l, listener, listeners, args;
4848 if (!hasOwnProperty2.call(this, '__ee__')) {
4849 return;
4850 }
4851 listeners = this.__ee__[type2];
4852 if (!listeners) {
4853 return;
4854 }
4855 if (_typeof(listeners) === 'object') {
4856 l = arguments.length;
4857 args = new Array(l - 1);
4858 for (i = 1; i < l; ++i) {
4859 args[i - 1] = arguments[i];
4860 }
4861 listeners = listeners.slice();
4862 for (i = 0; listener = listeners[i]; ++i) {
4863 apply.call(listener, this, args);
4864 }
4865 } else {
4866 switch (arguments.length) {
4867 case 1:
4868 call.call(listeners, this);
4869 break;
4870
4871 case 2:
4872 call.call(listeners, this, arguments[1]);
4873 break;
4874
4875 case 3:
4876 call.call(listeners, this, arguments[1], arguments[2]);
4877 break;
4878
4879 default:
4880 l = arguments.length;
4881 args = new Array(l - 1);
4882 for (i = 1; i < l; ++i) {
4883 args[i - 1] = arguments[i];
4884 }
4885 apply.call(listeners, this, args);
4886 }
4887 }
4888 };
4889 methods = {
4890 on: on,
4891 once: once,
4892 off: off,
4893 emit: emit
4894 };
4895 descriptors = {
4896 on: d2(on),
4897 once: d2(once),
4898 off: d2(off),
4899 emit: d2(emit)
4900 };
4901 base = defineProperties({}, descriptors);
4902 module.exports = exports = function exports(o) {
4903 return o == null ? create(base) : defineProperties(Object(o), descriptors);
4904 };
4905 exports.methods = methods;
4906 });
4907 var require_is_implemented5 = __commonJS(function(exports, module) {
4908 'use strict';
4909 module.exports = function() {
4910 var from = Array.from, arr, result;
4911 if (typeof from !== 'function') {
4912 return false;
4913 }
4914 arr = [ 'raz', 'dwa' ];
4915 result = from(arr);
4916 return Boolean(result && result !== arr && result[1] === 'dwa');
4917 };
4918 });
4919 var require_is_implemented6 = __commonJS(function(exports, module) {
4920 'use strict';
4921 module.exports = function() {
4922 if ((typeof globalThis === 'undefined' ? 'undefined' : _typeof(globalThis)) !== 'object') {
4923 return false;
4924 }
4925 if (!globalThis) {
4926 return false;
4927 }
4928 return globalThis.Array === Array;
4929 };
4930 });
4931 var require_implementation = __commonJS(function(exports, module) {
4932 var naiveFallback = function naiveFallback() {
4933 if ((typeof self === 'undefined' ? 'undefined' : _typeof(self)) === 'object' && self) {
4934 return self;
4935 }
4936 if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window) {
4937 return window;
4938 }
4939 throw new Error('Unable to resolve global `this`');
4940 };
4941 module.exports = function() {
4942 if (this) {
4943 return this;
4944 }
4945 try {
4946 Object.defineProperty(Object.prototype, '__global__', {
4947 get: function get() {
4948 return this;
4949 },
4950 configurable: true
4951 });
4952 } catch (error) {
4953 return naiveFallback();
4954 }
4955 try {
4956 if (!__global__) {
4957 return naiveFallback();
4958 }
4959 return __global__;
4960 } finally {
4961 delete Object.prototype.__global__;
4962 }
4963 }();
4964 });
4965 var require_global_this2 = __commonJS(function(exports, module) {
4966 'use strict';
4967 module.exports = require_is_implemented6()() ? globalThis : require_implementation();
4968 });
4969 var require_is_implemented7 = __commonJS(function(exports, module) {
4970 'use strict';
4971 var global2 = require_global_this2();
4972 var validTypes = {
4973 object: true,
4974 symbol: true
4975 };
4976 module.exports = function() {
4977 var Symbol2 = global2.Symbol;
4978 var symbol;
4979 if (typeof Symbol2 !== 'function') {
4980 return false;
4981 }
4982 symbol = Symbol2('test symbol');
4983 try {
4984 String(symbol);
4985 } catch (e) {
4986 return false;
4987 }
4988 if (!validTypes[_typeof(Symbol2.iterator)]) {
4989 return false;
4990 }
4991 if (!validTypes[_typeof(Symbol2.toPrimitive)]) {
4992 return false;
4993 }
4994 if (!validTypes[_typeof(Symbol2.toStringTag)]) {
4995 return false;
4996 }
4997 return true;
4998 };
4999 });
5000 var require_is_symbol2 = __commonJS(function(exports, module) {
5001 'use strict';
5002 module.exports = function(value) {
5003 if (!value) {
5004 return false;
5005 }
5006 if (_typeof(value) === 'symbol') {
5007 return true;
5008 }
5009 if (!value.constructor) {
5010 return false;
5011 }
5012 if (value.constructor.name !== 'Symbol') {
5013 return false;
5014 }
5015 return value[value.constructor.toStringTag] === 'Symbol';
5016 };
5017 });
5018 var require_validate_symbol = __commonJS(function(exports, module) {
5019 'use strict';
5020 var isSymbol = require_is_symbol2();
5021 module.exports = function(value) {
5022 if (!isSymbol(value)) {
5023 throw new TypeError(value + ' is not a symbol');
5024 }
5025 return value;
5026 };
5027 });
5028 var require_generate_name = __commonJS(function(exports, module) {
5029 'use strict';
5030 var d2 = require_d();
5031 var create = Object.create;
5032 var defineProperty = Object.defineProperty;
5033 var objPrototype = Object.prototype;
5034 var created = create(null);
5035 module.exports = function(desc) {
5036 var postfix = 0, name, ie11BugWorkaround;
5037 while (created[desc + (postfix || '')]) {
5038 ++postfix;
5039 }
5040 desc += postfix || '';
5041 created[desc] = true;
5042 name = '@@' + desc;
5043 defineProperty(objPrototype, name, d2.gs(null, function(value) {
5044 if (ie11BugWorkaround) {
5045 return;
5046 }
5047 ie11BugWorkaround = true;
5048 defineProperty(this, name, d2(value));
5049 ie11BugWorkaround = false;
5050 }));
5051 return name;
5052 };
5053 });
5054 var require_standard_symbols = __commonJS(function(exports, module) {
5055 'use strict';
5056 var d2 = require_d();
5057 var NativeSymbol = require_global_this2().Symbol;
5058 module.exports = function(SymbolPolyfill) {
5059 return Object.defineProperties(SymbolPolyfill, {
5060 hasInstance: d2('', NativeSymbol && NativeSymbol.hasInstance || SymbolPolyfill('hasInstance')),
5061 isConcatSpreadable: d2('', NativeSymbol && NativeSymbol.isConcatSpreadable || SymbolPolyfill('isConcatSpreadable')),
5062 iterator: d2('', NativeSymbol && NativeSymbol.iterator || SymbolPolyfill('iterator')),
5063 match: d2('', NativeSymbol && NativeSymbol.match || SymbolPolyfill('match')),
5064 replace: d2('', NativeSymbol && NativeSymbol.replace || SymbolPolyfill('replace')),
5065 search: d2('', NativeSymbol && NativeSymbol.search || SymbolPolyfill('search')),
5066 species: d2('', NativeSymbol && NativeSymbol.species || SymbolPolyfill('species')),
5067 split: d2('', NativeSymbol && NativeSymbol.split || SymbolPolyfill('split')),
5068 toPrimitive: d2('', NativeSymbol && NativeSymbol.toPrimitive || SymbolPolyfill('toPrimitive')),
5069 toStringTag: d2('', NativeSymbol && NativeSymbol.toStringTag || SymbolPolyfill('toStringTag')),
5070 unscopables: d2('', NativeSymbol && NativeSymbol.unscopables || SymbolPolyfill('unscopables'))
5071 });
5072 };
5073 });
5074 var require_symbol_registry = __commonJS(function(exports, module) {
5075 'use strict';
5076 var d2 = require_d();
5077 var validateSymbol = require_validate_symbol();
5078 var registry = Object.create(null);
5079 module.exports = function(SymbolPolyfill) {
5080 return Object.defineProperties(SymbolPolyfill, {
5081 for: d2(function(key) {
5082 if (registry[key]) {
5083 return registry[key];
5084 }
5085 return registry[key] = SymbolPolyfill(String(key));
5086 }),
5087 keyFor: d2(function(symbol) {
5088 var key;
5089 validateSymbol(symbol);
5090 for (key in registry) {
5091 if (registry[key] === symbol) {
5092 return key;
5093 }
5094 }
5095 return void 0;
5096 })
5097 });
5098 };
5099 });
5100 var require_polyfill = __commonJS(function(exports, module) {
5101 'use strict';
5102 var d2 = require_d();
5103 var validateSymbol = require_validate_symbol();
5104 var NativeSymbol = require_global_this2().Symbol;
5105 var generateName = require_generate_name();
5106 var setupStandardSymbols = require_standard_symbols();
5107 var setupSymbolRegistry = require_symbol_registry();
5108 var create = Object.create;
5109 var defineProperties = Object.defineProperties;
5110 var defineProperty = Object.defineProperty;
5111 var SymbolPolyfill;
5112 var HiddenSymbol;
5113 var isNativeSafe;
5114 if (typeof NativeSymbol === 'function') {
5115 try {
5116 String(NativeSymbol());
5117 isNativeSafe = true;
5118 } catch (ignore) {}
5119 } else {
5120 NativeSymbol = null;
5121 }
5122 HiddenSymbol = function Symbol2(description) {
5123 if (this instanceof HiddenSymbol) {
5124 throw new TypeError('Symbol is not a constructor');
5125 }
5126 return SymbolPolyfill(description);
5127 };
5128 module.exports = SymbolPolyfill = function Symbol2(description) {
5129 var symbol;
5130 if (this instanceof Symbol2) {
5131 throw new TypeError('Symbol is not a constructor');
5132 }
5133 if (isNativeSafe) {
5134 return NativeSymbol(description);
5135 }
5136 symbol = create(HiddenSymbol.prototype);
5137 description = description === void 0 ? '' : String(description);
5138 return defineProperties(symbol, {
5139 __description__: d2('', description),
5140 __name__: d2('', generateName(description))
5141 });
5142 };
5143 setupStandardSymbols(SymbolPolyfill);
5144 setupSymbolRegistry(SymbolPolyfill);
5145 defineProperties(HiddenSymbol.prototype, {
5146 constructor: d2(SymbolPolyfill),
5147 toString: d2('', function() {
5148 return this.__name__;
5149 })
5150 });
5151 defineProperties(SymbolPolyfill.prototype, {
5152 toString: d2(function() {
5153 return 'Symbol (' + validateSymbol(this).__description__ + ')';
5154 }),
5155 valueOf: d2(function() {
5156 return validateSymbol(this);
5157 })
5158 });
5159 defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d2('', function() {
5160 var symbol = validateSymbol(this);
5161 if (_typeof(symbol) === 'symbol') {
5162 return symbol;
5163 }
5164 return symbol.toString();
5165 }));
5166 defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d2('c', 'Symbol'));
5167 defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, d2('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]));
5168 defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, d2('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));
5169 });
5170 var require_es6_symbol = __commonJS(function(exports, module) {
5171 'use strict';
5172 module.exports = require_is_implemented7()() ? require_global_this2().Symbol : require_polyfill();
5173 });
5174 var require_is_arguments = __commonJS(function(exports, module) {
5175 'use strict';
5176 var objToString = Object.prototype.toString;
5177 var id = objToString.call(function() {
5178 return arguments;
5179 }());
5180 module.exports = function(value) {
5181 return objToString.call(value) === id;
5182 };
5183 });
5184 var require_is_function = __commonJS(function(exports, module) {
5185 'use strict';
5186 var objToString = Object.prototype.toString;
5187 var isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);
5188 module.exports = function(value) {
5189 return typeof value === 'function' && isFunctionStringTag(objToString.call(value));
5190 };
5191 });
5192 var require_is_string = __commonJS(function(exports, module) {
5193 'use strict';
5194 var objToString = Object.prototype.toString;
5195 var id = objToString.call('');
5196 module.exports = function(value) {
5197 return typeof value === 'string' || value && _typeof(value) === 'object' && (value instanceof String || objToString.call(value) === id) || false;
5198 };
5199 });
5200 var require_shim5 = __commonJS(function(exports, module) {
5201 'use strict';
5202 var iteratorSymbol = require_es6_symbol().iterator;
5203 var isArguments = require_is_arguments();
5204 var isFunction = require_is_function();
5205 var toPosInt = require_to_pos_integer();
5206 var callable = require_valid_callable();
5207 var validValue = require_valid_value();
5208 var isValue = require_is_value();
5209 var isString2 = require_is_string();
5210 var isArray = Array.isArray;
5211 var call = Function.prototype.call;
5212 var desc = {
5213 configurable: true,
5214 enumerable: true,
5215 writable: true,
5216 value: null
5217 };
5218 var defineProperty = Object.defineProperty;
5219 module.exports = function(arrayLike) {
5220 var mapFn = arguments[1], thisArg = arguments[2], Context2, i, j, arr, length, code, iterator, result, getIterator, value;
5221 arrayLike = Object(validValue(arrayLike));
5222 if (isValue(mapFn)) {
5223 callable(mapFn);
5224 }
5225 if (!this || this === Array || !isFunction(this)) {
5226 if (!mapFn) {
5227 if (isArguments(arrayLike)) {
5228 length = arrayLike.length;
5229 if (length !== 1) {
5230 return Array.apply(null, arrayLike);
5231 }
5232 arr = new Array(1);
5233 arr[0] = arrayLike[0];
5234 return arr;
5235 }
5236 if (isArray(arrayLike)) {
5237 arr = new Array(length = arrayLike.length);
5238 for (i = 0; i < length; ++i) {
5239 arr[i] = arrayLike[i];
5240 }
5241 return arr;
5242 }
5243 }
5244 arr = [];
5245 } else {
5246 Context2 = this;
5247 }
5248 if (!isArray(arrayLike)) {
5249 if ((getIterator = arrayLike[iteratorSymbol]) !== void 0) {
5250 iterator = callable(getIterator).call(arrayLike);
5251 if (Context2) {
5252 arr = new Context2();
5253 }
5254 result = iterator.next();
5255 i = 0;
5256 while (!result.done) {
5257 value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;
5258 if (Context2) {
5259 desc.value = value;
5260 defineProperty(arr, i, desc);
5261 } else {
5262 arr[i] = value;
5263 }
5264 result = iterator.next();
5265 ++i;
5266 }
5267 length = i;
5268 } else if (isString2(arrayLike)) {
5269 length = arrayLike.length;
5270 if (Context2) {
5271 arr = new Context2();
5272 }
5273 for (i = 0, j = 0; i < length; ++i) {
5274 value = arrayLike[i];
5275 if (i + 1 < length) {
5276 code = value.charCodeAt(0);
5277 if (code >= 55296 && code <= 56319) {
5278 value += arrayLike[++i];
5279 }
5280 }
5281 value = mapFn ? call.call(mapFn, thisArg, value, j) : value;
5282 if (Context2) {
5283 desc.value = value;
5284 defineProperty(arr, j, desc);
5285 } else {
5286 arr[j] = value;
5287 }
5288 ++j;
5289 }
5290 length = j;
5291 }
5292 }
5293 if (length === void 0) {
5294 length = toPosInt(arrayLike.length);
5295 if (Context2) {
5296 arr = new Context2(length);
5297 }
5298 for (i = 0; i < length; ++i) {
5299 value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];
5300 if (Context2) {
5301 desc.value = value;
5302 defineProperty(arr, i, desc);
5303 } else {
5304 arr[i] = value;
5305 }
5306 }
5307 }
5308 if (Context2) {
5309 desc.value = null;
5310 arr.length = length;
5311 }
5312 return arr;
5313 };
5314 });
5315 var require_from4 = __commonJS(function(exports, module) {
5316 'use strict';
5317 module.exports = require_is_implemented5()() ? Array.from : require_shim5();
5318 });
5319 var require_to_array = __commonJS(function(exports, module) {
5320 'use strict';
5321 var from = require_from4();
5322 var isArray = Array.isArray;
5323 module.exports = function(arrayLike) {
5324 return isArray(arrayLike) ? arrayLike : from(arrayLike);
5325 };
5326 });
5327 var require_resolve_resolve = __commonJS(function(exports, module) {
5328 'use strict';
5329 var toArray2 = require_to_array();
5330 var isValue = require_is_value();
5331 var callable = require_valid_callable();
5332 var slice = Array.prototype.slice;
5333 var resolveArgs;
5334 resolveArgs = function resolveArgs(args) {
5335 return this.map(function(resolve, i) {
5336 return resolve ? resolve(args[i]) : args[i];
5337 }).concat(slice.call(args, this.length));
5338 };
5339 module.exports = function(resolvers) {
5340 resolvers = toArray2(resolvers);
5341 resolvers.forEach(function(resolve) {
5342 if (isValue(resolve)) {
5343 callable(resolve);
5344 }
5345 });
5346 return resolveArgs.bind(resolvers);
5347 };
5348 });
5349 var require_resolve_normalize = __commonJS(function(exports, module) {
5350 'use strict';
5351 var callable = require_valid_callable();
5352 module.exports = function(userNormalizer) {
5353 var normalizer;
5354 if (typeof userNormalizer === 'function') {
5355 return {
5356 set: userNormalizer,
5357 get: userNormalizer
5358 };
5359 }
5360 normalizer = {
5361 get: callable(userNormalizer.get)
5362 };
5363 if (userNormalizer.set !== void 0) {
5364 normalizer.set = callable(userNormalizer.set);
5365 if (userNormalizer['delete']) {
5366 normalizer['delete'] = callable(userNormalizer['delete']);
5367 }
5368 if (userNormalizer.clear) {
5369 normalizer.clear = callable(userNormalizer.clear);
5370 }
5371 return normalizer;
5372 }
5373 normalizer.set = normalizer.get;
5374 return normalizer;
5375 };
5376 });
5377 var require_configure_map = __commonJS(function(exports, module) {
5378 'use strict';
5379 var customError = require_custom();
5380 var defineLength = require_define_length();
5381 var d2 = require_d();
5382 var ee = require_event_emitter().methods;
5383 var resolveResolve = require_resolve_resolve();
5384 var resolveNormalize = require_resolve_normalize();
5385 var apply = Function.prototype.apply;
5386 var call = Function.prototype.call;
5387 var create = Object.create;
5388 var defineProperties = Object.defineProperties;
5389 var _on = ee.on;
5390 var emit = ee.emit;
5391 module.exports = function(original, length, options) {
5392 var cache2 = create(null), conf, memLength, get2, set2, del, _clear, extDel, extGet, extHas, normalizer, getListeners, setListeners, deleteListeners, memoized, resolve;
5393 if (length !== false) {
5394 memLength = length;
5395 } else if (isNaN(original.length)) {
5396 memLength = 1;
5397 } else {
5398 memLength = original.length;
5399 }
5400 if (options.normalizer) {
5401 normalizer = resolveNormalize(options.normalizer);
5402 get2 = normalizer.get;
5403 set2 = normalizer.set;
5404 del = normalizer['delete'];
5405 _clear = normalizer.clear;
5406 }
5407 if (options.resolvers != null) {
5408 resolve = resolveResolve(options.resolvers);
5409 }
5410 if (get2) {
5411 memoized = defineLength(function(arg) {
5412 var id, result, args = arguments;
5413 if (resolve) {
5414 args = resolve(args);
5415 }
5416 id = get2(args);
5417 if (id !== null) {
5418 if (hasOwnProperty.call(cache2, id)) {
5419 if (getListeners) {
5420 conf.emit('get', id, args, this);
5421 }
5422 return cache2[id];
5423 }
5424 }
5425 if (args.length === 1) {
5426 result = call.call(original, this, args[0]);
5427 } else {
5428 result = apply.call(original, this, args);
5429 }
5430 if (id === null) {
5431 id = get2(args);
5432 if (id !== null) {
5433 throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
5434 }
5435 id = set2(args);
5436 } else if (hasOwnProperty.call(cache2, id)) {
5437 throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
5438 }
5439 cache2[id] = result;
5440 if (setListeners) {
5441 conf.emit('set', id, null, result);
5442 }
5443 return result;
5444 }, memLength);
5445 } else if (length === 0) {
5446 memoized = function memoized() {
5447 var result;
5448 if (hasOwnProperty.call(cache2, 'data')) {
5449 if (getListeners) {
5450 conf.emit('get', 'data', arguments, this);
5451 }
5452 return cache2.data;
5453 }
5454 if (arguments.length) {
5455 result = apply.call(original, this, arguments);
5456 } else {
5457 result = call.call(original, this);
5458 }
5459 if (hasOwnProperty.call(cache2, 'data')) {
5460 throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
5461 }
5462 cache2.data = result;
5463 if (setListeners) {
5464 conf.emit('set', 'data', null, result);
5465 }
5466 return result;
5467 };
5468 } else {
5469 memoized = function memoized(arg) {
5470 var result, args = arguments, id;
5471 if (resolve) {
5472 args = resolve(arguments);
5473 }
5474 id = String(args[0]);
5475 if (hasOwnProperty.call(cache2, id)) {
5476 if (getListeners) {
5477 conf.emit('get', id, args, this);
5478 }
5479 return cache2[id];
5480 }
5481 if (args.length === 1) {
5482 result = call.call(original, this, args[0]);
5483 } else {
5484 result = apply.call(original, this, args);
5485 }
5486 if (hasOwnProperty.call(cache2, id)) {
5487 throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
5488 }
5489 cache2[id] = result;
5490 if (setListeners) {
5491 conf.emit('set', id, null, result);
5492 }
5493 return result;
5494 };
5495 }
5496 conf = {
5497 original: original,
5498 memoized: memoized,
5499 profileName: options.profileName,
5500 get: function get(args) {
5501 if (resolve) {
5502 args = resolve(args);
5503 }
5504 if (get2) {
5505 return get2(args);
5506 }
5507 return String(args[0]);
5508 },
5509 has: function has(id) {
5510 return hasOwnProperty.call(cache2, id);
5511 },
5512 delete: function _delete(id) {
5513 var result;
5514 if (!hasOwnProperty.call(cache2, id)) {
5515 return;
5516 }
5517 if (del) {
5518 del(id);
5519 }
5520 result = cache2[id];
5521 delete cache2[id];
5522 if (deleteListeners) {
5523 conf.emit('delete', id, result);
5524 }
5525 },
5526 clear: function clear() {
5527 var oldCache = cache2;
5528 if (_clear) {
5529 _clear();
5530 }
5531 cache2 = create(null);
5532 conf.emit('clear', oldCache);
5533 },
5534 on: function on(type2, listener) {
5535 if (type2 === 'get') {
5536 getListeners = true;
5537 } else if (type2 === 'set') {
5538 setListeners = true;
5539 } else if (type2 === 'delete') {
5540 deleteListeners = true;
5541 }
5542 return _on.call(this, type2, listener);
5543 },
5544 emit: emit,
5545 updateEnv: function updateEnv() {
5546 original = conf.original;
5547 }
5548 };
5549 if (get2) {
5550 extDel = defineLength(function(arg) {
5551 var id, args = arguments;
5552 if (resolve) {
5553 args = resolve(args);
5554 }
5555 id = get2(args);
5556 if (id === null) {
5557 return;
5558 }
5559 conf['delete'](id);
5560 }, memLength);
5561 } else if (length === 0) {
5562 extDel = function extDel() {
5563 return conf['delete']('data');
5564 };
5565 } else {
5566 extDel = function extDel(arg) {
5567 if (resolve) {
5568 arg = resolve(arguments)[0];
5569 }
5570 return conf['delete'](arg);
5571 };
5572 }
5573 extGet = defineLength(function() {
5574 var id, args = arguments;
5575 if (length === 0) {
5576 return cache2.data;
5577 }
5578 if (resolve) {
5579 args = resolve(args);
5580 }
5581 if (get2) {
5582 id = get2(args);
5583 } else {
5584 id = String(args[0]);
5585 }
5586 return cache2[id];
5587 });
5588 extHas = defineLength(function() {
5589 var id, args = arguments;
5590 if (length === 0) {
5591 return conf.has('data');
5592 }
5593 if (resolve) {
5594 args = resolve(args);
5595 }
5596 if (get2) {
5597 id = get2(args);
5598 } else {
5599 id = String(args[0]);
5600 }
5601 if (id === null) {
5602 return false;
5603 }
5604 return conf.has(id);
5605 });
5606 defineProperties(memoized, {
5607 __memoized__: d2(true),
5608 delete: d2(extDel),
5609 clear: d2(conf.clear),
5610 _get: d2(extGet),
5611 _has: d2(extHas)
5612 });
5613 return conf;
5614 };
5615 });
5616 var require_plain = __commonJS(function(exports, module) {
5617 'use strict';
5618 var callable = require_valid_callable();
5619 var forEach = require_for_each();
5620 var extensions = require_registered_extensions();
5621 var configure4 = require_configure_map();
5622 var resolveLength = require_resolve_length();
5623 module.exports = function self2(fn) {
5624 var options, length, conf;
5625 callable(fn);
5626 options = Object(arguments[1]);
5627 if (options.async && options.promise) {
5628 throw new Error('Options \'async\' and \'promise\' cannot be used together');
5629 }
5630 if (hasOwnProperty.call(fn, '__memoized__') && !options.force) {
5631 return fn;
5632 }
5633 length = resolveLength(options.length, fn.length, options.async && extensions.async);
5634 conf = configure4(fn, length, options);
5635 forEach(extensions, function(extFn, name) {
5636 if (options[name]) {
5637 extFn(options[name], conf, options);
5638 }
5639 });
5640 if (self2.__profiler__) {
5641 self2.__profiler__(conf);
5642 }
5643 conf.updateEnv();
5644 return conf.memoized;
5645 };
5646 });
5647 var require_primitive = __commonJS(function(exports, module) {
5648 'use strict';
5649 module.exports = function(args) {
5650 var id, i, length = args.length;
5651 if (!length) {
5652 return '\x02';
5653 }
5654 id = String(args[i = 0]);
5655 while (--length) {
5656 id += '\x01' + args[++i];
5657 }
5658 return id;
5659 };
5660 });
5661 var require_get_primitive_fixed = __commonJS(function(exports, module) {
5662 'use strict';
5663 module.exports = function(length) {
5664 if (!length) {
5665 return function() {
5666 return '';
5667 };
5668 }
5669 return function(args) {
5670 var id = String(args[0]), i = 0, currentLength = length;
5671 while (--currentLength) {
5672 id += '\x01' + args[++i];
5673 }
5674 return id;
5675 };
5676 };
5677 });
5678 var require_is_implemented8 = __commonJS(function(exports, module) {
5679 'use strict';
5680 module.exports = function() {
5681 var numberIsNaN = Number.isNaN;
5682 if (typeof numberIsNaN !== 'function') {
5683 return false;
5684 }
5685 return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);
5686 };
5687 });
5688 var require_shim6 = __commonJS(function(exports, module) {
5689 'use strict';
5690 module.exports = function(value) {
5691 return value !== value;
5692 };
5693 });
5694 var require_is_nan = __commonJS(function(exports, module) {
5695 'use strict';
5696 module.exports = require_is_implemented8()() ? Number.isNaN : require_shim6();
5697 });
5698 var require_e_index_of = __commonJS(function(exports, module) {
5699 'use strict';
5700 var numberIsNaN = require_is_nan();
5701 var toPosInt = require_to_pos_integer();
5702 var value = require_valid_value();
5703 var indexOf = Array.prototype.indexOf;
5704 var objHasOwnProperty = Object.prototype.hasOwnProperty;
5705 var abs = Math.abs;
5706 var floor = Math.floor;
5707 module.exports = function(searchElement) {
5708 var i, length, fromIndex, val;
5709 if (!numberIsNaN(searchElement)) {
5710 return indexOf.apply(this, arguments);
5711 }
5712 length = toPosInt(value(this).length);
5713 fromIndex = arguments[1];
5714 if (isNaN(fromIndex)) {
5715 fromIndex = 0;
5716 } else if (fromIndex >= 0) {
5717 fromIndex = floor(fromIndex);
5718 } else {
5719 fromIndex = toPosInt(this.length) - floor(abs(fromIndex));
5720 }
5721 for (i = fromIndex; i < length; ++i) {
5722 if (objHasOwnProperty.call(this, i)) {
5723 val = this[i];
5724 if (numberIsNaN(val)) {
5725 return i;
5726 }
5727 }
5728 }
5729 return -1;
5730 };
5731 });
5732 var require_get = __commonJS(function(exports, module) {
5733 'use strict';
5734 var indexOf = require_e_index_of();
5735 var create = Object.create;
5736 module.exports = function() {
5737 var lastId = 0, map = [], cache2 = create(null);
5738 return {
5739 get: function get(args) {
5740 var index = 0, set2 = map, i, length = args.length;
5741 if (length === 0) {
5742 return set2[length] || null;
5743 }
5744 if (set2 = set2[length]) {
5745 while (index < length - 1) {
5746 i = indexOf.call(set2[0], args[index]);
5747 if (i === -1) {
5748 return null;
5749 }
5750 set2 = set2[1][i];
5751 ++index;
5752 }
5753 i = indexOf.call(set2[0], args[index]);
5754 if (i === -1) {
5755 return null;
5756 }
5757 return set2[1][i] || null;
5758 }
5759 return null;
5760 },
5761 set: function set(args) {
5762 var index = 0, set2 = map, i, length = args.length;
5763 if (length === 0) {
5764 set2[length] = ++lastId;
5765 } else {
5766 if (!set2[length]) {
5767 set2[length] = [ [], [] ];
5768 }
5769 set2 = set2[length];
5770 while (index < length - 1) {
5771 i = indexOf.call(set2[0], args[index]);
5772 if (i === -1) {
5773 i = set2[0].push(args[index]) - 1;
5774 set2[1].push([ [], [] ]);
5775 }
5776 set2 = set2[1][i];
5777 ++index;
5778 }
5779 i = indexOf.call(set2[0], args[index]);
5780 if (i === -1) {
5781 i = set2[0].push(args[index]) - 1;
5782 }
5783 set2[1][i] = ++lastId;
5784 }
5785 cache2[lastId] = args;
5786 return lastId;
5787 },
5788 delete: function _delete(id) {
5789 var index = 0, set2 = map, i, args = cache2[id], length = args.length, path = [];
5790 if (length === 0) {
5791 delete set2[length];
5792 } else if (set2 = set2[length]) {
5793 while (index < length - 1) {
5794 i = indexOf.call(set2[0], args[index]);
5795 if (i === -1) {
5796 return;
5797 }
5798 path.push(set2, i);
5799 set2 = set2[1][i];
5800 ++index;
5801 }
5802 i = indexOf.call(set2[0], args[index]);
5803 if (i === -1) {
5804 return;
5805 }
5806 id = set2[1][i];
5807 set2[0].splice(i, 1);
5808 set2[1].splice(i, 1);
5809 while (!set2[0].length && path.length) {
5810 i = path.pop();
5811 set2 = path.pop();
5812 set2[0].splice(i, 1);
5813 set2[1].splice(i, 1);
5814 }
5815 }
5816 delete cache2[id];
5817 },
5818 clear: function clear() {
5819 map = [];
5820 cache2 = create(null);
5821 }
5822 };
5823 };
5824 });
5825 var require_get_1 = __commonJS(function(exports, module) {
5826 'use strict';
5827 var indexOf = require_e_index_of();
5828 module.exports = function() {
5829 var lastId = 0, argsMap = [], cache2 = [];
5830 return {
5831 get: function get(args) {
5832 var index = indexOf.call(argsMap, args[0]);
5833 return index === -1 ? null : cache2[index];
5834 },
5835 set: function set(args) {
5836 argsMap.push(args[0]);
5837 cache2.push(++lastId);
5838 return lastId;
5839 },
5840 delete: function _delete(id) {
5841 var index = indexOf.call(cache2, id);
5842 if (index !== -1) {
5843 argsMap.splice(index, 1);
5844 cache2.splice(index, 1);
5845 }
5846 },
5847 clear: function clear() {
5848 argsMap = [];
5849 cache2 = [];
5850 }
5851 };
5852 };
5853 });
5854 var require_get_fixed = __commonJS(function(exports, module) {
5855 'use strict';
5856 var indexOf = require_e_index_of();
5857 var create = Object.create;
5858 module.exports = function(length) {
5859 var lastId = 0, map = [ [], [] ], cache2 = create(null);
5860 return {
5861 get: function get(args) {
5862 var index = 0, set2 = map, i;
5863 while (index < length - 1) {
5864 i = indexOf.call(set2[0], args[index]);
5865 if (i === -1) {
5866 return null;
5867 }
5868 set2 = set2[1][i];
5869 ++index;
5870 }
5871 i = indexOf.call(set2[0], args[index]);
5872 if (i === -1) {
5873 return null;
5874 }
5875 return set2[1][i] || null;
5876 },
5877 set: function set(args) {
5878 var index = 0, set2 = map, i;
5879 while (index < length - 1) {
5880 i = indexOf.call(set2[0], args[index]);
5881 if (i === -1) {
5882 i = set2[0].push(args[index]) - 1;
5883 set2[1].push([ [], [] ]);
5884 }
5885 set2 = set2[1][i];
5886 ++index;
5887 }
5888 i = indexOf.call(set2[0], args[index]);
5889 if (i === -1) {
5890 i = set2[0].push(args[index]) - 1;
5891 }
5892 set2[1][i] = ++lastId;
5893 cache2[lastId] = args;
5894 return lastId;
5895 },
5896 delete: function _delete(id) {
5897 var index = 0, set2 = map, i, path = [], args = cache2[id];
5898 while (index < length - 1) {
5899 i = indexOf.call(set2[0], args[index]);
5900 if (i === -1) {
5901 return;
5902 }
5903 path.push(set2, i);
5904 set2 = set2[1][i];
5905 ++index;
5906 }
5907 i = indexOf.call(set2[0], args[index]);
5908 if (i === -1) {
5909 return;
5910 }
5911 id = set2[1][i];
5912 set2[0].splice(i, 1);
5913 set2[1].splice(i, 1);
5914 while (!set2[0].length && path.length) {
5915 i = path.pop();
5916 set2 = path.pop();
5917 set2[0].splice(i, 1);
5918 set2[1].splice(i, 1);
5919 }
5920 delete cache2[id];
5921 },
5922 clear: function clear() {
5923 map = [ [], [] ];
5924 cache2 = create(null);
5925 }
5926 };
5927 };
5928 });
5929 var require_map = __commonJS(function(exports, module) {
5930 'use strict';
5931 var callable = require_valid_callable();
5932 var forEach = require_for_each();
5933 var call = Function.prototype.call;
5934 module.exports = function(obj, cb) {
5935 var result = {}, thisArg = arguments[2];
5936 callable(cb);
5937 forEach(obj, function(value, key, targetObj, index) {
5938 result[key] = call.call(cb, thisArg, value, key, targetObj, index);
5939 });
5940 return result;
5941 };
5942 });
5943 var require_next_tick = __commonJS(function(exports, module) {
5944 'use strict';
5945 var ensureCallable = function ensureCallable(fn) {
5946 if (typeof fn !== 'function') {
5947 throw new TypeError(fn + ' is not a function');
5948 }
5949 return fn;
5950 };
5951 var byObserver = function byObserver(Observer) {
5952 var node = document.createTextNode(''), queue2, currentQueue, i = 0;
5953 new Observer(function() {
5954 var callback;
5955 if (!queue2) {
5956 if (!currentQueue) {
5957 return;
5958 }
5959 queue2 = currentQueue;
5960 } else if (currentQueue) {
5961 queue2 = currentQueue.concat(queue2);
5962 }
5963 currentQueue = queue2;
5964 queue2 = null;
5965 if (typeof currentQueue === 'function') {
5966 callback = currentQueue;
5967 currentQueue = null;
5968 callback();
5969 return;
5970 }
5971 node.data = i = ++i % 2;
5972 while (currentQueue) {
5973 callback = currentQueue.shift();
5974 if (!currentQueue.length) {
5975 currentQueue = null;
5976 }
5977 callback();
5978 }
5979 }).observe(node, {
5980 characterData: true
5981 });
5982 return function(fn) {
5983 ensureCallable(fn);
5984 if (queue2) {
5985 if (typeof queue2 === 'function') {
5986 queue2 = [ queue2, fn ];
5987 } else {
5988 queue2.push(fn);
5989 }
5990 return;
5991 }
5992 queue2 = fn;
5993 node.data = i = ++i % 2;
5994 };
5995 };
5996 module.exports = function() {
5997 if ((typeof process === 'undefined' ? 'undefined' : _typeof(process)) === 'object' && process && typeof process.nextTick === 'function') {
5998 return process.nextTick;
5999 }
6000 if (typeof queueMicrotask === 'function') {
6001 return function(cb) {
6002 queueMicrotask(ensureCallable(cb));
6003 };
6004 }
6005 if ((typeof document === 'undefined' ? 'undefined' : _typeof(document)) === 'object' && document) {
6006 if (typeof MutationObserver === 'function') {
6007 return byObserver(MutationObserver);
6008 }
6009 if (typeof WebKitMutationObserver === 'function') {
6010 return byObserver(WebKitMutationObserver);
6011 }
6012 }
6013 if (typeof setImmediate === 'function') {
6014 return function(cb) {
6015 setImmediate(ensureCallable(cb));
6016 };
6017 }
6018 if (typeof setTimeout === 'function' || (typeof setTimeout === 'undefined' ? 'undefined' : _typeof(setTimeout)) === 'object') {
6019 return function(cb) {
6020 setTimeout(ensureCallable(cb), 0);
6021 };
6022 }
6023 return null;
6024 }();
6025 });
6026 var require_async = __commonJS(function() {
6027 'use strict';
6028 var aFrom = require_from4();
6029 var objectMap = require_map();
6030 var mixin = require_mixin();
6031 var defineLength = require_define_length();
6032 var nextTick = require_next_tick();
6033 var slice = Array.prototype.slice;
6034 var apply = Function.prototype.apply;
6035 var create = Object.create;
6036 require_registered_extensions().async = function(tbi, conf) {
6037 var waiting = create(null), cache2 = create(null), base = conf.memoized, original = conf.original, currentCallback, currentContext, currentArgs;
6038 conf.memoized = defineLength(function(arg) {
6039 var args = arguments, last2 = args[args.length - 1];
6040 if (typeof last2 === 'function') {
6041 currentCallback = last2;
6042 args = slice.call(args, 0, -1);
6043 }
6044 return base.apply(currentContext = this, currentArgs = args);
6045 }, base);
6046 try {
6047 mixin(conf.memoized, base);
6048 } catch (ignore) {}
6049 conf.on('get', function(id) {
6050 var cb, context, args;
6051 if (!currentCallback) {
6052 return;
6053 }
6054 if (waiting[id]) {
6055 if (typeof waiting[id] === 'function') {
6056 waiting[id] = [ waiting[id], currentCallback ];
6057 } else {
6058 waiting[id].push(currentCallback);
6059 }
6060 currentCallback = null;
6061 return;
6062 }
6063 cb = currentCallback;
6064 context = currentContext;
6065 args = currentArgs;
6066 currentCallback = currentContext = currentArgs = null;
6067 nextTick(function() {
6068 var data;
6069 if (hasOwnProperty.call(cache2, id)) {
6070 data = cache2[id];
6071 conf.emit('getasync', id, args, context);
6072 apply.call(cb, data.context, data.args);
6073 } else {
6074 currentCallback = cb;
6075 currentContext = context;
6076 currentArgs = args;
6077 base.apply(context, args);
6078 }
6079 });
6080 });
6081 conf.original = function() {
6082 var args, cb, origCb, result;
6083 if (!currentCallback) {
6084 return apply.call(original, this, arguments);
6085 }
6086 args = aFrom(arguments);
6087 cb = function self2(err2) {
6088 var cb2, args2, id = self2.id;
6089 if (id == null) {
6090 nextTick(apply.bind(self2, this, arguments));
6091 return void 0;
6092 }
6093 delete self2.id;
6094 cb2 = waiting[id];
6095 delete waiting[id];
6096 if (!cb2) {
6097 return void 0;
6098 }
6099 args2 = aFrom(arguments);
6100 if (conf.has(id)) {
6101 if (err2) {
6102 conf['delete'](id);
6103 } else {
6104 cache2[id] = {
6105 context: this,
6106 args: args2
6107 };
6108 conf.emit('setasync', id, typeof cb2 === 'function' ? 1 : cb2.length);
6109 }
6110 }
6111 if (typeof cb2 === 'function') {
6112 result = apply.call(cb2, this, args2);
6113 } else {
6114 cb2.forEach(function(cb3) {
6115 result = apply.call(cb3, this, args2);
6116 }, this);
6117 }
6118 return result;
6119 };
6120 origCb = currentCallback;
6121 currentCallback = currentContext = currentArgs = null;
6122 args.push(cb);
6123 result = apply.call(original, this, args);
6124 cb.cb = origCb;
6125 currentCallback = cb;
6126 return result;
6127 };
6128 conf.on('set', function(id) {
6129 if (!currentCallback) {
6130 conf['delete'](id);
6131 return;
6132 }
6133 if (waiting[id]) {
6134 if (typeof waiting[id] === 'function') {
6135 waiting[id] = [ waiting[id], currentCallback.cb ];
6136 } else {
6137 waiting[id].push(currentCallback.cb);
6138 }
6139 } else {
6140 waiting[id] = currentCallback.cb;
6141 }
6142 delete currentCallback.cb;
6143 currentCallback.id = id;
6144 currentCallback = null;
6145 });
6146 conf.on('delete', function(id) {
6147 var result;
6148 if (hasOwnProperty.call(waiting, id)) {
6149 return;
6150 }
6151 if (!cache2[id]) {
6152 return;
6153 }
6154 result = cache2[id];
6155 delete cache2[id];
6156 conf.emit('deleteasync', id, slice.call(result.args, 1));
6157 });
6158 conf.on('clear', function() {
6159 var oldCache = cache2;
6160 cache2 = create(null);
6161 conf.emit('clearasync', objectMap(oldCache, function(data) {
6162 return slice.call(data.args, 1);
6163 }));
6164 });
6165 };
6166 });
6167 var require_primitive_set = __commonJS(function(exports, module) {
6168 'use strict';
6169 var forEach = Array.prototype.forEach;
6170 var create = Object.create;
6171 module.exports = function(arg) {
6172 var set2 = create(null);
6173 forEach.call(arguments, function(name) {
6174 set2[name] = true;
6175 });
6176 return set2;
6177 };
6178 });
6179 var require_is_callable2 = __commonJS(function(exports, module) {
6180 'use strict';
6181 module.exports = function(obj) {
6182 return typeof obj === 'function';
6183 };
6184 });
6185 var require_validate_stringifiable = __commonJS(function(exports, module) {
6186 'use strict';
6187 var isCallable = require_is_callable2();
6188 module.exports = function(stringifiable) {
6189 try {
6190 if (stringifiable && isCallable(stringifiable.toString)) {
6191 return stringifiable.toString();
6192 }
6193 return String(stringifiable);
6194 } catch (e) {
6195 throw new TypeError('Passed argument cannot be stringifed');
6196 }
6197 };
6198 });
6199 var require_validate_stringifiable_value = __commonJS(function(exports, module) {
6200 'use strict';
6201 var ensureValue = require_valid_value();
6202 var stringifiable = require_validate_stringifiable();
6203 module.exports = function(value) {
6204 return stringifiable(ensureValue(value));
6205 };
6206 });
6207 var require_safe_to_string = __commonJS(function(exports, module) {
6208 'use strict';
6209 var isCallable = require_is_callable2();
6210 module.exports = function(value) {
6211 try {
6212 if (value && isCallable(value.toString)) {
6213 return value.toString();
6214 }
6215 return String(value);
6216 } catch (e) {
6217 return '<Non-coercible to string value>';
6218 }
6219 };
6220 });
6221 var require_to_short_string_representation = __commonJS(function(exports, module) {
6222 'use strict';
6223 var safeToString = require_safe_to_string();
6224 var reNewLine = /[\n\r\u2028\u2029]/g;
6225 module.exports = function(value) {
6226 var string = safeToString(value);
6227 if (string.length > 100) {
6228 string = string.slice(0, 99) + '\u2026';
6229 }
6230 string = string.replace(reNewLine, function(_char) {
6231 return JSON.stringify(_char).slice(1, -1);
6232 });
6233 return string;
6234 };
6235 });
6236 var require_is_promise = __commonJS(function(exports, module) {
6237 module.exports = isPromise;
6238 module.exports['default'] = isPromise;
6239 function isPromise(obj) {
6240 return !!obj && (_typeof(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
6241 }
6242 });
6243 var require_promise = __commonJS(function() {
6244 'use strict';
6245 var objectMap = require_map();
6246 var primitiveSet = require_primitive_set();
6247 var ensureString = require_validate_stringifiable_value();
6248 var toShortString = require_to_short_string_representation();
6249 var isPromise = require_is_promise();
6250 var nextTick = require_next_tick();
6251 var create = Object.create;
6252 var supportedModes = primitiveSet('then', 'then:finally', 'done', 'done:finally');
6253 require_registered_extensions().promise = function(mode, conf) {
6254 var waiting = create(null), cache2 = create(null), promises = create(null);
6255 if (mode === true) {
6256 mode = null;
6257 } else {
6258 mode = ensureString(mode);
6259 if (!supportedModes[mode]) {
6260 throw new TypeError('\'' + toShortString(mode) + '\' is not valid promise mode');
6261 }
6262 }
6263 conf.on('set', function(id, ignore, promise) {
6264 var isFailed = false;
6265 if (!isPromise(promise)) {
6266 cache2[id] = promise;
6267 conf.emit('setasync', id, 1);
6268 return;
6269 }
6270 waiting[id] = 1;
6271 promises[id] = promise;
6272 var onSuccess = function onSuccess(result) {
6273 var count = waiting[id];
6274 if (isFailed) {
6275 throw new Error('Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in \'done:finally\' mode)\nConsider to rely on \'then\' or \'done\' mode instead.');
6276 }
6277 if (!count) {
6278 return;
6279 }
6280 delete waiting[id];
6281 cache2[id] = result;
6282 conf.emit('setasync', id, count);
6283 };
6284 var onFailure = function onFailure() {
6285 isFailed = true;
6286 if (!waiting[id]) {
6287 return;
6288 }
6289 delete waiting[id];
6290 delete promises[id];
6291 conf['delete'](id);
6292 };
6293 var resolvedMode = mode;
6294 if (!resolvedMode) {
6295 resolvedMode = 'then';
6296 }
6297 if (resolvedMode === 'then') {
6298 var nextTickFailure = function nextTickFailure() {
6299 nextTick(onFailure);
6300 };
6301 promise = promise.then(function(result) {
6302 nextTick(onSuccess.bind(this, result));
6303 }, nextTickFailure);
6304 if (typeof promise['finally'] === 'function') {
6305 promise['finally'](nextTickFailure);
6306 }
6307 } else if (resolvedMode === 'done') {
6308 if (typeof promise.done !== 'function') {
6309 throw new Error('Memoizee error: Retrieved promise does not implement \'done\' in \'done\' mode');
6310 }
6311 promise.done(onSuccess, onFailure);
6312 } else if (resolvedMode === 'done:finally') {
6313 if (typeof promise.done !== 'function') {
6314 throw new Error('Memoizee error: Retrieved promise does not implement \'done\' in \'done:finally\' mode');
6315 }
6316 if (typeof promise['finally'] !== 'function') {
6317 throw new Error('Memoizee error: Retrieved promise does not implement \'finally\' in \'done:finally\' mode');
6318 }
6319 promise.done(onSuccess);
6320 promise['finally'](onFailure);
6321 }
6322 });
6323 conf.on('get', function(id, args, context) {
6324 var promise;
6325 if (waiting[id]) {
6326 ++waiting[id];
6327 return;
6328 }
6329 promise = promises[id];
6330 var emit = function emit() {
6331 conf.emit('getasync', id, args, context);
6332 };
6333 if (isPromise(promise)) {
6334 if (typeof promise.done === 'function') {
6335 promise.done(emit);
6336 } else {
6337 promise.then(function() {
6338 nextTick(emit);
6339 });
6340 }
6341 } else {
6342 emit();
6343 }
6344 });
6345 conf.on('delete', function(id) {
6346 delete promises[id];
6347 if (waiting[id]) {
6348 delete waiting[id];
6349 return;
6350 }
6351 if (!hasOwnProperty.call(cache2, id)) {
6352 return;
6353 }
6354 var result = cache2[id];
6355 delete cache2[id];
6356 conf.emit('deleteasync', id, [ result ]);
6357 });
6358 conf.on('clear', function() {
6359 var oldCache = cache2;
6360 cache2 = create(null);
6361 waiting = create(null);
6362 promises = create(null);
6363 conf.emit('clearasync', objectMap(oldCache, function(data) {
6364 return [ data ];
6365 }));
6366 });
6367 };
6368 });
6369 var require_dispose = __commonJS(function() {
6370 'use strict';
6371 var callable = require_valid_callable();
6372 var forEach = require_for_each();
6373 var extensions = require_registered_extensions();
6374 var apply = Function.prototype.apply;
6375 extensions.dispose = function(dispose, conf, options) {
6376 var del;
6377 callable(dispose);
6378 if (options.async && extensions.async || options.promise && extensions.promise) {
6379 conf.on('deleteasync', del = function del(id, resultArray) {
6380 apply.call(dispose, null, resultArray);
6381 });
6382 conf.on('clearasync', function(cache2) {
6383 forEach(cache2, function(result, id) {
6384 del(id, result);
6385 });
6386 });
6387 return;
6388 }
6389 conf.on('delete', del = function del(id, result) {
6390 dispose(result);
6391 });
6392 conf.on('clear', function(cache2) {
6393 forEach(cache2, function(result, id) {
6394 del(id, result);
6395 });
6396 });
6397 };
6398 });
6399 var require_max_timeout = __commonJS(function(exports, module) {
6400 'use strict';
6401 module.exports = 2147483647;
6402 });
6403 var require_valid_timeout = __commonJS(function(exports, module) {
6404 'use strict';
6405 var toPosInt = require_to_pos_integer();
6406 var maxTimeout = require_max_timeout();
6407 module.exports = function(value) {
6408 value = toPosInt(value);
6409 if (value > maxTimeout) {
6410 throw new TypeError(value + ' exceeds maximum possible timeout');
6411 }
6412 return value;
6413 };
6414 });
6415 var require_max_age = __commonJS(function() {
6416 'use strict';
6417 var aFrom = require_from4();
6418 var forEach = require_for_each();
6419 var nextTick = require_next_tick();
6420 var isPromise = require_is_promise();
6421 var timeout = require_valid_timeout();
6422 var extensions = require_registered_extensions();
6423 var noop3 = Function.prototype;
6424 var max2 = Math.max;
6425 var min = Math.min;
6426 var create = Object.create;
6427 extensions.maxAge = function(maxAge, conf, options) {
6428 var timeouts, postfix, preFetchAge, preFetchTimeouts;
6429 maxAge = timeout(maxAge);
6430 if (!maxAge) {
6431 return;
6432 }
6433 timeouts = create(null);
6434 postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';
6435 conf.on('set' + postfix, function(id) {
6436 timeouts[id] = setTimeout(function() {
6437 conf['delete'](id);
6438 }, maxAge);
6439 if (typeof timeouts[id].unref === 'function') {
6440 timeouts[id].unref();
6441 }
6442 if (!preFetchTimeouts) {
6443 return;
6444 }
6445 if (preFetchTimeouts[id]) {
6446 if (preFetchTimeouts[id] !== 'nextTick') {
6447 clearTimeout(preFetchTimeouts[id]);
6448 }
6449 }
6450 preFetchTimeouts[id] = setTimeout(function() {
6451 delete preFetchTimeouts[id];
6452 }, preFetchAge);
6453 if (typeof preFetchTimeouts[id].unref === 'function') {
6454 preFetchTimeouts[id].unref();
6455 }
6456 });
6457 conf.on('delete' + postfix, function(id) {
6458 clearTimeout(timeouts[id]);
6459 delete timeouts[id];
6460 if (!preFetchTimeouts) {
6461 return;
6462 }
6463 if (preFetchTimeouts[id] !== 'nextTick') {
6464 clearTimeout(preFetchTimeouts[id]);
6465 }
6466 delete preFetchTimeouts[id];
6467 });
6468 if (options.preFetch) {
6469 if (options.preFetch === true || isNaN(options.preFetch)) {
6470 preFetchAge = .333;
6471 } else {
6472 preFetchAge = max2(min(Number(options.preFetch), 1), 0);
6473 }
6474 if (preFetchAge) {
6475 preFetchTimeouts = {};
6476 preFetchAge = (1 - preFetchAge) * maxAge;
6477 conf.on('get' + postfix, function(id, args, context) {
6478 if (!preFetchTimeouts[id]) {
6479 preFetchTimeouts[id] = 'nextTick';
6480 nextTick(function() {
6481 var result;
6482 if (preFetchTimeouts[id] !== 'nextTick') {
6483 return;
6484 }
6485 delete preFetchTimeouts[id];
6486 conf['delete'](id);
6487 if (options.async) {
6488 args = aFrom(args);
6489 args.push(noop3);
6490 }
6491 result = conf.memoized.apply(context, args);
6492 if (options.promise) {
6493 if (isPromise(result)) {
6494 if (typeof result.done === 'function') {
6495 result.done(noop3, noop3);
6496 } else {
6497 result.then(noop3, noop3);
6498 }
6499 }
6500 }
6501 });
6502 }
6503 });
6504 }
6505 }
6506 conf.on('clear' + postfix, function() {
6507 forEach(timeouts, function(id) {
6508 clearTimeout(id);
6509 });
6510 timeouts = {};
6511 if (preFetchTimeouts) {
6512 forEach(preFetchTimeouts, function(id) {
6513 if (id !== 'nextTick') {
6514 clearTimeout(id);
6515 }
6516 });
6517 preFetchTimeouts = {};
6518 }
6519 });
6520 };
6521 });
6522 var require_lru_queue = __commonJS(function(exports, module) {
6523 'use strict';
6524 var toPosInt = require_to_pos_integer();
6525 var create = Object.create;
6526 var hasOwnProperty2 = Object.prototype.hasOwnProperty;
6527 module.exports = function(limit) {
6528 var size = 0, base = 1, queue2 = create(null), map = create(null), index = 0, del;
6529 limit = toPosInt(limit);
6530 return {
6531 hit: function hit(id) {
6532 var oldIndex = map[id], nuIndex = ++index;
6533 queue2[nuIndex] = id;
6534 map[id] = nuIndex;
6535 if (!oldIndex) {
6536 ++size;
6537 if (size <= limit) {
6538 return;
6539 }
6540 id = queue2[base];
6541 del(id);
6542 return id;
6543 }
6544 delete queue2[oldIndex];
6545 if (base !== oldIndex) {
6546 return;
6547 }
6548 while (!hasOwnProperty2.call(queue2, ++base)) {
6549 continue;
6550 }
6551 },
6552 delete: del = function del(id) {
6553 var oldIndex = map[id];
6554 if (!oldIndex) {
6555 return;
6556 }
6557 delete queue2[oldIndex];
6558 delete map[id];
6559 --size;
6560 if (base !== oldIndex) {
6561 return;
6562 }
6563 if (!size) {
6564 index = 0;
6565 base = 1;
6566 return;
6567 }
6568 while (!hasOwnProperty2.call(queue2, ++base)) {
6569 continue;
6570 }
6571 },
6572 clear: function clear() {
6573 size = 0;
6574 base = 1;
6575 queue2 = create(null);
6576 map = create(null);
6577 index = 0;
6578 }
6579 };
6580 };
6581 });
6582 var require_max = __commonJS(function() {
6583 'use strict';
6584 var toPosInteger = require_to_pos_integer();
6585 var lruQueue = require_lru_queue();
6586 var extensions = require_registered_extensions();
6587 extensions.max = function(max2, conf, options) {
6588 var postfix, queue2, hit;
6589 max2 = toPosInteger(max2);
6590 if (!max2) {
6591 return;
6592 }
6593 queue2 = lruQueue(max2);
6594 postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';
6595 conf.on('set' + postfix, hit = function hit(id) {
6596 id = queue2.hit(id);
6597 if (id === void 0) {
6598 return;
6599 }
6600 conf['delete'](id);
6601 });
6602 conf.on('get' + postfix, hit);
6603 conf.on('delete' + postfix, queue2['delete']);
6604 conf.on('clear' + postfix, queue2.clear);
6605 };
6606 });
6607 var require_ref_counter = __commonJS(function() {
6608 'use strict';
6609 var d2 = require_d();
6610 var extensions = require_registered_extensions();
6611 var create = Object.create;
6612 var defineProperties = Object.defineProperties;
6613 extensions.refCounter = function(ignore, conf, options) {
6614 var cache2, postfix;
6615 cache2 = create(null);
6616 postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';
6617 conf.on('set' + postfix, function(id, length) {
6618 cache2[id] = length || 1;
6619 });
6620 conf.on('get' + postfix, function(id) {
6621 ++cache2[id];
6622 });
6623 conf.on('delete' + postfix, function(id) {
6624 delete cache2[id];
6625 });
6626 conf.on('clear' + postfix, function() {
6627 cache2 = {};
6628 });
6629 defineProperties(conf.memoized, {
6630 deleteRef: d2(function() {
6631 var id = conf.get(arguments);
6632 if (id === null) {
6633 return null;
6634 }
6635 if (!cache2[id]) {
6636 return null;
6637 }
6638 if (!--cache2[id]) {
6639 conf['delete'](id);
6640 return true;
6641 }
6642 return false;
6643 }),
6644 getRefCount: d2(function() {
6645 var id = conf.get(arguments);
6646 if (id === null) {
6647 return 0;
6648 }
6649 if (!cache2[id]) {
6650 return 0;
6651 }
6652 return cache2[id];
6653 })
6654 });
6655 };
6656 });
6657 var require_memoizee = __commonJS(function(exports, module) {
6658 'use strict';
6659 var normalizeOpts = require_normalize_options();
6660 var resolveLength = require_resolve_length();
6661 var plain = require_plain();
6662 module.exports = function(fn) {
6663 var options = normalizeOpts(arguments[1]), length;
6664 if (!options.normalizer) {
6665 length = options.length = resolveLength(options.length, fn.length, options.async);
6666 if (length !== 0) {
6667 if (options.primitive) {
6668 if (length === false) {
6669 options.normalizer = require_primitive();
6670 } else if (length > 1) {
6671 options.normalizer = require_get_primitive_fixed()(length);
6672 }
6673 } else if (length === false) {
6674 options.normalizer = require_get()();
6675 } else if (length === 1) {
6676 options.normalizer = require_get_1()();
6677 } else {
6678 options.normalizer = require_get_fixed()(length);
6679 }
6680 }
6681 }
6682 if (options.async) {
6683 require_async();
6684 }
6685 if (options.promise) {
6686 require_promise();
6687 }
6688 if (options.dispose) {
6689 require_dispose();
6690 }
6691 if (options.maxAge) {
6692 require_max_age();
6693 }
6694 if (options.max) {
6695 require_max();
6696 }
6697 if (options.refCounter) {
6698 require_ref_counter();
6699 }
6700 return plain(fn, options);
6701 };
6702 });
6703 var definitions = [ {
6704 name: 'NA',
6705 value: 'inapplicable',
6706 priority: 0,
6707 group: 'inapplicable'
6708 }, {
6709 name: 'PASS',
6710 value: 'passed',
6711 priority: 1,
6712 group: 'passes'
6713 }, {
6714 name: 'CANTTELL',
6715 value: 'cantTell',
6716 priority: 2,
6717 group: 'incomplete'
6718 }, {
6719 name: 'FAIL',
6720 value: 'failed',
6721 priority: 3,
6722 group: 'violations'
6723 } ];
6724 var constants = {
6725 helpUrlBase: 'https://dequeuniversity.com/rules/',
6726 gridSize: 200,
6727 selectorSimilarFilterLimit: 700,
6728 results: [],
6729 resultGroups: [],
6730 resultGroupMap: {},
6731 impact: Object.freeze([ 'minor', 'moderate', 'serious', 'critical' ]),
6732 preload: Object.freeze({
6733 assets: [ 'cssom', 'media' ],
6734 timeout: 1e4
6735 }),
6736 allOrigins: '<unsafe_all_origins>',
6737 sameOrigin: '<same_origin>',
6738 serializableErrorProps: Object.freeze([ 'message', 'stack', 'name', 'code', 'ruleId', 'method' ])
6739 };
6740 definitions.forEach(function(definition) {
6741 var name = definition.name;
6742 var value = definition.value;
6743 var priority = definition.priority;
6744 var group = definition.group;
6745 constants[name] = value;
6746 constants[name + '_PRIO'] = priority;
6747 constants[name + '_GROUP'] = group;
6748 constants.results[priority] = value;
6749 constants.resultGroups[priority] = group;
6750 constants.resultGroupMap[value] = group;
6751 });
6752 Object.freeze(constants.results);
6753 Object.freeze(constants.resultGroups);
6754 Object.freeze(constants.resultGroupMap);
6755 Object.freeze(constants);
6756 var constants_default = constants;
6757 function log() {
6758 if ((typeof console === 'undefined' ? 'undefined' : _typeof(console)) === 'object' && console.log) {
6759 Function.prototype.apply.call(console.log, console, arguments);
6760 }
6761 }
6762 var log_default = log;
6763 var whitespaceRegex = /[\t\r\n\f]/g;
6764 var AbstractVirtualNode = function() {
6765 function AbstractVirtualNode() {
6766 _classCallCheck(this, AbstractVirtualNode);
6767 this.parent = void 0;
6768 }
6769 return _createClass(AbstractVirtualNode, [ {
6770 key: 'props',
6771 get: function get() {
6772 throw new Error('VirtualNode class must have a "props" object consisting of "nodeType" and "nodeName" properties');
6773 }
6774 }, {
6775 key: 'attrNames',
6776 get: function get() {
6777 throw new Error('VirtualNode class must have an "attrNames" property');
6778 }
6779 }, {
6780 key: 'attr',
6781 value: function attr() {
6782 throw new Error('VirtualNode class must have an "attr" function');
6783 }
6784 }, {
6785 key: 'hasAttr',
6786 value: function hasAttr() {
6787 throw new Error('VirtualNode class must have a "hasAttr" function');
6788 }
6789 }, {
6790 key: 'hasClass',
6791 value: function hasClass(className) {
6792 var classAttr = this.attr('class');
6793 if (!classAttr) {
6794 return false;
6795 }
6796 var selector = ' ' + className + ' ';
6797 return (' ' + classAttr + ' ').replace(whitespaceRegex, ' ').indexOf(selector) >= 0;
6798 }
6799 } ]);
6800 }();
6801 var abstract_virtual_node_default = AbstractVirtualNode;
6802 var utils_exports = {};
6803 __export(utils_exports, {
6804 DqElement: function DqElement() {
6805 return dq_element_default;
6806 },
6807 RuleError: function RuleError() {
6808 return rule_error_default;
6809 },
6810 aggregate: function aggregate() {
6811 return aggregate_default;
6812 },
6813 aggregateChecks: function aggregateChecks() {
6814 return aggregate_checks_default;
6815 },
6816 aggregateNodeResults: function aggregateNodeResults() {
6817 return aggregate_node_results_default;
6818 },
6819 aggregateResult: function aggregateResult() {
6820 return aggregate_result_default;
6821 },
6822 areStylesSet: function areStylesSet() {
6823 return are_styles_set_default;
6824 },
6825 assert: function assert() {
6826 return assert_default;
6827 },
6828 checkHelper: function checkHelper() {
6829 return check_helper_default;
6830 },
6831 clone: function clone() {
6832 return clone2;
6833 },
6834 closest: function closest() {
6835 return closest_default;
6836 },
6837 collectResultsFromFrames: function collectResultsFromFrames() {
6838 return _collectResultsFromFrames;
6839 },
6840 contains: function contains() {
6841 return _contains;
6842 },
6843 convertSelector: function convertSelector() {
6844 return _convertSelector;
6845 },
6846 cssParser: function cssParser() {
6847 return css_parser_default;
6848 },
6849 deepMerge: function deepMerge() {
6850 return deep_merge_default;
6851 },
6852 escapeSelector: function escapeSelector() {
6853 return escape_selector_default;
6854 },
6855 extendMetaData: function extendMetaData() {
6856 return extend_meta_data_default;
6857 },
6858 filterHtmlAttrs: function filterHtmlAttrs() {
6859 return _filterHtmlAttrs;
6860 },
6861 finalizeRuleResult: function finalizeRuleResult() {
6862 return _finalizeRuleResult;
6863 },
6864 findBy: function findBy() {
6865 return find_by_default;
6866 },
6867 getAllChecks: function getAllChecks() {
6868 return get_all_checks_default;
6869 },
6870 getAncestry: function getAncestry() {
6871 return _getAncestry;
6872 },
6873 getBaseLang: function getBaseLang() {
6874 return get_base_lang_default;
6875 },
6876 getCheckMessage: function getCheckMessage() {
6877 return get_check_message_default;
6878 },
6879 getCheckOption: function getCheckOption() {
6880 return get_check_option_default;
6881 },
6882 getElementSource: function getElementSource() {
6883 return _getElementSource;
6884 },
6885 getEnvironmentData: function getEnvironmentData() {
6886 return _getEnvironmentData;
6887 },
6888 getFlattenedTree: function getFlattenedTree() {
6889 return _getFlattenedTree;
6890 },
6891 getFrameContexts: function getFrameContexts() {
6892 return _getFrameContexts;
6893 },
6894 getFriendlyUriEnd: function getFriendlyUriEnd() {
6895 return get_friendly_uri_end_default;
6896 },
6897 getNodeAttributes: function getNodeAttributes() {
6898 return get_node_attributes_default;
6899 },
6900 getNodeFromTree: function getNodeFromTree() {
6901 return get_node_from_tree_default;
6902 },
6903 getPreloadConfig: function getPreloadConfig() {
6904 return _getPreloadConfig;
6905 },
6906 getRootNode: function getRootNode() {
6907 return get_root_node_default;
6908 },
6909 getRule: function getRule() {
6910 return _getRule;
6911 },
6912 getScroll: function getScroll() {
6913 return get_scroll_default;
6914 },
6915 getScrollState: function getScrollState() {
6916 return get_scroll_state_default;
6917 },
6918 getSelector: function getSelector() {
6919 return get_selector_default;
6920 },
6921 getSelectorData: function getSelectorData() {
6922 return _getSelectorData;
6923 },
6924 getShadowSelector: function getShadowSelector() {
6925 return _getShadowSelector;
6926 },
6927 getStandards: function getStandards() {
6928 return _getStandards;
6929 },
6930 getStyleSheetFactory: function getStyleSheetFactory() {
6931 return get_stylesheet_factory_default;
6932 },
6933 getXpath: function getXpath() {
6934 return get_xpath_default;
6935 },
6936 injectStyle: function injectStyle() {
6937 return inject_style_default;
6938 },
6939 isArrayLike: function isArrayLike() {
6940 return _isArrayLike;
6941 },
6942 isContextObject: function isContextObject() {
6943 return _isContextObject;
6944 },
6945 isContextProp: function isContextProp() {
6946 return _isContextProp;
6947 },
6948 isContextSpec: function isContextSpec() {
6949 return _isContextSpec;
6950 },
6951 isHidden: function isHidden() {
6952 return is_hidden_default;
6953 },
6954 isHtmlElement: function isHtmlElement() {
6955 return is_html_element_default;
6956 },
6957 isLabelledFramesSelector: function isLabelledFramesSelector() {
6958 return _isLabelledFramesSelector;
6959 },
6960 isLabelledShadowDomSelector: function isLabelledShadowDomSelector() {
6961 return _isLabelledShadowDomSelector;
6962 },
6963 isNodeInContext: function isNodeInContext() {
6964 return _isNodeInContext;
6965 },
6966 isShadowRoot: function isShadowRoot() {
6967 return is_shadow_root_default;
6968 },
6969 isValidLang: function isValidLang() {
6970 return valid_langs_default;
6971 },
6972 isXHTML: function isXHTML() {
6973 return is_xhtml_default;
6974 },
6975 matchAncestry: function matchAncestry() {
6976 return _matchAncestry;
6977 },
6978 matches: function matches() {
6979 return _matches;
6980 },
6981 matchesExpression: function matchesExpression() {
6982 return _matchesExpression;
6983 },
6984 matchesSelector: function matchesSelector() {
6985 return element_matches_default;
6986 },
6987 memoize: function memoize() {
6988 return memoize_default;
6989 },
6990 mergeResults: function mergeResults() {
6991 return merge_results_default;
6992 },
6993 nodeLookup: function nodeLookup() {
6994 return _nodeLookup;
6995 },
6996 nodeSerializer: function nodeSerializer() {
6997 return node_serializer_default;
6998 },
6999 nodeSorter: function nodeSorter() {
7000 return node_sorter_default;
7001 },
7002 objectHasOwn: function objectHasOwn() {
7003 return _objectHasOwn;
7004 },
7005 parseCrossOriginStylesheet: function parseCrossOriginStylesheet() {
7006 return parse_crossorigin_stylesheet_default;
7007 },
7008 parseSameOriginStylesheet: function parseSameOriginStylesheet() {
7009 return parse_sameorigin_stylesheet_default;
7010 },
7011 parseStylesheet: function parseStylesheet() {
7012 return parse_stylesheet_default;
7013 },
7014 parseTabindex: function parseTabindex() {
7015 return parse_tabindex_default;
7016 },
7017 performanceTimer: function performanceTimer() {
7018 return performance_timer_default;
7019 },
7020 pollyfillElementsFromPoint: function pollyfillElementsFromPoint() {
7021 return _pollyfillElementsFromPoint;
7022 },
7023 preload: function preload() {
7024 return _preload;
7025 },
7026 preloadCssom: function preloadCssom() {
7027 return preload_cssom_default;
7028 },
7029 preloadMedia: function preloadMedia() {
7030 return preload_media_default;
7031 },
7032 processMessage: function processMessage() {
7033 return process_message_default;
7034 },
7035 publishMetaData: function publishMetaData() {
7036 return _publishMetaData;
7037 },
7038 querySelectorAll: function querySelectorAll() {
7039 return query_selector_all_default;
7040 },
7041 querySelectorAllFilter: function querySelectorAllFilter() {
7042 return query_selector_all_filter_default;
7043 },
7044 queue: function queue() {
7045 return queue_default;
7046 },
7047 respondable: function respondable() {
7048 return _respondable;
7049 },
7050 ruleShouldRun: function ruleShouldRun() {
7051 return rule_should_run_default;
7052 },
7053 select: function select() {
7054 return _select;
7055 },
7056 sendCommandToFrame: function sendCommandToFrame() {
7057 return _sendCommandToFrame;
7058 },
7059 serializeError: function serializeError() {
7060 return _serializeError;
7061 },
7062 setScrollState: function setScrollState() {
7063 return set_scroll_state_default;
7064 },
7065 shadowSelect: function shadowSelect() {
7066 return _shadowSelect;
7067 },
7068 shadowSelectAll: function shadowSelectAll() {
7069 return _shadowSelectAll;
7070 },
7071 shouldPreload: function shouldPreload() {
7072 return _shouldPreload;
7073 },
7074 toArray: function toArray() {
7075 return to_array_default;
7076 },
7077 tokenList: function tokenList() {
7078 return token_list_default;
7079 },
7080 uniqueArray: function uniqueArray() {
7081 return unique_array_default;
7082 },
7083 uuid: function uuid() {
7084 return uuid_default;
7085 },
7086 validInputTypes: function validInputTypes() {
7087 return valid_input_type_default;
7088 },
7089 validLangs: function validLangs() {
7090 return _validLangs;
7091 }
7092 });
7093 function aggregate(map, values2, initial) {
7094 values2 = values2.slice();
7095 if (initial) {
7096 values2.push(initial);
7097 }
7098 var sorting = values2.map(function(val) {
7099 return map.indexOf(val);
7100 }).sort();
7101 return map[sorting.pop()];
7102 }
7103 var aggregate_default = aggregate;
7104 var CANTTELL_PRIO = constants_default.CANTTELL_PRIO, FAIL_PRIO = constants_default.FAIL_PRIO;
7105 var checkMap = [];
7106 checkMap[constants_default.PASS_PRIO] = true;
7107 checkMap[constants_default.CANTTELL_PRIO] = null;
7108 checkMap[constants_default.FAIL_PRIO] = false;
7109 var checkTypes = [ 'any', 'all', 'none' ];
7110 function anyAllNone(obj, functor) {
7111 return checkTypes.reduce(function(out, type2) {
7112 out[type2] = (obj[type2] || []).map(function(val) {
7113 return functor(val, type2);
7114 });
7115 return out;
7116 }, {});
7117 }
7118 function aggregateChecks(nodeResOriginal) {
7119 var nodeResult = Object.assign({}, nodeResOriginal);
7120 anyAllNone(nodeResult, function(check, type2) {
7121 var i = typeof check.result === 'undefined' ? -1 : checkMap.indexOf(check.result);
7122 check.priority = i !== -1 ? i : constants_default.CANTTELL_PRIO;
7123 if (type2 === 'none') {
7124 if (check.priority === constants_default.PASS_PRIO) {
7125 check.priority = constants_default.FAIL_PRIO;
7126 } else if (check.priority === constants_default.FAIL_PRIO) {
7127 check.priority = constants_default.PASS_PRIO;
7128 }
7129 }
7130 });
7131 var priorities = {
7132 all: nodeResult.all.reduce(function(a2, b2) {
7133 return Math.max(a2, b2.priority);
7134 }, 0),
7135 none: nodeResult.none.reduce(function(a2, b2) {
7136 return Math.max(a2, b2.priority);
7137 }, 0),
7138 any: nodeResult.any.reduce(function(a2, b2) {
7139 return Math.min(a2, b2.priority);
7140 }, 4) % 4
7141 };
7142 nodeResult.priority = Math.max(priorities.all, priorities.none, priorities.any);
7143 var impacts = [];
7144 checkTypes.forEach(function(type2) {
7145 nodeResult[type2] = nodeResult[type2].filter(function(check) {
7146 return check.priority === nodeResult.priority && check.priority === priorities[type2];
7147 });
7148 nodeResult[type2].forEach(function(check) {
7149 return impacts.push(check.impact);
7150 });
7151 });
7152 if ([ CANTTELL_PRIO, FAIL_PRIO ].includes(nodeResult.priority)) {
7153 nodeResult.impact = aggregate_default(constants_default.impact, impacts);
7154 } else {
7155 nodeResult.impact = null;
7156 }
7157 anyAllNone(nodeResult, function(c4) {
7158 delete c4.result;
7159 delete c4.priority;
7160 });
7161 nodeResult.result = constants_default.results[nodeResult.priority];
7162 delete nodeResult.priority;
7163 return nodeResult;
7164 }
7165 var aggregate_checks_default = aggregateChecks;
7166 function _finalizeRuleResult(ruleResult) {
7167 var rule = axe._audit.rules.find(function(_ref) {
7168 var id = _ref.id;
7169 return id === ruleResult.id;
7170 });
7171 if (rule && rule.impact) {
7172 ruleResult.nodes.forEach(function(node) {
7173 [ 'any', 'all', 'none' ].forEach(function(checkType) {
7174 (node[checkType] || []).forEach(function(checkResult) {
7175 checkResult.impact = rule.impact;
7176 });
7177 });
7178 });
7179 }
7180 Object.assign(ruleResult, aggregate_node_results_default(ruleResult.nodes));
7181 delete ruleResult.nodes;
7182 return ruleResult;
7183 }
7184 function aggregateNodeResults(nodeResults) {
7185 var ruleResult = {};
7186 nodeResults = nodeResults.map(function(nodeResult) {
7187 if (nodeResult.any && nodeResult.all && nodeResult.none) {
7188 return aggregate_checks_default(nodeResult);
7189 } else if (Array.isArray(nodeResult.node)) {
7190 return _finalizeRuleResult(nodeResult);
7191 } else {
7192 throw new TypeError('Invalid Result type');
7193 }
7194 });
7195 if (nodeResults && nodeResults.length) {
7196 var resultList = nodeResults.map(function(node) {
7197 return node.result;
7198 });
7199 ruleResult.result = aggregate_default(constants_default.results, resultList, ruleResult.result);
7200 } else {
7201 ruleResult.result = 'inapplicable';
7202 }
7203 constants_default.resultGroups.forEach(function(group) {
7204 return ruleResult[group] = [];
7205 });
7206 nodeResults.forEach(function(nodeResult) {
7207 var groupName = constants_default.resultGroupMap[nodeResult.result];
7208 ruleResult[groupName].push(nodeResult);
7209 });
7210 var impactGroup = constants_default.FAIL_GROUP;
7211 if (ruleResult[impactGroup].length === 0) {
7212 impactGroup = constants_default.CANTTELL_GROUP;
7213 }
7214 if (ruleResult[impactGroup].length > 0) {
7215 var impactList = ruleResult[impactGroup].map(function(failure) {
7216 return failure.impact;
7217 });
7218 ruleResult.impact = aggregate_default(constants_default.impact, impactList) || null;
7219 } else {
7220 ruleResult.impact = null;
7221 }
7222 return ruleResult;
7223 }
7224 var aggregate_node_results_default = aggregateNodeResults;
7225 function copyToGroup(resultObject, subResult, group) {
7226 var resultCopy = Object.assign({}, subResult);
7227 resultCopy.nodes = (resultCopy[group] || []).concat();
7228 constants_default.resultGroups.forEach(function(resultGroup) {
7229 delete resultCopy[resultGroup];
7230 });
7231 resultObject[group].push(resultCopy);
7232 }
7233 function aggregateResult(results) {
7234 var resultObject = {};
7235 constants_default.resultGroups.forEach(function(groupName) {
7236 return resultObject[groupName] = [];
7237 });
7238 results.forEach(function(subResult) {
7239 if (subResult.error) {
7240 copyToGroup(resultObject, subResult, constants_default.CANTTELL_GROUP);
7241 } else if (subResult.result === constants_default.NA) {
7242 copyToGroup(resultObject, subResult, constants_default.NA_GROUP);
7243 } else {
7244 constants_default.resultGroups.forEach(function(group) {
7245 if (Array.isArray(subResult[group]) && subResult[group].length > 0) {
7246 copyToGroup(resultObject, subResult, group);
7247 }
7248 });
7249 }
7250 });
7251 return resultObject;
7252 }
7253 var aggregate_result_default = aggregateResult;
7254 function areStylesSet(el, styles, stopAt) {
7255 var styl = window.getComputedStyle(el, null);
7256 if (!styl) {
7257 return false;
7258 }
7259 for (var i = 0; i < styles.length; ++i) {
7260 var att = styles[i];
7261 if (styl.getPropertyValue(att.property) === att.value) {
7262 return true;
7263 }
7264 }
7265 if (!el.parentNode || el.nodeName.toUpperCase() === stopAt.toUpperCase()) {
7266 return false;
7267 }
7268 return areStylesSet(el.parentNode, styles, stopAt);
7269 }
7270 var are_styles_set_default = areStylesSet;
7271 function assert(bool, message) {
7272 if (!bool) {
7273 throw new Error(message);
7274 }
7275 }
7276 var assert_default = assert;
7277 function toArray(thing) {
7278 return Array.prototype.slice.call(thing);
7279 }
7280 var to_array_default = toArray;
7281 function escapeSelector(value) {
7282 var string = String(value);
7283 var length = string.length;
7284 var index = -1;
7285 var codeUnit;
7286 var result = '';
7287 var firstCodeUnit = string.charCodeAt(0);
7288 while (++index < length) {
7289 codeUnit = string.charCodeAt(index);
7290 if (codeUnit == 0) {
7291 result += '\ufffd';
7292 continue;
7293 }
7294 if (codeUnit >= 1 && codeUnit <= 31 || codeUnit == 127 || index == 0 && codeUnit >= 48 && codeUnit <= 57 || index == 1 && codeUnit >= 48 && codeUnit <= 57 && firstCodeUnit == 45) {
7295 result += '\\' + codeUnit.toString(16) + ' ';
7296 continue;
7297 }
7298 if (index == 0 && length == 1 && codeUnit == 45) {
7299 result += '\\' + string.charAt(index);
7300 continue;
7301 }
7302 if (codeUnit >= 128 || codeUnit == 45 || codeUnit == 95 || codeUnit >= 48 && codeUnit <= 57 || codeUnit >= 65 && codeUnit <= 90 || codeUnit >= 97 && codeUnit <= 122) {
7303 result += string.charAt(index);
7304 continue;
7305 }
7306 result += '\\' + string.charAt(index);
7307 }
7308 return result;
7309 }
7310 var escape_selector_default = escapeSelector;
7311 function isMostlyNumbers() {
7312 var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
7313 return str.length !== 0 && (str.match(/[0-9]/g) || '').length >= str.length / 2;
7314 }
7315 function splitString(str, splitIndex) {
7316 return [ str.substring(0, splitIndex), str.substring(splitIndex) ];
7317 }
7318 function trimRight(str) {
7319 return str.replace(/\s+$/, '');
7320 }
7321 function uriParser(url) {
7322 var original = url;
7323 var protocol = '', domain = '', port = '', path = '', query = '', hash = '';
7324 if (url.includes('#')) {
7325 var _splitString = splitString(url, url.indexOf('#'));
7326 var _splitString2 = _slicedToArray(_splitString, 2);
7327 url = _splitString2[0];
7328 hash = _splitString2[1];
7329 }
7330 if (url.includes('?')) {
7331 var _splitString3 = splitString(url, url.indexOf('?'));
7332 var _splitString4 = _slicedToArray(_splitString3, 2);
7333 url = _splitString4[0];
7334 query = _splitString4[1];
7335 }
7336 if (url.includes('://')) {
7337 var _url$split = url.split('://');
7338 var _url$split2 = _slicedToArray(_url$split, 2);
7339 protocol = _url$split2[0];
7340 url = _url$split2[1];
7341 var _splitString5 = splitString(url, url.indexOf('/'));
7342 var _splitString6 = _slicedToArray(_splitString5, 2);
7343 domain = _splitString6[0];
7344 url = _splitString6[1];
7345 } else if (url.substr(0, 2) === '//') {
7346 url = url.substr(2);
7347 var _splitString7 = splitString(url, url.indexOf('/'));
7348 var _splitString8 = _slicedToArray(_splitString7, 2);
7349 domain = _splitString8[0];
7350 url = _splitString8[1];
7351 }
7352 if (domain.substr(0, 4) === 'www.') {
7353 domain = domain.substr(4);
7354 }
7355 if (domain && domain.includes(':')) {
7356 var _splitString9 = splitString(domain, domain.indexOf(':'));
7357 var _splitString0 = _slicedToArray(_splitString9, 2);
7358 domain = _splitString0[0];
7359 port = _splitString0[1];
7360 }
7361 path = url;
7362 return {
7363 original: original,
7364 protocol: protocol,
7365 domain: domain,
7366 port: port,
7367 path: path,
7368 query: query,
7369 hash: hash
7370 };
7371 }
7372 function getFriendlyUriEnd() {
7373 var uri = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
7374 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7375 if (uri.length <= 1 || uri.substr(0, 5) === 'data:' || uri.substr(0, 11) === 'javascript:' || uri.includes('?')) {
7376 return;
7377 }
7378 var currentDomain = options.currentDomain, _options$maxLength = options.maxLength, maxLength = _options$maxLength === void 0 ? 25 : _options$maxLength;
7379 var _uriParser = uriParser(uri), path = _uriParser.path, domain = _uriParser.domain, hash = _uriParser.hash;
7380 var pathEnd = path.substr(path.substr(0, path.length - 2).lastIndexOf('/') + 1);
7381 if (hash) {
7382 if (pathEnd && (pathEnd + hash).length <= maxLength) {
7383 return trimRight(pathEnd + hash);
7384 } else if (pathEnd.length < 2 && hash.length > 2 && hash.length <= maxLength) {
7385 return trimRight(hash);
7386 } else {
7387 return;
7388 }
7389 } else if (domain && domain.length < maxLength && path.length <= 1) {
7390 return trimRight(domain + path);
7391 }
7392 if (path === '/' + pathEnd && domain && currentDomain && domain !== currentDomain && (domain + path).length <= maxLength) {
7393 return trimRight(domain + path);
7394 }
7395 var lastDotIndex = pathEnd.lastIndexOf('.');
7396 if ((lastDotIndex === -1 || lastDotIndex > 1) && (lastDotIndex !== -1 || pathEnd.length > 2) && pathEnd.length <= maxLength && !pathEnd.match(/index(\.[a-zA-Z]{2-4})?/) && !isMostlyNumbers(pathEnd)) {
7397 return trimRight(pathEnd);
7398 }
7399 }
7400 var get_friendly_uri_end_default = getFriendlyUriEnd;
7401 function getNodeAttributes(node) {
7402 if (node.attributes instanceof window.NamedNodeMap) {
7403 return node.attributes;
7404 }
7405 return node.cloneNode(false).attributes;
7406 }
7407 var get_node_attributes_default = getNodeAttributes;
7408 var matchesSelector = function() {
7409 var method;
7410 function getMethod(node) {
7411 var candidates = [ 'matches', 'matchesSelector', 'mozMatchesSelector', 'webkitMatchesSelector', 'msMatchesSelector' ];
7412 var length = candidates.length;
7413 var index, candidate;
7414 for (index = 0; index < length; index++) {
7415 candidate = candidates[index];
7416 if (node[candidate]) {
7417 return candidate;
7418 }
7419 }
7420 }
7421 return function(node, selector) {
7422 if (!method || !node[method]) {
7423 method = getMethod(node);
7424 }
7425 if (node[method]) {
7426 return node[method](selector);
7427 }
7428 return false;
7429 };
7430 }();
7431 var element_matches_default = matchesSelector;
7432 var imports_exports = {};
7433 __export(imports_exports, {
7434 ArrayFrom: function ArrayFrom() {
7435 return import_from2['default'];
7436 },
7437 Colorjs: function Colorjs() {
7438 return _Color;
7439 },
7440 CssSelectorParser: function CssSelectorParser() {
7441 return import_css_selector_parser.CssSelectorParser;
7442 },
7443 doT: function doT() {
7444 return import_dot['default'];
7445 },
7446 emojiRegexText: function emojiRegexText() {
7447 return emoji_regex_default;
7448 },
7449 memoize: function memoize() {
7450 return import_memoizee['default'];
7451 }
7452 });
7453 var import_es6_promise = __toModule(require_es6_promise());
7454 var import_typedarray = __toModule(require_typedarray());
7455 var import_weakmap_polyfill = __toModule(require_weakmap_polyfill());
7456 var import_has_own = __toModule(require_has_own3());
7457 var import_values = __toModule(require_values3());
7458 var import_from = __toModule(require_from3());
7459 if (!('hasOwn' in Object)) {
7460 Object.hasOwn = import_has_own['default'];
7461 }
7462 if (!('values' in Object)) {
7463 Object.values = import_values['default'];
7464 }
7465 if (!('Promise' in window)) {
7466 import_es6_promise['default'].polyfill();
7467 }
7468 if (!('Uint32Array' in window)) {
7469 window.Uint32Array = import_typedarray.Uint32Array;
7470 }
7471 if (window.Uint32Array) {
7472 if (!('some' in window.Uint32Array.prototype)) {
7473 Object.defineProperty(window.Uint32Array.prototype, 'some', {
7474 value: Array.prototype.some
7475 });
7476 }
7477 if (!('reduce' in window.Uint32Array.prototype)) {
7478 Object.defineProperty(window.Uint32Array.prototype, 'reduce', {
7479 value: Array.prototype.reduce
7480 });
7481 }
7482 }
7483 if (typeof Object.assign !== 'function') {
7484 (function() {
7485 Object.assign = function(target) {
7486 if (target === void 0 || target === null) {
7487 throw new TypeError('Cannot convert undefined or null to object');
7488 }
7489 var output = Object(target);
7490 for (var index = 1; index < arguments.length; index++) {
7491 var source = arguments[index];
7492 if (source !== void 0 && source !== null) {
7493 for (var nextKey in source) {
7494 if (source.hasOwnProperty(nextKey)) {
7495 output[nextKey] = source[nextKey];
7496 }
7497 }
7498 }
7499 }
7500 return output;
7501 };
7502 })();
7503 }
7504 if (!Array.prototype.find) {
7505 Object.defineProperty(Array.prototype, 'find', {
7506 value: function value(predicate) {
7507 if (this === null) {
7508 throw new TypeError('Array.prototype.find called on null or undefined');
7509 }
7510 if (typeof predicate !== 'function') {
7511 throw new TypeError('predicate must be a function');
7512 }
7513 var list = Object(this);
7514 var length = list.length >>> 0;
7515 var thisArg = arguments[1];
7516 var value;
7517 for (var i = 0; i < length; i++) {
7518 value = list[i];
7519 if (predicate.call(thisArg, value, i, list)) {
7520 return value;
7521 }
7522 }
7523 return void 0;
7524 }
7525 });
7526 }
7527 if (!Array.prototype.findIndex) {
7528 Object.defineProperty(Array.prototype, 'findIndex', {
7529 value: function value(predicate, thisArg) {
7530 if (this === null) {
7531 throw new TypeError('Array.prototype.find called on null or undefined');
7532 }
7533 if (typeof predicate !== 'function') {
7534 throw new TypeError('predicate must be a function');
7535 }
7536 var list = Object(this);
7537 var length = list.length >>> 0;
7538 var value;
7539 for (var i = 0; i < length; i++) {
7540 value = list[i];
7541 if (predicate.call(thisArg, value, i, list)) {
7542 return i;
7543 }
7544 }
7545 return -1;
7546 }
7547 });
7548 }
7549 if (!Array.prototype.includes) {
7550 Object.defineProperty(Array.prototype, 'includes', {
7551 value: function value(searchElement) {
7552 var O = Object(this);
7553 var len = parseInt(O.length, 10) || 0;
7554 if (len === 0) {
7555 return false;
7556 }
7557 var n2 = parseInt(arguments[1], 10) || 0;
7558 var k;
7559 if (n2 >= 0) {
7560 k = n2;
7561 } else {
7562 k = len + n2;
7563 if (k < 0) {
7564 k = 0;
7565 }
7566 }
7567 var currentElement;
7568 while (k < len) {
7569 currentElement = O[k];
7570 if (searchElement === currentElement || searchElement !== searchElement && currentElement !== currentElement) {
7571 return true;
7572 }
7573 k++;
7574 }
7575 return false;
7576 }
7577 });
7578 }
7579 if (!Array.prototype.some) {
7580 Object.defineProperty(Array.prototype, 'some', {
7581 value: function value(fun) {
7582 if (this == null) {
7583 throw new TypeError('Array.prototype.some called on null or undefined');
7584 }
7585 if (typeof fun !== 'function') {
7586 throw new TypeError();
7587 }
7588 var t = Object(this);
7589 var len = t.length >>> 0;
7590 var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
7591 for (var i = 0; i < len; i++) {
7592 if (i in t && fun.call(thisArg, t[i], i, t)) {
7593 return true;
7594 }
7595 }
7596 return false;
7597 }
7598 });
7599 }
7600 if (!Array.from) {
7601 Array.from = import_from['default'];
7602 }
7603 if (!String.prototype.includes) {
7604 String.prototype.includes = function(search, start) {
7605 if (typeof start !== 'number') {
7606 start = 0;
7607 }
7608 if (start + search.length > this.length) {
7609 return false;
7610 } else {
7611 return this.indexOf(search, start) !== -1;
7612 }
7613 };
7614 }
7615 if (!Array.prototype.flat) {
7616 Object.defineProperty(Array.prototype, 'flat', {
7617 configurable: true,
7618 value: function flat() {
7619 var depth = isNaN(arguments[0]) ? 1 : Number(arguments[0]);
7620 return depth ? Array.prototype.reduce.call(this, function(acc, cur) {
7621 if (Array.isArray(cur)) {
7622 acc.push.apply(acc, flat.call(cur, depth - 1));
7623 } else {
7624 acc.push(cur);
7625 }
7626 return acc;
7627 }, []) : Array.prototype.slice.call(this);
7628 },
7629 writable: true
7630 });
7631 }
7632 if (window.Node && !('isConnected' in window.Node.prototype)) {
7633 Object.defineProperty(window.Node.prototype, 'isConnected', {
7634 get: function get() {
7635 return !this.ownerDocument || !(this.ownerDocument.compareDocumentPosition(this) & this.DOCUMENT_POSITION_DISCONNECTED);
7636 }
7637 });
7638 }
7639 var import_css_selector_parser = __toModule(require_lib());
7640 var import_dot = __toModule(require_doT());
7641 var emoji_regex_default = function emoji_regex_default() {
7642 return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
7643 };
7644 var import_memoizee = __toModule(require_memoizee());
7645 function multiplyMatrices(A, B) {
7646 var m3 = A.length;
7647 if (!Array.isArray(A[0])) {
7648 A = [ A ];
7649 }
7650 if (!Array.isArray(B[0])) {
7651 B = B.map(function(x) {
7652 return [ x ];
7653 });
7654 }
7655 var p2 = B[0].length;
7656 var B_cols = B[0].map(function(_, i) {
7657 return B.map(function(x) {
7658 return x[i];
7659 });
7660 });
7661 var product = A.map(function(row) {
7662 return B_cols.map(function(col) {
7663 var ret = 0;
7664 if (!Array.isArray(row)) {
7665 var _iterator2 = _createForOfIteratorHelper(col), _step2;
7666 try {
7667 for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) {
7668 var c4 = _step2.value;
7669 ret += row * c4;
7670 }
7671 } catch (err) {
7672 _iterator2.e(err);
7673 } finally {
7674 _iterator2.f();
7675 }
7676 return ret;
7677 }
7678 for (var i = 0; i < row.length; i++) {
7679 ret += row[i] * (col[i] || 0);
7680 }
7681 return ret;
7682 });
7683 });
7684 if (m3 === 1) {
7685 product = product[0];
7686 }
7687 if (p2 === 1) {
7688 return product.map(function(x) {
7689 return x[0];
7690 });
7691 }
7692 return product;
7693 }
7694 function isString(str) {
7695 return type(str) === 'string';
7696 }
7697 function type(o) {
7698 var str = Object.prototype.toString.call(o);
7699 return (str.match(/^\[object\s+(.*?)\]$/)[1] || '').toLowerCase();
7700 }
7701 function toPrecision(n2, precision) {
7702 n2 = +n2;
7703 precision = +precision;
7704 var integerLength = (Math.floor(n2) + '').length;
7705 if (precision > integerLength) {
7706 return +n2.toFixed(precision - integerLength);
7707 } else {
7708 var p10 = Math.pow(10, integerLength - precision);
7709 return Math.round(n2 / p10) * p10;
7710 }
7711 }
7712 function parseFunction(str) {
7713 if (!str) {
7714 return;
7715 }
7716 str = str.trim();
7717 var isFunctionRegex = /^([a-z]+)\((.+?)\)$/i;
7718 var isNumberRegex = /^-?[\d.]+$/;
7719 var parts = str.match(isFunctionRegex);
7720 if (parts) {
7721 var args = [];
7722 parts[2].replace(/\/?\s*([-\w.]+(?:%|deg)?)/g, function($0, arg) {
7723 if (/%$/.test(arg)) {
7724 arg = new Number(arg.slice(0, -1) / 100);
7725 arg.type = '<percentage>';
7726 } else if (/deg$/.test(arg)) {
7727 arg = new Number(+arg.slice(0, -3));
7728 arg.type = '<angle>';
7729 arg.unit = 'deg';
7730 } else if (isNumberRegex.test(arg)) {
7731 arg = new Number(arg);
7732 arg.type = '<number>';
7733 }
7734 if ($0.startsWith('/')) {
7735 arg = arg instanceof Number ? arg : new Number(arg);
7736 arg.alpha = true;
7737 }
7738 args.push(arg);
7739 });
7740 return {
7741 name: parts[1].toLowerCase(),
7742 rawName: parts[1],
7743 rawArgs: parts[2],
7744 args: args
7745 };
7746 }
7747 }
7748 function last(arr) {
7749 return arr[arr.length - 1];
7750 }
7751 function interpolate(start, end, p2) {
7752 if (isNaN(start)) {
7753 return end;
7754 }
7755 if (isNaN(end)) {
7756 return start;
7757 }
7758 return start + (end - start) * p2;
7759 }
7760 function interpolateInv(start, end, value) {
7761 return (value - start) / (end - start);
7762 }
7763 function mapRange(from, to2, value) {
7764 return interpolate(to2[0], to2[1], interpolateInv(from[0], from[1], value));
7765 }
7766 function parseCoordGrammar(coordGrammars) {
7767 return coordGrammars.map(function(coordGrammar2) {
7768 return coordGrammar2.split('|').map(function(type2) {
7769 type2 = type2.trim();
7770 var range2 = type2.match(/^(<[a-z]+>)\[(-?[.\d]+),\s*(-?[.\d]+)\]?$/);
7771 if (range2) {
7772 var ret = new String(range2[1]);
7773 ret.range = [ +range2[2], +range2[3] ];
7774 return ret;
7775 }
7776 return type2;
7777 });
7778 });
7779 }
7780 var util = Object.freeze({
7781 __proto__: null,
7782 isString: isString,
7783 type: type,
7784 toPrecision: toPrecision,
7785 parseFunction: parseFunction,
7786 last: last,
7787 interpolate: interpolate,
7788 interpolateInv: interpolateInv,
7789 mapRange: mapRange,
7790 parseCoordGrammar: parseCoordGrammar,
7791 multiplyMatrices: multiplyMatrices
7792 });
7793 var Hooks = function() {
7794 function Hooks() {
7795 _classCallCheck(this, Hooks);
7796 }
7797 return _createClass(Hooks, [ {
7798 key: 'add',
7799 value: function add(name, callback, first) {
7800 if (typeof arguments[0] != 'string') {
7801 for (var name in arguments[0]) {
7802 this.add(name, arguments[0][name], arguments[1]);
7803 }
7804 return;
7805 }
7806 (Array.isArray(name) ? name : [ name ]).forEach(function(name2) {
7807 this[name2] = this[name2] || [];
7808 if (callback) {
7809 this[name2][first ? 'unshift' : 'push'](callback);
7810 }
7811 }, this);
7812 }
7813 }, {
7814 key: 'run',
7815 value: function run(name, env) {
7816 this[name] = this[name] || [];
7817 this[name].forEach(function(callback) {
7818 callback.call(env && env.context ? env.context : env, env);
7819 });
7820 }
7821 } ]);
7822 }();
7823 var hooks = new Hooks();
7824 var defaults = {
7825 gamut_mapping: 'lch.c',
7826 precision: 5,
7827 deltaE: '76'
7828 };
7829 var WHITES = {
7830 D50: [ .3457 / .3585, 1, (1 - .3457 - .3585) / .3585 ],
7831 D65: [ .3127 / .329, 1, (1 - .3127 - .329) / .329 ]
7832 };
7833 function getWhite(name) {
7834 if (Array.isArray(name)) {
7835 return name;
7836 }
7837 return WHITES[name];
7838 }
7839 function adapt$1(W1, W2, XYZ) {
7840 var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
7841 W1 = getWhite(W1);
7842 W2 = getWhite(W2);
7843 if (!W1 || !W2) {
7844 throw new TypeError('Missing white point to convert '.concat(!W1 ? 'from' : '').concat(!W1 && !W2 ? '/' : '').concat(!W2 ? 'to' : ''));
7845 }
7846 if (W1 === W2) {
7847 return XYZ;
7848 }
7849 var env = {
7850 W1: W1,
7851 W2: W2,
7852 XYZ: XYZ,
7853 options: options
7854 };
7855 hooks.run('chromatic-adaptation-start', env);
7856 if (!env.M) {
7857 if (env.W1 === WHITES.D65 && env.W2 === WHITES.D50) {
7858 env.M = [ [ 1.0479298208405488, .022946793341019088, -.05019222954313557 ], [ .029627815688159344, .990434484573249, -.01707382502938514 ], [ -.009243058152591178, .015055144896577895, .7518742899580008 ] ];
7859 } else if (env.W1 === WHITES.D50 && env.W2 === WHITES.D65) {
7860 env.M = [ [ .9554734527042182, -.023098536874261423, .0632593086610217 ], [ -.028369706963208136, 1.0099954580058226, .021041398966943008 ], [ .012314001688319899, -.020507696433477912, 1.3303659366080753 ] ];
7861 }
7862 }
7863 hooks.run('chromatic-adaptation-end', env);
7864 if (env.M) {
7865 return multiplyMatrices(env.M, env.XYZ);
7866 } else {
7867 throw new TypeError('Only Bradford CAT with white points D50 and D65 supported for now.');
7868 }
7869 }
7870 var \u03b5$4 = 75e-6;
7871 var _ColorSpace2 = (_Class_brand = new WeakSet(), _path = new WeakMap(), function() {
7872 function _ColorSpace(options) {
7873 var _options$coords, _ref2, _options$white, _options$formats, _this$formats$functio, _this$formats, _this$formats2;
7874 _classCallCheck(this, _ColorSpace);
7875 _classPrivateMethodInitSpec(this, _Class_brand);
7876 _classPrivateFieldInitSpec(this, _path, void 0);
7877 this.id = options.id;
7878 this.name = options.name;
7879 this.base = options.base ? _ColorSpace2.get(options.base) : null;
7880 this.aliases = options.aliases;
7881 if (this.base) {
7882 this.fromBase = options.fromBase;
7883 this.toBase = options.toBase;
7884 }
7885 var _coords = (_options$coords = options.coords) !== null && _options$coords !== void 0 ? _options$coords : this.base.coords;
7886 this.coords = _coords;
7887 var white2 = (_ref2 = (_options$white = options.white) !== null && _options$white !== void 0 ? _options$white : this.base.white) !== null && _ref2 !== void 0 ? _ref2 : 'D65';
7888 this.white = getWhite(white2);
7889 this.formats = (_options$formats = options.formats) !== null && _options$formats !== void 0 ? _options$formats : {};
7890 for (var name in this.formats) {
7891 var format = this.formats[name];
7892 format.type || (format.type = 'function');
7893 format.name || (format.name = name);
7894 }
7895 if (options.cssId && !((_this$formats$functio = this.formats.functions) !== null && _this$formats$functio !== void 0 && _this$formats$functio.color)) {
7896 this.formats.color = {
7897 id: options.cssId
7898 };
7899 Object.defineProperty(this, 'cssId', {
7900 value: options.cssId
7901 });
7902 } else if ((_this$formats = this.formats) !== null && _this$formats !== void 0 && _this$formats.color && !((_this$formats2 = this.formats) !== null && _this$formats2 !== void 0 && _this$formats2.color.id)) {
7903 this.formats.color.id = this.id;
7904 }
7905 this.referred = options.referred;
7906 _classPrivateFieldSet(_path, this, _assertClassBrand(_Class_brand, this, _getPath).call(this).reverse());
7907 hooks.run('colorspace-init-end', this);
7908 }
7909 return _createClass(_ColorSpace, [ {
7910 key: 'inGamut',
7911 value: function inGamut(coords) {
7912 var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref3$epsilon = _ref3.epsilon, epsilon = _ref3$epsilon === void 0 ? \u03b5$4 : _ref3$epsilon;
7913 if (this.isPolar) {
7914 coords = this.toBase(coords);
7915 return this.base.inGamut(coords, {
7916 epsilon: epsilon
7917 });
7918 }
7919 var coordMeta = Object.values(this.coords);
7920 return coords.every(function(c4, i) {
7921 var meta = coordMeta[i];
7922 if (meta.type !== 'angle' && meta.range) {
7923 if (Number.isNaN(c4)) {
7924 return true;
7925 }
7926 var _meta$range = _slicedToArray(meta.range, 2), min = _meta$range[0], max2 = _meta$range[1];
7927 return (min === void 0 || c4 >= min - epsilon) && (max2 === void 0 || c4 <= max2 + epsilon);
7928 }
7929 return true;
7930 });
7931 }
7932 }, {
7933 key: 'cssId',
7934 get: function get() {
7935 var _this$formats$functio2;
7936 return ((_this$formats$functio2 = this.formats.functions) === null || _this$formats$functio2 === void 0 || (_this$formats$functio2 = _this$formats$functio2.color) === null || _this$formats$functio2 === void 0 ? void 0 : _this$formats$functio2.id) || this.id;
7937 }
7938 }, {
7939 key: 'isPolar',
7940 get: function get() {
7941 for (var id in this.coords) {
7942 if (this.coords[id].type === 'angle') {
7943 return true;
7944 }
7945 }
7946 return false;
7947 }
7948 }, {
7949 key: 'getFormat',
7950 value: function getFormat(format) {
7951 if (_typeof(format) === 'object') {
7952 format = _assertClassBrand(_Class_brand, this, _processFormat).call(this, format);
7953 return format;
7954 }
7955 var ret;
7956 if (format === 'default') {
7957 ret = Object.values(this.formats)[0];
7958 } else {
7959 ret = this.formats[format];
7960 }
7961 if (ret) {
7962 ret = _assertClassBrand(_Class_brand, this, _processFormat).call(this, ret);
7963 return ret;
7964 }
7965 return null;
7966 }
7967 }, {
7968 key: 'to',
7969 value: function to(space, coords) {
7970 if (arguments.length === 1) {
7971 var _ref4 = [ space.space, space.coords ];
7972 space = _ref4[0];
7973 coords = _ref4[1];
7974 }
7975 space = _ColorSpace2.get(space);
7976 if (this === space) {
7977 return coords;
7978 }
7979 coords = coords.map(function(c4) {
7980 return Number.isNaN(c4) ? 0 : c4;
7981 });
7982 var myPath = _classPrivateFieldGet(_path, this);
7983 var otherPath = _classPrivateFieldGet(_path, space);
7984 var connectionSpace, connectionSpaceIndex;
7985 for (var i = 0; i < myPath.length; i++) {
7986 if (myPath[i] === otherPath[i]) {
7987 connectionSpace = myPath[i];
7988 connectionSpaceIndex = i;
7989 } else {
7990 break;
7991 }
7992 }
7993 if (!connectionSpace) {
7994 throw new Error('Cannot convert between color spaces '.concat(this, ' and ').concat(space, ': no connection space was found'));
7995 }
7996 for (var _i2 = myPath.length - 1; _i2 > connectionSpaceIndex; _i2--) {
7997 coords = myPath[_i2].toBase(coords);
7998 }
7999 for (var _i3 = connectionSpaceIndex + 1; _i3 < otherPath.length; _i3++) {
8000 coords = otherPath[_i3].fromBase(coords);
8001 }
8002 return coords;
8003 }
8004 }, {
8005 key: 'from',
8006 value: function from(space, coords) {
8007 if (arguments.length === 1) {
8008 var _ref5 = [ space.space, space.coords ];
8009 space = _ref5[0];
8010 coords = _ref5[1];
8011 }
8012 space = _ColorSpace2.get(space);
8013 return space.to(this, coords);
8014 }
8015 }, {
8016 key: 'toString',
8017 value: function toString() {
8018 return ''.concat(this.name, ' (').concat(this.id, ')');
8019 }
8020 }, {
8021 key: 'getMinCoords',
8022 value: function getMinCoords() {
8023 var ret = [];
8024 for (var id in this.coords) {
8025 var _range2$min;
8026 var meta = this.coords[id];
8027 var range2 = meta.range || meta.refRange;
8028 ret.push((_range2$min = range2 === null || range2 === void 0 ? void 0 : range2.min) !== null && _range2$min !== void 0 ? _range2$min : 0);
8029 }
8030 return ret;
8031 }
8032 } ], [ {
8033 key: 'all',
8034 get: function get() {
8035 return _toConsumableArray(new Set(Object.values(_ColorSpace2.registry)));
8036 }
8037 }, {
8038 key: 'register',
8039 value: function register(id, space) {
8040 if (arguments.length === 1) {
8041 space = arguments[0];
8042 id = space.id;
8043 }
8044 space = this.get(space);
8045 if (this.registry[id] && this.registry[id] !== space) {
8046 throw new Error('Duplicate color space registration: \''.concat(id, '\''));
8047 }
8048 this.registry[id] = space;
8049 if (arguments.length === 1 && space.aliases) {
8050 var _iterator3 = _createForOfIteratorHelper(space.aliases), _step3;
8051 try {
8052 for (_iterator3.s(); !(_step3 = _iterator3.n()).done; ) {
8053 var alias = _step3.value;
8054 this.register(alias, space);
8055 }
8056 } catch (err) {
8057 _iterator3.e(err);
8058 } finally {
8059 _iterator3.f();
8060 }
8061 }
8062 return space;
8063 }
8064 }, {
8065 key: 'get',
8066 value: function get(space) {
8067 if (!space || space instanceof _ColorSpace2) {
8068 return space;
8069 }
8070 var argType = type(space);
8071 if (argType === 'string') {
8072 var ret = _ColorSpace2.registry[space.toLowerCase()];
8073 if (!ret) {
8074 throw new TypeError('No color space found with id = "'.concat(space, '"'));
8075 }
8076 return ret;
8077 }
8078 for (var _len = arguments.length, alternatives = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
8079 alternatives[_key - 1] = arguments[_key];
8080 }
8081 if (alternatives.length) {
8082 return _ColorSpace2.get.apply(_ColorSpace2, alternatives);
8083 }
8084 throw new TypeError(''.concat(space, ' is not a valid color space'));
8085 }
8086 }, {
8087 key: 'resolveCoord',
8088 value: function resolveCoord(ref, workingSpace) {
8089 var coordType = type(ref);
8090 var space, coord;
8091 if (coordType === 'string') {
8092 if (ref.includes('.')) {
8093 var _ref$split = ref.split('.');
8094 var _ref$split2 = _slicedToArray(_ref$split, 2);
8095 space = _ref$split2[0];
8096 coord = _ref$split2[1];
8097 } else {
8098 space = void 0;
8099 coord = ref;
8100 }
8101 } else if (Array.isArray(ref)) {
8102 var _ref6 = _slicedToArray(ref, 2);
8103 space = _ref6[0];
8104 coord = _ref6[1];
8105 } else {
8106 space = ref.space;
8107 coord = ref.coordId;
8108 }
8109 space = _ColorSpace2.get(space);
8110 if (!space) {
8111 space = workingSpace;
8112 }
8113 if (!space) {
8114 throw new TypeError('Cannot resolve coordinate reference '.concat(ref, ': No color space specified and relative references are not allowed here'));
8115 }
8116 coordType = type(coord);
8117 if (coordType === 'number' || coordType === 'string' && coord >= 0) {
8118 var meta = Object.entries(space.coords)[coord];
8119 if (meta) {
8120 return _extends({
8121 space: space,
8122 id: meta[0],
8123 index: coord
8124 }, meta[1]);
8125 }
8126 }
8127 space = _ColorSpace2.get(space);
8128 var normalizedCoord = coord.toLowerCase();
8129 var i = 0;
8130 for (var id in space.coords) {
8131 var _meta$name;
8132 var _meta = space.coords[id];
8133 if (id.toLowerCase() === normalizedCoord || ((_meta$name = _meta.name) === null || _meta$name === void 0 ? void 0 : _meta$name.toLowerCase()) === normalizedCoord) {
8134 return _extends({
8135 space: space,
8136 id: id,
8137 index: i
8138 }, _meta);
8139 }
8140 i++;
8141 }
8142 throw new TypeError('No "'.concat(coord, '" coordinate found in ').concat(space.name, '. Its coordinates are: ').concat(Object.keys(space.coords).join(', ')));
8143 }
8144 } ]);
8145 }());
8146 function _processFormat(format) {
8147 if (format.coords && !format.coordGrammar) {
8148 format.type || (format.type = 'function');
8149 format.name || (format.name = 'color');
8150 format.coordGrammar = parseCoordGrammar(format.coords);
8151 var coordFormats = Object.entries(this.coords).map(function(_ref153, i) {
8152 var _ref154 = _slicedToArray(_ref153, 2), id = _ref154[0], coordMeta = _ref154[1];
8153 var outputType = format.coordGrammar[i][0];
8154 var fromRange = coordMeta.range || coordMeta.refRange;
8155 var toRange = outputType.range, suffix = '';
8156 if (outputType == '<percentage>') {
8157 toRange = [ 0, 100 ];
8158 suffix = '%';
8159 } else if (outputType == '<angle>') {
8160 suffix = 'deg';
8161 }
8162 return {
8163 fromRange: fromRange,
8164 toRange: toRange,
8165 suffix: suffix
8166 };
8167 });
8168 format.serializeCoords = function(coords, precision) {
8169 return coords.map(function(c4, i) {
8170 var _coordFormats$i = coordFormats[i], fromRange = _coordFormats$i.fromRange, toRange = _coordFormats$i.toRange, suffix = _coordFormats$i.suffix;
8171 if (fromRange && toRange) {
8172 c4 = mapRange(fromRange, toRange, c4);
8173 }
8174 c4 = toPrecision(c4, precision);
8175 if (suffix) {
8176 c4 += suffix;
8177 }
8178 return c4;
8179 });
8180 };
8181 }
8182 return format;
8183 }
8184 function _getPath() {
8185 var ret = [ this ];
8186 for (var _space2 = this; _space2 = _space2.base; ) {
8187 ret.push(_space2);
8188 }
8189 return ret;
8190 }
8191 var ColorSpace = _ColorSpace2;
8192 __publicField(ColorSpace, 'registry', {});
8193 __publicField(ColorSpace, 'DEFAULT_FORMAT', {
8194 type: 'functions',
8195 name: 'color'
8196 });
8197 var XYZ_D65 = new ColorSpace({
8198 id: 'xyz-d65',
8199 name: 'XYZ D65',
8200 coords: {
8201 x: {
8202 name: 'X'
8203 },
8204 y: {
8205 name: 'Y'
8206 },
8207 z: {
8208 name: 'Z'
8209 }
8210 },
8211 white: 'D65',
8212 formats: {
8213 color: {
8214 ids: [ 'xyz-d65', 'xyz' ]
8215 }
8216 },
8217 aliases: [ 'xyz' ]
8218 });
8219 var RGBColorSpace = function(_ColorSpace3) {
8220 function RGBColorSpace(options) {
8221 var _options$referred;
8222 var _this;
8223 _classCallCheck(this, RGBColorSpace);
8224 if (!options.coords) {
8225 options.coords = {
8226 r: {
8227 range: [ 0, 1 ],
8228 name: 'Red'
8229 },
8230 g: {
8231 range: [ 0, 1 ],
8232 name: 'Green'
8233 },
8234 b: {
8235 range: [ 0, 1 ],
8236 name: 'Blue'
8237 }
8238 };
8239 }
8240 if (!options.base) {
8241 options.base = XYZ_D65;
8242 }
8243 if (options.toXYZ_M && options.fromXYZ_M) {
8244 var _options$toBase, _options$fromBase;
8245 (_options$toBase = options.toBase) !== null && _options$toBase !== void 0 ? _options$toBase : options.toBase = function(rgb) {
8246 var xyz = multiplyMatrices(options.toXYZ_M, rgb);
8247 if (_this.white !== _this.base.white) {
8248 xyz = adapt$1(_this.white, _this.base.white, xyz);
8249 }
8250 return xyz;
8251 };
8252 (_options$fromBase = options.fromBase) !== null && _options$fromBase !== void 0 ? _options$fromBase : options.fromBase = function(xyz) {
8253 xyz = adapt$1(_this.base.white, _this.white, xyz);
8254 return multiplyMatrices(options.fromXYZ_M, xyz);
8255 };
8256 }
8257 (_options$referred = options.referred) !== null && _options$referred !== void 0 ? _options$referred : options.referred = 'display';
8258 return _this = _callSuper(this, RGBColorSpace, [ options ]);
8259 }
8260 _inherits(RGBColorSpace, _ColorSpace3);
8261 return _createClass(RGBColorSpace);
8262 }(ColorSpace);
8263 function parse(str) {
8264 var _String;
8265 var env = {
8266 str: (_String = String(str)) === null || _String === void 0 ? void 0 : _String.trim()
8267 };
8268 hooks.run('parse-start', env);
8269 if (env.color) {
8270 return env.color;
8271 }
8272 env.parsed = parseFunction(env.str);
8273 if (env.parsed) {
8274 var name = env.parsed.name;
8275 if (name === 'color') {
8276 var id = env.parsed.args.shift();
8277 var alpha = env.parsed.rawArgs.indexOf('/') > 0 ? env.parsed.args.pop() : 1;
8278 var _iterator4 = _createForOfIteratorHelper(ColorSpace.all), _step4;
8279 try {
8280 var _loop2 = function _loop2() {
8281 var space = _step4.value;
8282 var colorSpec = space.getFormat('color');
8283 if (colorSpec) {
8284 var _colorSpec$ids;
8285 if (id === colorSpec.id || (_colorSpec$ids = colorSpec.ids) !== null && _colorSpec$ids !== void 0 && _colorSpec$ids.includes(id)) {
8286 var argCount = Object.keys(space.coords).length;
8287 var coords = Array(argCount).fill(0);
8288 coords.forEach(function(_, i) {
8289 return coords[i] = env.parsed.args[i] || 0;
8290 });
8291 return {
8292 v: {
8293 spaceId: space.id,
8294 coords: coords,
8295 alpha: alpha
8296 }
8297 };
8298 }
8299 }
8300 }, _ret;
8301 for (_iterator4.s(); !(_step4 = _iterator4.n()).done; ) {
8302 _ret = _loop2();
8303 if (_ret) {
8304 return _ret.v;
8305 }
8306 }
8307 } catch (err) {
8308 _iterator4.e(err);
8309 } finally {
8310 _iterator4.f();
8311 }
8312 var didYouMean = '';
8313 if (id in ColorSpace.registry) {
8314 var _ColorSpace$registry$;
8315 var cssId = (_ColorSpace$registry$ = ColorSpace.registry[id].formats) === null || _ColorSpace$registry$ === void 0 || (_ColorSpace$registry$ = _ColorSpace$registry$.functions) === null || _ColorSpace$registry$ === void 0 || (_ColorSpace$registry$ = _ColorSpace$registry$.color) === null || _ColorSpace$registry$ === void 0 ? void 0 : _ColorSpace$registry$.id;
8316 if (cssId) {
8317 didYouMean = 'Did you mean color('.concat(cssId, ')?');
8318 }
8319 }
8320 throw new TypeError('Cannot parse color('.concat(id, '). ') + (didYouMean || 'Missing a plugin?'));
8321 } else {
8322 var _iterator5 = _createForOfIteratorHelper(ColorSpace.all), _step5;
8323 try {
8324 var _loop3 = function _loop3() {
8325 var space = _step5.value;
8326 var format = space.getFormat(name);
8327 if (format && format.type === 'function') {
8328 var _alpha = 1;
8329 if (format.lastAlpha || last(env.parsed.args).alpha) {
8330 _alpha = env.parsed.args.pop();
8331 }
8332 var coords = env.parsed.args;
8333 if (format.coordGrammar) {
8334 Object.entries(space.coords).forEach(function(_ref7, i) {
8335 var _coords$i;
8336 var _ref8 = _slicedToArray(_ref7, 2), id = _ref8[0], coordMeta = _ref8[1];
8337 var coordGrammar2 = format.coordGrammar[i];
8338 var providedType = (_coords$i = coords[i]) === null || _coords$i === void 0 ? void 0 : _coords$i.type;
8339 coordGrammar2 = coordGrammar2.find(function(c4) {
8340 return c4 == providedType;
8341 });
8342 if (!coordGrammar2) {
8343 var coordName = coordMeta.name || id;
8344 throw new TypeError(''.concat(providedType, ' not allowed for ').concat(coordName, ' in ').concat(name, '()'));
8345 }
8346 var fromRange = coordGrammar2.range;
8347 if (providedType === '<percentage>') {
8348 fromRange || (fromRange = [ 0, 1 ]);
8349 }
8350 var toRange = coordMeta.range || coordMeta.refRange;
8351 if (fromRange && toRange) {
8352 coords[i] = mapRange(fromRange, toRange, coords[i]);
8353 }
8354 });
8355 }
8356 return {
8357 v: {
8358 spaceId: space.id,
8359 coords: coords,
8360 alpha: _alpha
8361 }
8362 };
8363 }
8364 }, _ret2;
8365 for (_iterator5.s(); !(_step5 = _iterator5.n()).done; ) {
8366 _ret2 = _loop3();
8367 if (_ret2) {
8368 return _ret2.v;
8369 }
8370 }
8371 } catch (err) {
8372 _iterator5.e(err);
8373 } finally {
8374 _iterator5.f();
8375 }
8376 }
8377 } else {
8378 var _iterator6 = _createForOfIteratorHelper(ColorSpace.all), _step6;
8379 try {
8380 for (_iterator6.s(); !(_step6 = _iterator6.n()).done; ) {
8381 var space = _step6.value;
8382 for (var formatId in space.formats) {
8383 var format = space.formats[formatId];
8384 if (format.type !== 'custom') {
8385 continue;
8386 }
8387 if (format.test && !format.test(env.str)) {
8388 continue;
8389 }
8390 var color = format.parse(env.str);
8391 if (color) {
8392 var _color$alpha;
8393 (_color$alpha = color.alpha) !== null && _color$alpha !== void 0 ? _color$alpha : color.alpha = 1;
8394 return color;
8395 }
8396 }
8397 }
8398 } catch (err) {
8399 _iterator6.e(err);
8400 } finally {
8401 _iterator6.f();
8402 }
8403 }
8404 throw new TypeError('Could not parse '.concat(str, ' as a color. Missing a plugin?'));
8405 }
8406 function getColor(color) {
8407 if (!color) {
8408 throw new TypeError('Empty color reference');
8409 }
8410 if (isString(color)) {
8411 color = parse(color);
8412 }
8413 var space = color.space || color.spaceId;
8414 if (!(space instanceof ColorSpace)) {
8415 color.space = ColorSpace.get(space);
8416 }
8417 if (color.alpha === void 0) {
8418 color.alpha = 1;
8419 }
8420 return color;
8421 }
8422 function getAll(color, space) {
8423 space = ColorSpace.get(space);
8424 return space.from(color);
8425 }
8426 function get(color, prop) {
8427 var _ColorSpace$resolveCo = ColorSpace.resolveCoord(prop, color.space), space = _ColorSpace$resolveCo.space, index = _ColorSpace$resolveCo.index;
8428 var coords = getAll(color, space);
8429 return coords[index];
8430 }
8431 function setAll(color, space, coords) {
8432 space = ColorSpace.get(space);
8433 color.coords = space.to(color.space, coords);
8434 return color;
8435 }
8436 function set(color, prop, value) {
8437 color = getColor(color);
8438 if (arguments.length === 2 && type(arguments[1]) === 'object') {
8439 var object = arguments[1];
8440 for (var p2 in object) {
8441 set(color, p2, object[p2]);
8442 }
8443 } else {
8444 if (typeof value === 'function') {
8445 value = value(get(color, prop));
8446 }
8447 var _ColorSpace$resolveCo2 = ColorSpace.resolveCoord(prop, color.space), space = _ColorSpace$resolveCo2.space, index = _ColorSpace$resolveCo2.index;
8448 var coords = getAll(color, space);
8449 coords[index] = value;
8450 setAll(color, space, coords);
8451 }
8452 return color;
8453 }
8454 var XYZ_D50 = new ColorSpace({
8455 id: 'xyz-d50',
8456 name: 'XYZ D50',
8457 white: 'D50',
8458 base: XYZ_D65,
8459 fromBase: function fromBase(coords) {
8460 return adapt$1(XYZ_D65.white, 'D50', coords);
8461 },
8462 toBase: function toBase(coords) {
8463 return adapt$1('D50', XYZ_D65.white, coords);
8464 },
8465 formats: {
8466 color: {}
8467 }
8468 });
8469 var \u03b5$3 = 216 / 24389;
8470 var \u03b53$1 = 24 / 116;
8471 var \u03ba$1 = 24389 / 27;
8472 var white$1 = WHITES.D50;
8473 var lab = new ColorSpace({
8474 id: 'lab',
8475 name: 'Lab',
8476 coords: {
8477 l: {
8478 refRange: [ 0, 100 ],
8479 name: 'L'
8480 },
8481 a: {
8482 refRange: [ -125, 125 ]
8483 },
8484 b: {
8485 refRange: [ -125, 125 ]
8486 }
8487 },
8488 white: white$1,
8489 base: XYZ_D50,
8490 fromBase: function fromBase(XYZ) {
8491 var xyz = XYZ.map(function(value, i) {
8492 return value / white$1[i];
8493 });
8494 var f = xyz.map(function(value) {
8495 return value > \u03b5$3 ? Math.cbrt(value) : (\u03ba$1 * value + 16) / 116;
8496 });
8497 return [ 116 * f[1] - 16, 500 * (f[0] - f[1]), 200 * (f[1] - f[2]) ];
8498 },
8499 toBase: function toBase(Lab) {
8500 var f = [];
8501 f[1] = (Lab[0] + 16) / 116;
8502 f[0] = Lab[1] / 500 + f[1];
8503 f[2] = f[1] - Lab[2] / 200;
8504 var xyz = [ f[0] > \u03b53$1 ? Math.pow(f[0], 3) : (116 * f[0] - 16) / \u03ba$1, Lab[0] > 8 ? Math.pow((Lab[0] + 16) / 116, 3) : Lab[0] / \u03ba$1, f[2] > \u03b53$1 ? Math.pow(f[2], 3) : (116 * f[2] - 16) / \u03ba$1 ];
8505 return xyz.map(function(value, i) {
8506 return value * white$1[i];
8507 });
8508 },
8509 formats: {
8510 lab: {
8511 coords: [ '<number> | <percentage>', '<number>', '<number>' ]
8512 }
8513 }
8514 });
8515 function constrain(angle) {
8516 return (angle % 360 + 360) % 360;
8517 }
8518 function adjust(arc, angles) {
8519 if (arc === 'raw') {
8520 return angles;
8521 }
8522 var _angles$map = angles.map(constrain), _angles$map2 = _slicedToArray(_angles$map, 2), a1 = _angles$map2[0], a2 = _angles$map2[1];
8523 var angleDiff = a2 - a1;
8524 if (arc === 'increasing') {
8525 if (angleDiff < 0) {
8526 a2 += 360;
8527 }
8528 } else if (arc === 'decreasing') {
8529 if (angleDiff > 0) {
8530 a1 += 360;
8531 }
8532 } else if (arc === 'longer') {
8533 if (-180 < angleDiff && angleDiff < 180) {
8534 if (angleDiff > 0) {
8535 a2 += 360;
8536 } else {
8537 a1 += 360;
8538 }
8539 }
8540 } else if (arc === 'shorter') {
8541 if (angleDiff > 180) {
8542 a1 += 360;
8543 } else if (angleDiff < -180) {
8544 a2 += 360;
8545 }
8546 }
8547 return [ a1, a2 ];
8548 }
8549 var lch = new ColorSpace({
8550 id: 'lch',
8551 name: 'LCH',
8552 coords: {
8553 l: {
8554 refRange: [ 0, 100 ],
8555 name: 'Lightness'
8556 },
8557 c: {
8558 refRange: [ 0, 150 ],
8559 name: 'Chroma'
8560 },
8561 h: {
8562 refRange: [ 0, 360 ],
8563 type: 'angle',
8564 name: 'Hue'
8565 }
8566 },
8567 base: lab,
8568 fromBase: function fromBase(Lab) {
8569 var _Lab = _slicedToArray(Lab, 3), L = _Lab[0], a2 = _Lab[1], b2 = _Lab[2];
8570 var hue;
8571 var \u03b52 = .02;
8572 if (Math.abs(a2) < \u03b52 && Math.abs(b2) < \u03b52) {
8573 hue = NaN;
8574 } else {
8575 hue = Math.atan2(b2, a2) * 180 / Math.PI;
8576 }
8577 return [ L, Math.sqrt(Math.pow(a2, 2) + Math.pow(b2, 2)), constrain(hue) ];
8578 },
8579 toBase: function toBase(LCH) {
8580 var _LCH = _slicedToArray(LCH, 3), Lightness = _LCH[0], Chroma = _LCH[1], Hue = _LCH[2];
8581 if (Chroma < 0) {
8582 Chroma = 0;
8583 }
8584 if (isNaN(Hue)) {
8585 Hue = 0;
8586 }
8587 return [ Lightness, Chroma * Math.cos(Hue * Math.PI / 180), Chroma * Math.sin(Hue * Math.PI / 180) ];
8588 },
8589 formats: {
8590 lch: {
8591 coords: [ '<number> | <percentage>', '<number>', '<number> | <angle>' ]
8592 }
8593 }
8594 });
8595 var Gfactor = Math.pow(25, 7);
8596 var \u03c0$1 = Math.PI;
8597 var r2d = 180 / \u03c0$1;
8598 var d2r$1 = \u03c0$1 / 180;
8599 function deltaE2000(color, sample) {
8600 var _ref9 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, _ref9$kL = _ref9.kL, kL = _ref9$kL === void 0 ? 1 : _ref9$kL, _ref9$kC = _ref9.kC, kC = _ref9$kC === void 0 ? 1 : _ref9$kC, _ref9$kH = _ref9.kH, kH = _ref9$kH === void 0 ? 1 : _ref9$kH;
8601 var _lab$from = lab.from(color), _lab$from2 = _slicedToArray(_lab$from, 3), L1 = _lab$from2[0], a1 = _lab$from2[1], b1 = _lab$from2[2];
8602 var C1 = lch.from(lab, [ L1, a1, b1 ])[1];
8603 var _lab$from3 = lab.from(sample), _lab$from4 = _slicedToArray(_lab$from3, 3), L2 = _lab$from4[0], a2 = _lab$from4[1], b2 = _lab$from4[2];
8604 var C2 = lch.from(lab, [ L2, a2, b2 ])[1];
8605 if (C1 < 0) {
8606 C1 = 0;
8607 }
8608 if (C2 < 0) {
8609 C2 = 0;
8610 }
8611 var Cbar = (C1 + C2) / 2;
8612 var C7 = Math.pow(Cbar, 7);
8613 var G = .5 * (1 - Math.sqrt(C7 / (C7 + Gfactor)));
8614 var adash1 = (1 + G) * a1;
8615 var adash2 = (1 + G) * a2;
8616 var Cdash1 = Math.sqrt(Math.pow(adash1, 2) + Math.pow(b1, 2));
8617 var Cdash2 = Math.sqrt(Math.pow(adash2, 2) + Math.pow(b2, 2));
8618 var h1 = adash1 === 0 && b1 === 0 ? 0 : Math.atan2(b1, adash1);
8619 var h2 = adash2 === 0 && b2 === 0 ? 0 : Math.atan2(b2, adash2);
8620 if (h1 < 0) {
8621 h1 += 2 * \u03c0$1;
8622 }
8623 if (h2 < 0) {
8624 h2 += 2 * \u03c0$1;
8625 }
8626 h1 *= r2d;
8627 h2 *= r2d;
8628 var \u0394L = L2 - L1;
8629 var \u0394C = Cdash2 - Cdash1;
8630 var hdiff = h2 - h1;
8631 var hsum = h1 + h2;
8632 var habs = Math.abs(hdiff);
8633 var \u0394h;
8634 if (Cdash1 * Cdash2 === 0) {
8635 \u0394h = 0;
8636 } else if (habs <= 180) {
8637 \u0394h = hdiff;
8638 } else if (hdiff > 180) {
8639 \u0394h = hdiff - 360;
8640 } else if (hdiff < -180) {
8641 \u0394h = hdiff + 360;
8642 } else {
8643 console.log('the unthinkable has happened');
8644 }
8645 var \u0394H = 2 * Math.sqrt(Cdash2 * Cdash1) * Math.sin(\u0394h * d2r$1 / 2);
8646 var Ldash = (L1 + L2) / 2;
8647 var Cdash = (Cdash1 + Cdash2) / 2;
8648 var Cdash7 = Math.pow(Cdash, 7);
8649 var hdash;
8650 if (Cdash1 * Cdash2 === 0) {
8651 hdash = hsum;
8652 } else if (habs <= 180) {
8653 hdash = hsum / 2;
8654 } else if (hsum < 360) {
8655 hdash = (hsum + 360) / 2;
8656 } else {
8657 hdash = (hsum - 360) / 2;
8658 }
8659 var lsq = Math.pow(Ldash - 50, 2);
8660 var SL = 1 + .015 * lsq / Math.sqrt(20 + lsq);
8661 var SC = 1 + .045 * Cdash;
8662 var T = 1;
8663 T -= .17 * Math.cos((hdash - 30) * d2r$1);
8664 T += .24 * Math.cos(2 * hdash * d2r$1);
8665 T += .32 * Math.cos((3 * hdash + 6) * d2r$1);
8666 T -= .2 * Math.cos((4 * hdash - 63) * d2r$1);
8667 var SH = 1 + .015 * Cdash * T;
8668 var \u0394\u03b8 = 30 * Math.exp(-1 * Math.pow((hdash - 275) / 25, 2));
8669 var RC = 2 * Math.sqrt(Cdash7 / (Cdash7 + Gfactor));
8670 var RT = -1 * Math.sin(2 * \u0394\u03b8 * d2r$1) * RC;
8671 var dE = Math.pow(\u0394L / (kL * SL), 2);
8672 dE += Math.pow(\u0394C / (kC * SC), 2);
8673 dE += Math.pow(\u0394H / (kH * SH), 2);
8674 dE += RT * (\u0394C / (kC * SC)) * (\u0394H / (kH * SH));
8675 return Math.sqrt(dE);
8676 }
8677 var \u03b5$2 = 75e-6;
8678 function inGamut(color) {
8679 var space = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : color.space;
8680 var _ref0 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, _ref0$epsilon = _ref0.epsilon, epsilon = _ref0$epsilon === void 0 ? \u03b5$2 : _ref0$epsilon;
8681 color = getColor(color);
8682 space = ColorSpace.get(space);
8683 var coords = color.coords;
8684 if (space !== color.space) {
8685 coords = space.from(color);
8686 }
8687 return space.inGamut(coords, {
8688 epsilon: epsilon
8689 });
8690 }
8691 function clone(color) {
8692 return {
8693 space: color.space,
8694 coords: color.coords.slice(),
8695 alpha: color.alpha
8696 };
8697 }
8698 function toGamut(color) {
8699 var _ref1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref1$method = _ref1.method, method = _ref1$method === void 0 ? defaults.gamut_mapping : _ref1$method, _ref1$space = _ref1.space, space = _ref1$space === void 0 ? color.space : _ref1$space;
8700 if (isString(arguments[1])) {
8701 space = arguments[1];
8702 }
8703 space = ColorSpace.get(space);
8704 if (inGamut(color, space, {
8705 epsilon: 0
8706 })) {
8707 return color;
8708 }
8709 var spaceColor = to(color, space);
8710 if (method !== 'clip' && !inGamut(color, space)) {
8711 var clipped = toGamut(clone(spaceColor), {
8712 method: 'clip',
8713 space: space
8714 });
8715 if (deltaE2000(color, clipped) > 2) {
8716 var coordMeta = ColorSpace.resolveCoord(method);
8717 var mapSpace = coordMeta.space;
8718 var coordId = coordMeta.id;
8719 var mappedColor = to(spaceColor, mapSpace);
8720 var bounds = coordMeta.range || coordMeta.refRange;
8721 var min = bounds[0];
8722 var \u03b52 = .01;
8723 var low = min;
8724 var high = get(mappedColor, coordId);
8725 while (high - low > \u03b52) {
8726 var clipped2 = clone(mappedColor);
8727 clipped2 = toGamut(clipped2, {
8728 space: space,
8729 method: 'clip'
8730 });
8731 var deltaE2 = deltaE2000(mappedColor, clipped2);
8732 if (deltaE2 - 2 < \u03b52) {
8733 low = get(mappedColor, coordId);
8734 } else {
8735 high = get(mappedColor, coordId);
8736 }
8737 set(mappedColor, coordId, (low + high) / 2);
8738 }
8739 spaceColor = to(mappedColor, space);
8740 } else {
8741 spaceColor = clipped;
8742 }
8743 }
8744 if (method === 'clip' || !inGamut(spaceColor, space, {
8745 epsilon: 0
8746 })) {
8747 var _bounds = Object.values(space.coords).map(function(c4) {
8748 return c4.range || [];
8749 });
8750 spaceColor.coords = spaceColor.coords.map(function(c4, i) {
8751 var _bounds$i = _slicedToArray(_bounds[i], 2), min = _bounds$i[0], max2 = _bounds$i[1];
8752 if (min !== void 0) {
8753 c4 = Math.max(min, c4);
8754 }
8755 if (max2 !== void 0) {
8756 c4 = Math.min(c4, max2);
8757 }
8758 return c4;
8759 });
8760 }
8761 if (space !== color.space) {
8762 spaceColor = to(spaceColor, color.space);
8763 }
8764 color.coords = spaceColor.coords;
8765 return color;
8766 }
8767 toGamut.returns = 'color';
8768 function to(color, space) {
8769 var _ref10 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, inGamut2 = _ref10.inGamut;
8770 color = getColor(color);
8771 space = ColorSpace.get(space);
8772 var coords = space.from(color);
8773 var ret = {
8774 space: space,
8775 coords: coords,
8776 alpha: color.alpha
8777 };
8778 if (inGamut2) {
8779 ret = toGamut(ret);
8780 }
8781 return ret;
8782 }
8783 to.returns = 'color';
8784 function serialize(color) {
8785 var _ref12, _color$space$getForma;
8786 var _ref11 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8787 var _ref11$precision = _ref11.precision, precision = _ref11$precision === void 0 ? defaults.precision : _ref11$precision, _ref11$format = _ref11.format, format = _ref11$format === void 0 ? 'default' : _ref11$format, _ref11$inGamut = _ref11.inGamut, inGamut$1 = _ref11$inGamut === void 0 ? true : _ref11$inGamut, customOptions = _objectWithoutProperties(_ref11, _excluded);
8788 var ret;
8789 color = getColor(color);
8790 var formatId = format;
8791 format = (_ref12 = (_color$space$getForma = color.space.getFormat(format)) !== null && _color$space$getForma !== void 0 ? _color$space$getForma : color.space.getFormat('default')) !== null && _ref12 !== void 0 ? _ref12 : ColorSpace.DEFAULT_FORMAT;
8792 inGamut$1 || (inGamut$1 = format.toGamut);
8793 var coords = color.coords;
8794 coords = coords.map(function(c4) {
8795 return c4 ? c4 : 0;
8796 });
8797 if (inGamut$1 && !inGamut(color)) {
8798 coords = toGamut(clone(color), inGamut$1 === true ? void 0 : inGamut$1).coords;
8799 }
8800 if (format.type === 'custom') {
8801 customOptions.precision = precision;
8802 if (format.serialize) {
8803 ret = format.serialize(coords, color.alpha, customOptions);
8804 } else {
8805 throw new TypeError('format '.concat(formatId, ' can only be used to parse colors, not for serialization'));
8806 }
8807 } else {
8808 var name = format.name || 'color';
8809 if (format.serializeCoords) {
8810 coords = format.serializeCoords(coords, precision);
8811 } else {
8812 if (precision !== null) {
8813 coords = coords.map(function(c4) {
8814 return toPrecision(c4, precision);
8815 });
8816 }
8817 }
8818 var args = _toConsumableArray(coords);
8819 if (name === 'color') {
8820 var _format$ids;
8821 var cssId = format.id || ((_format$ids = format.ids) === null || _format$ids === void 0 ? void 0 : _format$ids[0]) || color.space.id;
8822 args.unshift(cssId);
8823 }
8824 var alpha = color.alpha;
8825 if (precision !== null) {
8826 alpha = toPrecision(alpha, precision);
8827 }
8828 var strAlpha = color.alpha < 1 && !format.noAlpha ? ''.concat(format.commas ? ',' : ' /', ' ').concat(alpha) : '';
8829 ret = ''.concat(name, '(').concat(args.join(format.commas ? ', ' : ' ')).concat(strAlpha, ')');
8830 }
8831 return ret;
8832 }
8833 var toXYZ_M$5 = [ [ .6369580483012914, .14461690358620832, .1688809751641721 ], [ .2627002120112671, .6779980715188708, .05930171646986196 ], [ 0, .028072693049087428, 1.060985057710791 ] ];
8834 var fromXYZ_M$5 = [ [ 1.716651187971268, -.355670783776392, -.25336628137366 ], [ -.666684351832489, 1.616481236634939, .0157685458139111 ], [ .017639857445311, -.042770613257809, .942103121235474 ] ];
8835 var REC2020Linear = new RGBColorSpace({
8836 id: 'rec2020-linear',
8837 name: 'Linear REC.2020',
8838 white: 'D65',
8839 toXYZ_M: toXYZ_M$5,
8840 fromXYZ_M: fromXYZ_M$5,
8841 formats: {
8842 color: {}
8843 }
8844 });
8845 var \u03b1 = 1.09929682680944;
8846 var \u03b2 = .018053968510807;
8847 var REC2020 = new RGBColorSpace({
8848 id: 'rec2020',
8849 name: 'REC.2020',
8850 base: REC2020Linear,
8851 toBase: function toBase(RGB) {
8852 return RGB.map(function(val) {
8853 if (val < \u03b2 * 4.5) {
8854 return val / 4.5;
8855 }
8856 return Math.pow((val + \u03b1 - 1) / \u03b1, 1 / .45);
8857 });
8858 },
8859 fromBase: function fromBase(RGB) {
8860 return RGB.map(function(val) {
8861 if (val >= \u03b2) {
8862 return \u03b1 * Math.pow(val, .45) - (\u03b1 - 1);
8863 }
8864 return 4.5 * val;
8865 });
8866 },
8867 formats: {
8868 color: {}
8869 }
8870 });
8871 var toXYZ_M$4 = [ [ .4865709486482162, .26566769316909306, .1982172852343625 ], [ .2289745640697488, .6917385218365064, .079286914093745 ], [ 0, .04511338185890264, 1.043944368900976 ] ];
8872 var fromXYZ_M$4 = [ [ 2.493496911941425, -.9313836179191239, -.40271078445071684 ], [ -.8294889695615747, 1.7626640603183463, .023624685841943577 ], [ .03584583024378447, -.07617238926804182, .9568845240076872 ] ];
8873 var P3Linear = new RGBColorSpace({
8874 id: 'p3-linear',
8875 name: 'Linear P3',
8876 white: 'D65',
8877 toXYZ_M: toXYZ_M$4,
8878 fromXYZ_M: fromXYZ_M$4
8879 });
8880 var toXYZ_M$3 = [ [ .41239079926595934, .357584339383878, .1804807884018343 ], [ .21263900587151027, .715168678767756, .07219231536073371 ], [ .01933081871559182, .11919477979462598, .9505321522496607 ] ];
8881 var fromXYZ_M$3 = [ [ 3.2409699419045226, -1.537383177570094, -.4986107602930034 ], [ -.9692436362808796, 1.8759675015077202, .04155505740717559 ], [ .05563007969699366, -.20397695888897652, 1.0569715142428786 ] ];
8882 var sRGBLinear = new RGBColorSpace({
8883 id: 'srgb-linear',
8884 name: 'Linear sRGB',
8885 white: 'D65',
8886 toXYZ_M: toXYZ_M$3,
8887 fromXYZ_M: fromXYZ_M$3,
8888 formats: {
8889 color: {}
8890 }
8891 });
8892 var KEYWORDS = {
8893 aliceblue: [ 240 / 255, 248 / 255, 1 ],
8894 antiquewhite: [ 250 / 255, 235 / 255, 215 / 255 ],
8895 aqua: [ 0, 1, 1 ],
8896 aquamarine: [ 127 / 255, 1, 212 / 255 ],
8897 azure: [ 240 / 255, 1, 1 ],
8898 beige: [ 245 / 255, 245 / 255, 220 / 255 ],
8899 bisque: [ 1, 228 / 255, 196 / 255 ],
8900 black: [ 0, 0, 0 ],
8901 blanchedalmond: [ 1, 235 / 255, 205 / 255 ],
8902 blue: [ 0, 0, 1 ],
8903 blueviolet: [ 138 / 255, 43 / 255, 226 / 255 ],
8904 brown: [ 165 / 255, 42 / 255, 42 / 255 ],
8905 burlywood: [ 222 / 255, 184 / 255, 135 / 255 ],
8906 cadetblue: [ 95 / 255, 158 / 255, 160 / 255 ],
8907 chartreuse: [ 127 / 255, 1, 0 ],
8908 chocolate: [ 210 / 255, 105 / 255, 30 / 255 ],
8909 coral: [ 1, 127 / 255, 80 / 255 ],
8910 cornflowerblue: [ 100 / 255, 149 / 255, 237 / 255 ],
8911 cornsilk: [ 1, 248 / 255, 220 / 255 ],
8912 crimson: [ 220 / 255, 20 / 255, 60 / 255 ],
8913 cyan: [ 0, 1, 1 ],
8914 darkblue: [ 0, 0, 139 / 255 ],
8915 darkcyan: [ 0, 139 / 255, 139 / 255 ],
8916 darkgoldenrod: [ 184 / 255, 134 / 255, 11 / 255 ],
8917 darkgray: [ 169 / 255, 169 / 255, 169 / 255 ],
8918 darkgreen: [ 0, 100 / 255, 0 ],
8919 darkgrey: [ 169 / 255, 169 / 255, 169 / 255 ],
8920 darkkhaki: [ 189 / 255, 183 / 255, 107 / 255 ],
8921 darkmagenta: [ 139 / 255, 0, 139 / 255 ],
8922 darkolivegreen: [ 85 / 255, 107 / 255, 47 / 255 ],
8923 darkorange: [ 1, 140 / 255, 0 ],
8924 darkorchid: [ 153 / 255, 50 / 255, 204 / 255 ],
8925 darkred: [ 139 / 255, 0, 0 ],
8926 darksalmon: [ 233 / 255, 150 / 255, 122 / 255 ],
8927 darkseagreen: [ 143 / 255, 188 / 255, 143 / 255 ],
8928 darkslateblue: [ 72 / 255, 61 / 255, 139 / 255 ],
8929 darkslategray: [ 47 / 255, 79 / 255, 79 / 255 ],
8930 darkslategrey: [ 47 / 255, 79 / 255, 79 / 255 ],
8931 darkturquoise: [ 0, 206 / 255, 209 / 255 ],
8932 darkviolet: [ 148 / 255, 0, 211 / 255 ],
8933 deeppink: [ 1, 20 / 255, 147 / 255 ],
8934 deepskyblue: [ 0, 191 / 255, 1 ],
8935 dimgray: [ 105 / 255, 105 / 255, 105 / 255 ],
8936 dimgrey: [ 105 / 255, 105 / 255, 105 / 255 ],
8937 dodgerblue: [ 30 / 255, 144 / 255, 1 ],
8938 firebrick: [ 178 / 255, 34 / 255, 34 / 255 ],
8939 floralwhite: [ 1, 250 / 255, 240 / 255 ],
8940 forestgreen: [ 34 / 255, 139 / 255, 34 / 255 ],
8941 fuchsia: [ 1, 0, 1 ],
8942 gainsboro: [ 220 / 255, 220 / 255, 220 / 255 ],
8943 ghostwhite: [ 248 / 255, 248 / 255, 1 ],
8944 gold: [ 1, 215 / 255, 0 ],
8945 goldenrod: [ 218 / 255, 165 / 255, 32 / 255 ],
8946 gray: [ 128 / 255, 128 / 255, 128 / 255 ],
8947 green: [ 0, 128 / 255, 0 ],
8948 greenyellow: [ 173 / 255, 1, 47 / 255 ],
8949 grey: [ 128 / 255, 128 / 255, 128 / 255 ],
8950 honeydew: [ 240 / 255, 1, 240 / 255 ],
8951 hotpink: [ 1, 105 / 255, 180 / 255 ],
8952 indianred: [ 205 / 255, 92 / 255, 92 / 255 ],
8953 indigo: [ 75 / 255, 0, 130 / 255 ],
8954 ivory: [ 1, 1, 240 / 255 ],
8955 khaki: [ 240 / 255, 230 / 255, 140 / 255 ],
8956 lavender: [ 230 / 255, 230 / 255, 250 / 255 ],
8957 lavenderblush: [ 1, 240 / 255, 245 / 255 ],
8958 lawngreen: [ 124 / 255, 252 / 255, 0 ],
8959 lemonchiffon: [ 1, 250 / 255, 205 / 255 ],
8960 lightblue: [ 173 / 255, 216 / 255, 230 / 255 ],
8961 lightcoral: [ 240 / 255, 128 / 255, 128 / 255 ],
8962 lightcyan: [ 224 / 255, 1, 1 ],
8963 lightgoldenrodyellow: [ 250 / 255, 250 / 255, 210 / 255 ],
8964 lightgray: [ 211 / 255, 211 / 255, 211 / 255 ],
8965 lightgreen: [ 144 / 255, 238 / 255, 144 / 255 ],
8966 lightgrey: [ 211 / 255, 211 / 255, 211 / 255 ],
8967 lightpink: [ 1, 182 / 255, 193 / 255 ],
8968 lightsalmon: [ 1, 160 / 255, 122 / 255 ],
8969 lightseagreen: [ 32 / 255, 178 / 255, 170 / 255 ],
8970 lightskyblue: [ 135 / 255, 206 / 255, 250 / 255 ],
8971 lightslategray: [ 119 / 255, 136 / 255, 153 / 255 ],
8972 lightslategrey: [ 119 / 255, 136 / 255, 153 / 255 ],
8973 lightsteelblue: [ 176 / 255, 196 / 255, 222 / 255 ],
8974 lightyellow: [ 1, 1, 224 / 255 ],
8975 lime: [ 0, 1, 0 ],
8976 limegreen: [ 50 / 255, 205 / 255, 50 / 255 ],
8977 linen: [ 250 / 255, 240 / 255, 230 / 255 ],
8978 magenta: [ 1, 0, 1 ],
8979 maroon: [ 128 / 255, 0, 0 ],
8980 mediumaquamarine: [ 102 / 255, 205 / 255, 170 / 255 ],
8981 mediumblue: [ 0, 0, 205 / 255 ],
8982 mediumorchid: [ 186 / 255, 85 / 255, 211 / 255 ],
8983 mediumpurple: [ 147 / 255, 112 / 255, 219 / 255 ],
8984 mediumseagreen: [ 60 / 255, 179 / 255, 113 / 255 ],
8985 mediumslateblue: [ 123 / 255, 104 / 255, 238 / 255 ],
8986 mediumspringgreen: [ 0, 250 / 255, 154 / 255 ],
8987 mediumturquoise: [ 72 / 255, 209 / 255, 204 / 255 ],
8988 mediumvioletred: [ 199 / 255, 21 / 255, 133 / 255 ],
8989 midnightblue: [ 25 / 255, 25 / 255, 112 / 255 ],
8990 mintcream: [ 245 / 255, 1, 250 / 255 ],
8991 mistyrose: [ 1, 228 / 255, 225 / 255 ],
8992 moccasin: [ 1, 228 / 255, 181 / 255 ],
8993 navajowhite: [ 1, 222 / 255, 173 / 255 ],
8994 navy: [ 0, 0, 128 / 255 ],
8995 oldlace: [ 253 / 255, 245 / 255, 230 / 255 ],
8996 olive: [ 128 / 255, 128 / 255, 0 ],
8997 olivedrab: [ 107 / 255, 142 / 255, 35 / 255 ],
8998 orange: [ 1, 165 / 255, 0 ],
8999 orangered: [ 1, 69 / 255, 0 ],
9000 orchid: [ 218 / 255, 112 / 255, 214 / 255 ],
9001 palegoldenrod: [ 238 / 255, 232 / 255, 170 / 255 ],
9002 palegreen: [ 152 / 255, 251 / 255, 152 / 255 ],
9003 paleturquoise: [ 175 / 255, 238 / 255, 238 / 255 ],
9004 palevioletred: [ 219 / 255, 112 / 255, 147 / 255 ],
9005 papayawhip: [ 1, 239 / 255, 213 / 255 ],
9006 peachpuff: [ 1, 218 / 255, 185 / 255 ],
9007 peru: [ 205 / 255, 133 / 255, 63 / 255 ],
9008 pink: [ 1, 192 / 255, 203 / 255 ],
9009 plum: [ 221 / 255, 160 / 255, 221 / 255 ],
9010 powderblue: [ 176 / 255, 224 / 255, 230 / 255 ],
9011 purple: [ 128 / 255, 0, 128 / 255 ],
9012 rebeccapurple: [ 102 / 255, 51 / 255, 153 / 255 ],
9013 red: [ 1, 0, 0 ],
9014 rosybrown: [ 188 / 255, 143 / 255, 143 / 255 ],
9015 royalblue: [ 65 / 255, 105 / 255, 225 / 255 ],
9016 saddlebrown: [ 139 / 255, 69 / 255, 19 / 255 ],
9017 salmon: [ 250 / 255, 128 / 255, 114 / 255 ],
9018 sandybrown: [ 244 / 255, 164 / 255, 96 / 255 ],
9019 seagreen: [ 46 / 255, 139 / 255, 87 / 255 ],
9020 seashell: [ 1, 245 / 255, 238 / 255 ],
9021 sienna: [ 160 / 255, 82 / 255, 45 / 255 ],
9022 silver: [ 192 / 255, 192 / 255, 192 / 255 ],
9023 skyblue: [ 135 / 255, 206 / 255, 235 / 255 ],
9024 slateblue: [ 106 / 255, 90 / 255, 205 / 255 ],
9025 slategray: [ 112 / 255, 128 / 255, 144 / 255 ],
9026 slategrey: [ 112 / 255, 128 / 255, 144 / 255 ],
9027 snow: [ 1, 250 / 255, 250 / 255 ],
9028 springgreen: [ 0, 1, 127 / 255 ],
9029 steelblue: [ 70 / 255, 130 / 255, 180 / 255 ],
9030 tan: [ 210 / 255, 180 / 255, 140 / 255 ],
9031 teal: [ 0, 128 / 255, 128 / 255 ],
9032 thistle: [ 216 / 255, 191 / 255, 216 / 255 ],
9033 tomato: [ 1, 99 / 255, 71 / 255 ],
9034 turquoise: [ 64 / 255, 224 / 255, 208 / 255 ],
9035 violet: [ 238 / 255, 130 / 255, 238 / 255 ],
9036 wheat: [ 245 / 255, 222 / 255, 179 / 255 ],
9037 white: [ 1, 1, 1 ],
9038 whitesmoke: [ 245 / 255, 245 / 255, 245 / 255 ],
9039 yellow: [ 1, 1, 0 ],
9040 yellowgreen: [ 154 / 255, 205 / 255, 50 / 255 ]
9041 };
9042 var coordGrammar = Array(3).fill('<percentage> | <number>[0, 255]');
9043 var coordGrammarNumber = Array(3).fill('<number>[0, 255]');
9044 var sRGB = new RGBColorSpace({
9045 id: 'srgb',
9046 name: 'sRGB',
9047 base: sRGBLinear,
9048 fromBase: function fromBase(rgb) {
9049 return rgb.map(function(val) {
9050 var sign = val < 0 ? -1 : 1;
9051 var abs = val * sign;
9052 if (abs > .0031308) {
9053 return sign * (1.055 * Math.pow(abs, 1 / 2.4) - .055);
9054 }
9055 return 12.92 * val;
9056 });
9057 },
9058 toBase: function toBase(rgb) {
9059 return rgb.map(function(val) {
9060 var sign = val < 0 ? -1 : 1;
9061 var abs = val * sign;
9062 if (abs < .04045) {
9063 return val / 12.92;
9064 }
9065 return sign * Math.pow((abs + .055) / 1.055, 2.4);
9066 });
9067 },
9068 formats: {
9069 rgb: {
9070 coords: coordGrammar
9071 },
9072 rgb_number: {
9073 name: 'rgb',
9074 commas: true,
9075 coords: coordGrammarNumber,
9076 noAlpha: true
9077 },
9078 color: {},
9079 rgba: {
9080 coords: coordGrammar,
9081 commas: true,
9082 lastAlpha: true
9083 },
9084 rgba_number: {
9085 name: 'rgba',
9086 commas: true,
9087 coords: coordGrammarNumber
9088 },
9089 hex: {
9090 type: 'custom',
9091 toGamut: true,
9092 test: function test(str) {
9093 return /^#([a-f0-9]{3,4}){1,2}$/i.test(str);
9094 },
9095 parse: function parse(str) {
9096 if (str.length <= 5) {
9097 str = str.replace(/[a-f0-9]/gi, '$&$&');
9098 }
9099 var rgba = [];
9100 str.replace(/[a-f0-9]{2}/gi, function(component) {
9101 rgba.push(parseInt(component, 16) / 255);
9102 });
9103 return {
9104 spaceId: 'srgb',
9105 coords: rgba.slice(0, 3),
9106 alpha: rgba.slice(3)[0]
9107 };
9108 },
9109 serialize: function serialize(coords, alpha) {
9110 var _ref13 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, _ref13$collapse = _ref13.collapse, collapse = _ref13$collapse === void 0 ? true : _ref13$collapse;
9111 if (alpha < 1) {
9112 coords.push(alpha);
9113 }
9114 coords = coords.map(function(c4) {
9115 return Math.round(c4 * 255);
9116 });
9117 var collapsible = collapse && coords.every(function(c4) {
9118 return c4 % 17 === 0;
9119 });
9120 var hex = coords.map(function(c4) {
9121 if (collapsible) {
9122 return (c4 / 17).toString(16);
9123 }
9124 return c4.toString(16).padStart(2, '0');
9125 }).join('');
9126 return '#' + hex;
9127 }
9128 },
9129 keyword: {
9130 type: 'custom',
9131 test: function test(str) {
9132 return /^[a-z]+$/i.test(str);
9133 },
9134 parse: function parse(str) {
9135 str = str.toLowerCase();
9136 var ret = {
9137 spaceId: 'srgb',
9138 coords: null,
9139 alpha: 1
9140 };
9141 if (str === 'transparent') {
9142 ret.coords = KEYWORDS.black;
9143 ret.alpha = 0;
9144 } else {
9145 ret.coords = KEYWORDS[str];
9146 }
9147 if (ret.coords) {
9148 return ret;
9149 }
9150 }
9151 }
9152 }
9153 });
9154 var P3 = new RGBColorSpace({
9155 id: 'p3',
9156 name: 'P3',
9157 base: P3Linear,
9158 fromBase: sRGB.fromBase,
9159 toBase: sRGB.toBase,
9160 formats: {
9161 color: {
9162 id: 'display-p3'
9163 }
9164 }
9165 });
9166 defaults.display_space = sRGB;
9167 if (typeof CSS !== 'undefined' && (_CSS = CSS) !== null && _CSS !== void 0 && _CSS.supports) {
9168 for (var _i4 = 0, _arr = [ lab, REC2020, P3 ]; _i4 < _arr.length; _i4++) {
9169 var space = _arr[_i4];
9170 var coords = space.getMinCoords();
9171 var color = {
9172 space: space,
9173 coords: coords,
9174 alpha: 1
9175 };
9176 var str = serialize(color);
9177 if (CSS.supports('color', str)) {
9178 defaults.display_space = space;
9179 break;
9180 }
9181 }
9182 }
9183 function _display(color) {
9184 var _CSS2;
9185 var _ref14 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9186 var _ref14$space = _ref14.space, space = _ref14$space === void 0 ? defaults.display_space : _ref14$space, options = _objectWithoutProperties(_ref14, _excluded2);
9187 var ret = serialize(color, options);
9188 if (typeof CSS === 'undefined' || (_CSS2 = CSS) !== null && _CSS2 !== void 0 && _CSS2.supports('color', ret) || !defaults.display_space) {
9189 ret = new String(ret);
9190 ret.color = color;
9191 } else {
9192 var fallbackColor = to(color, space);
9193 ret = new String(serialize(fallbackColor, options));
9194 ret.color = fallbackColor;
9195 }
9196 return ret;
9197 }
9198 function distance(color1, color2) {
9199 var space = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'lab';
9200 space = ColorSpace.get(space);
9201 var coords1 = space.from(color1);
9202 var coords2 = space.from(color2);
9203 return Math.sqrt(coords1.reduce(function(acc, c12, i) {
9204 var c22 = coords2[i];
9205 if (isNaN(c12) || isNaN(c22)) {
9206 return acc;
9207 }
9208 return acc + Math.pow(c22 - c12, 2);
9209 }, 0));
9210 }
9211 function equals(color1, color2) {
9212 color1 = getColor(color1);
9213 color2 = getColor(color2);
9214 return color1.space === color2.space && color1.alpha === color2.alpha && color1.coords.every(function(c4, i) {
9215 return c4 === color2.coords[i];
9216 });
9217 }
9218 function getLuminance(color) {
9219 return get(color, [ XYZ_D65, 'y' ]);
9220 }
9221 function setLuminance(color, value) {
9222 set(color, [ XYZ_D65, 'y' ], value);
9223 }
9224 function register$2(Color3) {
9225 Object.defineProperty(Color3.prototype, 'luminance', {
9226 get: function get() {
9227 return getLuminance(this);
9228 },
9229 set: function set(value) {
9230 setLuminance(this, value);
9231 }
9232 });
9233 }
9234 var luminance = Object.freeze({
9235 __proto__: null,
9236 getLuminance: getLuminance,
9237 setLuminance: setLuminance,
9238 register: register$2
9239 });
9240 function contrastWCAG21(color1, color2) {
9241 color1 = getColor(color1);
9242 color2 = getColor(color2);
9243 var Y1 = Math.max(getLuminance(color1), 0);
9244 var Y2 = Math.max(getLuminance(color2), 0);
9245 if (Y2 > Y1) {
9246 var _ref15 = [ Y2, Y1 ];
9247 Y1 = _ref15[0];
9248 Y2 = _ref15[1];
9249 }
9250 return (Y1 + .05) / (Y2 + .05);
9251 }
9252 var normBG = .56;
9253 var normTXT = .57;
9254 var revTXT = .62;
9255 var revBG = .65;
9256 var blkThrs = .022;
9257 var blkClmp = 1.414;
9258 var loClip = .1;
9259 var deltaYmin = 5e-4;
9260 var scaleBoW = 1.14;
9261 var loBoWoffset = .027;
9262 var scaleWoB = 1.14;
9263 function fclamp(Y) {
9264 if (Y >= blkThrs) {
9265 return Y;
9266 }
9267 return Y + Math.pow(blkThrs - Y, blkClmp);
9268 }
9269 function linearize(val) {
9270 var sign = val < 0 ? -1 : 1;
9271 var abs = Math.abs(val);
9272 return sign * Math.pow(abs, 2.4);
9273 }
9274 function contrastAPCA(background, foreground) {
9275 foreground = getColor(foreground);
9276 background = getColor(background);
9277 var S;
9278 var C;
9279 var Sapc;
9280 var R, G, B;
9281 foreground = to(foreground, 'srgb');
9282 var _foreground$coords = _slicedToArray(foreground.coords, 3);
9283 R = _foreground$coords[0];
9284 G = _foreground$coords[1];
9285 B = _foreground$coords[2];
9286 var lumTxt = linearize(R) * .2126729 + linearize(G) * .7151522 + linearize(B) * .072175;
9287 background = to(background, 'srgb');
9288 var _background$coords = _slicedToArray(background.coords, 3);
9289 R = _background$coords[0];
9290 G = _background$coords[1];
9291 B = _background$coords[2];
9292 var lumBg = linearize(R) * .2126729 + linearize(G) * .7151522 + linearize(B) * .072175;
9293 var Ytxt = fclamp(lumTxt);
9294 var Ybg = fclamp(lumBg);
9295 var BoW = Ybg > Ytxt;
9296 if (Math.abs(Ybg - Ytxt) < deltaYmin) {
9297 C = 0;
9298 } else {
9299 if (BoW) {
9300 S = Math.pow(Ybg, normBG) - Math.pow(Ytxt, normTXT);
9301 C = S * scaleBoW;
9302 } else {
9303 S = Math.pow(Ybg, revBG) - Math.pow(Ytxt, revTXT);
9304 C = S * scaleWoB;
9305 }
9306 }
9307 if (Math.abs(C) < loClip) {
9308 Sapc = 0;
9309 } else if (C > 0) {
9310 Sapc = C - loBoWoffset;
9311 } else {
9312 Sapc = C + loBoWoffset;
9313 }
9314 return Sapc * 100;
9315 }
9316 function contrastMichelson(color1, color2) {
9317 color1 = getColor(color1);
9318 color2 = getColor(color2);
9319 var Y1 = Math.max(getLuminance(color1), 0);
9320 var Y2 = Math.max(getLuminance(color2), 0);
9321 if (Y2 > Y1) {
9322 var _ref16 = [ Y2, Y1 ];
9323 Y1 = _ref16[0];
9324 Y2 = _ref16[1];
9325 }
9326 var denom = Y1 + Y2;
9327 return denom === 0 ? 0 : (Y1 - Y2) / denom;
9328 }
9329 var max = 5e4;
9330 function contrastWeber(color1, color2) {
9331 color1 = getColor(color1);
9332 color2 = getColor(color2);
9333 var Y1 = Math.max(getLuminance(color1), 0);
9334 var Y2 = Math.max(getLuminance(color2), 0);
9335 if (Y2 > Y1) {
9336 var _ref17 = [ Y2, Y1 ];
9337 Y1 = _ref17[0];
9338 Y2 = _ref17[1];
9339 }
9340 return Y2 === 0 ? max : (Y1 - Y2) / Y2;
9341 }
9342 function contrastLstar(color1, color2) {
9343 color1 = getColor(color1);
9344 color2 = getColor(color2);
9345 var L1 = get(color1, [ lab, 'l' ]);
9346 var L2 = get(color2, [ lab, 'l' ]);
9347 return Math.abs(L1 - L2);
9348 }
9349 var \u03b5$1 = 216 / 24389;
9350 var \u03b53 = 24 / 116;
9351 var \u03ba = 24389 / 27;
9352 var white = WHITES.D65;
9353 var lab_d65 = new ColorSpace({
9354 id: 'lab-d65',
9355 name: 'Lab D65',
9356 coords: {
9357 l: {
9358 refRange: [ 0, 100 ],
9359 name: 'L'
9360 },
9361 a: {
9362 refRange: [ -125, 125 ]
9363 },
9364 b: {
9365 refRange: [ -125, 125 ]
9366 }
9367 },
9368 white: white,
9369 base: XYZ_D65,
9370 fromBase: function fromBase(XYZ) {
9371 var xyz = XYZ.map(function(value, i) {
9372 return value / white[i];
9373 });
9374 var f = xyz.map(function(value) {
9375 return value > \u03b5$1 ? Math.cbrt(value) : (\u03ba * value + 16) / 116;
9376 });
9377 return [ 116 * f[1] - 16, 500 * (f[0] - f[1]), 200 * (f[1] - f[2]) ];
9378 },
9379 toBase: function toBase(Lab) {
9380 var f = [];
9381 f[1] = (Lab[0] + 16) / 116;
9382 f[0] = Lab[1] / 500 + f[1];
9383 f[2] = f[1] - Lab[2] / 200;
9384 var xyz = [ f[0] > \u03b53 ? Math.pow(f[0], 3) : (116 * f[0] - 16) / \u03ba, Lab[0] > 8 ? Math.pow((Lab[0] + 16) / 116, 3) : Lab[0] / \u03ba, f[2] > \u03b53 ? Math.pow(f[2], 3) : (116 * f[2] - 16) / \u03ba ];
9385 return xyz.map(function(value, i) {
9386 return value * white[i];
9387 });
9388 },
9389 formats: {
9390 'lab-d65': {
9391 coords: [ '<number> | <percentage>', '<number>', '<number>' ]
9392 }
9393 }
9394 });
9395 var phi = Math.pow(5, .5) * .5 + .5;
9396 function contrastDeltaPhi(color1, color2) {
9397 color1 = getColor(color1);
9398 color2 = getColor(color2);
9399 var Lstr1 = get(color1, [ lab_d65, 'l' ]);
9400 var Lstr2 = get(color2, [ lab_d65, 'l' ]);
9401 var deltaPhiStar = Math.abs(Math.pow(Lstr1, phi) - Math.pow(Lstr2, phi));
9402 var contrast2 = Math.pow(deltaPhiStar, 1 / phi) * Math.SQRT2 - 40;
9403 return contrast2 < 7.5 ? 0 : contrast2;
9404 }
9405 var contrastMethods = Object.freeze({
9406 __proto__: null,
9407 contrastWCAG21: contrastWCAG21,
9408 contrastAPCA: contrastAPCA,
9409 contrastMichelson: contrastMichelson,
9410 contrastWeber: contrastWeber,
9411 contrastLstar: contrastLstar,
9412 contrastDeltaPhi: contrastDeltaPhi
9413 });
9414 function contrast(background, foreground) {
9415 var o = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
9416 if (isString(o)) {
9417 o = {
9418 algorithm: o
9419 };
9420 }
9421 var _o = o, algorithm = _o.algorithm, rest = _objectWithoutProperties(_o, _excluded3);
9422 if (!algorithm) {
9423 var algorithms = Object.keys(contrastMethods).map(function(a2) {
9424 return a2.replace(/^contrast/, '');
9425 }).join(', ');
9426 throw new TypeError('contrast() function needs a contrast algorithm. Please specify one of: '.concat(algorithms));
9427 }
9428 background = getColor(background);
9429 foreground = getColor(foreground);
9430 for (var a2 in contrastMethods) {
9431 if ('contrast' + algorithm.toLowerCase() === a2.toLowerCase()) {
9432 return contrastMethods[a2](background, foreground, rest);
9433 }
9434 }
9435 throw new TypeError('Unknown contrast algorithm: '.concat(algorithm));
9436 }
9437 function uv(color) {
9438 var _getAll = getAll(color, XYZ_D65), _getAll2 = _slicedToArray(_getAll, 3), X = _getAll2[0], Y = _getAll2[1], Z = _getAll2[2];
9439 var denom = X + 15 * Y + 3 * Z;
9440 return [ 4 * X / denom, 9 * Y / denom ];
9441 }
9442 function xy(color) {
9443 var _getAll3 = getAll(color, XYZ_D65), _getAll4 = _slicedToArray(_getAll3, 3), X = _getAll4[0], Y = _getAll4[1], Z = _getAll4[2];
9444 var sum = X + Y + Z;
9445 return [ X / sum, Y / sum ];
9446 }
9447 function register$1(Color3) {
9448 Object.defineProperty(Color3.prototype, 'uv', {
9449 get: function get() {
9450 return uv(this);
9451 }
9452 });
9453 Object.defineProperty(Color3.prototype, 'xy', {
9454 get: function get() {
9455 return xy(this);
9456 }
9457 });
9458 }
9459 var chromaticity = Object.freeze({
9460 __proto__: null,
9461 uv: uv,
9462 xy: xy,
9463 register: register$1
9464 });
9465 function deltaE76(color, sample) {
9466 return distance(color, sample, 'lab');
9467 }
9468 var \u03c0 = Math.PI;
9469 var d2r = \u03c0 / 180;
9470 function deltaECMC(color, sample) {
9471 var _ref18 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, _ref18$l = _ref18.l, l = _ref18$l === void 0 ? 2 : _ref18$l, _ref18$c = _ref18.c, c4 = _ref18$c === void 0 ? 1 : _ref18$c;
9472 var _lab$from5 = lab.from(color), _lab$from6 = _slicedToArray(_lab$from5, 3), L1 = _lab$from6[0], a1 = _lab$from6[1], b1 = _lab$from6[2];
9473 var _lch$from = lch.from(lab, [ L1, a1, b1 ]), _lch$from2 = _slicedToArray(_lch$from, 3), C1 = _lch$from2[1], H1 = _lch$from2[2];
9474 var _lab$from7 = lab.from(sample), _lab$from8 = _slicedToArray(_lab$from7, 3), L2 = _lab$from8[0], a2 = _lab$from8[1], b2 = _lab$from8[2];
9475 var C2 = lch.from(lab, [ L2, a2, b2 ])[1];
9476 if (C1 < 0) {
9477 C1 = 0;
9478 }
9479 if (C2 < 0) {
9480 C2 = 0;
9481 }
9482 var \u0394L = L1 - L2;
9483 var \u0394C = C1 - C2;
9484 var \u0394a = a1 - a2;
9485 var \u0394b = b1 - b2;
9486 var H2 = Math.pow(\u0394a, 2) + Math.pow(\u0394b, 2) - Math.pow(\u0394C, 2);
9487 var SL = .511;
9488 if (L1 >= 16) {
9489 SL = .040975 * L1 / (1 + .01765 * L1);
9490 }
9491 var SC = .0638 * C1 / (1 + .0131 * C1) + .638;
9492 var T;
9493 if (Number.isNaN(H1)) {
9494 H1 = 0;
9495 }
9496 if (H1 >= 164 && H1 <= 345) {
9497 T = .56 + Math.abs(.2 * Math.cos((H1 + 168) * d2r));
9498 } else {
9499 T = .36 + Math.abs(.4 * Math.cos((H1 + 35) * d2r));
9500 }
9501 var C4 = Math.pow(C1, 4);
9502 var F = Math.sqrt(C4 / (C4 + 1900));
9503 var SH = SC * (F * T + 1 - F);
9504 var dE = Math.pow(\u0394L / (l * SL), 2);
9505 dE += Math.pow(\u0394C / (c4 * SC), 2);
9506 dE += H2 / Math.pow(SH, 2);
9507 return Math.sqrt(dE);
9508 }
9509 var Yw$1 = 203;
9510 var XYZ_Abs_D65 = new ColorSpace({
9511 id: 'xyz-abs-d65',
9512 name: 'Absolute XYZ D65',
9513 coords: {
9514 x: {
9515 refRange: [ 0, 9504.7 ],
9516 name: 'Xa'
9517 },
9518 y: {
9519 refRange: [ 0, 1e4 ],
9520 name: 'Ya'
9521 },
9522 z: {
9523 refRange: [ 0, 10888.3 ],
9524 name: 'Za'
9525 }
9526 },
9527 base: XYZ_D65,
9528 fromBase: function fromBase(XYZ) {
9529 return XYZ.map(function(v) {
9530 return Math.max(v * Yw$1, 0);
9531 });
9532 },
9533 toBase: function toBase(AbsXYZ) {
9534 return AbsXYZ.map(function(v) {
9535 return Math.max(v / Yw$1, 0);
9536 });
9537 }
9538 });
9539 var b$1 = 1.15;
9540 var g = .66;
9541 var n$1 = 2610 / Math.pow(2, 14);
9542 var ninv$1 = Math.pow(2, 14) / 2610;
9543 var c1$2 = 3424 / Math.pow(2, 12);
9544 var c2$2 = 2413 / Math.pow(2, 7);
9545 var c3$2 = 2392 / Math.pow(2, 7);
9546 var p = 1.7 * 2523 / Math.pow(2, 5);
9547 var pinv = Math.pow(2, 5) / (1.7 * 2523);
9548 var d = -.56;
9549 var d0 = 16295499532821565e-27;
9550 var XYZtoCone_M = [ [ .41478972, .579999, .014648 ], [ -.20151, 1.120649, .0531008 ], [ -.0166008, .2648, .6684799 ] ];
9551 var ConetoXYZ_M = [ [ 1.9242264357876067, -1.0047923125953657, .037651404030618 ], [ .35031676209499907, .7264811939316552, -.06538442294808501 ], [ -.09098281098284752, -.3127282905230739, 1.5227665613052603 ] ];
9552 var ConetoIab_M = [ [ .5, .5, 0 ], [ 3.524, -4.066708, .542708 ], [ .199076, 1.096799, -1.295875 ] ];
9553 var IabtoCone_M = [ [ 1, .1386050432715393, .05804731615611886 ], [ .9999999999999999, -.1386050432715393, -.05804731615611886 ], [ .9999999999999998, -.09601924202631895, -.8118918960560388 ] ];
9554 var Jzazbz = new ColorSpace({
9555 id: 'jzazbz',
9556 name: 'Jzazbz',
9557 coords: {
9558 jz: {
9559 refRange: [ 0, 1 ],
9560 name: 'Jz'
9561 },
9562 az: {
9563 refRange: [ -.5, .5 ]
9564 },
9565 bz: {
9566 refRange: [ -.5, .5 ]
9567 }
9568 },
9569 base: XYZ_Abs_D65,
9570 fromBase: function fromBase(XYZ) {
9571 var _XYZ = _slicedToArray(XYZ, 3), Xa = _XYZ[0], Ya = _XYZ[1], Za = _XYZ[2];
9572 var Xm = b$1 * Xa - (b$1 - 1) * Za;
9573 var Ym = g * Ya - (g - 1) * Xa;
9574 var LMS = multiplyMatrices(XYZtoCone_M, [ Xm, Ym, Za ]);
9575 var PQLMS = LMS.map(function(val) {
9576 var num = c1$2 + c2$2 * Math.pow(val / 1e4, n$1);
9577 var denom = 1 + c3$2 * Math.pow(val / 1e4, n$1);
9578 return Math.pow(num / denom, p);
9579 });
9580 var _multiplyMatrices = multiplyMatrices(ConetoIab_M, PQLMS), _multiplyMatrices2 = _slicedToArray(_multiplyMatrices, 3), Iz = _multiplyMatrices2[0], az = _multiplyMatrices2[1], bz = _multiplyMatrices2[2];
9581 var Jz = (1 + d) * Iz / (1 + d * Iz) - d0;
9582 return [ Jz, az, bz ];
9583 },
9584 toBase: function toBase(Jzazbz2) {
9585 var _Jzazbz = _slicedToArray(Jzazbz2, 3), Jz = _Jzazbz[0], az = _Jzazbz[1], bz = _Jzazbz[2];
9586 var Iz = (Jz + d0) / (1 + d - d * (Jz + d0));
9587 var PQLMS = multiplyMatrices(IabtoCone_M, [ Iz, az, bz ]);
9588 var LMS = PQLMS.map(function(val) {
9589 var num = c1$2 - Math.pow(val, pinv);
9590 var denom = c3$2 * Math.pow(val, pinv) - c2$2;
9591 var x = 1e4 * Math.pow(num / denom, ninv$1);
9592 return x;
9593 });
9594 var _multiplyMatrices3 = multiplyMatrices(ConetoXYZ_M, LMS), _multiplyMatrices4 = _slicedToArray(_multiplyMatrices3, 3), Xm = _multiplyMatrices4[0], Ym = _multiplyMatrices4[1], Za = _multiplyMatrices4[2];
9595 var Xa = (Xm + (b$1 - 1) * Za) / b$1;
9596 var Ya = (Ym + (g - 1) * Xa) / g;
9597 return [ Xa, Ya, Za ];
9598 },
9599 formats: {
9600 color: {}
9601 }
9602 });
9603 var jzczhz = new ColorSpace({
9604 id: 'jzczhz',
9605 name: 'JzCzHz',
9606 coords: {
9607 jz: {
9608 refRange: [ 0, 1 ],
9609 name: 'Jz'
9610 },
9611 cz: {
9612 refRange: [ 0, 1 ],
9613 name: 'Chroma'
9614 },
9615 hz: {
9616 refRange: [ 0, 360 ],
9617 type: 'angle',
9618 name: 'Hue'
9619 }
9620 },
9621 base: Jzazbz,
9622 fromBase: function fromBase(jzazbz) {
9623 var _jzazbz = _slicedToArray(jzazbz, 3), Jz = _jzazbz[0], az = _jzazbz[1], bz = _jzazbz[2];
9624 var hue;
9625 var \u03b52 = 2e-4;
9626 if (Math.abs(az) < \u03b52 && Math.abs(bz) < \u03b52) {
9627 hue = NaN;
9628 } else {
9629 hue = Math.atan2(bz, az) * 180 / Math.PI;
9630 }
9631 return [ Jz, Math.sqrt(Math.pow(az, 2) + Math.pow(bz, 2)), constrain(hue) ];
9632 },
9633 toBase: function toBase(jzczhz2) {
9634 return [ jzczhz2[0], jzczhz2[1] * Math.cos(jzczhz2[2] * Math.PI / 180), jzczhz2[1] * Math.sin(jzczhz2[2] * Math.PI / 180) ];
9635 },
9636 formats: {
9637 color: {}
9638 }
9639 });
9640 function deltaEJz(color, sample) {
9641 var _jzczhz$from = jzczhz.from(color), _jzczhz$from2 = _slicedToArray(_jzczhz$from, 3), Jz1 = _jzczhz$from2[0], Cz1 = _jzczhz$from2[1], Hz1 = _jzczhz$from2[2];
9642 var _jzczhz$from3 = jzczhz.from(sample), _jzczhz$from4 = _slicedToArray(_jzczhz$from3, 3), Jz2 = _jzczhz$from4[0], Cz2 = _jzczhz$from4[1], Hz2 = _jzczhz$from4[2];
9643 var \u0394J = Jz1 - Jz2;
9644 var \u0394C = Cz1 - Cz2;
9645 if (Number.isNaN(Hz1) && Number.isNaN(Hz2)) {
9646 Hz1 = 0;
9647 Hz2 = 0;
9648 } else if (Number.isNaN(Hz1)) {
9649 Hz1 = Hz2;
9650 } else if (Number.isNaN(Hz2)) {
9651 Hz2 = Hz1;
9652 }
9653 var \u0394h = Hz1 - Hz2;
9654 var \u0394H = 2 * Math.sqrt(Cz1 * Cz2) * Math.sin(\u0394h / 2 * (Math.PI / 180));
9655 return Math.sqrt(Math.pow(\u0394J, 2) + Math.pow(\u0394C, 2) + Math.pow(\u0394H, 2));
9656 }
9657 var c1$1 = 3424 / 4096;
9658 var c2$1 = 2413 / 128;
9659 var c3$1 = 2392 / 128;
9660 var m1 = 2610 / 16384;
9661 var m2 = 2523 / 32;
9662 var im1 = 16384 / 2610;
9663 var im2 = 32 / 2523;
9664 var XYZtoLMS_M$1 = [ [ .3592, .6976, -.0358 ], [ -.1922, 1.1004, .0755 ], [ .007, .0749, .8434 ] ];
9665 var LMStoIPT_M = [ [ 2048 / 4096, 2048 / 4096, 0 ], [ 6610 / 4096, -13613 / 4096, 7003 / 4096 ], [ 17933 / 4096, -17390 / 4096, -543 / 4096 ] ];
9666 var IPTtoLMS_M = [ [ .9999888965628402, .008605050147287059, .11103437159861648 ], [ 1.00001110343716, -.008605050147287059, -.11103437159861648 ], [ 1.0000320633910054, .56004913547279, -.3206339100541203 ] ];
9667 var LMStoXYZ_M$1 = [ [ 2.0701800566956137, -1.326456876103021, .20661600684785517 ], [ .3649882500326575, .6804673628522352, -.04542175307585323 ], [ -.04959554223893211, -.04942116118675749, 1.1879959417328034 ] ];
9668 var ictcp = new ColorSpace({
9669 id: 'ictcp',
9670 name: 'ICTCP',
9671 coords: {
9672 i: {
9673 refRange: [ 0, 1 ],
9674 name: 'I'
9675 },
9676 ct: {
9677 refRange: [ -.5, .5 ],
9678 name: 'CT'
9679 },
9680 cp: {
9681 refRange: [ -.5, .5 ],
9682 name: 'CP'
9683 }
9684 },
9685 base: XYZ_Abs_D65,
9686 fromBase: function fromBase(XYZ) {
9687 var LMS = multiplyMatrices(XYZtoLMS_M$1, XYZ);
9688 return LMStoICtCp(LMS);
9689 },
9690 toBase: function toBase(ICtCp) {
9691 var LMS = ICtCptoLMS(ICtCp);
9692 return multiplyMatrices(LMStoXYZ_M$1, LMS);
9693 },
9694 formats: {
9695 color: {}
9696 }
9697 });
9698 function LMStoICtCp(LMS) {
9699 var PQLMS = LMS.map(function(val) {
9700 var num = c1$1 + c2$1 * Math.pow(val / 1e4, m1);
9701 var denom = 1 + c3$1 * Math.pow(val / 1e4, m1);
9702 return Math.pow(num / denom, m2);
9703 });
9704 return multiplyMatrices(LMStoIPT_M, PQLMS);
9705 }
9706 function ICtCptoLMS(ICtCp) {
9707 var PQLMS = multiplyMatrices(IPTtoLMS_M, ICtCp);
9708 var LMS = PQLMS.map(function(val) {
9709 var num = Math.max(Math.pow(val, im2) - c1$1, 0);
9710 var denom = c2$1 - c3$1 * Math.pow(val, im2);
9711 return 1e4 * Math.pow(num / denom, im1);
9712 });
9713 return LMS;
9714 }
9715 function deltaEITP(color, sample) {
9716 var _ictcp$from = ictcp.from(color), _ictcp$from2 = _slicedToArray(_ictcp$from, 3), I1 = _ictcp$from2[0], T1 = _ictcp$from2[1], P1 = _ictcp$from2[2];
9717 var _ictcp$from3 = ictcp.from(sample), _ictcp$from4 = _slicedToArray(_ictcp$from3, 3), I2 = _ictcp$from4[0], T2 = _ictcp$from4[1], P2 = _ictcp$from4[2];
9718 return 720 * Math.sqrt(Math.pow(I1 - I2, 2) + .25 * Math.pow(T1 - T2, 2) + Math.pow(P1 - P2, 2));
9719 }
9720 var XYZtoLMS_M = [ [ .8190224432164319, .3619062562801221, -.12887378261216414 ], [ .0329836671980271, .9292868468965546, .03614466816999844 ], [ .048177199566046255, .26423952494422764, .6335478258136937 ] ];
9721 var LMStoXYZ_M = [ [ 1.2268798733741557, -.5578149965554813, .28139105017721583 ], [ -.04057576262431372, 1.1122868293970594, -.07171106666151701 ], [ -.07637294974672142, -.4214933239627914, 1.5869240244272418 ] ];
9722 var LMStoLab_M = [ [ .2104542553, .793617785, -.0040720468 ], [ 1.9779984951, -2.428592205, .4505937099 ], [ .0259040371, .7827717662, -.808675766 ] ];
9723 var LabtoLMS_M = [ [ .9999999984505198, .39633779217376786, .2158037580607588 ], [ 1.0000000088817609, -.10556134232365635, -.06385417477170591 ], [ 1.0000000546724108, -.08948418209496575, -1.2914855378640917 ] ];
9724 var OKLab = new ColorSpace({
9725 id: 'oklab',
9726 name: 'OKLab',
9727 coords: {
9728 l: {
9729 refRange: [ 0, 1 ],
9730 name: 'L'
9731 },
9732 a: {
9733 refRange: [ -.4, .4 ]
9734 },
9735 b: {
9736 refRange: [ -.4, .4 ]
9737 }
9738 },
9739 white: 'D65',
9740 base: XYZ_D65,
9741 fromBase: function fromBase(XYZ) {
9742 var LMS = multiplyMatrices(XYZtoLMS_M, XYZ);
9743 var LMSg = LMS.map(function(val) {
9744 return Math.cbrt(val);
9745 });
9746 return multiplyMatrices(LMStoLab_M, LMSg);
9747 },
9748 toBase: function toBase(OKLab2) {
9749 var LMSg = multiplyMatrices(LabtoLMS_M, OKLab2);
9750 var LMS = LMSg.map(function(val) {
9751 return Math.pow(val, 3);
9752 });
9753 return multiplyMatrices(LMStoXYZ_M, LMS);
9754 },
9755 formats: {
9756 oklab: {
9757 coords: [ '<number> | <percentage>', '<number>', '<number>' ]
9758 }
9759 }
9760 });
9761 function deltaEOK(color, sample) {
9762 var _OKLab$from = OKLab.from(color), _OKLab$from2 = _slicedToArray(_OKLab$from, 3), L1 = _OKLab$from2[0], a1 = _OKLab$from2[1], b1 = _OKLab$from2[2];
9763 var _OKLab$from3 = OKLab.from(sample), _OKLab$from4 = _slicedToArray(_OKLab$from3, 3), L2 = _OKLab$from4[0], a2 = _OKLab$from4[1], b2 = _OKLab$from4[2];
9764 var \u0394L = L1 - L2;
9765 var \u0394a = a1 - a2;
9766 var \u0394b = b1 - b2;
9767 return Math.sqrt(Math.pow(\u0394L, 2) + Math.pow(\u0394a, 2) + Math.pow(\u0394b, 2));
9768 }
9769 var deltaEMethods = Object.freeze({
9770 __proto__: null,
9771 deltaE76: deltaE76,
9772 deltaECMC: deltaECMC,
9773 deltaE2000: deltaE2000,
9774 deltaEJz: deltaEJz,
9775 deltaEITP: deltaEITP,
9776 deltaEOK: deltaEOK
9777 });
9778 function deltaE(c12, c22) {
9779 var o = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
9780 if (isString(o)) {
9781 o = {
9782 method: o
9783 };
9784 }
9785 var _o2 = o, _o2$method = _o2.method, method = _o2$method === void 0 ? defaults.deltaE : _o2$method, rest = _objectWithoutProperties(_o2, _excluded4);
9786 c12 = getColor(c12);
9787 c22 = getColor(c22);
9788 for (var m3 in deltaEMethods) {
9789 if ('deltae' + method.toLowerCase() === m3.toLowerCase()) {
9790 return deltaEMethods[m3](c12, c22, rest);
9791 }
9792 }
9793 throw new TypeError('Unknown deltaE method: '.concat(method));
9794 }
9795 function lighten(color) {
9796 var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .25;
9797 var space = ColorSpace.get('oklch', 'lch');
9798 var lightness = [ space, 'l' ];
9799 return set(color, lightness, function(l) {
9800 return l * (1 + amount);
9801 });
9802 }
9803 function darken(color) {
9804 var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .25;
9805 var space = ColorSpace.get('oklch', 'lch');
9806 var lightness = [ space, 'l' ];
9807 return set(color, lightness, function(l) {
9808 return l * (1 - amount);
9809 });
9810 }
9811 var variations = Object.freeze({
9812 __proto__: null,
9813 lighten: lighten,
9814 darken: darken
9815 });
9816 function mix(c12, c22) {
9817 var p2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : .5;
9818 var o = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
9819 var _ref19 = [ getColor(c12), getColor(c22) ];
9820 c12 = _ref19[0];
9821 c22 = _ref19[1];
9822 if (type(p2) === 'object') {
9823 var _ref20 = [ .5, p2 ];
9824 p2 = _ref20[0];
9825 o = _ref20[1];
9826 }
9827 var _o3 = o, space = _o3.space, outputSpace = _o3.outputSpace, premultiplied = _o3.premultiplied;
9828 var r = range(c12, c22, {
9829 space: space,
9830 outputSpace: outputSpace,
9831 premultiplied: premultiplied
9832 });
9833 return r(p2);
9834 }
9835 function steps(c12, c22) {
9836 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
9837 var colorRange;
9838 if (isRange(c12)) {
9839 colorRange = c12;
9840 options = c22;
9841 var _colorRange$rangeArgs = _slicedToArray(colorRange.rangeArgs.colors, 2);
9842 c12 = _colorRange$rangeArgs[0];
9843 c22 = _colorRange$rangeArgs[1];
9844 }
9845 var _options = options, maxDeltaE = _options.maxDeltaE, deltaEMethod = _options.deltaEMethod, _options$steps = _options.steps, steps2 = _options$steps === void 0 ? 2 : _options$steps, _options$maxSteps = _options.maxSteps, maxSteps = _options$maxSteps === void 0 ? 1e3 : _options$maxSteps, rangeOptions = _objectWithoutProperties(_options, _excluded5);
9846 if (!colorRange) {
9847 var _ref21 = [ getColor(c12), getColor(c22) ];
9848 c12 = _ref21[0];
9849 c22 = _ref21[1];
9850 colorRange = range(c12, c22, rangeOptions);
9851 }
9852 var totalDelta = deltaE(c12, c22);
9853 var actualSteps = maxDeltaE > 0 ? Math.max(steps2, Math.ceil(totalDelta / maxDeltaE) + 1) : steps2;
9854 var ret = [];
9855 if (maxSteps !== void 0) {
9856 actualSteps = Math.min(actualSteps, maxSteps);
9857 }
9858 if (actualSteps === 1) {
9859 ret = [ {
9860 p: .5,
9861 color: colorRange(.5)
9862 } ];
9863 } else {
9864 var step = 1 / (actualSteps - 1);
9865 ret = Array.from({
9866 length: actualSteps
9867 }, function(_, i) {
9868 var p2 = i * step;
9869 return {
9870 p: p2,
9871 color: colorRange(p2)
9872 };
9873 });
9874 }
9875 if (maxDeltaE > 0) {
9876 var maxDelta = ret.reduce(function(acc, cur, i) {
9877 if (i === 0) {
9878 return 0;
9879 }
9880 var \u0394\u0395 = deltaE(cur.color, ret[i - 1].color, deltaEMethod);
9881 return Math.max(acc, \u0394\u0395);
9882 }, 0);
9883 while (maxDelta > maxDeltaE) {
9884 maxDelta = 0;
9885 for (var i = 1; i < ret.length && ret.length < maxSteps; i++) {
9886 var prev = ret[i - 1];
9887 var cur = ret[i];
9888 var p2 = (cur.p + prev.p) / 2;
9889 var _color = colorRange(p2);
9890 maxDelta = Math.max(maxDelta, deltaE(_color, prev.color), deltaE(_color, cur.color));
9891 ret.splice(i, 0, {
9892 p: p2,
9893 color: colorRange(p2)
9894 });
9895 i++;
9896 }
9897 }
9898 }
9899 ret = ret.map(function(a2) {
9900 return a2.color;
9901 });
9902 return ret;
9903 }
9904 function range(color1, color2) {
9905 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
9906 if (isRange(color1)) {
9907 var r = color1, options2 = color2;
9908 return range.apply(void 0, _toConsumableArray(r.rangeArgs.colors).concat([ _extends({}, r.rangeArgs.options, options2) ]));
9909 }
9910 var space = options.space, outputSpace = options.outputSpace, progression = options.progression, premultiplied = options.premultiplied;
9911 color1 = getColor(color1);
9912 color2 = getColor(color2);
9913 color1 = clone(color1);
9914 color2 = clone(color2);
9915 var rangeArgs = {
9916 colors: [ color1, color2 ],
9917 options: options
9918 };
9919 if (space) {
9920 space = ColorSpace.get(space);
9921 } else {
9922 space = ColorSpace.registry[defaults.interpolationSpace] || color1.space;
9923 }
9924 outputSpace = outputSpace ? ColorSpace.get(outputSpace) : space;
9925 color1 = to(color1, space);
9926 color2 = to(color2, space);
9927 color1 = toGamut(color1);
9928 color2 = toGamut(color2);
9929 if (space.coords.h && space.coords.h.type === 'angle') {
9930 var arc = options.hue = options.hue || 'shorter';
9931 var hue = [ space, 'h' ];
9932 var _ref22 = [ get(color1, hue), get(color2, hue) ], \u03b81 = _ref22[0], \u03b82 = _ref22[1];
9933 var _adjust = adjust(arc, [ \u03b81, \u03b82 ]);
9934 var _adjust2 = _slicedToArray(_adjust, 2);
9935 \u03b81 = _adjust2[0];
9936 \u03b82 = _adjust2[1];
9937 set(color1, hue, \u03b81);
9938 set(color2, hue, \u03b82);
9939 }
9940 if (premultiplied) {
9941 color1.coords = color1.coords.map(function(c4) {
9942 return c4 * color1.alpha;
9943 });
9944 color2.coords = color2.coords.map(function(c4) {
9945 return c4 * color2.alpha;
9946 });
9947 }
9948 return Object.assign(function(p2) {
9949 p2 = progression ? progression(p2) : p2;
9950 var coords = color1.coords.map(function(start, i) {
9951 var end = color2.coords[i];
9952 return interpolate(start, end, p2);
9953 });
9954 var alpha = interpolate(color1.alpha, color2.alpha, p2);
9955 var ret = {
9956 space: space,
9957 coords: coords,
9958 alpha: alpha
9959 };
9960 if (premultiplied) {
9961 ret.coords = ret.coords.map(function(c4) {
9962 return c4 / alpha;
9963 });
9964 }
9965 if (outputSpace !== space) {
9966 ret = to(ret, outputSpace);
9967 }
9968 return ret;
9969 }, {
9970 rangeArgs: rangeArgs
9971 });
9972 }
9973 function isRange(val) {
9974 return type(val) === 'function' && !!val.rangeArgs;
9975 }
9976 defaults.interpolationSpace = 'lab';
9977 function register(Color3) {
9978 Color3.defineFunction('mix', mix, {
9979 returns: 'color'
9980 });
9981 Color3.defineFunction('range', range, {
9982 returns: 'function<color>'
9983 });
9984 Color3.defineFunction('steps', steps, {
9985 returns: 'array<color>'
9986 });
9987 }
9988 var interpolation = Object.freeze({
9989 __proto__: null,
9990 mix: mix,
9991 steps: steps,
9992 range: range,
9993 isRange: isRange,
9994 register: register
9995 });
9996 var HSL = new ColorSpace({
9997 id: 'hsl',
9998 name: 'HSL',
9999 coords: {
10000 h: {
10001 refRange: [ 0, 360 ],
10002 type: 'angle',
10003 name: 'Hue'
10004 },
10005 s: {
10006 range: [ 0, 100 ],
10007 name: 'Saturation'
10008 },
10009 l: {
10010 range: [ 0, 100 ],
10011 name: 'Lightness'
10012 }
10013 },
10014 base: sRGB,
10015 fromBase: function fromBase(rgb) {
10016 var max2 = Math.max.apply(Math, _toConsumableArray(rgb));
10017 var min = Math.min.apply(Math, _toConsumableArray(rgb));
10018 var _rgb = _slicedToArray(rgb, 3), r = _rgb[0], g2 = _rgb[1], b2 = _rgb[2];
10019 var h = NaN, s = 0, l = (min + max2) / 2;
10020 var d2 = max2 - min;
10021 if (d2 !== 0) {
10022 s = l === 0 || l === 1 ? 0 : (max2 - l) / Math.min(l, 1 - l);
10023 switch (max2) {
10024 case r:
10025 h = (g2 - b2) / d2 + (g2 < b2 ? 6 : 0);
10026 break;
10027
10028 case g2:
10029 h = (b2 - r) / d2 + 2;
10030 break;
10031
10032 case b2:
10033 h = (r - g2) / d2 + 4;
10034 }
10035 h = h * 60;
10036 }
10037 return [ h, s * 100, l * 100 ];
10038 },
10039 toBase: function toBase(hsl) {
10040 var _hsl = _slicedToArray(hsl, 3), h = _hsl[0], s = _hsl[1], l = _hsl[2];
10041 h = h % 360;
10042 if (h < 0) {
10043 h += 360;
10044 }
10045 s /= 100;
10046 l /= 100;
10047 function f(n2) {
10048 var k = (n2 + h / 30) % 12;
10049 var a2 = s * Math.min(l, 1 - l);
10050 return l - a2 * Math.max(-1, Math.min(k - 3, 9 - k, 1));
10051 }
10052 return [ f(0), f(8), f(4) ];
10053 },
10054 formats: {
10055 hsl: {
10056 toGamut: true,
10057 coords: [ '<number> | <angle>', '<percentage>', '<percentage>' ]
10058 },
10059 hsla: {
10060 coords: [ '<number> | <angle>', '<percentage>', '<percentage>' ],
10061 commas: true,
10062 lastAlpha: true
10063 }
10064 }
10065 });
10066 var HSV = new ColorSpace({
10067 id: 'hsv',
10068 name: 'HSV',
10069 coords: {
10070 h: {
10071 refRange: [ 0, 360 ],
10072 type: 'angle',
10073 name: 'Hue'
10074 },
10075 s: {
10076 range: [ 0, 100 ],
10077 name: 'Saturation'
10078 },
10079 v: {
10080 range: [ 0, 100 ],
10081 name: 'Value'
10082 }
10083 },
10084 base: HSL,
10085 fromBase: function fromBase(hsl) {
10086 var _hsl2 = _slicedToArray(hsl, 3), h = _hsl2[0], s = _hsl2[1], l = _hsl2[2];
10087 s /= 100;
10088 l /= 100;
10089 var v = l + s * Math.min(l, 1 - l);
10090 return [ h, v === 0 ? 0 : 200 * (1 - l / v), 100 * v ];
10091 },
10092 toBase: function toBase(hsv) {
10093 var _hsv = _slicedToArray(hsv, 3), h = _hsv[0], s = _hsv[1], v = _hsv[2];
10094 s /= 100;
10095 v /= 100;
10096 var l = v * (1 - s / 2);
10097 return [ h, l === 0 || l === 1 ? 0 : (v - l) / Math.min(l, 1 - l) * 100, l * 100 ];
10098 },
10099 formats: {
10100 color: {
10101 toGamut: true
10102 }
10103 }
10104 });
10105 var hwb = new ColorSpace({
10106 id: 'hwb',
10107 name: 'HWB',
10108 coords: {
10109 h: {
10110 refRange: [ 0, 360 ],
10111 type: 'angle',
10112 name: 'Hue'
10113 },
10114 w: {
10115 range: [ 0, 100 ],
10116 name: 'Whiteness'
10117 },
10118 b: {
10119 range: [ 0, 100 ],
10120 name: 'Blackness'
10121 }
10122 },
10123 base: HSV,
10124 fromBase: function fromBase(hsv) {
10125 var _hsv2 = _slicedToArray(hsv, 3), h = _hsv2[0], s = _hsv2[1], v = _hsv2[2];
10126 return [ h, v * (100 - s) / 100, 100 - v ];
10127 },
10128 toBase: function toBase(hwb2) {
10129 var _hwb = _slicedToArray(hwb2, 3), h = _hwb[0], w = _hwb[1], b2 = _hwb[2];
10130 w /= 100;
10131 b2 /= 100;
10132 var sum = w + b2;
10133 if (sum >= 1) {
10134 var gray = w / sum;
10135 return [ h, 0, gray * 100 ];
10136 }
10137 var v = 1 - b2;
10138 var s = v === 0 ? 0 : 1 - w / v;
10139 return [ h, s * 100, v * 100 ];
10140 },
10141 formats: {
10142 hwb: {
10143 toGamut: true,
10144 coords: [ '<number> | <angle>', '<percentage>', '<percentage>' ]
10145 }
10146 }
10147 });
10148 var toXYZ_M$2 = [ [ .5766690429101305, .1855582379065463, .1882286462349947 ], [ .29734497525053605, .6273635662554661, .07529145849399788 ], [ .02703136138641234, .07068885253582723, .9913375368376388 ] ];
10149 var fromXYZ_M$2 = [ [ 2.0415879038107465, -.5650069742788596, -.34473135077832956 ], [ -.9692436362808795, 1.8759675015077202, .04155505740717557 ], [ .013444280632031142, -.11836239223101838, 1.0151749943912054 ] ];
10150 var A98Linear = new RGBColorSpace({
10151 id: 'a98rgb-linear',
10152 name: 'Linear Adobe\xae 98 RGB compatible',
10153 white: 'D65',
10154 toXYZ_M: toXYZ_M$2,
10155 fromXYZ_M: fromXYZ_M$2
10156 });
10157 var a98rgb = new RGBColorSpace({
10158 id: 'a98rgb',
10159 name: 'Adobe\xae 98 RGB compatible',
10160 base: A98Linear,
10161 toBase: function toBase(RGB) {
10162 return RGB.map(function(val) {
10163 return Math.pow(Math.abs(val), 563 / 256) * Math.sign(val);
10164 });
10165 },
10166 fromBase: function fromBase(RGB) {
10167 return RGB.map(function(val) {
10168 return Math.pow(Math.abs(val), 256 / 563) * Math.sign(val);
10169 });
10170 },
10171 formats: {
10172 color: {
10173 id: 'a98-rgb'
10174 }
10175 }
10176 });
10177 var toXYZ_M$1 = [ [ .7977604896723027, .13518583717574031, .0313493495815248 ], [ .2880711282292934, .7118432178101014, 8565396060525902e-20 ], [ 0, 0, .8251046025104601 ] ];
10178 var fromXYZ_M$1 = [ [ 1.3457989731028281, -.25558010007997534, -.05110628506753401 ], [ -.5446224939028347, 1.5082327413132781, .02053603239147973 ], [ 0, 0, 1.2119675456389454 ] ];
10179 var ProPhotoLinear = new RGBColorSpace({
10180 id: 'prophoto-linear',
10181 name: 'Linear ProPhoto',
10182 white: 'D50',
10183 base: XYZ_D50,
10184 toXYZ_M: toXYZ_M$1,
10185 fromXYZ_M: fromXYZ_M$1
10186 });
10187 var Et = 1 / 512;
10188 var Et2 = 16 / 512;
10189 var prophoto = new RGBColorSpace({
10190 id: 'prophoto',
10191 name: 'ProPhoto',
10192 base: ProPhotoLinear,
10193 toBase: function toBase(RGB) {
10194 return RGB.map(function(v) {
10195 return v < Et2 ? v / 16 : Math.pow(v, 1.8);
10196 });
10197 },
10198 fromBase: function fromBase(RGB) {
10199 return RGB.map(function(v) {
10200 return v >= Et ? Math.pow(v, 1 / 1.8) : 16 * v;
10201 });
10202 },
10203 formats: {
10204 color: {
10205 id: 'prophoto-rgb'
10206 }
10207 }
10208 });
10209 var oklch = new ColorSpace({
10210 id: 'oklch',
10211 name: 'OKLCh',
10212 coords: {
10213 l: {
10214 refRange: [ 0, 1 ],
10215 name: 'Lightness'
10216 },
10217 c: {
10218 refRange: [ 0, .4 ],
10219 name: 'Chroma'
10220 },
10221 h: {
10222 refRange: [ 0, 360 ],
10223 type: 'angle',
10224 name: 'Hue'
10225 }
10226 },
10227 white: 'D65',
10228 base: OKLab,
10229 fromBase: function fromBase(oklab) {
10230 var _oklab = _slicedToArray(oklab, 3), L = _oklab[0], a2 = _oklab[1], b2 = _oklab[2];
10231 var h;
10232 var \u03b52 = 2e-4;
10233 if (Math.abs(a2) < \u03b52 && Math.abs(b2) < \u03b52) {
10234 h = NaN;
10235 } else {
10236 h = Math.atan2(b2, a2) * 180 / Math.PI;
10237 }
10238 return [ L, Math.sqrt(Math.pow(a2, 2) + Math.pow(b2, 2)), constrain(h) ];
10239 },
10240 toBase: function toBase(oklch2) {
10241 var _oklch = _slicedToArray(oklch2, 3), L = _oklch[0], C = _oklch[1], h = _oklch[2];
10242 var a2, b2;
10243 if (isNaN(h)) {
10244 a2 = 0;
10245 b2 = 0;
10246 } else {
10247 a2 = C * Math.cos(h * Math.PI / 180);
10248 b2 = C * Math.sin(h * Math.PI / 180);
10249 }
10250 return [ L, a2, b2 ];
10251 },
10252 formats: {
10253 oklch: {
10254 coords: [ '<number> | <percentage>', '<number>', '<number> | <angle>' ]
10255 }
10256 }
10257 });
10258 var Yw = 203;
10259 var n = 2610 / Math.pow(2, 14);
10260 var ninv = Math.pow(2, 14) / 2610;
10261 var m = 2523 / Math.pow(2, 5);
10262 var minv = Math.pow(2, 5) / 2523;
10263 var c1 = 3424 / Math.pow(2, 12);
10264 var c2 = 2413 / Math.pow(2, 7);
10265 var c3 = 2392 / Math.pow(2, 7);
10266 var rec2100Pq = new RGBColorSpace({
10267 id: 'rec2100pq',
10268 name: 'REC.2100-PQ',
10269 base: REC2020Linear,
10270 toBase: function toBase(RGB) {
10271 return RGB.map(function(val) {
10272 var x = Math.pow(Math.max(Math.pow(val, minv) - c1, 0) / (c2 - c3 * Math.pow(val, minv)), ninv);
10273 return x * 1e4 / Yw;
10274 });
10275 },
10276 fromBase: function fromBase(RGB) {
10277 return RGB.map(function(val) {
10278 var x = Math.max(val * Yw / 1e4, 0);
10279 var num = c1 + c2 * Math.pow(x, n);
10280 var denom = 1 + c3 * Math.pow(x, n);
10281 return Math.pow(num / denom, m);
10282 });
10283 },
10284 formats: {
10285 color: {
10286 id: 'rec2100-pq'
10287 }
10288 }
10289 });
10290 var a = .17883277;
10291 var b = .28466892;
10292 var c = .55991073;
10293 var scale = 3.7743;
10294 var rec2100Hlg = new RGBColorSpace({
10295 id: 'rec2100hlg',
10296 cssid: 'rec2100-hlg',
10297 name: 'REC.2100-HLG',
10298 referred: 'scene',
10299 base: REC2020Linear,
10300 toBase: function toBase(RGB) {
10301 return RGB.map(function(val) {
10302 if (val <= .5) {
10303 return Math.pow(val, 2) / 3 * scale;
10304 }
10305 return Math.exp((val - c) / a + b) / 12 * scale;
10306 });
10307 },
10308 fromBase: function fromBase(RGB) {
10309 return RGB.map(function(val) {
10310 val /= scale;
10311 if (val <= 1 / 12) {
10312 return Math.sqrt(3 * val);
10313 }
10314 return a * Math.log(12 * val - b) + c;
10315 });
10316 },
10317 formats: {
10318 color: {
10319 id: 'rec2100-hlg'
10320 }
10321 }
10322 });
10323 var CATs = {};
10324 hooks.add('chromatic-adaptation-start', function(env) {
10325 if (env.options.method) {
10326 env.M = adapt(env.W1, env.W2, env.options.method);
10327 }
10328 });
10329 hooks.add('chromatic-adaptation-end', function(env) {
10330 if (!env.M) {
10331 env.M = adapt(env.W1, env.W2, env.options.method);
10332 }
10333 });
10334 function defineCAT(_ref23) {
10335 var id = _ref23.id, toCone_M = _ref23.toCone_M, fromCone_M = _ref23.fromCone_M;
10336 CATs[id] = arguments[0];
10337 }
10338 function adapt(W1, W2) {
10339 var id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Bradford';
10340 var method = CATs[id];
10341 var _multiplyMatrices5 = multiplyMatrices(method.toCone_M, W1), _multiplyMatrices6 = _slicedToArray(_multiplyMatrices5, 3), \u03c1s = _multiplyMatrices6[0], \u03b3s = _multiplyMatrices6[1], \u03b2s = _multiplyMatrices6[2];
10342 var _multiplyMatrices7 = multiplyMatrices(method.toCone_M, W2), _multiplyMatrices8 = _slicedToArray(_multiplyMatrices7, 3), \u03c1d = _multiplyMatrices8[0], \u03b3d = _multiplyMatrices8[1], \u03b2d = _multiplyMatrices8[2];
10343 var scale2 = [ [ \u03c1d / \u03c1s, 0, 0 ], [ 0, \u03b3d / \u03b3s, 0 ], [ 0, 0, \u03b2d / \u03b2s ] ];
10344 var scaled_cone_M = multiplyMatrices(scale2, method.toCone_M);
10345 var adapt_M = multiplyMatrices(method.fromCone_M, scaled_cone_M);
10346 return adapt_M;
10347 }
10348 defineCAT({
10349 id: 'von Kries',
10350 toCone_M: [ [ .40024, .7076, -.08081 ], [ -.2263, 1.16532, .0457 ], [ 0, 0, .91822 ] ],
10351 fromCone_M: [ [ 1.8599364, -1.1293816, .2198974 ], [ .3611914, .6388125, -64e-7 ], [ 0, 0, 1.0890636 ] ]
10352 });
10353 defineCAT({
10354 id: 'Bradford',
10355 toCone_M: [ [ .8951, .2664, -.1614 ], [ -.7502, 1.7135, .0367 ], [ .0389, -.0685, 1.0296 ] ],
10356 fromCone_M: [ [ .9869929, -.1470543, .1599627 ], [ .4323053, .5183603, .0492912 ], [ -.0085287, .0400428, .9684867 ] ]
10357 });
10358 defineCAT({
10359 id: 'CAT02',
10360 toCone_M: [ [ .7328, .4296, -.1624 ], [ -.7036, 1.6975, .0061 ], [ .003, .0136, .9834 ] ],
10361 fromCone_M: [ [ 1.0961238, -.278869, .1827452 ], [ .454369, .4735332, .0720978 ], [ -.0096276, -.005698, 1.0153256 ] ]
10362 });
10363 defineCAT({
10364 id: 'CAT16',
10365 toCone_M: [ [ .401288, .650173, -.051461 ], [ -.250268, 1.204414, .045854 ], [ -.002079, .048952, .953127 ] ],
10366 fromCone_M: [ [ 1.862067855087233, -1.011254630531685, .1491867754444518 ], [ .3875265432361372, .6214474419314753, -.008973985167612518 ], [ -.01584149884933386, -.03412293802851557, 1.04996443687785 ] ]
10367 });
10368 Object.assign(WHITES, {
10369 A: [ 1.0985, 1, .35585 ],
10370 C: [ .98074, 1, 1.18232 ],
10371 D55: [ .95682, 1, .92149 ],
10372 D75: [ .94972, 1, 1.22638 ],
10373 E: [ 1, 1, 1 ],
10374 F2: [ .99186, 1, .67393 ],
10375 F7: [ .95041, 1, 1.08747 ],
10376 F11: [ 1.00962, 1, .6435 ]
10377 });
10378 WHITES.ACES = [ .32168 / .33767, 1, (1 - .32168 - .33767) / .33767 ];
10379 var toXYZ_M = [ [ .6624541811085053, .13400420645643313, .1561876870049078 ], [ .27222871678091454, .6740817658111484, .05368951740793705 ], [ -.005574649490394108, .004060733528982826, 1.0103391003129971 ] ];
10380 var fromXYZ_M = [ [ 1.6410233796943257, -.32480329418479, -.23642469523761225 ], [ -.6636628587229829, 1.6153315916573379, .016756347685530137 ], [ .011721894328375376, -.008284441996237409, .9883948585390215 ] ];
10381 var ACEScg = new RGBColorSpace({
10382 id: 'acescg',
10383 name: 'ACEScg',
10384 coords: {
10385 r: {
10386 range: [ 0, 65504 ],
10387 name: 'Red'
10388 },
10389 g: {
10390 range: [ 0, 65504 ],
10391 name: 'Green'
10392 },
10393 b: {
10394 range: [ 0, 65504 ],
10395 name: 'Blue'
10396 }
10397 },
10398 referred: 'scene',
10399 white: WHITES.ACES,
10400 toXYZ_M: toXYZ_M,
10401 fromXYZ_M: fromXYZ_M,
10402 formats: {
10403 color: {}
10404 }
10405 });
10406 var \u03b5 = Math.pow(2, -16);
10407 var ACES_min_nonzero = -.35828683;
10408 var ACES_cc_max = (Math.log2(65504) + 9.72) / 17.52;
10409 var acescc = new RGBColorSpace({
10410 id: 'acescc',
10411 name: 'ACEScc',
10412 coords: {
10413 r: {
10414 range: [ ACES_min_nonzero, ACES_cc_max ],
10415 name: 'Red'
10416 },
10417 g: {
10418 range: [ ACES_min_nonzero, ACES_cc_max ],
10419 name: 'Green'
10420 },
10421 b: {
10422 range: [ ACES_min_nonzero, ACES_cc_max ],
10423 name: 'Blue'
10424 }
10425 },
10426 referred: 'scene',
10427 base: ACEScg,
10428 toBase: function toBase(RGB) {
10429 var low = (9.72 - 15) / 17.52;
10430 return RGB.map(function(val) {
10431 if (val <= low) {
10432 return (Math.pow(2, val * 17.52 - 9.72) - \u03b5) * 2;
10433 } else if (val < ACES_cc_max) {
10434 return Math.pow(2, val * 17.52 - 9.72);
10435 } else {
10436 return 65504;
10437 }
10438 });
10439 },
10440 fromBase: function fromBase(RGB) {
10441 return RGB.map(function(val) {
10442 if (val <= 0) {
10443 return (Math.log2(\u03b5) + 9.72) / 17.52;
10444 } else if (val < \u03b5) {
10445 return (Math.log2(\u03b5 + val * .5) + 9.72) / 17.52;
10446 } else {
10447 return (Math.log2(val) + 9.72) / 17.52;
10448 }
10449 });
10450 },
10451 formats: {
10452 color: {}
10453 }
10454 });
10455 var spaces = Object.freeze({
10456 __proto__: null,
10457 XYZ_D65: XYZ_D65,
10458 XYZ_D50: XYZ_D50,
10459 XYZ_ABS_D65: XYZ_Abs_D65,
10460 Lab_D65: lab_d65,
10461 Lab: lab,
10462 LCH: lch,
10463 sRGB_Linear: sRGBLinear,
10464 sRGB: sRGB,
10465 HSL: HSL,
10466 HWB: hwb,
10467 HSV: HSV,
10468 P3_Linear: P3Linear,
10469 P3: P3,
10470 A98RGB_Linear: A98Linear,
10471 A98RGB: a98rgb,
10472 ProPhoto_Linear: ProPhotoLinear,
10473 ProPhoto: prophoto,
10474 REC_2020_Linear: REC2020Linear,
10475 REC_2020: REC2020,
10476 OKLab: OKLab,
10477 OKLCH: oklch,
10478 Jzazbz: Jzazbz,
10479 JzCzHz: jzczhz,
10480 ICTCP: ictcp,
10481 REC_2100_PQ: rec2100Pq,
10482 REC_2100_HLG: rec2100Hlg,
10483 ACEScg: ACEScg,
10484 ACEScc: acescc
10485 });
10486 var _Color = (_space = new WeakMap(), function() {
10487 function Color() {
10488 var _this2 = this;
10489 _classCallCheck(this, Color);
10490 _classPrivateFieldInitSpec(this, _space, void 0);
10491 var color;
10492 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
10493 args[_key2] = arguments[_key2];
10494 }
10495 if (args.length === 1) {
10496 color = getColor(args[0]);
10497 }
10498 var space, coords, alpha;
10499 if (color) {
10500 space = color.space || color.spaceId;
10501 coords = color.coords;
10502 alpha = color.alpha;
10503 } else {
10504 space = args[0];
10505 coords = args[1];
10506 alpha = args[2];
10507 }
10508 _classPrivateFieldSet(_space, this, ColorSpace.get(space));
10509 this.coords = coords ? coords.slice() : [ 0, 0, 0 ];
10510 this.alpha = alpha < 1 ? alpha : 1;
10511 for (var i = 0; i < this.coords.length; i++) {
10512 if (this.coords[i] === 'NaN') {
10513 this.coords[i] = NaN;
10514 }
10515 }
10516 var _loop4 = function _loop4(id) {
10517 Object.defineProperty(_this2, id, {
10518 get: function get() {
10519 return _this2.get(id);
10520 },
10521 set: function set(value) {
10522 return _this2.set(id, value);
10523 }
10524 });
10525 };
10526 for (var id in _classPrivateFieldGet(_space, this).coords) {
10527 _loop4(id);
10528 }
10529 }
10530 return _createClass(Color, [ {
10531 key: 'space',
10532 get: function get() {
10533 return _classPrivateFieldGet(_space, this);
10534 }
10535 }, {
10536 key: 'spaceId',
10537 get: function get() {
10538 return _classPrivateFieldGet(_space, this).id;
10539 }
10540 }, {
10541 key: 'clone',
10542 value: function clone() {
10543 return new _Color(this.space, this.coords, this.alpha);
10544 }
10545 }, {
10546 key: 'toJSON',
10547 value: function toJSON() {
10548 return {
10549 spaceId: this.spaceId,
10550 coords: this.coords,
10551 alpha: this.alpha
10552 };
10553 }
10554 }, {
10555 key: 'display',
10556 value: function display() {
10557 for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
10558 args[_key3] = arguments[_key3];
10559 }
10560 var ret = _display.apply(void 0, [ this ].concat(args));
10561 ret.color = new _Color(ret.color);
10562 return ret;
10563 }
10564 } ], [ {
10565 key: 'get',
10566 value: function get(color) {
10567 if (color instanceof _Color) {
10568 return color;
10569 }
10570 for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
10571 args[_key4 - 1] = arguments[_key4];
10572 }
10573 return _construct(_Color, [ color ].concat(args));
10574 }
10575 }, {
10576 key: 'defineFunction',
10577 value: function defineFunction(name, code) {
10578 var o = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : code;
10579 var _o$instance = o.instance, instance = _o$instance === void 0 ? true : _o$instance, returns = o.returns;
10580 var func = function func() {
10581 var ret = code.apply(void 0, arguments);
10582 if (returns === 'color') {
10583 ret = _Color.get(ret);
10584 } else if (returns === 'function<color>') {
10585 var f = ret;
10586 ret = function ret() {
10587 var ret2 = f.apply(void 0, arguments);
10588 return _Color.get(ret2);
10589 };
10590 Object.assign(ret, f);
10591 } else if (returns === 'array<color>') {
10592 ret = ret.map(function(c4) {
10593 return _Color.get(c4);
10594 });
10595 }
10596 return ret;
10597 };
10598 if (!(name in _Color)) {
10599 _Color[name] = func;
10600 }
10601 if (instance) {
10602 _Color.prototype[name] = function() {
10603 for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
10604 args[_key5] = arguments[_key5];
10605 }
10606 return func.apply(void 0, [ this ].concat(args));
10607 };
10608 }
10609 }
10610 }, {
10611 key: 'defineFunctions',
10612 value: function defineFunctions(o) {
10613 for (var name in o) {
10614 _Color.defineFunction(name, o[name], o[name]);
10615 }
10616 }
10617 }, {
10618 key: 'extend',
10619 value: function extend(exports) {
10620 if (exports.register) {
10621 exports.register(_Color);
10622 } else {
10623 for (var name in exports) {
10624 _Color.defineFunction(name, exports[name]);
10625 }
10626 }
10627 }
10628 } ]);
10629 }());
10630 _Color.defineFunctions({
10631 get: get,
10632 getAll: getAll,
10633 set: set,
10634 setAll: setAll,
10635 to: to,
10636 equals: equals,
10637 inGamut: inGamut,
10638 toGamut: toGamut,
10639 distance: distance,
10640 toString: serialize
10641 });
10642 Object.assign(_Color, {
10643 util: util,
10644 hooks: hooks,
10645 WHITES: WHITES,
10646 Space: ColorSpace,
10647 spaces: ColorSpace.registry,
10648 parse: parse,
10649 defaults: defaults
10650 });
10651 for (var _i5 = 0, _Object$keys = Object.keys(spaces); _i5 < _Object$keys.length; _i5++) {
10652 var key = _Object$keys[_i5];
10653 ColorSpace.register(spaces[key]);
10654 }
10655 for (var id in ColorSpace.registry) {
10656 addSpaceAccessors(id, ColorSpace.registry[id]);
10657 }
10658 hooks.add('colorspace-init-end', function(space) {
10659 var _space$aliases;
10660 addSpaceAccessors(space.id, space);
10661 (_space$aliases = space.aliases) === null || _space$aliases === void 0 || _space$aliases.forEach(function(alias) {
10662 addSpaceAccessors(alias, space);
10663 });
10664 });
10665 function addSpaceAccessors(id, space) {
10666 Object.keys(space.coords);
10667 Object.values(space.coords).map(function(c4) {
10668 return c4.name;
10669 });
10670 var propId = id.replace(/-/g, '_');
10671 Object.defineProperty(_Color.prototype, propId, {
10672 get: function get() {
10673 var _this3 = this;
10674 var ret = this.getAll(id);
10675 if (typeof Proxy === 'undefined') {
10676 return ret;
10677 }
10678 return new Proxy(ret, {
10679 has: function has(obj, property) {
10680 try {
10681 ColorSpace.resolveCoord([ space, property ]);
10682 return true;
10683 } catch (e) {}
10684 return Reflect.has(obj, property);
10685 },
10686 get: function get(obj, property, receiver) {
10687 if (property && _typeof(property) !== 'symbol' && !(property in obj)) {
10688 var _ColorSpace$resolveCo3 = ColorSpace.resolveCoord([ space, property ]), index = _ColorSpace$resolveCo3.index;
10689 if (index >= 0) {
10690 return obj[index];
10691 }
10692 }
10693 return Reflect.get(obj, property, receiver);
10694 },
10695 set: function set(obj, property, value, receiver) {
10696 if (property && _typeof(property) !== 'symbol' && !(property in obj) || property >= 0) {
10697 var _ColorSpace$resolveCo4 = ColorSpace.resolveCoord([ space, property ]), index = _ColorSpace$resolveCo4.index;
10698 if (index >= 0) {
10699 obj[index] = value;
10700 _this3.setAll(id, obj);
10701 return true;
10702 }
10703 }
10704 return Reflect.set(obj, property, value, receiver);
10705 }
10706 });
10707 },
10708 set: function set(coords) {
10709 this.setAll(id, coords);
10710 },
10711 configurable: true,
10712 enumerable: true
10713 });
10714 }
10715 _Color.extend(deltaEMethods);
10716 _Color.extend({
10717 deltaE: deltaE
10718 });
10719 _Color.extend(variations);
10720 _Color.extend({
10721 contrast: contrast
10722 });
10723 _Color.extend(chromaticity);
10724 _Color.extend(luminance);
10725 _Color.extend(interpolation);
10726 _Color.extend(contrastMethods);
10727 var import_from2 = __toModule(require_from3());
10728 import_dot['default'].templateSettings.strip = false;
10729 axe._memoizedFns = [];
10730 function memoizeImplementation(fn) {
10731 var memoized = (0, import_memoizee['default'])(fn);
10732 axe._memoizedFns.push(memoized);
10733 return memoized;
10734 }
10735 var memoize_default = memoizeImplementation;
10736 var isXHTML = memoize_default(function(doc) {
10737 if (!(doc !== null && doc !== void 0 && doc.createElement)) {
10738 return false;
10739 }
10740 return doc.createElement('A').localName === 'A';
10741 });
10742 var is_xhtml_default = isXHTML;
10743 function _getShadowSelector(generateSelector2, elm) {
10744 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
10745 if (!elm) {
10746 return '';
10747 }
10748 var doc = elm.getRootNode && elm.getRootNode() || document;
10749 if (doc.nodeType !== 11) {
10750 return generateSelector2(elm, options, doc);
10751 }
10752 var stack = [];
10753 while (doc.nodeType === 11) {
10754 if (!doc.host) {
10755 return '';
10756 }
10757 stack.unshift({
10758 elm: elm,
10759 doc: doc
10760 });
10761 elm = doc.host;
10762 doc = elm.getRootNode();
10763 }
10764 stack.unshift({
10765 elm: elm,
10766 doc: doc
10767 });
10768 return stack.map(function(item) {
10769 return generateSelector2(item.elm, options, item.doc);
10770 });
10771 }
10772 var ignoredAttributes = [ 'class', 'style', 'id', 'selected', 'checked', 'disabled', 'tabindex', 'aria-checked', 'aria-selected', 'aria-invalid', 'aria-activedescendant', 'aria-busy', 'aria-disabled', 'aria-expanded', 'aria-grabbed', 'aria-pressed', 'aria-valuenow', 'xmlns' ];
10773 var MAXATTRIBUTELENGTH = 31;
10774 var attrCharsRegex = /([\\"])/g;
10775 var newlineChars = /(\r\n|\r|\n)/g;
10776 function escapeAttribute(str) {
10777 return str.replace(attrCharsRegex, '\\$1').replace(newlineChars, '\\a ');
10778 }
10779 function getAttributeNameValue(node, at) {
10780 var name = at.name;
10781 var atnv;
10782 if (name.indexOf('href') !== -1 || name.indexOf('src') !== -1) {
10783 var friendly = get_friendly_uri_end_default(node.getAttribute(name));
10784 if (friendly) {
10785 atnv = escape_selector_default(at.name) + '$="' + escapeAttribute(friendly) + '"';
10786 } else {
10787 atnv = escape_selector_default(at.name) + '="' + escapeAttribute(node.getAttribute(name)) + '"';
10788 }
10789 } else {
10790 atnv = escape_selector_default(name) + '="' + escapeAttribute(at.value) + '"';
10791 }
10792 return atnv;
10793 }
10794 function countSort(a2, b2) {
10795 return a2.count < b2.count ? -1 : a2.count === b2.count ? 0 : 1;
10796 }
10797 function filterAttributes(at) {
10798 return !ignoredAttributes.includes(at.name) && at.name.indexOf(':') === -1 && (!at.value || at.value.length < MAXATTRIBUTELENGTH);
10799 }
10800 function _getSelectorData(domTree) {
10801 var data = {
10802 classes: {},
10803 tags: {},
10804 attributes: {}
10805 };
10806 domTree = Array.isArray(domTree) ? domTree : [ domTree ];
10807 var currentLevel = domTree.slice();
10808 var stack = [];
10809 var _loop5 = function _loop5() {
10810 var current = currentLevel.pop();
10811 var node = current.actualNode;
10812 if (!!node.querySelectorAll) {
10813 var tag = node.nodeName;
10814 if (data.tags[tag]) {
10815 data.tags[tag]++;
10816 } else {
10817 data.tags[tag] = 1;
10818 }
10819 if (node.classList) {
10820 Array.from(node.classList).forEach(function(cl) {
10821 var ind = escape_selector_default(cl);
10822 if (data.classes[ind]) {
10823 data.classes[ind]++;
10824 } else {
10825 data.classes[ind] = 1;
10826 }
10827 });
10828 }
10829 if (node.hasAttributes()) {
10830 Array.from(get_node_attributes_default(node)).filter(filterAttributes).forEach(function(at) {
10831 var atnv = getAttributeNameValue(node, at);
10832 if (atnv) {
10833 if (data.attributes[atnv]) {
10834 data.attributes[atnv]++;
10835 } else {
10836 data.attributes[atnv] = 1;
10837 }
10838 }
10839 });
10840 }
10841 }
10842 if (current.children.length) {
10843 stack.push(currentLevel);
10844 currentLevel = current.children.slice();
10845 }
10846 while (!currentLevel.length && stack.length) {
10847 currentLevel = stack.pop();
10848 }
10849 };
10850 while (currentLevel.length) {
10851 _loop5();
10852 }
10853 return data;
10854 }
10855 function uncommonClasses(node, selectorData) {
10856 var retVal = [];
10857 var classData = selectorData.classes;
10858 var tagData = selectorData.tags;
10859 if (node.classList) {
10860 Array.from(node.classList).forEach(function(cl) {
10861 var ind = escape_selector_default(cl);
10862 if (classData[ind] < tagData[node.nodeName]) {
10863 retVal.push({
10864 name: ind,
10865 count: classData[ind],
10866 species: 'class'
10867 });
10868 }
10869 });
10870 }
10871 return retVal.sort(countSort);
10872 }
10873 function getNthChildString(elm, selector) {
10874 var siblings = elm.parentNode && Array.from(elm.parentNode.children || '') || [];
10875 var hasMatchingSiblings = siblings.find(function(sibling) {
10876 return sibling !== elm && element_matches_default(sibling, selector);
10877 });
10878 if (hasMatchingSiblings) {
10879 var nthChild = 1 + siblings.indexOf(elm);
10880 return ':nth-child(' + nthChild + ')';
10881 } else {
10882 return '';
10883 }
10884 }
10885 function getElmId(elm) {
10886 if (!elm.getAttribute('id')) {
10887 return;
10888 }
10889 var doc = elm.getRootNode && elm.getRootNode() || document;
10890 var id = '#' + escape_selector_default(elm.getAttribute('id') || '');
10891 if (!id.match(/player_uid_/) && doc.querySelectorAll(id).length === 1) {
10892 return id;
10893 }
10894 }
10895 function getBaseSelector(elm) {
10896 var xhtml = is_xhtml_default(document);
10897 return escape_selector_default(xhtml ? elm.localName : elm.nodeName.toLowerCase());
10898 }
10899 function uncommonAttributes(node, selectorData) {
10900 var retVal = [];
10901 var attData = selectorData.attributes;
10902 var tagData = selectorData.tags;
10903 if (node.hasAttributes()) {
10904 Array.from(get_node_attributes_default(node)).filter(filterAttributes).forEach(function(at) {
10905 var atnv = getAttributeNameValue(node, at);
10906 if (atnv && attData[atnv] < tagData[node.nodeName]) {
10907 retVal.push({
10908 name: atnv,
10909 count: attData[atnv],
10910 species: 'attribute'
10911 });
10912 }
10913 });
10914 }
10915 return retVal.sort(countSort);
10916 }
10917 function getThreeLeastCommonFeatures(elm, selectorData) {
10918 var selector = '';
10919 var features;
10920 var clss = uncommonClasses(elm, selectorData);
10921 var atts = uncommonAttributes(elm, selectorData);
10922 if (clss.length && clss[0].count === 1) {
10923 features = [ clss[0] ];
10924 } else if (atts.length && atts[0].count === 1) {
10925 features = [ atts[0] ];
10926 selector = getBaseSelector(elm);
10927 } else {
10928 features = clss.concat(atts);
10929 features.sort(countSort);
10930 features = features.slice(0, 3);
10931 if (!features.some(function(feat) {
10932 return feat.species === 'class';
10933 })) {
10934 selector = getBaseSelector(elm);
10935 } else {
10936 features.sort(function(a2, b2) {
10937 return a2.species !== b2.species && a2.species === 'class' ? -1 : a2.species === b2.species ? 0 : 1;
10938 });
10939 }
10940 }
10941 return selector += features.reduce(function(val, feat) {
10942 switch (feat.species) {
10943 case 'class':
10944 return val + '.' + feat.name;
10945
10946 case 'attribute':
10947 return val + '[' + feat.name + ']';
10948 }
10949 return val;
10950 }, '');
10951 }
10952 function generateSelector(elm, options, doc) {
10953 if (!axe._selectorData) {
10954 throw new Error('Expect axe._selectorData to be set up');
10955 }
10956 var _options$toRoot = options.toRoot, toRoot = _options$toRoot === void 0 ? false : _options$toRoot;
10957 var selector;
10958 var similar;
10959 do {
10960 var features = getElmId(elm);
10961 if (!features) {
10962 features = getThreeLeastCommonFeatures(elm, axe._selectorData);
10963 features += getNthChildString(elm, features);
10964 }
10965 if (selector) {
10966 selector = features + ' > ' + selector;
10967 } else {
10968 selector = features;
10969 }
10970 if (!similar || similar.length > constants_default.selectorSimilarFilterLimit) {
10971 similar = findSimilar(doc, selector);
10972 } else {
10973 similar = similar.filter(function(item) {
10974 return element_matches_default(item, selector);
10975 });
10976 }
10977 elm = elm.parentElement;
10978 } while ((similar.length > 1 || toRoot) && elm && elm.nodeType !== 11);
10979 if (similar.length === 1) {
10980 return selector;
10981 } else if (selector.indexOf(' > ') !== -1) {
10982 return ':root' + selector.substring(selector.indexOf(' > '));
10983 }
10984 return ':root';
10985 }
10986 function getSelector(elm, options) {
10987 return _getShadowSelector(generateSelector, elm, options);
10988 }
10989 var get_selector_default = memoize_default(getSelector);
10990 var findSimilar = memoize_default(function(doc, selector) {
10991 return Array.from(doc.querySelectorAll(selector));
10992 });
10993 function generateAncestry(node) {
10994 var nodeName2 = escape_selector_default(node.nodeName.toLowerCase());
10995 var parentElement = node.parentElement;
10996 var parentNode = node.parentNode;
10997 var nthChild = '';
10998 if (nodeName2 !== 'head' && nodeName2 !== 'body' && (parentNode === null || parentNode === void 0 ? void 0 : parentNode.children.length) > 1) {
10999 var index = Array.prototype.indexOf.call(parentNode.children, node) + 1;
11000 nthChild = ':nth-child('.concat(index, ')');
11001 }
11002 if (!parentElement) {
11003 return nodeName2 + nthChild;
11004 }
11005 return generateAncestry(parentElement) + ' > ' + nodeName2 + nthChild;
11006 }
11007 function _getAncestry(elm, options) {
11008 return _getShadowSelector(generateAncestry, elm, options);
11009 }
11010 function getXPathArray(node, path) {
11011 var sibling, count;
11012 if (!node) {
11013 return [];
11014 }
11015 if (!path && node.nodeType === 9) {
11016 path = [ {
11017 str: 'html'
11018 } ];
11019 return path;
11020 }
11021 path = path || [];
11022 if (node.parentNode && node.parentNode !== node) {
11023 path = getXPathArray(node.parentNode, path);
11024 }
11025 if (node.previousSibling) {
11026 count = 1;
11027 sibling = node.previousSibling;
11028 do {
11029 if (sibling.nodeType === 1 && sibling.nodeName === node.nodeName) {
11030 count++;
11031 }
11032 sibling = sibling.previousSibling;
11033 } while (sibling);
11034 if (count === 1) {
11035 count = null;
11036 }
11037 } else if (node.nextSibling) {
11038 sibling = node.nextSibling;
11039 do {
11040 if (sibling.nodeType === 1 && sibling.nodeName === node.nodeName) {
11041 count = 1;
11042 sibling = null;
11043 } else {
11044 count = null;
11045 sibling = sibling.previousSibling;
11046 }
11047 } while (sibling);
11048 }
11049 if (node.nodeType === 1) {
11050 var element = {};
11051 element.str = node.nodeName.toLowerCase();
11052 var _id = node.getAttribute && escape_selector_default(node.getAttribute('id'));
11053 if (_id && node.ownerDocument.querySelectorAll('#' + _id).length === 1) {
11054 element.id = node.getAttribute('id');
11055 }
11056 if (count > 1) {
11057 element.count = count;
11058 }
11059 path.push(element);
11060 }
11061 return path;
11062 }
11063 function xpathToString(xpathArray) {
11064 return xpathArray.reduce(function(str, elm) {
11065 if (elm.id) {
11066 return '//'.concat(elm.str, '[@id=\'').concat(elm.id, '\']');
11067 } else {
11068 return str + '/'.concat(elm.str) + (elm.count > 0 ? '['.concat(elm.count, ']') : '');
11069 }
11070 }, '');
11071 }
11072 function getXpath(node) {
11073 var xpathArray = getXPathArray(node);
11074 return xpathToString(xpathArray);
11075 }
11076 var get_xpath_default = getXpath;
11077 var _cache = {};
11078 var cache = {
11079 set: function set(key, value) {
11080 validateKey(key);
11081 _cache[key] = value;
11082 },
11083 get: function get(key, creator) {
11084 validateCreator(creator);
11085 if (key in _cache) {
11086 return _cache[key];
11087 }
11088 if (typeof creator === 'function') {
11089 var value = creator();
11090 assert_default(value !== void 0, 'Cache creator function should not return undefined');
11091 this.set(key, value);
11092 return _cache[key];
11093 }
11094 },
11095 clear: function clear() {
11096 _cache = {};
11097 }
11098 };
11099 function validateKey(key) {
11100 assert_default(typeof key === 'string', 'key must be a string, ' + _typeof(key) + ' given');
11101 assert_default(key !== '', 'key must not be empty');
11102 }
11103 function validateCreator(creator) {
11104 assert_default(typeof creator === 'function' || typeof creator === 'undefined', 'creator must be a function or undefined, ' + _typeof(creator) + ' given');
11105 }
11106 var cache_default = cache;
11107 function getNodeFromTree(vNode, node) {
11108 var el = node || vNode;
11109 return cache_default.get('nodeMap') ? cache_default.get('nodeMap').get(el) : null;
11110 }
11111 var get_node_from_tree_default = getNodeFromTree;
11112 function _getElementSource(node) {
11113 var _ref24 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref24$maxLength = _ref24.maxLength, maxLength = _ref24$maxLength === void 0 ? 300 : _ref24$maxLength, _ref24$attrLimit = _ref24.attrLimit, attrLimit = _ref24$attrLimit === void 0 ? 20 : _ref24$attrLimit;
11114 if (!node) {
11115 return '';
11116 }
11117 if (node.nodeType !== 1) {
11118 var _node$nodeValue;
11119 var value = (_node$nodeValue = node.nodeValue) !== null && _node$nodeValue !== void 0 ? _node$nodeValue : '';
11120 return truncate(value, maxLength);
11121 }
11122 var deepStr = getOuterHtml(node);
11123 if (deepStr.length > maxLength) {
11124 return getTruncatedElementSource(node, {
11125 maxLength: maxLength,
11126 attrLimit: attrLimit
11127 });
11128 }
11129 return deepStr;
11130 }
11131 function getOuterHtml(element) {
11132 var source = element.outerHTML;
11133 if (!source && typeof window.XMLSerializer === 'function') {
11134 source = new window.XMLSerializer().serializeToString(element);
11135 }
11136 return source || '';
11137 }
11138 function getTruncatedElementSource(elm, _ref25) {
11139 var maxLength = _ref25.maxLength, attrLimit = _ref25.attrLimit;
11140 var nodeName2 = is_xhtml_default(elm.ownerDocument || document) ? elm.nodeName : elm.nodeName.toLowerCase();
11141 var nodeAttrs = Array.from(get_node_attributes_default(elm)).map(function(_ref26) {
11142 var name = _ref26.name, value = _ref26.value;
11143 return {
11144 name: name,
11145 value: value
11146 };
11147 });
11148 var attrsLength = nodeAttrs.reduce(function(acc, _ref27) {
11149 var name = _ref27.name, value = _ref27.value;
11150 return acc + name.length + value.length + 4;
11151 }, 0);
11152 if (2 + nodeName2.length + attrsLength > maxLength) {
11153 nodeAttrs.forEach(function(attr) {
11154 attr.name = truncate(attr.name, attrLimit);
11155 attr.value = truncate(attr.value, attrLimit);
11156 });
11157 }
11158 var source = '<'.concat(nodeName2);
11159 var tagEnd = '>';
11160 var truncateEnd = ' ...>';
11161 var _iterator7 = _createForOfIteratorHelper(nodeAttrs), _step7;
11162 try {
11163 for (_iterator7.s(); !(_step7 = _iterator7.n()).done; ) {
11164 var attr = _step7.value;
11165 var attrStr = ' '.concat(attr.name, '="').concat(attr.value, '"');
11166 if (source.length + attrStr.length > maxLength - truncateEnd.length) {
11167 tagEnd = truncateEnd;
11168 continue;
11169 }
11170 source += attrStr;
11171 }
11172 } catch (err) {
11173 _iterator7.e(err);
11174 } finally {
11175 _iterator7.f();
11176 }
11177 return source + tagEnd;
11178 }
11179 function truncate(str, attrLimit) {
11180 return str.length <= attrLimit ? str : str.substring(0, attrLimit) + '...';
11181 }
11182 var CACHE_KEY = 'DqElm.RunOptions';
11183 var DqElement = memoize_default(function DqElement2(elm, options, spec) {
11184 var _this$spec$selector, _this$_virtualNode;
11185 options !== null && options !== void 0 ? options : options = null;
11186 spec !== null && spec !== void 0 ? spec : spec = {};
11187 if (!options) {
11188 var _cache_default$get;
11189 options = (_cache_default$get = cache_default.get(CACHE_KEY)) !== null && _cache_default$get !== void 0 ? _cache_default$get : {};
11190 }
11191 this.spec = spec;
11192 if (elm instanceof abstract_virtual_node_default) {
11193 this._virtualNode = elm;
11194 this._element = elm.actualNode;
11195 } else {
11196 this._element = elm;
11197 this._virtualNode = get_node_from_tree_default(elm);
11198 }
11199 this.fromFrame = ((_this$spec$selector = this.spec.selector) === null || _this$spec$selector === void 0 ? void 0 : _this$spec$selector.length) > 1;
11200 this._includeElementInJson = options.elementRef;
11201 if (options.absolutePaths) {
11202 this._options = {
11203 toRoot: true
11204 };
11205 }
11206 this.nodeIndexes = [];
11207 if (Array.isArray(this.spec.nodeIndexes)) {
11208 this.nodeIndexes = this.spec.nodeIndexes;
11209 } else if (typeof ((_this$_virtualNode = this._virtualNode) === null || _this$_virtualNode === void 0 ? void 0 : _this$_virtualNode.nodeIndex) === 'number') {
11210 this.nodeIndexes = [ this._virtualNode.nodeIndex ];
11211 }
11212 this.source = null;
11213 if (!axe._audit.noHtml) {
11214 var _this$spec$source;
11215 this.source = (_this$spec$source = this.spec.source) !== null && _this$spec$source !== void 0 ? _this$spec$source : _getElementSource(this._element);
11216 }
11217 return this;
11218 });
11219 DqElement.prototype = {
11220 get selector() {
11221 return this.spec.selector || [ get_selector_default(this.element, this._options) ];
11222 },
11223 get ancestry() {
11224 return this.spec.ancestry || [ _getAncestry(this.element) ];
11225 },
11226 get xpath() {
11227 return this.spec.xpath || [ get_xpath_default(this.element) ];
11228 },
11229 get element() {
11230 return this._element;
11231 },
11232 toJSON: function toJSON() {
11233 var spec = {
11234 selector: this.selector,
11235 source: this.source,
11236 xpath: this.xpath,
11237 ancestry: this.ancestry,
11238 nodeIndexes: this.nodeIndexes,
11239 fromFrame: this.fromFrame
11240 };
11241 if (this._includeElementInJson) {
11242 spec.element = this._element;
11243 }
11244 return spec;
11245 }
11246 };
11247 DqElement.fromFrame = function fromFrame(node, options, frame) {
11248 var spec = DqElement.mergeSpecs(node, frame);
11249 return new DqElement(frame.element, options, spec);
11250 };
11251 DqElement.mergeSpecs = function mergeSpecs(child, parentFrame) {
11252 return _extends({}, child, {
11253 selector: [].concat(_toConsumableArray(parentFrame.selector), _toConsumableArray(child.selector)),
11254 ancestry: [].concat(_toConsumableArray(parentFrame.ancestry), _toConsumableArray(child.ancestry)),
11255 xpath: [].concat(_toConsumableArray(parentFrame.xpath), _toConsumableArray(child.xpath)),
11256 nodeIndexes: [].concat(_toConsumableArray(parentFrame.nodeIndexes), _toConsumableArray(child.nodeIndexes)),
11257 fromFrame: true
11258 });
11259 };
11260 DqElement.setRunOptions = function setRunOptions(_ref28) {
11261 var elementRef = _ref28.elementRef, absolutePaths = _ref28.absolutePaths;
11262 cache_default.set(CACHE_KEY, {
11263 elementRef: elementRef,
11264 absolutePaths: absolutePaths
11265 });
11266 };
11267 var dq_element_default = DqElement;
11268 function checkHelper(checkResult, options, resolve, reject) {
11269 return {
11270 isAsync: false,
11271 async: function async() {
11272 this.isAsync = true;
11273 return function(result) {
11274 if (result instanceof Error === false) {
11275 checkResult.result = result;
11276 resolve(checkResult);
11277 } else {
11278 reject(result);
11279 }
11280 };
11281 },
11282 data: function data(_data) {
11283 checkResult.data = _data;
11284 },
11285 relatedNodes: function relatedNodes(nodes) {
11286 if (!window.Node) {
11287 return;
11288 }
11289 if (nodes instanceof window.Node || nodes instanceof abstract_virtual_node_default) {
11290 nodes = [ nodes ];
11291 } else {
11292 nodes = to_array_default(nodes);
11293 }
11294 checkResult.relatedNodes = [];
11295 nodes.forEach(function(node) {
11296 if (node instanceof abstract_virtual_node_default) {
11297 node = node.actualNode;
11298 }
11299 if (node instanceof window.Node) {
11300 var dqElm = new dq_element_default(node);
11301 checkResult.relatedNodes.push(dqElm);
11302 }
11303 });
11304 }
11305 };
11306 }
11307 var check_helper_default = checkHelper;
11308 function clone2(obj) {
11309 return cloneRecused(obj, new Map());
11310 }
11311 function cloneRecused(obj, seen) {
11312 var _window, _window2;
11313 if (obj === null || _typeof(obj) !== 'object') {
11314 return obj;
11315 }
11316 if ((_window = window) !== null && _window !== void 0 && _window.Node && obj instanceof window.Node || (_window2 = window) !== null && _window2 !== void 0 && _window2.HTMLCollection && obj instanceof window.HTMLCollection || 'nodeName' in obj && 'nodeType' in obj && 'ownerDocument' in obj) {
11317 return obj;
11318 }
11319 if (seen.has(obj)) {
11320 return seen.get(obj);
11321 }
11322 if (Array.isArray(obj)) {
11323 var out2 = [];
11324 seen.set(obj, out2);
11325 obj.forEach(function(value) {
11326 out2.push(cloneRecused(value, seen));
11327 });
11328 return out2;
11329 }
11330 var out = {};
11331 seen.set(obj, out);
11332 for (var _key6 in obj) {
11333 out[_key6] = cloneRecused(obj[_key6], seen);
11334 }
11335 return out;
11336 }
11337 var parser = new import_css_selector_parser.CssSelectorParser();
11338 parser.registerSelectorPseudos('not');
11339 parser.registerSelectorPseudos('is');
11340 parser.registerNestingOperators('>');
11341 parser.registerAttrEqualityMods('^', '$', '*', '~');
11342 var css_parser_default = parser;
11343 function _matches(vNode, selector) {
11344 var expressions = _convertSelector(selector);
11345 return expressions.some(function(expression) {
11346 return _matchesExpression(vNode, expression);
11347 });
11348 }
11349 function matchesTag(vNode, exp) {
11350 return vNode.props.nodeType === 1 && (exp.tag === '*' || vNode.props.nodeName === exp.tag);
11351 }
11352 function matchesClasses(vNode, exp) {
11353 return !exp.classes || exp.classes.every(function(cl) {
11354 return vNode.hasClass(cl.value);
11355 });
11356 }
11357 function matchesAttributes(vNode, exp) {
11358 return !exp.attributes || exp.attributes.every(function(att) {
11359 var nodeAtt = vNode.attr(att.key);
11360 return nodeAtt !== null && att.test(nodeAtt);
11361 });
11362 }
11363 function matchesId(vNode, exp) {
11364 return !exp.id || vNode.props.id === exp.id;
11365 }
11366 function matchesPseudos(target, exp) {
11367 if (!exp.pseudos || exp.pseudos.every(function(pseudo) {
11368 if (pseudo.name === 'not') {
11369 return !pseudo.expressions.some(function(expression) {
11370 return _matchesExpression(target, expression);
11371 });
11372 } else if (pseudo.name === 'is') {
11373 return pseudo.expressions.some(function(expression) {
11374 return _matchesExpression(target, expression);
11375 });
11376 }
11377 throw new Error('the pseudo selector ' + pseudo.name + ' has not yet been implemented');
11378 })) {
11379 return true;
11380 }
11381 return false;
11382 }
11383 function matchExpression(vNode, expression) {
11384 return matchesTag(vNode, expression) && matchesClasses(vNode, expression) && matchesAttributes(vNode, expression) && matchesId(vNode, expression) && matchesPseudos(vNode, expression);
11385 }
11386 var escapeRegExp = function() {
11387 var from = /(?=[\-\[\]{}()*+?.\\\^$|,#\s])/g;
11388 var to2 = '\\';
11389 return function(string) {
11390 return string.replace(from, to2);
11391 };
11392 }();
11393 var reUnescape = /\\/g;
11394 function convertAttributes(atts) {
11395 if (!atts) {
11396 return;
11397 }
11398 return atts.map(function(att) {
11399 var attributeKey = att.name.replace(reUnescape, '');
11400 var attributeValue = (att.value || '').replace(reUnescape, '');
11401 var test, regexp;
11402 switch (att.operator) {
11403 case '^=':
11404 regexp = new RegExp('^' + escapeRegExp(attributeValue));
11405 break;
11406
11407 case '$=':
11408 regexp = new RegExp(escapeRegExp(attributeValue) + '$');
11409 break;
11410
11411 case '~=':
11412 regexp = new RegExp('(^|\\s)' + escapeRegExp(attributeValue) + '(\\s|$)');
11413 break;
11414
11415 case '|=':
11416 regexp = new RegExp('^' + escapeRegExp(attributeValue) + '(-|$)');
11417 break;
11418
11419 case '=':
11420 test = function test(value) {
11421 return attributeValue === value;
11422 };
11423 break;
11424
11425 case '*=':
11426 test = function test(value) {
11427 return value && value.includes(attributeValue);
11428 };
11429 break;
11430
11431 case '!=':
11432 test = function test(value) {
11433 return attributeValue !== value;
11434 };
11435 break;
11436
11437 default:
11438 test = function test(value) {
11439 return value !== null;
11440 };
11441 }
11442 if (attributeValue === '' && /^[*$^]=$/.test(att.operator)) {
11443 test = function test() {
11444 return false;
11445 };
11446 }
11447 if (!test) {
11448 test = function test(value) {
11449 return value && regexp.test(value);
11450 };
11451 }
11452 return {
11453 key: attributeKey,
11454 value: attributeValue,
11455 type: typeof att.value === 'undefined' ? 'attrExist' : 'attrValue',
11456 test: test
11457 };
11458 });
11459 }
11460 function convertClasses(classes) {
11461 if (!classes) {
11462 return;
11463 }
11464 return classes.map(function(className) {
11465 className = className.replace(reUnescape, '');
11466 return {
11467 value: className,
11468 regexp: new RegExp('(^|\\s)' + escapeRegExp(className) + '(\\s|$)')
11469 };
11470 });
11471 }
11472 function convertPseudos(pseudos) {
11473 if (!pseudos) {
11474 return;
11475 }
11476 return pseudos.map(function(p2) {
11477 var expressions;
11478 if ([ 'is', 'not' ].includes(p2.name)) {
11479 expressions = p2.value;
11480 expressions = expressions.selectors ? expressions.selectors : [ expressions ];
11481 expressions = convertExpressions(expressions);
11482 }
11483 return {
11484 name: p2.name,
11485 expressions: expressions,
11486 value: p2.value
11487 };
11488 });
11489 }
11490 function convertExpressions(expressions) {
11491 return expressions.map(function(exp) {
11492 var newExp = [];
11493 var rule = exp.rule;
11494 while (rule) {
11495 newExp.push({
11496 tag: rule.tagName ? rule.tagName.toLowerCase() : '*',
11497 combinator: rule.nestingOperator ? rule.nestingOperator : ' ',
11498 id: rule.id,
11499 attributes: convertAttributes(rule.attrs),
11500 classes: convertClasses(rule.classNames),
11501 pseudos: convertPseudos(rule.pseudos)
11502 });
11503 rule = rule.rule;
11504 }
11505 return newExp;
11506 });
11507 }
11508 function _convertSelector(selector) {
11509 var expressions = css_parser_default.parse(selector);
11510 expressions = expressions.selectors ? expressions.selectors : [ expressions ];
11511 return convertExpressions(expressions);
11512 }
11513 function optimizedMatchesExpression(vNode, expressions, index, matchAnyParent) {
11514 if (!vNode) {
11515 return false;
11516 }
11517 var isArray = Array.isArray(expressions);
11518 var expression = isArray ? expressions[index] : expressions;
11519 var machedExpression = matchExpression(vNode, expression);
11520 while (!machedExpression && matchAnyParent && vNode.parent) {
11521 vNode = vNode.parent;
11522 machedExpression = matchExpression(vNode, expression);
11523 }
11524 if (index > 0) {
11525 if ([ ' ', '>' ].includes(expression.combinator) === false) {
11526 throw new Error('axe.utils.matchesExpression does not support the combinator: ' + expression.combinator);
11527 }
11528 machedExpression = machedExpression && optimizedMatchesExpression(vNode.parent, expressions, index - 1, expression.combinator === ' ');
11529 }
11530 return machedExpression;
11531 }
11532 function _matchesExpression(vNode, expressions, matchAnyParent) {
11533 return optimizedMatchesExpression(vNode, expressions, expressions.length - 1, matchAnyParent);
11534 }
11535 function closest(vNode, selector) {
11536 while (vNode) {
11537 if (_matches(vNode, selector)) {
11538 return vNode;
11539 }
11540 if (typeof vNode.parent === 'undefined') {
11541 throw new TypeError('Cannot resolve parent for non-DOM nodes');
11542 }
11543 vNode = vNode.parent;
11544 }
11545 return null;
11546 }
11547 var closest_default = closest;
11548 function noop() {}
11549 function funcGuard(f) {
11550 if (typeof f !== 'function') {
11551 throw new TypeError('Queue methods require functions as arguments');
11552 }
11553 }
11554 function queue() {
11555 var tasks = [];
11556 var started = 0;
11557 var remaining = 0;
11558 var completeQueue = noop;
11559 var complete = false;
11560 var err2;
11561 var defaultFail = function defaultFail(e) {
11562 err2 = e;
11563 setTimeout(function() {
11564 if (err2 !== void 0 && err2 !== null) {
11565 log_default('Uncaught error (of queue)', err2);
11566 }
11567 }, 1);
11568 };
11569 var failed = defaultFail;
11570 function createResolve(i) {
11571 return function(r) {
11572 tasks[i] = r;
11573 remaining -= 1;
11574 if (!remaining && completeQueue !== noop) {
11575 complete = true;
11576 completeQueue(tasks);
11577 }
11578 };
11579 }
11580 function abort(msg) {
11581 completeQueue = noop;
11582 failed(msg);
11583 return tasks;
11584 }
11585 function pop() {
11586 var length = tasks.length;
11587 for (;started < length; started++) {
11588 var task = tasks[started];
11589 try {
11590 task.call(null, createResolve(started), abort);
11591 } catch (e) {
11592 abort(e);
11593 }
11594 }
11595 }
11596 var q = {
11597 defer: function defer(fn) {
11598 if (_typeof(fn) === 'object' && fn.then && fn['catch']) {
11599 var defer = fn;
11600 fn = function fn(resolve, reject) {
11601 defer.then(resolve)['catch'](reject);
11602 };
11603 }
11604 funcGuard(fn);
11605 if (err2 !== void 0) {
11606 return;
11607 } else if (complete) {
11608 throw new Error('Queue already completed');
11609 }
11610 tasks.push(fn);
11611 ++remaining;
11612 pop();
11613 return q;
11614 },
11615 then: function then(fn) {
11616 funcGuard(fn);
11617 if (completeQueue !== noop) {
11618 throw new Error('queue `then` already set');
11619 }
11620 if (!err2) {
11621 completeQueue = fn;
11622 if (!remaining) {
11623 complete = true;
11624 completeQueue(tasks);
11625 }
11626 }
11627 return q;
11628 },
11629 catch: function _catch(fn) {
11630 funcGuard(fn);
11631 if (failed !== defaultFail) {
11632 throw new Error('queue `catch` already set');
11633 }
11634 if (!err2) {
11635 failed = fn;
11636 } else {
11637 fn(err2);
11638 err2 = null;
11639 }
11640 return q;
11641 },
11642 abort: abort
11643 };
11644 return q;
11645 }
11646 var queue_default = queue;
11647 var uuid;
11648 var _rng;
11649 var _crypto = window.crypto || window.msCrypto;
11650 if (!_rng && _crypto && _crypto.getRandomValues) {
11651 var _rnds8 = new Uint8Array(16);
11652 _rng = function whatwgRNG() {
11653 _crypto.getRandomValues(_rnds8);
11654 return _rnds8;
11655 };
11656 }
11657 if (!_rng) {
11658 var _rnds = new Array(16);
11659 _rng = function _rng() {
11660 for (var i = 0, r; i < 16; i++) {
11661 if ((i & 3) === 0) {
11662 r = Math.random() * 4294967296;
11663 }
11664 _rnds[i] = r >>> ((i & 3) << 3) & 255;
11665 }
11666 return _rnds;
11667 };
11668 }
11669 var BufferClass = typeof window.Buffer == 'function' ? window.Buffer : Array;
11670 var _byteToHex = [];
11671 var _hexToByte = {};
11672 for (var i = 0; i < 256; i++) {
11673 _byteToHex[i] = (i + 256).toString(16).substr(1);
11674 _hexToByte[_byteToHex[i]] = i;
11675 }
11676 function parse2(s, buf, offset) {
11677 var i = buf && offset || 0, ii = 0;
11678 buf = buf || [];
11679 s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) {
11680 if (ii < 16) {
11681 buf[i + ii++] = _hexToByte[oct];
11682 }
11683 });
11684 while (ii < 16) {
11685 buf[i + ii++] = 0;
11686 }
11687 return buf;
11688 }
11689 function unparse(buf, offset) {
11690 var i = offset || 0, bth = _byteToHex;
11691 return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]];
11692 }
11693 var _seedBytes = _rng();
11694 var _nodeId = [ _seedBytes[0] | 1, _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] ];
11695 var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 16383;
11696 var _lastMSecs = 0;
11697 var _lastNSecs = 0;
11698 function v1(options, buf, offset) {
11699 var i = buf && offset || 0;
11700 var b2 = buf || [];
11701 options = options || {};
11702 var clockseq = options.clockseq != null ? options.clockseq : _clockseq;
11703 var msecs = options.msecs != null ? options.msecs : new Date().getTime();
11704 var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1;
11705 var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;
11706 if (dt < 0 && options.clockseq == null) {
11707 clockseq = clockseq + 1 & 16383;
11708 }
11709 if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) {
11710 nsecs = 0;
11711 }
11712 if (nsecs >= 1e4) {
11713 throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
11714 }
11715 _lastMSecs = msecs;
11716 _lastNSecs = nsecs;
11717 _clockseq = clockseq;
11718 msecs += 122192928e5;
11719 var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;
11720 b2[i++] = tl >>> 24 & 255;
11721 b2[i++] = tl >>> 16 & 255;
11722 b2[i++] = tl >>> 8 & 255;
11723 b2[i++] = tl & 255;
11724 var tmh = msecs / 4294967296 * 1e4 & 268435455;
11725 b2[i++] = tmh >>> 8 & 255;
11726 b2[i++] = tmh & 255;
11727 b2[i++] = tmh >>> 24 & 15 | 16;
11728 b2[i++] = tmh >>> 16 & 255;
11729 b2[i++] = clockseq >>> 8 | 128;
11730 b2[i++] = clockseq & 255;
11731 var node = options.node || _nodeId;
11732 for (var n2 = 0; n2 < 6; n2++) {
11733 b2[i + n2] = node[n2];
11734 }
11735 return buf ? buf : unparse(b2);
11736 }
11737 function v4(options, buf, offset) {
11738 var i = buf && offset || 0;
11739 if (typeof options == 'string') {
11740 buf = options == 'binary' ? new BufferClass(16) : null;
11741 options = null;
11742 }
11743 options = options || {};
11744 var rnds = options.random || (options.rng || _rng)();
11745 rnds[6] = rnds[6] & 15 | 64;
11746 rnds[8] = rnds[8] & 63 | 128;
11747 if (buf) {
11748 for (var ii = 0; ii < 16; ii++) {
11749 buf[i + ii] = rnds[ii];
11750 }
11751 }
11752 return buf || unparse(rnds);
11753 }
11754 uuid = v4;
11755 uuid.v1 = v1;
11756 uuid.v4 = v4;
11757 uuid.parse = parse2;
11758 uuid.unparse = unparse;
11759 uuid.BufferClass = BufferClass;
11760 axe._uuid = v1();
11761 var uuid_default = v4;
11762 var errorTypes = Object.freeze([ 'EvalError', 'RangeError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError' ]);
11763 function stringifyMessage(_ref29) {
11764 var topic = _ref29.topic, channelId = _ref29.channelId, message = _ref29.message, messageId = _ref29.messageId, keepalive = _ref29.keepalive;
11765 var data = {
11766 channelId: channelId,
11767 topic: topic,
11768 messageId: messageId,
11769 keepalive: !!keepalive,
11770 source: getSource()
11771 };
11772 if (message instanceof Error) {
11773 data.error = {
11774 name: message.name,
11775 message: message.message,
11776 stack: message.stack
11777 };
11778 } else {
11779 data.payload = message;
11780 }
11781 return JSON.stringify(data);
11782 }
11783 function parseMessage(dataString) {
11784 var data;
11785 try {
11786 data = JSON.parse(dataString);
11787 } catch (_unused) {
11788 return;
11789 }
11790 if (!isRespondableMessage(data)) {
11791 return;
11792 }
11793 var _data2 = data, topic = _data2.topic, channelId = _data2.channelId, messageId = _data2.messageId, keepalive = _data2.keepalive;
11794 var message = _typeof(data.error) === 'object' ? buildErrorObject(data.error) : data.payload;
11795 return {
11796 topic: topic,
11797 message: message,
11798 messageId: messageId,
11799 channelId: channelId,
11800 keepalive: !!keepalive
11801 };
11802 }
11803 function isRespondableMessage(postedMessage) {
11804 return postedMessage !== null && _typeof(postedMessage) === 'object' && typeof postedMessage.channelId === 'string' && postedMessage.source === getSource();
11805 }
11806 function buildErrorObject(error) {
11807 var msg = error.message || 'Unknown error occurred';
11808 var errorName = errorTypes.includes(error.name) ? error.name : 'Error';
11809 var ErrConstructor = window[errorName] || Error;
11810 if (error.stack) {
11811 msg += '\n' + error.stack.replace(error.message, '');
11812 }
11813 return new ErrConstructor(msg);
11814 }
11815 function getSource() {
11816 var application = 'axeAPI';
11817 var version = '';
11818 if (typeof axe !== 'undefined' && axe._audit && axe._audit.application) {
11819 application = axe._audit.application;
11820 }
11821 if (typeof axe !== 'undefined') {
11822 version = axe.version;
11823 }
11824 return application + '.' + version;
11825 }
11826 function assertIsParentWindow(win) {
11827 assetNotGlobalWindow(win);
11828 assert_default(window.parent === win, 'Source of the response must be the parent window.');
11829 }
11830 function assertIsFrameWindow(win) {
11831 assetNotGlobalWindow(win);
11832 assert_default(win.parent === window, 'Respondable target must be a frame in the current window');
11833 }
11834 function assetNotGlobalWindow(win) {
11835 assert_default(window !== win, 'Messages can not be sent to the same window.');
11836 }
11837 var channels = {};
11838 function storeReplyHandler(channelId, replyHandler) {
11839 var sendToParent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
11840 assert_default(!Object.prototype.hasOwnProperty.call(channels, channelId), 'A replyHandler already exists for this message channel.');
11841 channels[channelId] = {
11842 replyHandler: replyHandler,
11843 sendToParent: sendToParent
11844 };
11845 }
11846 function getReplyHandler(channelId) {
11847 return Object.prototype.hasOwnProperty.call(channels, channelId) ? channels[channelId] : void 0;
11848 }
11849 function deleteReplyHandler(channelId) {
11850 delete channels[channelId];
11851 }
11852 var messageIds = [];
11853 function createMessageId() {
11854 var uuid2 = ''.concat(v4(), ':').concat(v4());
11855 if (messageIds.includes(uuid2)) {
11856 return createMessageId();
11857 }
11858 messageIds.push(uuid2);
11859 return uuid2;
11860 }
11861 function isNewMessage(uuid2) {
11862 if (messageIds.includes(uuid2)) {
11863 return false;
11864 }
11865 messageIds.push(uuid2);
11866 return true;
11867 }
11868 function postMessage(win, data, sendToParent, replyHandler) {
11869 sendToParent ? assertIsParentWindow(win) : assertIsFrameWindow(win);
11870 if (data.message instanceof Error && !sendToParent) {
11871 axe.log(data.message);
11872 return false;
11873 }
11874 var dataString = stringifyMessage(_extends({
11875 messageId: createMessageId()
11876 }, data));
11877 var allowedOrigins = axe._audit.allowedOrigins;
11878 if (!allowedOrigins || !allowedOrigins.length) {
11879 return false;
11880 }
11881 if (typeof replyHandler === 'function') {
11882 storeReplyHandler(data.channelId, replyHandler, sendToParent);
11883 }
11884 allowedOrigins.forEach(function(origin) {
11885 try {
11886 win.postMessage(dataString, origin);
11887 } catch (err2) {
11888 if (err2 instanceof win.DOMException) {
11889 throw new Error('allowedOrigins value "'.concat(origin, '" is not a valid origin'));
11890 }
11891 throw err2;
11892 }
11893 });
11894 return true;
11895 }
11896 function processError(win, error, channelId) {
11897 if (!win.parent !== window) {
11898 return axe.log(error);
11899 }
11900 try {
11901 postMessage(win, {
11902 topic: null,
11903 channelId: channelId,
11904 message: error,
11905 messageId: createMessageId(),
11906 keepalive: true
11907 }, true);
11908 } catch (err2) {
11909 return axe.log(err2);
11910 }
11911 }
11912 function createResponder(win, channelId) {
11913 var sendToParent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
11914 return function respond(message, keepalive, replyHandler) {
11915 var data = {
11916 channelId: channelId,
11917 message: message,
11918 keepalive: keepalive
11919 };
11920 postMessage(win, data, sendToParent, replyHandler);
11921 };
11922 }
11923 function originIsAllowed(origin) {
11924 var allowedOrigins = axe._audit.allowedOrigins;
11925 return allowedOrigins && allowedOrigins.includes('*') || allowedOrigins.includes(origin);
11926 }
11927 function messageHandler(_ref30, topicHandler) {
11928 var origin = _ref30.origin, dataString = _ref30.data, win = _ref30.source;
11929 try {
11930 var data = parseMessage(dataString) || {};
11931 var channelId = data.channelId, message = data.message, messageId = data.messageId;
11932 if (!originIsAllowed(origin) || !isNewMessage(messageId)) {
11933 return;
11934 }
11935 if (message instanceof Error && win.parent !== window) {
11936 axe.log(message);
11937 return false;
11938 }
11939 try {
11940 if (data.topic) {
11941 var responder = createResponder(win, channelId);
11942 assertIsParentWindow(win);
11943 topicHandler(data, responder);
11944 } else {
11945 callReplyHandler(win, data);
11946 }
11947 } catch (error) {
11948 processError(win, error, channelId);
11949 }
11950 } catch (error) {
11951 axe.log(error);
11952 return false;
11953 }
11954 }
11955 function callReplyHandler(win, data) {
11956 var channelId = data.channelId, message = data.message, keepalive = data.keepalive;
11957 var _ref31 = getReplyHandler(channelId) || {}, replyHandler = _ref31.replyHandler, sendToParent = _ref31.sendToParent;
11958 if (!replyHandler) {
11959 return;
11960 }
11961 sendToParent ? assertIsParentWindow(win) : assertIsFrameWindow(win);
11962 var responder = createResponder(win, channelId, sendToParent);
11963 if (!keepalive && channelId) {
11964 deleteReplyHandler(channelId);
11965 }
11966 try {
11967 replyHandler(message, keepalive, responder);
11968 } catch (error) {
11969 axe.log(error);
11970 responder(error, keepalive);
11971 }
11972 }
11973 var frameMessenger = {
11974 open: function open(topicHandler) {
11975 if (typeof window.addEventListener !== 'function') {
11976 return;
11977 }
11978 var handler = function handler(messageEvent) {
11979 messageHandler(messageEvent, topicHandler);
11980 };
11981 window.addEventListener('message', handler, false);
11982 return function() {
11983 window.removeEventListener('message', handler, false);
11984 };
11985 },
11986 post: function post(win, data, replyHandler) {
11987 if (typeof window.addEventListener !== 'function') {
11988 return false;
11989 }
11990 return postMessage(win, data, false, replyHandler);
11991 }
11992 };
11993 function setDefaultFrameMessenger(respondable2) {
11994 respondable2.updateMessenger(frameMessenger);
11995 }
11996 var closeHandler;
11997 var postMessage2;
11998 var topicHandlers = {};
11999 function _respondable(win, topic, message, keepalive, replyHandler) {
12000 var data = {
12001 topic: topic,
12002 message: message,
12003 channelId: ''.concat(v4(), ':').concat(v4()),
12004 keepalive: keepalive
12005 };
12006 return postMessage2(win, data, replyHandler);
12007 }
12008 function messageListener(data, responder) {
12009 var topic = data.topic, message = data.message, keepalive = data.keepalive;
12010 var topicHandler = Object.prototype.hasOwnProperty.call(topicHandlers, topic) ? topicHandlers[topic] : void 0;
12011 if (!topicHandler) {
12012 return;
12013 }
12014 try {
12015 topicHandler(message, keepalive, responder);
12016 } catch (error) {
12017 axe.log(error);
12018 responder(error, keepalive);
12019 }
12020 }
12021 _respondable.updateMessenger = function updateMessenger(_ref32) {
12022 var open = _ref32.open, post = _ref32.post;
12023 assert_default(typeof open === 'function', 'open callback must be a function');
12024 assert_default(typeof post === 'function', 'post callback must be a function');
12025 if (closeHandler) {
12026 closeHandler();
12027 }
12028 var close = open(messageListener);
12029 if (close) {
12030 assert_default(typeof close === 'function', 'open callback must return a cleanup function');
12031 closeHandler = close;
12032 } else {
12033 closeHandler = null;
12034 }
12035 postMessage2 = post;
12036 };
12037 _respondable.subscribe = function subscribe(topic, topicHandler) {
12038 assert_default(typeof topicHandler === 'function', 'Subscriber callback must be a function');
12039 assert_default(!Object.prototype.hasOwnProperty.call(topicHandlers, topic), 'Topic '.concat(topic, ' is already registered to.'));
12040 topicHandlers[topic] = topicHandler;
12041 };
12042 _respondable.isInFrame = function isInFrame() {
12043 var win = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
12044 return !!win.frameElement;
12045 };
12046 setDefaultFrameMessenger(_respondable);
12047 function _sendCommandToFrame(node, parameters, resolve, reject) {
12048 var _parameters$options$p, _parameters$options;
12049 var win = node.contentWindow;
12050 var pingWaitTime = (_parameters$options$p = (_parameters$options = parameters.options) === null || _parameters$options === void 0 ? void 0 : _parameters$options.pingWaitTime) !== null && _parameters$options$p !== void 0 ? _parameters$options$p : 500;
12051 if (!win) {
12052 log_default('Frame does not have a content window', node);
12053 resolve(null);
12054 return;
12055 }
12056 if (pingWaitTime === 0) {
12057 callAxeStart(node, parameters, resolve, reject);
12058 return;
12059 }
12060 var timeout = setTimeout(function() {
12061 timeout = setTimeout(function() {
12062 if (!parameters.debug) {
12063 resolve(null);
12064 } else {
12065 reject(err('No response from frame', node));
12066 }
12067 }, 0);
12068 }, pingWaitTime);
12069 _respondable(win, 'axe.ping', null, void 0, function() {
12070 clearTimeout(timeout);
12071 callAxeStart(node, parameters, resolve, reject);
12072 });
12073 }
12074 function callAxeStart(node, parameters, resolve, reject) {
12075 var _parameters$options$f, _parameters$options2;
12076 var frameWaitTime = (_parameters$options$f = (_parameters$options2 = parameters.options) === null || _parameters$options2 === void 0 ? void 0 : _parameters$options2.frameWaitTime) !== null && _parameters$options$f !== void 0 ? _parameters$options$f : 6e4;
12077 var win = node.contentWindow;
12078 var timeout = setTimeout(function collectResultFramesTimeout() {
12079 reject(err('Axe in frame timed out', node));
12080 }, frameWaitTime);
12081 _respondable(win, 'axe.start', parameters, void 0, function(data) {
12082 clearTimeout(timeout);
12083 if (data instanceof Error === false) {
12084 resolve(data);
12085 } else {
12086 reject(data);
12087 }
12088 });
12089 }
12090 function err(message, node) {
12091 var selector;
12092 if (axe._tree) {
12093 selector = get_selector_default(node);
12094 }
12095 return new Error(message + ': ' + (selector || node));
12096 }
12097 var customSerializer = null;
12098 var nodeSerializer = {
12099 update: function update(serializer) {
12100 assert_default(_typeof(serializer) === 'object', 'serializer must be an object');
12101 customSerializer = serializer;
12102 },
12103 toSpec: function toSpec(node) {
12104 return nodeSerializer.dqElmToSpec(new dq_element_default(node));
12105 },
12106 dqElmToSpec: function dqElmToSpec(dqElm, runOptions) {
12107 var _customSerializer;
12108 if (dqElm instanceof dq_element_default === false) {
12109 return dqElm;
12110 }
12111 if (runOptions) {
12112 dqElm = cloneLimitedDqElement(dqElm, runOptions);
12113 }
12114 if (typeof ((_customSerializer = customSerializer) === null || _customSerializer === void 0 ? void 0 : _customSerializer.toSpec) === 'function') {
12115 return customSerializer.toSpec(dqElm);
12116 }
12117 return dqElm.toJSON();
12118 },
12119 mergeSpecs: function mergeSpecs(nodeSpec, parentFrameSpec) {
12120 var _customSerializer2;
12121 if (typeof ((_customSerializer2 = customSerializer) === null || _customSerializer2 === void 0 ? void 0 : _customSerializer2.mergeSpecs) === 'function') {
12122 return customSerializer.mergeSpecs(nodeSpec, parentFrameSpec);
12123 }
12124 return dq_element_default.mergeSpecs(nodeSpec, parentFrameSpec);
12125 },
12126 mapRawResults: function mapRawResults(rawResults) {
12127 return rawResults.map(function(rawResult) {
12128 return _extends({}, rawResult, {
12129 nodes: nodeSerializer.mapRawNodeResults(rawResult.nodes)
12130 });
12131 });
12132 },
12133 mapRawNodeResults: function mapRawNodeResults(nodeResults) {
12134 return nodeResults === null || nodeResults === void 0 ? void 0 : nodeResults.map(function(_ref33) {
12135 var node = _ref33.node, nodeResult = _objectWithoutProperties(_ref33, _excluded6);
12136 nodeResult.node = nodeSerializer.dqElmToSpec(node);
12137 for (var _i6 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i6 < _arr2.length; _i6++) {
12138 var type2 = _arr2[_i6];
12139 nodeResult[type2] = nodeResult[type2].map(function(_ref34) {
12140 var relatedNodes = _ref34.relatedNodes, checkResult = _objectWithoutProperties(_ref34, _excluded7);
12141 checkResult.relatedNodes = relatedNodes.map(nodeSerializer.dqElmToSpec);
12142 return checkResult;
12143 });
12144 }
12145 return nodeResult;
12146 });
12147 }
12148 };
12149 var node_serializer_default = nodeSerializer;
12150 function cloneLimitedDqElement(dqElm, runOptions) {
12151 var fromFrame2 = dqElm.fromFrame;
12152 var hasAncestry = runOptions.ancestry, hasXpath = runOptions.xpath;
12153 var hasSelectors = runOptions.selectors !== false || fromFrame2;
12154 dqElm = new dq_element_default(dqElm.element, runOptions, {
12155 source: dqElm.source,
12156 nodeIndexes: dqElm.nodeIndexes,
12157 selector: hasSelectors ? dqElm.selector : [ ':root' ],
12158 ancestry: hasAncestry ? dqElm.ancestry : [ ':root' ],
12159 xpath: hasXpath ? dqElm.xpath : '/'
12160 });
12161 dqElm.fromFrame = fromFrame2;
12162 return dqElm;
12163 }
12164 function getAllChecks(object) {
12165 var result = [];
12166 return result.concat(object.any || []).concat(object.all || []).concat(object.none || []);
12167 }
12168 var get_all_checks_default = getAllChecks;
12169 function findBy(array, key, value) {
12170 if (Array.isArray(array)) {
12171 return array.find(function(obj) {
12172 return obj !== null && _typeof(obj) === 'object' && Object.hasOwn(obj, key) && obj[key] === value;
12173 });
12174 }
12175 }
12176 var find_by_default = findBy;
12177 function pushFrame(resultSet, options, frameSpec) {
12178 resultSet.forEach(function(res) {
12179 res.node = node_serializer_default.mergeSpecs(res.node, frameSpec);
12180 var checks = get_all_checks_default(res);
12181 checks.forEach(function(check) {
12182 check.relatedNodes = check.relatedNodes.map(function(node) {
12183 return node_serializer_default.mergeSpecs(node, frameSpec);
12184 });
12185 });
12186 });
12187 }
12188 function spliceNodes(target, to2) {
12189 var firstFromFrame = to2[0].node;
12190 var node;
12191 for (var _i7 = 0; _i7 < target.length; _i7++) {
12192 node = target[_i7].node;
12193 var resultSort = nodeIndexSort(node.nodeIndexes, firstFromFrame.nodeIndexes);
12194 if (resultSort > 0 || resultSort === 0 && firstFromFrame.selector.length < node.selector.length) {
12195 target.splice.apply(target, [ _i7, 0 ].concat(_toConsumableArray(to2)));
12196 return;
12197 }
12198 }
12199 target.push.apply(target, _toConsumableArray(to2));
12200 }
12201 function normalizeResult(result) {
12202 if (!result || !result.results) {
12203 return null;
12204 }
12205 if (!Array.isArray(result.results)) {
12206 return [ result.results ];
12207 }
12208 if (!result.results.length) {
12209 return null;
12210 }
12211 return result.results;
12212 }
12213 function mergeResults(frameResults, options) {
12214 var mergedResult = [];
12215 frameResults.forEach(function(frameResult) {
12216 var results = normalizeResult(frameResult);
12217 if (!results || !results.length) {
12218 return;
12219 }
12220 var frameSpec = getFrameSpec(frameResult);
12221 results.forEach(function(ruleResult) {
12222 if (ruleResult.nodes && frameSpec) {
12223 pushFrame(ruleResult.nodes, options, frameSpec);
12224 }
12225 var res = find_by_default(mergedResult, 'id', ruleResult.id);
12226 if (!res) {
12227 mergedResult.push(ruleResult);
12228 } else {
12229 if (ruleResult.nodes.length) {
12230 spliceNodes(res.nodes, ruleResult.nodes);
12231 }
12232 if (ruleResult.error) {
12233 var _res$error;
12234 (_res$error = res.error) !== null && _res$error !== void 0 ? _res$error : res.error = ruleResult.error;
12235 }
12236 }
12237 });
12238 });
12239 mergedResult.forEach(function(result) {
12240 if (result.nodes) {
12241 result.nodes.sort(function(nodeA, nodeB) {
12242 return nodeIndexSort(nodeA.node.nodeIndexes, nodeB.node.nodeIndexes);
12243 });
12244 }
12245 });
12246 return mergedResult;
12247 }
12248 function nodeIndexSort() {
12249 var nodeIndexesA = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
12250 var nodeIndexesB = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
12251 var length = Math.max(nodeIndexesA === null || nodeIndexesA === void 0 ? void 0 : nodeIndexesA.length, nodeIndexesB === null || nodeIndexesB === void 0 ? void 0 : nodeIndexesB.length);
12252 for (var _i8 = 0; _i8 < length; _i8++) {
12253 var indexA = nodeIndexesA === null || nodeIndexesA === void 0 ? void 0 : nodeIndexesA[_i8];
12254 var indexB = nodeIndexesB === null || nodeIndexesB === void 0 ? void 0 : nodeIndexesB[_i8];
12255 if (typeof indexA !== 'number' || isNaN(indexA)) {
12256 return _i8 === 0 ? 1 : -1;
12257 }
12258 if (typeof indexB !== 'number' || isNaN(indexB)) {
12259 return _i8 === 0 ? -1 : 1;
12260 }
12261 if (indexA !== indexB) {
12262 return indexA - indexB;
12263 }
12264 }
12265 return 0;
12266 }
12267 var merge_results_default = mergeResults;
12268 function getFrameSpec(frameResult) {
12269 if (frameResult.frameElement) {
12270 return node_serializer_default.toSpec(frameResult.frameElement);
12271 } else if (frameResult.frameSpec) {
12272 return frameResult.frameSpec;
12273 }
12274 return null;
12275 }
12276 function _collectResultsFromFrames(parentContent, options, command, parameter, resolve, reject) {
12277 options = _extends({}, options, {
12278 elementRef: false
12279 });
12280 var q = queue_default();
12281 var frames = parentContent.frames;
12282 frames.forEach(function(_ref35) {
12283 var frameElement = _ref35.node, context = _objectWithoutProperties(_ref35, _excluded8);
12284 q.defer(function(res, rej) {
12285 var params = {
12286 options: options,
12287 command: command,
12288 parameter: parameter,
12289 context: context
12290 };
12291 function callback(results) {
12292 if (!results) {
12293 return res(null);
12294 }
12295 return res({
12296 results: results,
12297 frameElement: frameElement
12298 });
12299 }
12300 _sendCommandToFrame(frameElement, params, callback, rej);
12301 });
12302 });
12303 q.then(function(data) {
12304 resolve(merge_results_default(data, options));
12305 })['catch'](reject);
12306 }
12307 function _contains(vNode, otherVNode) {
12308 if (!vNode.shadowId && !otherVNode.shadowId && vNode.actualNode && typeof vNode.actualNode.contains === 'function') {
12309 return vNode.actualNode.contains(otherVNode.actualNode);
12310 }
12311 do {
12312 if (vNode === otherVNode) {
12313 return true;
12314 } else if (otherVNode.nodeIndex < vNode.nodeIndex) {
12315 return false;
12316 }
12317 otherVNode = otherVNode.parent;
12318 } while (otherVNode);
12319 return false;
12320 }
12321 function deepMerge() {
12322 var target = {};
12323 for (var _len6 = arguments.length, sources = new Array(_len6), _key7 = 0; _key7 < _len6; _key7++) {
12324 sources[_key7] = arguments[_key7];
12325 }
12326 sources.forEach(function(source) {
12327 if (!source || _typeof(source) !== 'object' || Array.isArray(source)) {
12328 return;
12329 }
12330 for (var _i9 = 0, _Object$keys2 = Object.keys(source); _i9 < _Object$keys2.length; _i9++) {
12331 var _key8 = _Object$keys2[_i9];
12332 if (!target.hasOwnProperty(_key8) || _typeof(source[_key8]) !== 'object' || Array.isArray(target[_key8])) {
12333 target[_key8] = source[_key8];
12334 } else {
12335 target[_key8] = deepMerge(target[_key8], source[_key8]);
12336 }
12337 }
12338 });
12339 return target;
12340 }
12341 var deep_merge_default = deepMerge;
12342 function extendMetaData(to2, from) {
12343 Object.assign(to2, from);
12344 Object.keys(from).filter(function(prop) {
12345 return typeof from[prop] === 'function';
12346 }).forEach(function(prop) {
12347 to2[prop] = null;
12348 try {
12349 to2[prop] = from[prop](to2);
12350 } catch (_unused2) {}
12351 });
12352 }
12353 var extend_meta_data_default = extendMetaData;
12354 var possibleShadowRoots = [ 'article', 'aside', 'blockquote', 'body', 'div', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'main', 'nav', 'p', 'section', 'span' ];
12355 function isShadowRoot(node) {
12356 if (node.shadowRoot) {
12357 var nodeName2 = node.nodeName.toLowerCase();
12358 if (possibleShadowRoots.includes(nodeName2) || /^[a-z][a-z0-9_.-]*-[a-z0-9_.-]*$/.test(nodeName2)) {
12359 return true;
12360 }
12361 }
12362 return false;
12363 }
12364 var is_shadow_root_default = isShadowRoot;
12365 var dom_exports = {};
12366 __export(dom_exports, {
12367 createGrid: function createGrid() {
12368 return _createGrid;
12369 },
12370 findElmsInContext: function findElmsInContext() {
12371 return find_elms_in_context_default;
12372 },
12373 findNearbyElms: function findNearbyElms() {
12374 return _findNearbyElms;
12375 },
12376 findUp: function findUp() {
12377 return find_up_default;
12378 },
12379 findUpVirtual: function findUpVirtual() {
12380 return find_up_virtual_default;
12381 },
12382 focusDisabled: function focusDisabled() {
12383 return focus_disabled_default;
12384 },
12385 getComposedParent: function getComposedParent() {
12386 return get_composed_parent_default;
12387 },
12388 getElementByReference: function getElementByReference() {
12389 return get_element_by_reference_default;
12390 },
12391 getElementCoordinates: function getElementCoordinates() {
12392 return get_element_coordinates_default;
12393 },
12394 getElementStack: function getElementStack() {
12395 return get_element_stack_default;
12396 },
12397 getModalDialog: function getModalDialog() {
12398 return get_modal_dialog_default;
12399 },
12400 getNodeGrid: function getNodeGrid() {
12401 return _getNodeGrid;
12402 },
12403 getOverflowHiddenAncestors: function getOverflowHiddenAncestors() {
12404 return get_overflow_hidden_ancestors_default;
12405 },
12406 getRootNode: function getRootNode() {
12407 return get_root_node_default2;
12408 },
12409 getScrollOffset: function getScrollOffset() {
12410 return get_scroll_offset_default;
12411 },
12412 getTabbableElements: function getTabbableElements() {
12413 return get_tabbable_elements_default;
12414 },
12415 getTargetRects: function getTargetRects() {
12416 return get_target_rects_default;
12417 },
12418 getTargetSize: function getTargetSize() {
12419 return get_target_size_default;
12420 },
12421 getTextElementStack: function getTextElementStack() {
12422 return get_text_element_stack_default;
12423 },
12424 getViewportSize: function getViewportSize() {
12425 return get_viewport_size_default;
12426 },
12427 getVisibleChildTextRects: function getVisibleChildTextRects() {
12428 return get_visible_child_text_rects_default;
12429 },
12430 hasContent: function hasContent() {
12431 return has_content_default;
12432 },
12433 hasContentVirtual: function hasContentVirtual() {
12434 return has_content_virtual_default;
12435 },
12436 hasLangText: function hasLangText() {
12437 return _hasLangText;
12438 },
12439 idrefs: function idrefs() {
12440 return idrefs_default;
12441 },
12442 insertedIntoFocusOrder: function insertedIntoFocusOrder() {
12443 return inserted_into_focus_order_default;
12444 },
12445 isCurrentPageLink: function isCurrentPageLink() {
12446 return _isCurrentPageLink;
12447 },
12448 isFixedPosition: function isFixedPosition() {
12449 return _isFixedPosition;
12450 },
12451 isFocusable: function isFocusable() {
12452 return _isFocusable;
12453 },
12454 isHTML5: function isHTML5() {
12455 return is_html5_default;
12456 },
12457 isHiddenForEveryone: function isHiddenForEveryone() {
12458 return _isHiddenForEveryone;
12459 },
12460 isHiddenWithCSS: function isHiddenWithCSS() {
12461 return is_hidden_with_css_default;
12462 },
12463 isInTabOrder: function isInTabOrder() {
12464 return _isInTabOrder;
12465 },
12466 isInTextBlock: function isInTextBlock() {
12467 return is_in_text_block_default;
12468 },
12469 isInert: function isInert() {
12470 return _isInert;
12471 },
12472 isModalOpen: function isModalOpen() {
12473 return is_modal_open_default;
12474 },
12475 isMultiline: function isMultiline() {
12476 return _isMultiline;
12477 },
12478 isNativelyFocusable: function isNativelyFocusable() {
12479 return is_natively_focusable_default;
12480 },
12481 isNode: function isNode() {
12482 return is_node_default;
12483 },
12484 isOffscreen: function isOffscreen() {
12485 return is_offscreen_default;
12486 },
12487 isOpaque: function isOpaque() {
12488 return is_opaque_default;
12489 },
12490 isSkipLink: function isSkipLink() {
12491 return _isSkipLink;
12492 },
12493 isVisible: function isVisible() {
12494 return is_visible_default;
12495 },
12496 isVisibleOnScreen: function isVisibleOnScreen() {
12497 return _isVisibleOnScreen;
12498 },
12499 isVisibleToScreenReaders: function isVisibleToScreenReaders() {
12500 return _isVisibleToScreenReaders;
12501 },
12502 isVisualContent: function isVisualContent() {
12503 return is_visual_content_default;
12504 },
12505 reduceToElementsBelowFloating: function reduceToElementsBelowFloating() {
12506 return reduce_to_elements_below_floating_default;
12507 },
12508 shadowElementsFromPoint: function shadowElementsFromPoint() {
12509 return shadow_elements_from_point_default;
12510 },
12511 urlPropsFromAttribute: function urlPropsFromAttribute() {
12512 return url_props_from_attribute_default;
12513 },
12514 visuallyContains: function visuallyContains() {
12515 return _visuallyContains;
12516 },
12517 visuallyOverlaps: function visuallyOverlaps() {
12518 return visually_overlaps_default;
12519 },
12520 visuallySort: function visuallySort() {
12521 return _visuallySort;
12522 }
12523 });
12524 function getRootNode(node) {
12525 var doc = node.getRootNode && node.getRootNode() || document;
12526 if (doc === node) {
12527 doc = document;
12528 }
12529 return doc;
12530 }
12531 var get_root_node_default = getRootNode;
12532 var get_root_node_default2 = get_root_node_default;
12533 function findElmsInContext(_ref36) {
12534 var context = _ref36.context, value = _ref36.value, attr = _ref36.attr, _ref36$elm = _ref36.elm, elm = _ref36$elm === void 0 ? '' : _ref36$elm;
12535 var root;
12536 var escapedValue = escape_selector_default(value);
12537 if (context.nodeType === 9 || context.nodeType === 11) {
12538 root = context;
12539 } else {
12540 root = get_root_node_default2(context);
12541 }
12542 return Array.from(root.querySelectorAll(elm + '[' + attr + '=' + escapedValue + ']'));
12543 }
12544 var find_elms_in_context_default = findElmsInContext;
12545 function findUpVirtual(element, target) {
12546 var parent;
12547 parent = element.actualNode;
12548 if (!element.shadowId && typeof element.actualNode.closest === 'function') {
12549 var match = element.actualNode.closest(target);
12550 if (match) {
12551 return match;
12552 }
12553 return null;
12554 }
12555 do {
12556 parent = parent.assignedSlot ? parent.assignedSlot : parent.parentNode;
12557 if (parent && parent.nodeType === 11) {
12558 parent = parent.host;
12559 }
12560 } while (parent && !element_matches_default(parent, target) && parent !== document.documentElement);
12561 if (!parent) {
12562 return null;
12563 }
12564 if (!element_matches_default(parent, target)) {
12565 return null;
12566 }
12567 return parent;
12568 }
12569 var find_up_virtual_default = findUpVirtual;
12570 function findUp(element, target) {
12571 return find_up_virtual_default(get_node_from_tree_default(element), target);
12572 }
12573 var find_up_default = findUp;
12574 function _rectsOverlap(rect1, rect2) {
12575 return (rect1.left | 0) < (rect2.right | 0) && (rect1.right | 0) > (rect2.left | 0) && (rect1.top | 0) < (rect2.bottom | 0) && (rect1.bottom | 0) > (rect2.top | 0);
12576 }
12577 var getOverflowHiddenAncestors = memoize_default(function getOverflowHiddenAncestorsMemoized(vNode) {
12578 var ancestors = [];
12579 if (!vNode) {
12580 return ancestors;
12581 }
12582 var overflow = vNode.getComputedStylePropertyValue('overflow');
12583 if (overflow === 'hidden') {
12584 ancestors.push(vNode);
12585 }
12586 return ancestors.concat(getOverflowHiddenAncestors(vNode.parent));
12587 });
12588 var get_overflow_hidden_ancestors_default = getOverflowHiddenAncestors;
12589 var clipRegex = /rect\s*\(([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px\s*\)/;
12590 var clipPathRegex = /(\w+)\((\d+)/;
12591 function nativelyHidden(vNode) {
12592 return [ 'style', 'script', 'noscript', 'template' ].includes(vNode.props.nodeName);
12593 }
12594 function displayHidden(vNode) {
12595 if (vNode.props.nodeName === 'area') {
12596 return false;
12597 }
12598 return vNode.getComputedStylePropertyValue('display') === 'none';
12599 }
12600 function visibilityHidden(vNode) {
12601 var _ref37 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, isAncestor = _ref37.isAncestor;
12602 return !isAncestor && [ 'hidden', 'collapse' ].includes(vNode.getComputedStylePropertyValue('visibility'));
12603 }
12604 function contentVisibiltyHidden(vNode) {
12605 var _ref38 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, isAncestor = _ref38.isAncestor;
12606 return !!isAncestor && vNode.getComputedStylePropertyValue('content-visibility') === 'hidden';
12607 }
12608 function ariaHidden(vNode) {
12609 return vNode.attr('aria-hidden') === 'true';
12610 }
12611 function opacityHidden(vNode) {
12612 return vNode.getComputedStylePropertyValue('opacity') === '0';
12613 }
12614 function scrollHidden(vNode) {
12615 var scroll = get_scroll_default(vNode.actualNode);
12616 var elHeight = parseInt(vNode.getComputedStylePropertyValue('height'));
12617 var elWidth = parseInt(vNode.getComputedStylePropertyValue('width'));
12618 return !!scroll && (elHeight === 0 || elWidth === 0);
12619 }
12620 function overflowHidden(vNode) {
12621 var _ref39 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, isAncestor = _ref39.isAncestor;
12622 if (isAncestor) {
12623 return false;
12624 }
12625 var position = vNode.getComputedStylePropertyValue('position');
12626 if (position === 'fixed') {
12627 return false;
12628 }
12629 var nodes = get_overflow_hidden_ancestors_default(vNode);
12630 if (!nodes.length) {
12631 return false;
12632 }
12633 var rect = vNode.boundingClientRect;
12634 return nodes.some(function(node) {
12635 if (position === 'absolute' && !hasPositionedAncestorBetween(vNode, node) && node.getComputedStylePropertyValue('position') === 'static') {
12636 return false;
12637 }
12638 var nodeRect = node.boundingClientRect;
12639 if (nodeRect.width < 2 || nodeRect.height < 2) {
12640 return true;
12641 }
12642 return !_rectsOverlap(rect, nodeRect);
12643 });
12644 }
12645 function clipHidden(vNode) {
12646 var matchesClip = vNode.getComputedStylePropertyValue('clip').match(clipRegex);
12647 var matchesClipPath = vNode.getComputedStylePropertyValue('clip-path').match(clipPathRegex);
12648 if (matchesClip && matchesClip.length === 5) {
12649 var position = vNode.getComputedStylePropertyValue('position');
12650 if ([ 'fixed', 'absolute' ].includes(position)) {
12651 return matchesClip[3] - matchesClip[1] <= 0 && matchesClip[2] - matchesClip[4] <= 0;
12652 }
12653 }
12654 if (matchesClipPath) {
12655 var type2 = matchesClipPath[1];
12656 var value = parseInt(matchesClipPath[2], 10);
12657 switch (type2) {
12658 case 'inset':
12659 return value >= 50;
12660
12661 case 'circle':
12662 return value === 0;
12663
12664 default:
12665 }
12666 }
12667 return false;
12668 }
12669 function areaHidden(vNode, visibleFunction) {
12670 var mapEl = closest_default(vNode, 'map');
12671 if (!mapEl) {
12672 return true;
12673 }
12674 var mapElName = mapEl.attr('name');
12675 if (!mapElName) {
12676 return true;
12677 }
12678 var mapElRootNode = get_root_node_default(vNode.actualNode);
12679 if (!mapElRootNode || mapElRootNode.nodeType !== 9) {
12680 return true;
12681 }
12682 var refs = query_selector_all_default(axe._tree, 'img[usemap="#'.concat(escape_selector_default(mapElName), '"]'));
12683 if (!refs || !refs.length) {
12684 return true;
12685 }
12686 return refs.some(function(ref) {
12687 return !visibleFunction(ref);
12688 });
12689 }
12690 function detailsHidden(vNode) {
12691 var _vNode$parent;
12692 if (((_vNode$parent = vNode.parent) === null || _vNode$parent === void 0 ? void 0 : _vNode$parent.props.nodeName) !== 'details') {
12693 return false;
12694 }
12695 if (vNode.props.nodeName === 'summary') {
12696 var firstSummary = vNode.parent.children.find(function(node) {
12697 return node.props.nodeName === 'summary';
12698 });
12699 if (firstSummary === vNode) {
12700 return false;
12701 }
12702 }
12703 return !vNode.parent.hasAttr('open');
12704 }
12705 function hasPositionedAncestorBetween(child, ancestor) {
12706 var node = child.parent;
12707 while (node && node !== ancestor) {
12708 if ([ 'relative', 'sticky' ].includes(node.getComputedStylePropertyValue('position'))) {
12709 return true;
12710 }
12711 node = node.parent;
12712 }
12713 return false;
12714 }
12715 var hiddenMethods = [ displayHidden, visibilityHidden, contentVisibiltyHidden, detailsHidden ];
12716 function _isHiddenForEveryone(vNode) {
12717 var _ref40 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, skipAncestors = _ref40.skipAncestors, _ref40$isAncestor = _ref40.isAncestor, isAncestor = _ref40$isAncestor === void 0 ? false : _ref40$isAncestor;
12718 vNode = _nodeLookup(vNode).vNode;
12719 if (skipAncestors) {
12720 return isHiddenSelf(vNode, isAncestor);
12721 }
12722 return isHiddenAncestors(vNode, isAncestor);
12723 }
12724 var isHiddenSelf = memoize_default(function isHiddenSelfMemoized(vNode, isAncestor) {
12725 if (nativelyHidden(vNode)) {
12726 return true;
12727 }
12728 if (!vNode.actualNode) {
12729 return false;
12730 }
12731 if (hiddenMethods.some(function(method) {
12732 return method(vNode, {
12733 isAncestor: isAncestor
12734 });
12735 })) {
12736 return true;
12737 }
12738 if (!vNode.actualNode.isConnected) {
12739 return true;
12740 }
12741 return false;
12742 });
12743 var isHiddenAncestors = memoize_default(function isHiddenAncestorsMemoized(vNode, isAncestor) {
12744 if (isHiddenSelf(vNode, isAncestor)) {
12745 return true;
12746 }
12747 if (!vNode.parent) {
12748 return false;
12749 }
12750 return isHiddenAncestors(vNode.parent, true);
12751 });
12752 function getComposedParent(element) {
12753 if (element.assignedSlot) {
12754 return getComposedParent(element.assignedSlot);
12755 } else if (element.parentNode) {
12756 var parentNode = element.parentNode;
12757 if (parentNode.nodeType === 1) {
12758 return parentNode;
12759 } else if (parentNode.host) {
12760 return parentNode.host;
12761 }
12762 }
12763 return null;
12764 }
12765 var get_composed_parent_default = getComposedParent;
12766 function getScrollOffset(element) {
12767 if (!element.nodeType && element.document) {
12768 element = element.document;
12769 }
12770 if (element.nodeType === 9) {
12771 var docElement = element.documentElement, body = element.body;
12772 return {
12773 left: docElement && docElement.scrollLeft || body && body.scrollLeft || 0,
12774 top: docElement && docElement.scrollTop || body && body.scrollTop || 0
12775 };
12776 }
12777 return {
12778 left: element.scrollLeft,
12779 top: element.scrollTop
12780 };
12781 }
12782 var get_scroll_offset_default = getScrollOffset;
12783 function getElementCoordinates(element) {
12784 var scrollOffset = get_scroll_offset_default(document), xOffset = scrollOffset.left, yOffset = scrollOffset.top, coords = element.getBoundingClientRect();
12785 return {
12786 top: coords.top + yOffset,
12787 right: coords.right + xOffset,
12788 bottom: coords.bottom + yOffset,
12789 left: coords.left + xOffset,
12790 width: coords.right - coords.left,
12791 height: coords.bottom - coords.top
12792 };
12793 }
12794 var get_element_coordinates_default = getElementCoordinates;
12795 function getViewportSize(win) {
12796 var doc = win.document;
12797 var docElement = doc.documentElement;
12798 if (win.innerWidth) {
12799 return {
12800 width: win.innerWidth,
12801 height: win.innerHeight
12802 };
12803 }
12804 if (docElement) {
12805 return {
12806 width: docElement.clientWidth,
12807 height: docElement.clientHeight
12808 };
12809 }
12810 var body = doc.body;
12811 return {
12812 width: body.clientWidth,
12813 height: body.clientHeight
12814 };
12815 }
12816 var get_viewport_size_default = getViewportSize;
12817 function _isFixedPosition(node) {
12818 var _ref41 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, skipAncestors = _ref41.skipAncestors;
12819 var _nodeLookup2 = _nodeLookup(node), vNode = _nodeLookup2.vNode;
12820 if (!vNode) {
12821 return false;
12822 }
12823 if (skipAncestors) {
12824 return isFixedSelf(vNode);
12825 }
12826 return isFixedAncestors(vNode);
12827 }
12828 var isFixedSelf = memoize_default(function isFixedSelfMemoized(vNode) {
12829 return vNode.getComputedStylePropertyValue('position') === 'fixed';
12830 });
12831 var isFixedAncestors = memoize_default(function isFixedAncestorsMemoized(vNode) {
12832 if (isFixedSelf(vNode)) {
12833 return true;
12834 }
12835 if (!vNode.parent) {
12836 return false;
12837 }
12838 return isFixedAncestors(vNode.parent);
12839 });
12840 function noParentScrolled(element, offset) {
12841 element = get_composed_parent_default(element);
12842 while (element && element.nodeName.toLowerCase() !== 'html') {
12843 if (element.scrollTop) {
12844 offset += element.scrollTop;
12845 if (offset >= 0) {
12846 return false;
12847 }
12848 }
12849 element = get_composed_parent_default(element);
12850 }
12851 return true;
12852 }
12853 function isOffscreen(element) {
12854 var _ref42 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, isAncestor = _ref42.isAncestor;
12855 if (isAncestor) {
12856 return false;
12857 }
12858 var _nodeLookup3 = _nodeLookup(element), domNode = _nodeLookup3.domNode;
12859 if (!domNode) {
12860 return void 0;
12861 }
12862 var docElement = document.documentElement;
12863 var styl = window.getComputedStyle(domNode);
12864 var dir = window.getComputedStyle(document.body || docElement).getPropertyValue('direction');
12865 var isFixed = _isFixedPosition(domNode);
12866 var coords = isFixed ? domNode.getBoundingClientRect() : get_element_coordinates_default(domNode);
12867 if (coords.top === 0 && coords.bottom === 0) {
12868 return false;
12869 }
12870 if (coords.left === 0 && coords.right === 0) {
12871 return false;
12872 }
12873 if (coords.bottom <= 0 && (noParentScrolled(domNode, coords.bottom) || styl.position === 'absolute')) {
12874 return true;
12875 }
12876 var viewportSize = get_viewport_size_default(window);
12877 if (isFixed && coords.top >= viewportSize.height) {
12878 return true;
12879 }
12880 var rightEdge = Math.max(docElement.scrollWidth, viewportSize.width);
12881 if ((isFixed || dir === 'rtl') && coords.left >= rightEdge) {
12882 return true;
12883 }
12884 if ((isFixed || dir === 'ltr') && coords.right <= 0) {
12885 return true;
12886 }
12887 return false;
12888 }
12889 var is_offscreen_default = isOffscreen;
12890 var hiddenMethods2 = [ opacityHidden, scrollHidden, overflowHidden, clipHidden, is_offscreen_default ];
12891 function _isVisibleOnScreen(vNode) {
12892 vNode = _nodeLookup(vNode).vNode;
12893 return isVisibleOnScreenVirtual(vNode);
12894 }
12895 var isVisibleOnScreenVirtual = memoize_default(function isVisibleOnScreenMemoized(vNode, isAncestor) {
12896 if (vNode.actualNode && vNode.props.nodeName === 'area') {
12897 return !areaHidden(vNode, isVisibleOnScreenVirtual);
12898 }
12899 if (_isHiddenForEveryone(vNode, {
12900 skipAncestors: true,
12901 isAncestor: isAncestor
12902 })) {
12903 return false;
12904 }
12905 if (vNode.actualNode && hiddenMethods2.some(function(method) {
12906 return method(vNode, {
12907 isAncestor: isAncestor
12908 });
12909 })) {
12910 return false;
12911 }
12912 if (!vNode.parent) {
12913 return true;
12914 }
12915 return isVisibleOnScreenVirtual(vNode.parent, true);
12916 });
12917 function _getBoundingRect(rectA, rectB) {
12918 var top = Math.min(rectA.top, rectB.top);
12919 var right = Math.max(rectA.right, rectB.right);
12920 var bottom = Math.max(rectA.bottom, rectB.bottom);
12921 var left = Math.min(rectA.left, rectB.left);
12922 return new window.DOMRect(left, top, right - left, bottom - top);
12923 }
12924 function _isPointInRect(_ref43, _ref44) {
12925 var x = _ref43.x, y = _ref43.y;
12926 var top = _ref44.top, right = _ref44.right, bottom = _ref44.bottom, left = _ref44.left;
12927 return y >= top && x <= right && y <= bottom && x >= left;
12928 }
12929 var math_exports = {};
12930 __export(math_exports, {
12931 getBoundingRect: function getBoundingRect() {
12932 return _getBoundingRect;
12933 },
12934 getIntersectionRect: function getIntersectionRect() {
12935 return _getIntersectionRect;
12936 },
12937 getOffset: function getOffset() {
12938 return _getOffset;
12939 },
12940 getRectCenter: function getRectCenter() {
12941 return _getRectCenter;
12942 },
12943 hasVisualOverlap: function hasVisualOverlap() {
12944 return _hasVisualOverlap;
12945 },
12946 isPointInRect: function isPointInRect() {
12947 return _isPointInRect;
12948 },
12949 rectHasMinimumSize: function rectHasMinimumSize() {
12950 return _rectHasMinimumSize;
12951 },
12952 rectsOverlap: function rectsOverlap() {
12953 return _rectsOverlap;
12954 },
12955 splitRects: function splitRects() {
12956 return _splitRects;
12957 }
12958 });
12959 function _getIntersectionRect(rect1, rect2) {
12960 var leftX = Math.max(rect1.left, rect2.left);
12961 var rightX = Math.min(rect1.right, rect2.right);
12962 var topY = Math.max(rect1.top, rect2.top);
12963 var bottomY = Math.min(rect1.bottom, rect2.bottom);
12964 if (leftX >= rightX || topY >= bottomY) {
12965 return null;
12966 }
12967 return new window.DOMRect(leftX, topY, rightX - leftX, bottomY - topY);
12968 }
12969 function _getRectCenter(_ref45) {
12970 var left = _ref45.left, top = _ref45.top, width = _ref45.width, height = _ref45.height;
12971 return new window.DOMPoint(left + width / 2, top + height / 2);
12972 }
12973 var roundingMargin = .05;
12974 function _rectHasMinimumSize(minSize, _ref46) {
12975 var width = _ref46.width, height = _ref46.height;
12976 return width + roundingMargin >= minSize && height + roundingMargin >= minSize;
12977 }
12978 function _getOffset(vTarget, vNeighbor) {
12979 var minRadiusNeighbour = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 12;
12980 var targetRects = get_target_rects_default(vTarget);
12981 var neighborRects = get_target_rects_default(vNeighbor);
12982 if (!targetRects.length || !neighborRects.length) {
12983 return null;
12984 }
12985 return targetRects.reduce(function(minDistance, targetRect) {
12986 var targetCenter = _getRectCenter(targetRect);
12987 var _iterator8 = _createForOfIteratorHelper(neighborRects), _step8;
12988 try {
12989 for (_iterator8.s(); !(_step8 = _iterator8.n()).done; ) {
12990 var rect = _step8.value;
12991 if (_isPointInRect(targetCenter, rect)) {
12992 return 0;
12993 }
12994 var closestPoint = getClosestPoint(targetCenter, rect);
12995 var distance2 = pointDistance(targetCenter, closestPoint);
12996 minDistance = Math.min(minDistance, distance2);
12997 }
12998 } catch (err) {
12999 _iterator8.e(err);
13000 } finally {
13001 _iterator8.f();
13002 }
13003 var neighborTargetSize = get_target_size_default(vNeighbor);
13004 if (_rectHasMinimumSize(minRadiusNeighbour * 2, neighborTargetSize)) {
13005 return minDistance;
13006 }
13007 var neighborBoundingBox = neighborRects.reduce(_getBoundingRect);
13008 var neighborCenter = _getRectCenter(neighborBoundingBox);
13009 var centerDistance = pointDistance(targetCenter, neighborCenter) - minRadiusNeighbour;
13010 return Math.max(0, Math.min(minDistance, centerDistance));
13011 }, Infinity);
13012 }
13013 function getClosestPoint(point, rect) {
13014 var x;
13015 var y;
13016 if (point.x < rect.left) {
13017 x = rect.left;
13018 } else if (point.x > rect.right) {
13019 x = rect.right;
13020 } else {
13021 x = point.x;
13022 }
13023 if (point.y < rect.top) {
13024 y = rect.top;
13025 } else if (point.y > rect.bottom) {
13026 y = rect.bottom;
13027 } else {
13028 y = point.y;
13029 }
13030 return {
13031 x: x,
13032 y: y
13033 };
13034 }
13035 function pointDistance(pointA, pointB) {
13036 return Math.hypot(pointA.x - pointB.x, pointA.y - pointB.y);
13037 }
13038 function _hasVisualOverlap(vNodeA, vNodeB) {
13039 var rectA = vNodeA.boundingClientRect;
13040 var rectB = vNodeB.boundingClientRect;
13041 if (rectA.left >= rectB.right || rectA.right <= rectB.left || rectA.top >= rectB.bottom || rectA.bottom <= rectB.top) {
13042 return false;
13043 }
13044 return _visuallySort(vNodeA, vNodeB) > 0;
13045 }
13046 function _splitRects(outerRect, overlapRects) {
13047 var uniqueRects = Array.isArray(outerRect) ? outerRect : [ outerRect ];
13048 var _iterator9 = _createForOfIteratorHelper(overlapRects), _step9;
13049 try {
13050 var _loop6 = function _loop6() {
13051 var overlapRect = _step9.value;
13052 uniqueRects = uniqueRects.reduce(function(rects, inputRect) {
13053 return rects.concat(splitRect(inputRect, overlapRect));
13054 }, []);
13055 if (uniqueRects.length > 4e3) {
13056 throw new Error('splitRects: Too many rects');
13057 }
13058 };
13059 for (_iterator9.s(); !(_step9 = _iterator9.n()).done; ) {
13060 _loop6();
13061 }
13062 } catch (err) {
13063 _iterator9.e(err);
13064 } finally {
13065 _iterator9.f();
13066 }
13067 return uniqueRects;
13068 }
13069 function splitRect(inputRect, clipRect) {
13070 var top = inputRect.top, left = inputRect.left, bottom = inputRect.bottom, right = inputRect.right;
13071 var yAligned = top < clipRect.bottom && bottom > clipRect.top;
13072 var xAligned = left < clipRect.right && right > clipRect.left;
13073 var rects = [];
13074 if (between(clipRect.top, top, bottom) && xAligned) {
13075 rects.push({
13076 top: top,
13077 left: left,
13078 bottom: clipRect.top,
13079 right: right
13080 });
13081 }
13082 if (between(clipRect.right, left, right) && yAligned) {
13083 rects.push({
13084 top: top,
13085 left: clipRect.right,
13086 bottom: bottom,
13087 right: right
13088 });
13089 }
13090 if (between(clipRect.bottom, top, bottom) && xAligned) {
13091 rects.push({
13092 top: clipRect.bottom,
13093 right: right,
13094 bottom: bottom,
13095 left: left
13096 });
13097 }
13098 if (between(clipRect.left, left, right) && yAligned) {
13099 rects.push({
13100 top: top,
13101 left: left,
13102 bottom: bottom,
13103 right: clipRect.left
13104 });
13105 }
13106 if (rects.length === 0) {
13107 if (isEnclosedRect(inputRect, clipRect)) {
13108 return [];
13109 }
13110 rects.push(inputRect);
13111 }
13112 return rects.map(computeRect);
13113 }
13114 var between = function between(num, min, max2) {
13115 return num > min && num < max2;
13116 };
13117 function computeRect(baseRect) {
13118 return new window.DOMRect(baseRect.left, baseRect.top, baseRect.right - baseRect.left, baseRect.bottom - baseRect.top);
13119 }
13120 function isEnclosedRect(rectA, rectB) {
13121 return rectA.top >= rectB.top && rectA.left >= rectB.left && rectA.bottom <= rectB.bottom && rectA.right <= rectB.right;
13122 }
13123 var ROOT_LEVEL = 0;
13124 var DEFAULT_LEVEL = .1;
13125 var FLOAT_LEVEL = .2;
13126 var POSITION_LEVEL = .3;
13127 var nodeIndex = 0;
13128 function _createGrid() {
13129 var root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body;
13130 var rootGrid = arguments.length > 1 ? arguments[1] : undefined;
13131 var parentVNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
13132 if (cache_default.get('gridCreated') && !parentVNode) {
13133 return constants_default.gridSize;
13134 }
13135 cache_default.set('gridCreated', true);
13136 if (!parentVNode) {
13137 var vNode = get_node_from_tree_default(document.documentElement);
13138 if (!vNode) {
13139 vNode = new virtual_node_default(document.documentElement);
13140 }
13141 nodeIndex = 0;
13142 vNode._stackingOrder = [ createStackingContext(ROOT_LEVEL, nodeIndex++, null) ];
13143 rootGrid !== null && rootGrid !== void 0 ? rootGrid : rootGrid = new Grid();
13144 addNodeToGrid(rootGrid, vNode);
13145 if (get_scroll_default(vNode.actualNode)) {
13146 var subGrid = new Grid(vNode);
13147 vNode._subGrid = subGrid;
13148 }
13149 }
13150 var treeWalker = document.createTreeWalker(root, window.NodeFilter.SHOW_ELEMENT, null, false);
13151 var node = parentVNode ? treeWalker.nextNode() : treeWalker.currentNode;
13152 while (node) {
13153 var _vNode = get_node_from_tree_default(node);
13154 if (_vNode && _vNode.parent) {
13155 parentVNode = _vNode.parent;
13156 } else if (node.assignedSlot) {
13157 parentVNode = get_node_from_tree_default(node.assignedSlot);
13158 } else if (node.parentElement) {
13159 parentVNode = get_node_from_tree_default(node.parentElement);
13160 } else if (node.parentNode && get_node_from_tree_default(node.parentNode)) {
13161 parentVNode = get_node_from_tree_default(node.parentNode);
13162 }
13163 if (!_vNode) {
13164 _vNode = new axe.VirtualNode(node, parentVNode);
13165 }
13166 _vNode._stackingOrder = createStackingOrder(_vNode, parentVNode, nodeIndex++);
13167 var scrollRegionParent = findScrollRegionParent(_vNode, parentVNode);
13168 var grid = scrollRegionParent ? scrollRegionParent._subGrid : rootGrid;
13169 if (get_scroll_default(_vNode.actualNode)) {
13170 var _subGrid = new Grid(_vNode);
13171 _vNode._subGrid = _subGrid;
13172 }
13173 var rect = _vNode.boundingClientRect;
13174 if (rect.width !== 0 && rect.height !== 0 && _isVisibleOnScreen(node)) {
13175 addNodeToGrid(grid, _vNode);
13176 }
13177 if (is_shadow_root_default(node)) {
13178 _createGrid(node.shadowRoot, grid, _vNode);
13179 }
13180 node = treeWalker.nextNode();
13181 }
13182 return constants_default.gridSize;
13183 }
13184 function isStackingContext(vNode, parentVNode) {
13185 var position = vNode.getComputedStylePropertyValue('position');
13186 var zIndex = vNode.getComputedStylePropertyValue('z-index');
13187 if (position === 'fixed' || position === 'sticky') {
13188 return true;
13189 }
13190 if (zIndex !== 'auto' && position !== 'static') {
13191 return true;
13192 }
13193 if (vNode.getComputedStylePropertyValue('opacity') !== '1') {
13194 return true;
13195 }
13196 var transform = vNode.getComputedStylePropertyValue('-webkit-transform') || vNode.getComputedStylePropertyValue('-ms-transform') || vNode.getComputedStylePropertyValue('transform') || 'none';
13197 if (transform !== 'none') {
13198 return true;
13199 }
13200 var mixBlendMode = vNode.getComputedStylePropertyValue('mix-blend-mode');
13201 if (mixBlendMode && mixBlendMode !== 'normal') {
13202 return true;
13203 }
13204 var filter = vNode.getComputedStylePropertyValue('filter');
13205 if (filter && filter !== 'none') {
13206 return true;
13207 }
13208 var perspective = vNode.getComputedStylePropertyValue('perspective');
13209 if (perspective && perspective !== 'none') {
13210 return true;
13211 }
13212 var clipPath = vNode.getComputedStylePropertyValue('clip-path');
13213 if (clipPath && clipPath !== 'none') {
13214 return true;
13215 }
13216 var mask = vNode.getComputedStylePropertyValue('-webkit-mask') || vNode.getComputedStylePropertyValue('mask') || 'none';
13217 if (mask !== 'none') {
13218 return true;
13219 }
13220 var maskImage = vNode.getComputedStylePropertyValue('-webkit-mask-image') || vNode.getComputedStylePropertyValue('mask-image') || 'none';
13221 if (maskImage !== 'none') {
13222 return true;
13223 }
13224 var maskBorder = vNode.getComputedStylePropertyValue('-webkit-mask-border') || vNode.getComputedStylePropertyValue('mask-border') || 'none';
13225 if (maskBorder !== 'none') {
13226 return true;
13227 }
13228 if (vNode.getComputedStylePropertyValue('isolation') === 'isolate') {
13229 return true;
13230 }
13231 var willChange = vNode.getComputedStylePropertyValue('will-change');
13232 if (willChange === 'transform' || willChange === 'opacity') {
13233 return true;
13234 }
13235 if (vNode.getComputedStylePropertyValue('-webkit-overflow-scrolling') === 'touch') {
13236 return true;
13237 }
13238 var contain = vNode.getComputedStylePropertyValue('contain');
13239 if ([ 'layout', 'paint', 'strict', 'content' ].includes(contain)) {
13240 return true;
13241 }
13242 if (zIndex !== 'auto' && isFlexOrGridContainer(parentVNode)) {
13243 return true;
13244 }
13245 return false;
13246 }
13247 function isFlexOrGridContainer(vNode) {
13248 if (!vNode) {
13249 return false;
13250 }
13251 var display2 = vNode.getComputedStylePropertyValue('display');
13252 return [ 'flex', 'inline-flex', 'grid', 'inline-grid' ].includes(display2);
13253 }
13254 function createStackingOrder(vNode, parentVNode, treeOrder) {
13255 var stackingOrder = parentVNode._stackingOrder.slice();
13256 if (isStackingContext(vNode, parentVNode)) {
13257 var index = stackingOrder.findIndex(function(_ref47) {
13258 var stackLevel2 = _ref47.stackLevel;
13259 return [ ROOT_LEVEL, FLOAT_LEVEL, POSITION_LEVEL ].includes(stackLevel2);
13260 });
13261 if (index !== -1) {
13262 stackingOrder.splice(index, stackingOrder.length - index);
13263 }
13264 }
13265 var stackLevel = getStackLevel(vNode, parentVNode);
13266 if (stackLevel !== null) {
13267 stackingOrder.push(createStackingContext(stackLevel, treeOrder, vNode));
13268 }
13269 return stackingOrder;
13270 }
13271 function createStackingContext(stackLevel, treeOrder, vNode) {
13272 return {
13273 stackLevel: stackLevel,
13274 treeOrder: treeOrder,
13275 vNode: vNode
13276 };
13277 }
13278 function getStackLevel(vNode, parentVNode) {
13279 var zIndex = getRealZIndex(vNode, parentVNode);
13280 if (![ 'auto', '0' ].includes(zIndex)) {
13281 return parseInt(zIndex);
13282 }
13283 if (vNode.getComputedStylePropertyValue('position') !== 'static') {
13284 return POSITION_LEVEL;
13285 }
13286 if (vNode.getComputedStylePropertyValue('float') !== 'none') {
13287 return FLOAT_LEVEL;
13288 }
13289 if (isStackingContext(vNode, parentVNode)) {
13290 return DEFAULT_LEVEL;
13291 }
13292 return null;
13293 }
13294 function getRealZIndex(vNode, parentVNode) {
13295 var position = vNode.getComputedStylePropertyValue('position');
13296 if (position === 'static' && !isFlexOrGridContainer(parentVNode)) {
13297 return 'auto';
13298 }
13299 return vNode.getComputedStylePropertyValue('z-index');
13300 }
13301 function findScrollRegionParent(vNode, parentVNode) {
13302 var scrollRegionParent = null;
13303 var checkedNodes = [ vNode ];
13304 while (parentVNode) {
13305 if (get_scroll_default(parentVNode.actualNode)) {
13306 scrollRegionParent = parentVNode;
13307 break;
13308 }
13309 if (parentVNode._scrollRegionParent) {
13310 scrollRegionParent = parentVNode._scrollRegionParent;
13311 break;
13312 }
13313 checkedNodes.push(parentVNode);
13314 parentVNode = get_node_from_tree_default(parentVNode.actualNode.parentElement || parentVNode.actualNode.parentNode);
13315 }
13316 checkedNodes.forEach(function(virtualNode) {
13317 return virtualNode._scrollRegionParent = scrollRegionParent;
13318 });
13319 return scrollRegionParent;
13320 }
13321 function addNodeToGrid(grid, vNode) {
13322 var overflowHiddenNodes = get_overflow_hidden_ancestors_default(vNode);
13323 vNode.clientRects.forEach(function(clientRect) {
13324 var _vNode$_grid;
13325 var visibleRect = overflowHiddenNodes.reduce(function(rect, overflowNode) {
13326 return rect && _getIntersectionRect(rect, overflowNode.boundingClientRect);
13327 }, clientRect);
13328 if (!visibleRect) {
13329 return;
13330 }
13331 (_vNode$_grid = vNode._grid) !== null && _vNode$_grid !== void 0 ? _vNode$_grid : vNode._grid = grid;
13332 var gridRect = grid.getGridPositionOfRect(visibleRect);
13333 grid.loopGridPosition(gridRect, function(gridCell) {
13334 if (!gridCell.includes(vNode)) {
13335 gridCell.push(vNode);
13336 }
13337 });
13338 });
13339 }
13340 var Grid = function() {
13341 function Grid() {
13342 var container = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
13343 _classCallCheck(this, Grid);
13344 this.container = container;
13345 this.cells = [];
13346 }
13347 return _createClass(Grid, [ {
13348 key: 'toGridIndex',
13349 value: function toGridIndex(num) {
13350 return Math.floor(num / constants_default.gridSize);
13351 }
13352 }, {
13353 key: 'getCellFromPoint',
13354 value: function getCellFromPoint(_ref48) {
13355 var _this$cells, _row;
13356 var x = _ref48.x, y = _ref48.y;
13357 assert_default(this.boundaries, 'Grid does not have cells added');
13358 var rowIndex = this.toGridIndex(y);
13359 var colIndex = this.toGridIndex(x);
13360 assert_default(_isPointInRect({
13361 y: rowIndex,
13362 x: colIndex
13363 }, this.boundaries), 'Element midpoint exceeds the grid bounds');
13364 var row = (_this$cells = this.cells[rowIndex - this.cells._negativeIndex]) !== null && _this$cells !== void 0 ? _this$cells : [];
13365 return (_row = row[colIndex - row._negativeIndex]) !== null && _row !== void 0 ? _row : [];
13366 }
13367 }, {
13368 key: 'loopGridPosition',
13369 value: function loopGridPosition(gridPosition, callback) {
13370 var _gridPosition = gridPosition, left = _gridPosition.left, right = _gridPosition.right, top = _gridPosition.top, bottom = _gridPosition.bottom;
13371 if (this.boundaries) {
13372 gridPosition = _getBoundingRect(this.boundaries, gridPosition);
13373 }
13374 this.boundaries = gridPosition;
13375 loopNegativeIndexMatrix(this.cells, top, bottom, function(gridRow, row) {
13376 loopNegativeIndexMatrix(gridRow, left, right, function(gridCell, col) {
13377 callback(gridCell, {
13378 row: row,
13379 col: col
13380 });
13381 });
13382 });
13383 }
13384 }, {
13385 key: 'getGridPositionOfRect',
13386 value: function getGridPositionOfRect(_ref49) {
13387 var top = _ref49.top, right = _ref49.right, bottom = _ref49.bottom, left = _ref49.left;
13388 var margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
13389 top = this.toGridIndex(top - margin);
13390 right = this.toGridIndex(right + margin - 1);
13391 bottom = this.toGridIndex(bottom + margin - 1);
13392 left = this.toGridIndex(left - margin);
13393 return new window.DOMRect(left, top, right - left, bottom - top);
13394 }
13395 } ]);
13396 }();
13397 function loopNegativeIndexMatrix(matrix, start, end, callback) {
13398 var _matrix$_negativeInde;
13399 (_matrix$_negativeInde = matrix._negativeIndex) !== null && _matrix$_negativeInde !== void 0 ? _matrix$_negativeInde : matrix._negativeIndex = 0;
13400 if (start < matrix._negativeIndex) {
13401 for (var _i0 = 0; _i0 < matrix._negativeIndex - start; _i0++) {
13402 matrix.splice(0, 0, []);
13403 }
13404 matrix._negativeIndex = start;
13405 }
13406 var startOffset = start - matrix._negativeIndex;
13407 var endOffset = end - matrix._negativeIndex;
13408 for (var index = startOffset; index <= endOffset; index++) {
13409 var _index, _matrix$_index;
13410 (_matrix$_index = matrix[_index = index]) !== null && _matrix$_index !== void 0 ? _matrix$_index : matrix[_index] = [];
13411 callback(matrix[index], index + matrix._negativeIndex);
13412 }
13413 }
13414 function _getNodeGrid(node) {
13415 _createGrid();
13416 var _nodeLookup4 = _nodeLookup(node), vNode = _nodeLookup4.vNode;
13417 return vNode._grid;
13418 }
13419 function _findNearbyElms(vNode) {
13420 var _grid$cells;
13421 var margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
13422 var grid = _getNodeGrid(vNode);
13423 if (!(grid !== null && grid !== void 0 && (_grid$cells = grid.cells) !== null && _grid$cells !== void 0 && _grid$cells.length)) {
13424 return [];
13425 }
13426 var rect = vNode.boundingClientRect;
13427 var selfIsFixed = _isFixedPosition(vNode);
13428 var gridPosition = grid.getGridPositionOfRect(rect, margin);
13429 var neighbors = [];
13430 grid.loopGridPosition(gridPosition, function(vNeighbors) {
13431 var _iterator0 = _createForOfIteratorHelper(vNeighbors), _step0;
13432 try {
13433 for (_iterator0.s(); !(_step0 = _iterator0.n()).done; ) {
13434 var vNeighbor = _step0.value;
13435 if (vNeighbor && vNeighbor !== vNode && !neighbors.includes(vNeighbor) && selfIsFixed === _isFixedPosition(vNeighbor)) {
13436 neighbors.push(vNeighbor);
13437 }
13438 }
13439 } catch (err) {
13440 _iterator0.e(err);
13441 } finally {
13442 _iterator0.f();
13443 }
13444 });
13445 return neighbors;
13446 }
13447 var getModalDialog = memoize_default(function getModalDialogMemoized() {
13448 var _dialogs$find;
13449 if (!axe._tree) {
13450 return null;
13451 }
13452 var dialogs = query_selector_all_filter_default(axe._tree[0], 'dialog[open]', function(vNode) {
13453 var rect = vNode.boundingClientRect;
13454 var stack = document.elementsFromPoint(rect.left + 1, rect.top + 1);
13455 return stack.includes(vNode.actualNode) && _isVisibleOnScreen(vNode);
13456 });
13457 if (!dialogs.length) {
13458 return null;
13459 }
13460 var modalDialog = dialogs.find(function(dialog) {
13461 var rect = dialog.boundingClientRect;
13462 var stack = document.elementsFromPoint(rect.left - 10, rect.top - 10);
13463 return stack.includes(dialog.actualNode);
13464 });
13465 if (modalDialog) {
13466 return modalDialog;
13467 }
13468 return (_dialogs$find = dialogs.find(function(dialog) {
13469 var _getNodeFromGrid;
13470 var _ref50 = (_getNodeFromGrid = getNodeFromGrid(dialog)) !== null && _getNodeFromGrid !== void 0 ? _getNodeFromGrid : {}, vNode = _ref50.vNode, rect = _ref50.rect;
13471 if (!vNode) {
13472 return false;
13473 }
13474 var stack = document.elementsFromPoint(rect.left + 1, rect.top + 1);
13475 return !stack.includes(vNode.actualNode);
13476 })) !== null && _dialogs$find !== void 0 ? _dialogs$find : null;
13477 });
13478 var get_modal_dialog_default = getModalDialog;
13479 function getNodeFromGrid(dialog) {
13480 _createGrid();
13481 var grid = axe._tree[0]._grid;
13482 var viewRect = new window.DOMRect(0, 0, window.innerWidth, window.innerHeight);
13483 if (!grid) {
13484 return;
13485 }
13486 for (var row = 0; row < grid.cells.length; row++) {
13487 var cols = grid.cells[row];
13488 if (!cols) {
13489 continue;
13490 }
13491 for (var col = 0; col < cols.length; col++) {
13492 var cells = cols[col];
13493 if (!cells) {
13494 continue;
13495 }
13496 for (var _i1 = 0; _i1 < cells.length; _i1++) {
13497 var vNode = cells[_i1];
13498 var rect = vNode.boundingClientRect;
13499 var intersection = _getIntersectionRect(rect, viewRect);
13500 if (vNode.props.nodeName !== 'html' && vNode !== dialog && vNode.getComputedStylePropertyValue('pointer-events') !== 'none' && intersection) {
13501 return {
13502 vNode: vNode,
13503 rect: intersection
13504 };
13505 }
13506 }
13507 }
13508 }
13509 }
13510 function _isInert(vNode) {
13511 var _ref51 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, skipAncestors = _ref51.skipAncestors, isAncestor = _ref51.isAncestor;
13512 if (skipAncestors) {
13513 return isInertSelf(vNode, isAncestor);
13514 }
13515 return isInertAncestors(vNode, isAncestor);
13516 }
13517 var isInertSelf = memoize_default(function isInertSelfMemoized(vNode, isAncestor) {
13518 if (vNode.hasAttr('inert')) {
13519 return true;
13520 }
13521 if (!isAncestor && vNode.actualNode) {
13522 var modalDialog = get_modal_dialog_default();
13523 if (modalDialog && !_contains(modalDialog, vNode)) {
13524 return true;
13525 }
13526 }
13527 return false;
13528 });
13529 var isInertAncestors = memoize_default(function isInertAncestorsMemoized(vNode, isAncestor) {
13530 if (isInertSelf(vNode, isAncestor)) {
13531 return true;
13532 }
13533 if (!vNode.parent) {
13534 return false;
13535 }
13536 return isInertAncestors(vNode.parent, true);
13537 });
13538 var allowedDisabledNodeNames = [ 'button', 'command', 'fieldset', 'keygen', 'optgroup', 'option', 'select', 'textarea', 'input' ];
13539 function isDisabledAttrAllowed(nodeName2) {
13540 return allowedDisabledNodeNames.includes(nodeName2);
13541 }
13542 function focusDisabled(el) {
13543 var _nodeLookup5 = _nodeLookup(el), vNode = _nodeLookup5.vNode;
13544 if (isDisabledAttrAllowed(vNode.props.nodeName) && vNode.hasAttr('disabled') || _isInert(vNode)) {
13545 return true;
13546 }
13547 var parentNode = vNode.parent;
13548 var ancestors = [];
13549 var fieldsetDisabled = false;
13550 while (parentNode && parentNode.shadowId === vNode.shadowId && !fieldsetDisabled) {
13551 ancestors.push(parentNode);
13552 if (parentNode.props.nodeName === 'legend') {
13553 break;
13554 }
13555 if (parentNode._inDisabledFieldset !== void 0) {
13556 fieldsetDisabled = parentNode._inDisabledFieldset;
13557 break;
13558 }
13559 if (parentNode.props.nodeName === 'fieldset' && parentNode.hasAttr('disabled')) {
13560 fieldsetDisabled = true;
13561 }
13562 parentNode = parentNode.parent;
13563 }
13564 ancestors.forEach(function(ancestor) {
13565 return ancestor._inDisabledFieldset = fieldsetDisabled;
13566 });
13567 if (fieldsetDisabled) {
13568 return true;
13569 }
13570 if (vNode.props.nodeName !== 'area') {
13571 if (!vNode.actualNode) {
13572 return false;
13573 }
13574 return _isHiddenForEveryone(vNode);
13575 }
13576 return false;
13577 }
13578 var focus_disabled_default = focusDisabled;
13579 var angularSkipLinkRegex = /^\/\#/;
13580 var angularRouterLinkRegex = /^#[!/]/;
13581 function _isCurrentPageLink(anchor) {
13582 var _window$location;
13583 var href = anchor.getAttribute('href');
13584 if (!href || href === '#') {
13585 return false;
13586 }
13587 if (angularSkipLinkRegex.test(href)) {
13588 return true;
13589 }
13590 var hash = anchor.hash, protocol = anchor.protocol, hostname = anchor.hostname, port = anchor.port, pathname = anchor.pathname;
13591 if (angularRouterLinkRegex.test(hash)) {
13592 return false;
13593 }
13594 if (href.charAt(0) === '#') {
13595 return true;
13596 }
13597 if (typeof ((_window$location = window.location) === null || _window$location === void 0 ? void 0 : _window$location.origin) !== 'string' || window.location.origin.indexOf('://') === -1) {
13598 return null;
13599 }
13600 var currentPageUrl = window.location.origin + window.location.pathname;
13601 var url;
13602 if (!hostname) {
13603 url = window.location.origin;
13604 } else {
13605 url = ''.concat(protocol, '//').concat(hostname).concat(port ? ':'.concat(port) : '');
13606 }
13607 if (!pathname) {
13608 url += window.location.pathname;
13609 } else {
13610 url += (pathname[0] !== '/' ? '/' : '') + pathname;
13611 }
13612 return url === currentPageUrl;
13613 }
13614 function getElementByReference(node, attr) {
13615 var fragment = node.getAttribute(attr);
13616 if (!fragment) {
13617 return null;
13618 }
13619 if (attr === 'href' && !_isCurrentPageLink(node)) {
13620 return null;
13621 }
13622 if (fragment.indexOf('#') !== -1) {
13623 fragment = decodeURIComponent(fragment.substr(fragment.indexOf('#') + 1));
13624 }
13625 var candidate = document.getElementById(fragment);
13626 if (candidate) {
13627 return candidate;
13628 }
13629 candidate = document.getElementsByName(fragment);
13630 if (candidate.length) {
13631 return candidate[0];
13632 }
13633 return null;
13634 }
13635 var get_element_by_reference_default = getElementByReference;
13636 function _visuallySort(a2, b2) {
13637 _createGrid();
13638 var length = Math.max(a2._stackingOrder.length, b2._stackingOrder.length);
13639 for (var _i10 = 0; _i10 < length; _i10++) {
13640 if (typeof b2._stackingOrder[_i10] === 'undefined') {
13641 return -1;
13642 } else if (typeof a2._stackingOrder[_i10] === 'undefined') {
13643 return 1;
13644 }
13645 if (b2._stackingOrder[_i10].stackLevel > a2._stackingOrder[_i10].stackLevel) {
13646 return 1;
13647 }
13648 if (b2._stackingOrder[_i10].stackLevel < a2._stackingOrder[_i10].stackLevel) {
13649 return -1;
13650 }
13651 if (b2._stackingOrder[_i10].treeOrder !== a2._stackingOrder[_i10].treeOrder) {
13652 return b2._stackingOrder[_i10].treeOrder - a2._stackingOrder[_i10].treeOrder;
13653 }
13654 }
13655 var aNode = a2.actualNode;
13656 var bNode = b2.actualNode;
13657 if (aNode.getRootNode && aNode.getRootNode() !== bNode.getRootNode()) {
13658 var boundaries = [];
13659 while (aNode) {
13660 boundaries.push({
13661 root: aNode.getRootNode(),
13662 node: aNode
13663 });
13664 aNode = aNode.getRootNode().host;
13665 }
13666 while (bNode && !boundaries.find(function(boundary) {
13667 return boundary.root === bNode.getRootNode();
13668 })) {
13669 bNode = bNode.getRootNode().host;
13670 }
13671 aNode = boundaries.find(function(boundary) {
13672 return boundary.root === bNode.getRootNode();
13673 }).node;
13674 if (aNode === bNode) {
13675 return a2.actualNode.getRootNode() !== aNode.getRootNode() ? -1 : 1;
13676 }
13677 }
13678 var _window$Node = window.Node, DOCUMENT_POSITION_FOLLOWING = _window$Node.DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_CONTAINS = _window$Node.DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_CONTAINED_BY = _window$Node.DOCUMENT_POSITION_CONTAINED_BY;
13679 var docPosition = aNode.compareDocumentPosition(bNode);
13680 var DOMOrder = docPosition & DOCUMENT_POSITION_FOLLOWING ? 1 : -1;
13681 var isDescendant = docPosition & DOCUMENT_POSITION_CONTAINS || docPosition & DOCUMENT_POSITION_CONTAINED_BY;
13682 var aPosition = getPositionOrder(a2);
13683 var bPosition = getPositionOrder(b2);
13684 if (aPosition === bPosition || isDescendant) {
13685 return DOMOrder;
13686 }
13687 return bPosition - aPosition;
13688 }
13689 function getPositionOrder(vNode) {
13690 if (vNode.getComputedStylePropertyValue('display').indexOf('inline') !== -1) {
13691 return 2;
13692 }
13693 if (isFloated(vNode)) {
13694 return 1;
13695 }
13696 return 0;
13697 }
13698 function isFloated(vNode) {
13699 if (!vNode) {
13700 return false;
13701 }
13702 if (vNode._isFloated !== void 0) {
13703 return vNode._isFloated;
13704 }
13705 var floatStyle = vNode.getComputedStylePropertyValue('float');
13706 if (floatStyle !== 'none') {
13707 vNode._isFloated = true;
13708 return true;
13709 }
13710 var floated = isFloated(vNode.parent);
13711 vNode._isFloated = floated;
13712 return floated;
13713 }
13714 function getRectStack(grid, rect) {
13715 var recursed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
13716 var center = _getRectCenter(rect);
13717 var gridCell = grid.getCellFromPoint(center) || [];
13718 var floorX = Math.floor(center.x);
13719 var floorY = Math.floor(center.y);
13720 var stack = gridCell.filter(function(gridCellNode) {
13721 return gridCellNode.clientRects.some(function(clientRect) {
13722 var rectX = clientRect.left;
13723 var rectY = clientRect.top;
13724 return floorX < Math.floor(rectX + clientRect.width) && floorX >= Math.floor(rectX) && floorY < Math.floor(rectY + clientRect.height) && floorY >= Math.floor(rectY);
13725 });
13726 });
13727 var gridContainer = grid.container;
13728 if (gridContainer) {
13729 stack = getRectStack(gridContainer._grid, gridContainer.boundingClientRect, true).concat(stack);
13730 }
13731 if (!recursed) {
13732 stack = stack.sort(_visuallySort).map(function(vNode) {
13733 return vNode.actualNode;
13734 }).concat(document.documentElement).filter(function(node, index, array) {
13735 return array.indexOf(node) === index;
13736 });
13737 }
13738 return stack;
13739 }
13740 function getElementStack(node) {
13741 var grid = _getNodeGrid(node);
13742 if (!grid) {
13743 return [];
13744 }
13745 var rect = get_node_from_tree_default(node).boundingClientRect;
13746 return getRectStack(grid, rect);
13747 }
13748 var get_element_stack_default = getElementStack;
13749 function getTabbableElements(virtualNode) {
13750 var nodeAndDescendents = query_selector_all_default(virtualNode, '*');
13751 var tabbableElements = nodeAndDescendents.filter(function(vNode) {
13752 var isFocusable2 = vNode.isFocusable;
13753 var tabIndex = parse_tabindex_default(vNode.actualNode.getAttribute('tabindex'));
13754 return tabIndex !== null ? isFocusable2 && tabIndex >= 0 : isFocusable2;
13755 });
13756 return tabbableElements;
13757 }
13758 var get_tabbable_elements_default = getTabbableElements;
13759 function isNativelyFocusable(el) {
13760 var _nodeLookup6 = _nodeLookup(el), vNode = _nodeLookup6.vNode;
13761 if (!vNode || focus_disabled_default(vNode)) {
13762 return false;
13763 }
13764 switch (vNode.props.nodeName) {
13765 case 'a':
13766 case 'area':
13767 if (vNode.hasAttr('href')) {
13768 return true;
13769 }
13770 break;
13771
13772 case 'input':
13773 return vNode.props.type !== 'hidden';
13774
13775 case 'textarea':
13776 case 'select':
13777 case 'summary':
13778 case 'button':
13779 return true;
13780
13781 case 'details':
13782 return !query_selector_all_default(vNode, 'summary').length;
13783 }
13784 return false;
13785 }
13786 var is_natively_focusable_default = isNativelyFocusable;
13787 function _isFocusable(el) {
13788 var _nodeLookup7 = _nodeLookup(el), vNode = _nodeLookup7.vNode;
13789 if (vNode.props.nodeType !== 1) {
13790 return false;
13791 }
13792 if (focus_disabled_default(vNode)) {
13793 return false;
13794 } else if (is_natively_focusable_default(vNode)) {
13795 return true;
13796 }
13797 var tabindex = parse_tabindex_default(vNode.attr('tabindex'));
13798 return tabindex !== null;
13799 }
13800 function _isInTabOrder(el) {
13801 var _nodeLookup8 = _nodeLookup(el), vNode = _nodeLookup8.vNode;
13802 if (vNode.props.nodeType !== 1) {
13803 return false;
13804 }
13805 var tabindex = parse_tabindex_default(vNode.attr('tabindex'));
13806 if (tabindex <= -1) {
13807 return false;
13808 }
13809 return _isFocusable(vNode);
13810 }
13811 var get_target_rects_default = memoize_default(getTargetRects);
13812 function getTargetRects(vNode) {
13813 var display2 = vNode.getComputedStylePropertyValue('display');
13814 var nodeRects = display2 === 'inline' ? vNode.clientRects : [ vNode.boundingClientRect ];
13815 var overlappingVNodes = _findNearbyElms(vNode).filter(function(vNeighbor) {
13816 return _hasVisualOverlap(vNode, vNeighbor) && vNeighbor.getComputedStylePropertyValue('pointer-events') !== 'none' && !isDescendantNotInTabOrder(vNode, vNeighbor);
13817 });
13818 if (!overlappingVNodes.length) {
13819 return nodeRects;
13820 }
13821 var obscuringRects = overlappingVNodes.map(function(overlappingVNode) {
13822 var overlappingDisplay = overlappingVNode.getComputedStylePropertyValue('display');
13823 return overlappingDisplay === 'inline' ? overlappingVNode.clientRects : overlappingVNode.boundingClientRect;
13824 }).flat(Infinity);
13825 return _splitRects(nodeRects, obscuringRects);
13826 }
13827 function isDescendantNotInTabOrder(vAncestor, vNode) {
13828 return _contains(vAncestor, vNode) && !_isInTabOrder(vNode);
13829 }
13830 var get_target_size_default = memoize_default(getTargetSize);
13831 function getTargetSize(vNode, minSize) {
13832 var rects = get_target_rects_default(vNode);
13833 return getLargestRect(rects, minSize);
13834 }
13835 function getLargestRect(rects, minSize) {
13836 return rects.reduce(function(rectA, rectB) {
13837 var rectAisMinimum = _rectHasMinimumSize(minSize, rectA);
13838 var rectBisMinimum = _rectHasMinimumSize(minSize, rectB);
13839 if (rectAisMinimum !== rectBisMinimum) {
13840 return rectAisMinimum ? rectA : rectB;
13841 }
13842 var areaA = rectA.width * rectA.height;
13843 var areaB = rectB.width * rectB.height;
13844 return areaA > areaB ? rectA : rectB;
13845 });
13846 }
13847 var text_exports = {};
13848 __export(text_exports, {
13849 accessibleText: function accessibleText() {
13850 return accessible_text_default;
13851 },
13852 accessibleTextVirtual: function accessibleTextVirtual() {
13853 return _accessibleTextVirtual;
13854 },
13855 autocomplete: function autocomplete() {
13856 return _autocomplete;
13857 },
13858 formControlValue: function formControlValue() {
13859 return form_control_value_default;
13860 },
13861 formControlValueMethods: function formControlValueMethods() {
13862 return _formControlValueMethods;
13863 },
13864 hasUnicode: function hasUnicode() {
13865 return has_unicode_default;
13866 },
13867 isHumanInterpretable: function isHumanInterpretable() {
13868 return is_human_interpretable_default;
13869 },
13870 isIconLigature: function isIconLigature() {
13871 return _isIconLigature;
13872 },
13873 isValidAutocomplete: function isValidAutocomplete() {
13874 return is_valid_autocomplete_default;
13875 },
13876 label: function label() {
13877 return label_default;
13878 },
13879 labelText: function labelText() {
13880 return label_text_default;
13881 },
13882 labelVirtual: function labelVirtual() {
13883 return label_virtual_default2;
13884 },
13885 nativeElementType: function nativeElementType() {
13886 return native_element_type_default;
13887 },
13888 nativeTextAlternative: function nativeTextAlternative() {
13889 return _nativeTextAlternative;
13890 },
13891 nativeTextMethods: function nativeTextMethods() {
13892 return native_text_methods_default;
13893 },
13894 removeUnicode: function removeUnicode() {
13895 return remove_unicode_default;
13896 },
13897 sanitize: function sanitize() {
13898 return sanitize_default;
13899 },
13900 subtreeText: function subtreeText() {
13901 return subtree_text_default;
13902 },
13903 titleText: function titleText() {
13904 return title_text_default;
13905 },
13906 unsupported: function unsupported() {
13907 return unsupported_default;
13908 },
13909 visible: function visible() {
13910 return visible_default;
13911 },
13912 visibleTextNodes: function visibleTextNodes() {
13913 return visible_text_nodes_default;
13914 },
13915 visibleVirtual: function visibleVirtual() {
13916 return visible_virtual_default;
13917 }
13918 });
13919 function idrefs(node, attr) {
13920 node = node.actualNode || node;
13921 try {
13922 var doc = get_root_node_default2(node);
13923 var result = [];
13924 var attrValue = node.getAttribute(attr);
13925 if (attrValue) {
13926 attrValue = token_list_default(attrValue);
13927 for (var index = 0; index < attrValue.length; index++) {
13928 result.push(doc.getElementById(attrValue[index]));
13929 }
13930 }
13931 return result;
13932 } catch (_unused3) {
13933 throw new TypeError('Cannot resolve id references for non-DOM nodes');
13934 }
13935 }
13936 var idrefs_default = idrefs;
13937 function accessibleText(element, context) {
13938 var virtualNode = get_node_from_tree_default(element);
13939 return _accessibleTextVirtual(virtualNode, context);
13940 }
13941 var accessible_text_default = accessibleText;
13942 function arialabelledbyText(element) {
13943 var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13944 var _nodeLookup9 = _nodeLookup(element), vNode = _nodeLookup9.vNode;
13945 if ((vNode === null || vNode === void 0 ? void 0 : vNode.props.nodeType) !== 1) {
13946 return '';
13947 }
13948 if (vNode.props.nodeType !== 1 || context.inLabelledByContext || context.inControlContext || !vNode.attr('aria-labelledby')) {
13949 return '';
13950 }
13951 var refs = idrefs_default(vNode, 'aria-labelledby').filter(function(elm) {
13952 return elm;
13953 });
13954 return refs.reduce(function(accessibleName, elm) {
13955 var accessibleNameAdd = accessible_text_default(elm, _extends({
13956 inLabelledByContext: true,
13957 startNode: context.startNode || vNode
13958 }, context));
13959 if (!accessibleName) {
13960 return accessibleNameAdd;
13961 } else {
13962 return ''.concat(accessibleName, ' ').concat(accessibleNameAdd);
13963 }
13964 }, '');
13965 }
13966 var arialabelledby_text_default = arialabelledbyText;
13967 function _arialabelText(element) {
13968 var _nodeLookup0 = _nodeLookup(element), vNode = _nodeLookup0.vNode;
13969 if ((vNode === null || vNode === void 0 ? void 0 : vNode.props.nodeType) !== 1) {
13970 return '';
13971 }
13972 return vNode.attr('aria-label') || '';
13973 }
13974 var ariaAttrs = {
13975 'aria-activedescendant': {
13976 type: 'idref',
13977 allowEmpty: true
13978 },
13979 'aria-atomic': {
13980 type: 'boolean',
13981 global: true
13982 },
13983 'aria-autocomplete': {
13984 type: 'nmtoken',
13985 values: [ 'inline', 'list', 'both', 'none' ]
13986 },
13987 'aria-braillelabel': {
13988 type: 'string',
13989 allowEmpty: true,
13990 global: true
13991 },
13992 'aria-brailleroledescription': {
13993 type: 'string',
13994 allowEmpty: true,
13995 global: true
13996 },
13997 'aria-busy': {
13998 type: 'boolean',
13999 global: true
14000 },
14001 'aria-checked': {
14002 type: 'nmtoken',
14003 values: [ 'false', 'mixed', 'true', 'undefined' ]
14004 },
14005 'aria-colcount': {
14006 type: 'int',
14007 minValue: -1
14008 },
14009 'aria-colindex': {
14010 type: 'int',
14011 minValue: 1
14012 },
14013 'aria-colspan': {
14014 type: 'int',
14015 minValue: 1
14016 },
14017 'aria-controls': {
14018 type: 'idrefs',
14019 allowEmpty: true,
14020 global: true
14021 },
14022 'aria-current': {
14023 type: 'nmtoken',
14024 allowEmpty: true,
14025 values: [ 'page', 'step', 'location', 'date', 'time', 'true', 'false' ],
14026 global: true
14027 },
14028 'aria-describedby': {
14029 type: 'idrefs',
14030 allowEmpty: true,
14031 global: true
14032 },
14033 'aria-description': {
14034 type: 'string',
14035 allowEmpty: true,
14036 global: true
14037 },
14038 'aria-details': {
14039 type: 'idref',
14040 allowEmpty: true,
14041 global: true
14042 },
14043 'aria-disabled': {
14044 type: 'boolean',
14045 global: true
14046 },
14047 'aria-dropeffect': {
14048 type: 'nmtokens',
14049 values: [ 'copy', 'execute', 'link', 'move', 'none', 'popup' ],
14050 global: true
14051 },
14052 'aria-errormessage': {
14053 type: 'idref',
14054 allowEmpty: true,
14055 global: true
14056 },
14057 'aria-expanded': {
14058 type: 'nmtoken',
14059 values: [ 'true', 'false', 'undefined' ]
14060 },
14061 'aria-flowto': {
14062 type: 'idrefs',
14063 allowEmpty: true,
14064 global: true
14065 },
14066 'aria-grabbed': {
14067 type: 'nmtoken',
14068 values: [ 'true', 'false', 'undefined' ],
14069 global: true
14070 },
14071 'aria-haspopup': {
14072 type: 'nmtoken',
14073 allowEmpty: true,
14074 values: [ 'true', 'false', 'menu', 'listbox', 'tree', 'grid', 'dialog' ],
14075 global: true
14076 },
14077 'aria-hidden': {
14078 type: 'nmtoken',
14079 values: [ 'true', 'false', 'undefined' ],
14080 global: true
14081 },
14082 'aria-invalid': {
14083 type: 'nmtoken',
14084 values: [ 'grammar', 'false', 'spelling', 'true' ],
14085 global: true
14086 },
14087 'aria-keyshortcuts': {
14088 type: 'string',
14089 allowEmpty: true,
14090 global: true
14091 },
14092 'aria-label': {
14093 type: 'string',
14094 allowEmpty: true,
14095 global: true
14096 },
14097 'aria-labelledby': {
14098 type: 'idrefs',
14099 allowEmpty: true,
14100 global: true
14101 },
14102 'aria-level': {
14103 type: 'int',
14104 minValue: 1
14105 },
14106 'aria-live': {
14107 type: 'nmtoken',
14108 values: [ 'assertive', 'off', 'polite' ],
14109 global: true
14110 },
14111 'aria-modal': {
14112 type: 'boolean'
14113 },
14114 'aria-multiline': {
14115 type: 'boolean'
14116 },
14117 'aria-multiselectable': {
14118 type: 'boolean'
14119 },
14120 'aria-orientation': {
14121 type: 'nmtoken',
14122 values: [ 'horizontal', 'undefined', 'vertical' ]
14123 },
14124 'aria-owns': {
14125 type: 'idrefs',
14126 allowEmpty: true,
14127 global: true
14128 },
14129 'aria-placeholder': {
14130 type: 'string',
14131 allowEmpty: true
14132 },
14133 'aria-posinset': {
14134 type: 'int',
14135 minValue: 1
14136 },
14137 'aria-pressed': {
14138 type: 'nmtoken',
14139 values: [ 'false', 'mixed', 'true', 'undefined' ]
14140 },
14141 'aria-readonly': {
14142 type: 'boolean'
14143 },
14144 'aria-relevant': {
14145 type: 'nmtokens',
14146 values: [ 'additions', 'all', 'removals', 'text' ],
14147 global: true
14148 },
14149 'aria-required': {
14150 type: 'boolean'
14151 },
14152 'aria-roledescription': {
14153 type: 'string',
14154 allowEmpty: true,
14155 global: true
14156 },
14157 'aria-rowcount': {
14158 type: 'int',
14159 minValue: -1
14160 },
14161 'aria-rowindex': {
14162 type: 'int',
14163 minValue: 1
14164 },
14165 'aria-rowspan': {
14166 type: 'int',
14167 minValue: 0
14168 },
14169 'aria-selected': {
14170 type: 'nmtoken',
14171 values: [ 'false', 'true', 'undefined' ]
14172 },
14173 'aria-setsize': {
14174 type: 'int',
14175 minValue: -1
14176 },
14177 'aria-sort': {
14178 type: 'nmtoken',
14179 values: [ 'ascending', 'descending', 'none', 'other' ]
14180 },
14181 'aria-valuemax': {
14182 type: 'decimal'
14183 },
14184 'aria-valuemin': {
14185 type: 'decimal'
14186 },
14187 'aria-valuenow': {
14188 type: 'decimal'
14189 },
14190 'aria-valuetext': {
14191 type: 'string',
14192 allowEmpty: true
14193 }
14194 };
14195 var aria_attrs_default = ariaAttrs;
14196 var ariaRoles = {
14197 alert: {
14198 type: 'structure',
14199 allowedAttrs: [ 'aria-expanded' ],
14200 superclassRole: [ 'section' ]
14201 },
14202 alertdialog: {
14203 type: 'window',
14204 allowedAttrs: [ 'aria-expanded', 'aria-modal' ],
14205 superclassRole: [ 'alert', 'dialog' ],
14206 accessibleNameRequired: true
14207 },
14208 application: {
14209 type: 'landmark',
14210 allowedAttrs: [ 'aria-activedescendant', 'aria-expanded' ],
14211 superclassRole: [ 'structure' ],
14212 accessibleNameRequired: true
14213 },
14214 article: {
14215 type: 'structure',
14216 allowedAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded' ],
14217 superclassRole: [ 'document' ]
14218 },
14219 banner: {
14220 type: 'landmark',
14221 allowedAttrs: [ 'aria-expanded' ],
14222 superclassRole: [ 'landmark' ]
14223 },
14224 blockquote: {
14225 type: 'structure',
14226 superclassRole: [ 'section' ]
14227 },
14228 button: {
14229 type: 'widget',
14230 allowedAttrs: [ 'aria-expanded', 'aria-pressed' ],
14231 superclassRole: [ 'command' ],
14232 accessibleNameRequired: true,
14233 nameFromContent: true,
14234 childrenPresentational: true
14235 },
14236 caption: {
14237 type: 'structure',
14238 requiredContext: [ 'figure', 'table', 'grid', 'treegrid' ],
14239 superclassRole: [ 'section' ],
14240 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
14241 },
14242 cell: {
14243 type: 'structure',
14244 requiredContext: [ 'row' ],
14245 allowedAttrs: [ 'aria-colindex', 'aria-colspan', 'aria-rowindex', 'aria-rowspan', 'aria-expanded' ],
14246 superclassRole: [ 'section' ],
14247 nameFromContent: true
14248 },
14249 checkbox: {
14250 type: 'widget',
14251 requiredAttrs: [ 'aria-checked' ],
14252 allowedAttrs: [ 'aria-readonly', 'aria-expanded', 'aria-required' ],
14253 superclassRole: [ 'input' ],
14254 accessibleNameRequired: true,
14255 nameFromContent: true,
14256 childrenPresentational: true
14257 },
14258 code: {
14259 type: 'structure',
14260 superclassRole: [ 'section' ],
14261 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
14262 },
14263 columnheader: {
14264 type: 'structure',
14265 requiredContext: [ 'row' ],
14266 allowedAttrs: [ 'aria-sort', 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-readonly', 'aria-required', 'aria-rowindex', 'aria-rowspan', 'aria-selected' ],
14267 superclassRole: [ 'cell', 'gridcell', 'sectionhead' ],
14268 accessibleNameRequired: false,
14269 nameFromContent: true
14270 },
14271 combobox: {
14272 type: 'widget',
14273 requiredAttrs: [ 'aria-expanded', 'aria-controls' ],
14274 allowedAttrs: [ 'aria-owns', 'aria-autocomplete', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-orientation' ],
14275 superclassRole: [ 'select' ],
14276 accessibleNameRequired: true
14277 },
14278 command: {
14279 type: 'abstract',
14280 superclassRole: [ 'widget' ]
14281 },
14282 complementary: {
14283 type: 'landmark',
14284 allowedAttrs: [ 'aria-expanded' ],
14285 superclassRole: [ 'landmark' ]
14286 },
14287 composite: {
14288 type: 'abstract',
14289 superclassRole: [ 'widget' ]
14290 },
14291 contentinfo: {
14292 type: 'landmark',
14293 allowedAttrs: [ 'aria-expanded' ],
14294 superclassRole: [ 'landmark' ]
14295 },
14296 comment: {
14297 type: 'structure',
14298 allowedAttrs: [ 'aria-level', 'aria-posinset', 'aria-setsize' ],
14299 superclassRole: [ 'article' ]
14300 },
14301 definition: {
14302 type: 'structure',
14303 allowedAttrs: [ 'aria-expanded' ],
14304 superclassRole: [ 'section' ]
14305 },
14306 deletion: {
14307 type: 'structure',
14308 superclassRole: [ 'section' ],
14309 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
14310 },
14311 dialog: {
14312 type: 'window',
14313 allowedAttrs: [ 'aria-expanded', 'aria-modal' ],
14314 superclassRole: [ 'window' ],
14315 accessibleNameRequired: true
14316 },
14317 directory: {
14318 type: 'structure',
14319 deprecated: true,
14320 allowedAttrs: [ 'aria-expanded' ],
14321 superclassRole: [ 'list' ],
14322 nameFromContent: true
14323 },
14324 document: {
14325 type: 'structure',
14326 allowedAttrs: [ 'aria-expanded' ],
14327 superclassRole: [ 'structure' ]
14328 },
14329 emphasis: {
14330 type: 'structure',
14331 superclassRole: [ 'section' ],
14332 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
14333 },
14334 feed: {
14335 type: 'structure',
14336 requiredOwned: [ 'article' ],
14337 allowedAttrs: [ 'aria-expanded' ],
14338 superclassRole: [ 'list' ]
14339 },
14340 figure: {
14341 type: 'structure',
14342 allowedAttrs: [ 'aria-expanded' ],
14343 superclassRole: [ 'section' ],
14344 nameFromContent: true
14345 },
14346 form: {
14347 type: 'landmark',
14348 allowedAttrs: [ 'aria-expanded' ],
14349 superclassRole: [ 'landmark' ]
14350 },
14351 grid: {
14352 type: 'composite',
14353 requiredOwned: [ 'rowgroup', 'row' ],
14354 allowedAttrs: [ 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-rowcount' ],
14355 superclassRole: [ 'composite', 'table' ],
14356 accessibleNameRequired: false
14357 },
14358 gridcell: {
14359 type: 'widget',
14360 requiredContext: [ 'row' ],
14361 allowedAttrs: [ 'aria-readonly', 'aria-required', 'aria-selected', 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan' ],
14362 superclassRole: [ 'cell', 'widget' ],
14363 nameFromContent: true
14364 },
14365 group: {
14366 type: 'structure',
14367 allowedAttrs: [ 'aria-activedescendant', 'aria-expanded' ],
14368 superclassRole: [ 'section' ]
14369 },
14370 heading: {
14371 type: 'structure',
14372 requiredAttrs: [ 'aria-level' ],
14373 allowedAttrs: [ 'aria-expanded' ],
14374 superclassRole: [ 'sectionhead' ],
14375 accessibleNameRequired: false,
14376 nameFromContent: true
14377 },
14378 img: {
14379 type: 'structure',
14380 allowedAttrs: [ 'aria-expanded' ],
14381 superclassRole: [ 'section' ],
14382 accessibleNameRequired: true,
14383 childrenPresentational: true
14384 },
14385 input: {
14386 type: 'abstract',
14387 superclassRole: [ 'widget' ]
14388 },
14389 insertion: {
14390 type: 'structure',
14391 superclassRole: [ 'section' ],
14392 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
14393 },
14394 landmark: {
14395 type: 'abstract',
14396 superclassRole: [ 'section' ]
14397 },
14398 link: {
14399 type: 'widget',
14400 allowedAttrs: [ 'aria-expanded' ],
14401 superclassRole: [ 'command' ],
14402 accessibleNameRequired: true,
14403 nameFromContent: true
14404 },
14405 list: {
14406 type: 'structure',
14407 requiredOwned: [ 'listitem' ],
14408 allowedAttrs: [ 'aria-expanded' ],
14409 superclassRole: [ 'section' ]
14410 },
14411 listbox: {
14412 type: 'widget',
14413 requiredOwned: [ 'group', 'option' ],
14414 allowedAttrs: [ 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
14415 superclassRole: [ 'select' ],
14416 accessibleNameRequired: true
14417 },
14418 listitem: {
14419 type: 'structure',
14420 requiredContext: [ 'list' ],
14421 allowedAttrs: [ 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-expanded' ],
14422 superclassRole: [ 'section' ],
14423 nameFromContent: true
14424 },
14425 log: {
14426 type: 'structure',
14427 allowedAttrs: [ 'aria-expanded' ],
14428 superclassRole: [ 'section' ]
14429 },
14430 main: {
14431 type: 'landmark',
14432 allowedAttrs: [ 'aria-expanded' ],
14433 superclassRole: [ 'landmark' ]
14434 },
14435 marquee: {
14436 type: 'structure',
14437 allowedAttrs: [ 'aria-expanded' ],
14438 superclassRole: [ 'section' ]
14439 },
14440 math: {
14441 type: 'structure',
14442 allowedAttrs: [ 'aria-expanded' ],
14443 superclassRole: [ 'section' ],
14444 childrenPresentational: true
14445 },
14446 menu: {
14447 type: 'composite',
14448 requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox', 'menu', 'separator' ],
14449 allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
14450 superclassRole: [ 'select' ]
14451 },
14452 menubar: {
14453 type: 'composite',
14454 requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox', 'menu', 'separator' ],
14455 allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
14456 superclassRole: [ 'menu' ]
14457 },
14458 menuitem: {
14459 type: 'widget',
14460 requiredContext: [ 'menu', 'menubar', 'group' ],
14461 allowedAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded' ],
14462 superclassRole: [ 'command' ],
14463 accessibleNameRequired: true,
14464 nameFromContent: true
14465 },
14466 menuitemcheckbox: {
14467 type: 'widget',
14468 requiredContext: [ 'menu', 'menubar', 'group' ],
14469 requiredAttrs: [ 'aria-checked' ],
14470 allowedAttrs: [ 'aria-expanded', 'aria-posinset', 'aria-readonly', 'aria-setsize' ],
14471 superclassRole: [ 'checkbox', 'menuitem' ],
14472 accessibleNameRequired: true,
14473 nameFromContent: true,
14474 childrenPresentational: true
14475 },
14476 menuitemradio: {
14477 type: 'widget',
14478 requiredContext: [ 'menu', 'menubar', 'group' ],
14479 requiredAttrs: [ 'aria-checked' ],
14480 allowedAttrs: [ 'aria-expanded', 'aria-posinset', 'aria-readonly', 'aria-setsize' ],
14481 superclassRole: [ 'menuitemcheckbox', 'radio' ],
14482 accessibleNameRequired: true,
14483 nameFromContent: true,
14484 childrenPresentational: true
14485 },
14486 meter: {
14487 type: 'structure',
14488 requiredAttrs: [ 'aria-valuenow' ],
14489 allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-valuetext' ],
14490 superclassRole: [ 'range' ],
14491 accessibleNameRequired: true,
14492 childrenPresentational: true
14493 },
14494 mark: {
14495 type: 'structure',
14496 superclassRole: [ 'section' ],
14497 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
14498 },
14499 navigation: {
14500 type: 'landmark',
14501 allowedAttrs: [ 'aria-expanded' ],
14502 superclassRole: [ 'landmark' ]
14503 },
14504 none: {
14505 type: 'structure',
14506 superclassRole: [ 'structure' ],
14507 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
14508 },
14509 note: {
14510 type: 'structure',
14511 allowedAttrs: [ 'aria-expanded' ],
14512 superclassRole: [ 'section' ]
14513 },
14514 option: {
14515 type: 'widget',
14516 requiredContext: [ 'group', 'listbox' ],
14517 allowedAttrs: [ 'aria-selected', 'aria-checked', 'aria-posinset', 'aria-setsize' ],
14518 superclassRole: [ 'input' ],
14519 accessibleNameRequired: true,
14520 nameFromContent: true,
14521 childrenPresentational: true
14522 },
14523 paragraph: {
14524 type: 'structure',
14525 superclassRole: [ 'section' ],
14526 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
14527 },
14528 presentation: {
14529 type: 'structure',
14530 superclassRole: [ 'structure' ],
14531 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
14532 },
14533 progressbar: {
14534 type: 'widget',
14535 allowedAttrs: [ 'aria-expanded', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext' ],
14536 superclassRole: [ 'range' ],
14537 accessibleNameRequired: true,
14538 childrenPresentational: true
14539 },
14540 radio: {
14541 type: 'widget',
14542 requiredAttrs: [ 'aria-checked' ],
14543 allowedAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-required' ],
14544 superclassRole: [ 'input' ],
14545 accessibleNameRequired: true,
14546 nameFromContent: true,
14547 childrenPresentational: true
14548 },
14549 radiogroup: {
14550 type: 'composite',
14551 allowedAttrs: [ 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
14552 superclassRole: [ 'select' ],
14553 accessibleNameRequired: false
14554 },
14555 range: {
14556 type: 'abstract',
14557 superclassRole: [ 'widget' ]
14558 },
14559 region: {
14560 type: 'landmark',
14561 allowedAttrs: [ 'aria-expanded' ],
14562 superclassRole: [ 'landmark' ],
14563 accessibleNameRequired: false
14564 },
14565 roletype: {
14566 type: 'abstract',
14567 superclassRole: []
14568 },
14569 row: {
14570 type: 'structure',
14571 requiredContext: [ 'grid', 'rowgroup', 'table', 'treegrid' ],
14572 requiredOwned: [ 'cell', 'columnheader', 'gridcell', 'rowheader' ],
14573 allowedAttrs: [ 'aria-colindex', 'aria-level', 'aria-rowindex', 'aria-selected', 'aria-activedescendant', 'aria-expanded', 'aria-posinset', 'aria-setsize' ],
14574 superclassRole: [ 'group', 'widget' ],
14575 nameFromContent: true
14576 },
14577 rowgroup: {
14578 type: 'structure',
14579 requiredContext: [ 'grid', 'table', 'treegrid' ],
14580 requiredOwned: [ 'row' ],
14581 superclassRole: [ 'structure' ],
14582 nameFromContent: true
14583 },
14584 rowheader: {
14585 type: 'structure',
14586 requiredContext: [ 'row' ],
14587 allowedAttrs: [ 'aria-sort', 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-readonly', 'aria-required', 'aria-rowindex', 'aria-rowspan', 'aria-selected' ],
14588 superclassRole: [ 'cell', 'gridcell', 'sectionhead' ],
14589 accessibleNameRequired: false,
14590 nameFromContent: true
14591 },
14592 scrollbar: {
14593 type: 'widget',
14594 requiredAttrs: [ 'aria-valuenow' ],
14595 allowedAttrs: [ 'aria-controls', 'aria-orientation', 'aria-valuemax', 'aria-valuemin', 'aria-valuetext' ],
14596 superclassRole: [ 'range' ],
14597 childrenPresentational: true
14598 },
14599 search: {
14600 type: 'landmark',
14601 allowedAttrs: [ 'aria-expanded' ],
14602 superclassRole: [ 'landmark' ]
14603 },
14604 searchbox: {
14605 type: 'widget',
14606 allowedAttrs: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-placeholder', 'aria-readonly', 'aria-required' ],
14607 superclassRole: [ 'textbox' ],
14608 accessibleNameRequired: true
14609 },
14610 section: {
14611 type: 'abstract',
14612 superclassRole: [ 'structure' ],
14613 nameFromContent: true
14614 },
14615 sectionhead: {
14616 type: 'abstract',
14617 superclassRole: [ 'structure' ],
14618 nameFromContent: true
14619 },
14620 select: {
14621 type: 'abstract',
14622 superclassRole: [ 'composite', 'group' ]
14623 },
14624 separator: {
14625 type: 'structure',
14626 requiredAttrs: [ 'aria-valuenow' ],
14627 allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-orientation', 'aria-valuetext' ],
14628 superclassRole: [ 'structure', 'widget' ],
14629 childrenPresentational: true
14630 },
14631 slider: {
14632 type: 'widget',
14633 requiredAttrs: [ 'aria-valuenow' ],
14634 allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-orientation', 'aria-readonly', 'aria-required', 'aria-valuetext' ],
14635 superclassRole: [ 'input', 'range' ],
14636 accessibleNameRequired: true,
14637 childrenPresentational: true
14638 },
14639 spinbutton: {
14640 type: 'widget',
14641 allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-valuetext', 'aria-valuenow' ],
14642 superclassRole: [ 'composite', 'input', 'range' ],
14643 accessibleNameRequired: true
14644 },
14645 status: {
14646 type: 'structure',
14647 allowedAttrs: [ 'aria-expanded' ],
14648 superclassRole: [ 'section' ]
14649 },
14650 strong: {
14651 type: 'structure',
14652 superclassRole: [ 'section' ],
14653 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
14654 },
14655 structure: {
14656 type: 'abstract',
14657 superclassRole: [ 'roletype' ]
14658 },
14659 subscript: {
14660 type: 'structure',
14661 superclassRole: [ 'section' ],
14662 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
14663 },
14664 superscript: {
14665 type: 'structure',
14666 superclassRole: [ 'section' ],
14667 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
14668 },
14669 switch: {
14670 type: 'widget',
14671 requiredAttrs: [ 'aria-checked' ],
14672 allowedAttrs: [ 'aria-expanded', 'aria-readonly', 'aria-required' ],
14673 superclassRole: [ 'checkbox' ],
14674 accessibleNameRequired: true,
14675 nameFromContent: true,
14676 childrenPresentational: true
14677 },
14678 suggestion: {
14679 type: 'structure',
14680 requiredOwned: [ 'insertion', 'deletion' ],
14681 superclassRole: [ 'section' ],
14682 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
14683 },
14684 tab: {
14685 type: 'widget',
14686 requiredContext: [ 'tablist' ],
14687 allowedAttrs: [ 'aria-posinset', 'aria-selected', 'aria-setsize', 'aria-expanded' ],
14688 superclassRole: [ 'sectionhead', 'widget' ],
14689 nameFromContent: true,
14690 childrenPresentational: true
14691 },
14692 table: {
14693 type: 'structure',
14694 requiredOwned: [ 'rowgroup', 'row' ],
14695 allowedAttrs: [ 'aria-colcount', 'aria-rowcount', 'aria-expanded' ],
14696 superclassRole: [ 'section' ],
14697 accessibleNameRequired: false,
14698 nameFromContent: true
14699 },
14700 tablist: {
14701 type: 'composite',
14702 requiredOwned: [ 'tab' ],
14703 allowedAttrs: [ 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-activedescendant', 'aria-expanded' ],
14704 superclassRole: [ 'composite' ]
14705 },
14706 tabpanel: {
14707 type: 'structure',
14708 allowedAttrs: [ 'aria-expanded' ],
14709 superclassRole: [ 'section' ],
14710 accessibleNameRequired: false
14711 },
14712 term: {
14713 type: 'structure',
14714 allowedAttrs: [ 'aria-expanded' ],
14715 superclassRole: [ 'section' ],
14716 nameFromContent: true
14717 },
14718 text: {
14719 type: 'structure',
14720 superclassRole: [ 'section' ],
14721 nameFromContent: true
14722 },
14723 textbox: {
14724 type: 'widget',
14725 allowedAttrs: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-placeholder', 'aria-readonly', 'aria-required' ],
14726 superclassRole: [ 'input' ],
14727 accessibleNameRequired: true
14728 },
14729 time: {
14730 type: 'structure',
14731 superclassRole: [ 'section' ]
14732 },
14733 timer: {
14734 type: 'structure',
14735 allowedAttrs: [ 'aria-expanded' ],
14736 superclassRole: [ 'status' ]
14737 },
14738 toolbar: {
14739 type: 'structure',
14740 allowedAttrs: [ 'aria-orientation', 'aria-activedescendant', 'aria-expanded' ],
14741 superclassRole: [ 'group' ],
14742 accessibleNameRequired: true
14743 },
14744 tooltip: {
14745 type: 'structure',
14746 allowedAttrs: [ 'aria-expanded' ],
14747 superclassRole: [ 'section' ],
14748 nameFromContent: true
14749 },
14750 tree: {
14751 type: 'composite',
14752 requiredOwned: [ 'group', 'treeitem' ],
14753 allowedAttrs: [ 'aria-multiselectable', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
14754 superclassRole: [ 'select' ],
14755 accessibleNameRequired: false
14756 },
14757 treegrid: {
14758 type: 'composite',
14759 requiredOwned: [ 'rowgroup', 'row' ],
14760 allowedAttrs: [ 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-readonly', 'aria-required', 'aria-rowcount' ],
14761 superclassRole: [ 'grid', 'tree' ],
14762 accessibleNameRequired: false
14763 },
14764 treeitem: {
14765 type: 'widget',
14766 requiredContext: [ 'group', 'tree' ],
14767 allowedAttrs: [ 'aria-checked', 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-selected', 'aria-setsize' ],
14768 superclassRole: [ 'listitem', 'option' ],
14769 accessibleNameRequired: true,
14770 nameFromContent: true
14771 },
14772 widget: {
14773 type: 'abstract',
14774 superclassRole: [ 'roletype' ]
14775 },
14776 window: {
14777 type: 'abstract',
14778 superclassRole: [ 'roletype' ]
14779 }
14780 };
14781 var aria_roles_default = ariaRoles;
14782 var dpubRoles = {
14783 'doc-abstract': {
14784 type: 'section',
14785 allowedAttrs: [ 'aria-expanded' ],
14786 superclassRole: [ 'section' ]
14787 },
14788 'doc-acknowledgments': {
14789 type: 'landmark',
14790 allowedAttrs: [ 'aria-expanded' ],
14791 superclassRole: [ 'landmark' ]
14792 },
14793 'doc-afterword': {
14794 type: 'landmark',
14795 allowedAttrs: [ 'aria-expanded' ],
14796 superclassRole: [ 'landmark' ]
14797 },
14798 'doc-appendix': {
14799 type: 'landmark',
14800 allowedAttrs: [ 'aria-expanded' ],
14801 superclassRole: [ 'landmark' ]
14802 },
14803 'doc-backlink': {
14804 type: 'link',
14805 allowedAttrs: [ 'aria-expanded' ],
14806 nameFromContent: true,
14807 superclassRole: [ 'link' ]
14808 },
14809 'doc-biblioentry': {
14810 type: 'listitem',
14811 allowedAttrs: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ],
14812 superclassRole: [ 'listitem' ],
14813 deprecated: true
14814 },
14815 'doc-bibliography': {
14816 type: 'landmark',
14817 allowedAttrs: [ 'aria-expanded' ],
14818 superclassRole: [ 'landmark' ]
14819 },
14820 'doc-biblioref': {
14821 type: 'link',
14822 allowedAttrs: [ 'aria-expanded' ],
14823 nameFromContent: true,
14824 superclassRole: [ 'link' ]
14825 },
14826 'doc-chapter': {
14827 type: 'landmark',
14828 allowedAttrs: [ 'aria-expanded' ],
14829 superclassRole: [ 'landmark' ]
14830 },
14831 'doc-colophon': {
14832 type: 'section',
14833 allowedAttrs: [ 'aria-expanded' ],
14834 superclassRole: [ 'section' ]
14835 },
14836 'doc-conclusion': {
14837 type: 'landmark',
14838 allowedAttrs: [ 'aria-expanded' ],
14839 superclassRole: [ 'landmark' ]
14840 },
14841 'doc-cover': {
14842 type: 'img',
14843 allowedAttrs: [ 'aria-expanded' ],
14844 superclassRole: [ 'img' ]
14845 },
14846 'doc-credit': {
14847 type: 'section',
14848 allowedAttrs: [ 'aria-expanded' ],
14849 superclassRole: [ 'section' ]
14850 },
14851 'doc-credits': {
14852 type: 'landmark',
14853 allowedAttrs: [ 'aria-expanded' ],
14854 superclassRole: [ 'landmark' ]
14855 },
14856 'doc-dedication': {
14857 type: 'section',
14858 allowedAttrs: [ 'aria-expanded' ],
14859 superclassRole: [ 'section' ]
14860 },
14861 'doc-endnote': {
14862 type: 'listitem',
14863 allowedAttrs: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ],
14864 superclassRole: [ 'listitem' ],
14865 deprecated: true
14866 },
14867 'doc-endnotes': {
14868 type: 'landmark',
14869 allowedAttrs: [ 'aria-expanded' ],
14870 superclassRole: [ 'landmark' ]
14871 },
14872 'doc-epigraph': {
14873 type: 'section',
14874 allowedAttrs: [ 'aria-expanded' ],
14875 superclassRole: [ 'section' ]
14876 },
14877 'doc-epilogue': {
14878 type: 'landmark',
14879 allowedAttrs: [ 'aria-expanded' ],
14880 superclassRole: [ 'landmark' ]
14881 },
14882 'doc-errata': {
14883 type: 'landmark',
14884 allowedAttrs: [ 'aria-expanded' ],
14885 superclassRole: [ 'landmark' ]
14886 },
14887 'doc-example': {
14888 type: 'section',
14889 allowedAttrs: [ 'aria-expanded' ],
14890 superclassRole: [ 'section' ]
14891 },
14892 'doc-footnote': {
14893 type: 'section',
14894 allowedAttrs: [ 'aria-expanded' ],
14895 superclassRole: [ 'section' ]
14896 },
14897 'doc-foreword': {
14898 type: 'landmark',
14899 allowedAttrs: [ 'aria-expanded' ],
14900 superclassRole: [ 'landmark' ]
14901 },
14902 'doc-glossary': {
14903 type: 'landmark',
14904 allowedAttrs: [ 'aria-expanded' ],
14905 superclassRole: [ 'landmark' ]
14906 },
14907 'doc-glossref': {
14908 type: 'link',
14909 allowedAttrs: [ 'aria-expanded' ],
14910 nameFromContent: true,
14911 superclassRole: [ 'link' ]
14912 },
14913 'doc-index': {
14914 type: 'navigation',
14915 allowedAttrs: [ 'aria-expanded' ],
14916 superclassRole: [ 'navigation' ]
14917 },
14918 'doc-introduction': {
14919 type: 'landmark',
14920 allowedAttrs: [ 'aria-expanded' ],
14921 superclassRole: [ 'landmark' ]
14922 },
14923 'doc-noteref': {
14924 type: 'link',
14925 allowedAttrs: [ 'aria-expanded' ],
14926 nameFromContent: true,
14927 superclassRole: [ 'link' ]
14928 },
14929 'doc-notice': {
14930 type: 'note',
14931 allowedAttrs: [ 'aria-expanded' ],
14932 superclassRole: [ 'note' ]
14933 },
14934 'doc-pagebreak': {
14935 type: 'separator',
14936 allowedAttrs: [ 'aria-expanded', 'aria-orientation' ],
14937 superclassRole: [ 'separator' ],
14938 childrenPresentational: true
14939 },
14940 'doc-pagelist': {
14941 type: 'navigation',
14942 allowedAttrs: [ 'aria-expanded' ],
14943 superclassRole: [ 'navigation' ]
14944 },
14945 'doc-part': {
14946 type: 'landmark',
14947 allowedAttrs: [ 'aria-expanded' ],
14948 superclassRole: [ 'landmark' ]
14949 },
14950 'doc-preface': {
14951 type: 'landmark',
14952 allowedAttrs: [ 'aria-expanded' ],
14953 superclassRole: [ 'landmark' ]
14954 },
14955 'doc-prologue': {
14956 type: 'landmark',
14957 allowedAttrs: [ 'aria-expanded' ],
14958 superclassRole: [ 'landmark' ]
14959 },
14960 'doc-pullquote': {
14961 type: 'none',
14962 superclassRole: [ 'none' ]
14963 },
14964 'doc-qna': {
14965 type: 'section',
14966 allowedAttrs: [ 'aria-expanded' ],
14967 superclassRole: [ 'section' ]
14968 },
14969 'doc-subtitle': {
14970 type: 'sectionhead',
14971 allowedAttrs: [ 'aria-expanded' ],
14972 superclassRole: [ 'sectionhead' ]
14973 },
14974 'doc-tip': {
14975 type: 'note',
14976 allowedAttrs: [ 'aria-expanded' ],
14977 superclassRole: [ 'note' ]
14978 },
14979 'doc-toc': {
14980 type: 'navigation',
14981 allowedAttrs: [ 'aria-expanded' ],
14982 superclassRole: [ 'navigation' ]
14983 }
14984 };
14985 var dpub_roles_default = dpubRoles;
14986 var graphicsRoles = {
14987 'graphics-document': {
14988 type: 'structure',
14989 superclassRole: [ 'document' ],
14990 accessibleNameRequired: true
14991 },
14992 'graphics-object': {
14993 type: 'structure',
14994 superclassRole: [ 'group' ],
14995 nameFromContent: true
14996 },
14997 'graphics-symbol': {
14998 type: 'structure',
14999 superclassRole: [ 'img' ],
15000 accessibleNameRequired: true,
15001 childrenPresentational: true
15002 }
15003 };
15004 var graphics_roles_default = graphicsRoles;
15005 var htmlElms = {
15006 a: {
15007 variant: {
15008 href: {
15009 matches: '[href]',
15010 contentTypes: [ 'interactive', 'phrasing', 'flow' ],
15011 allowedRoles: [ 'button', 'checkbox', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'switch', 'tab', 'treeitem', 'doc-backlink', 'doc-biblioref', 'doc-glossref', 'doc-noteref' ],
15012 namingMethods: [ 'subtreeText' ]
15013 },
15014 default: {
15015 contentTypes: [ 'phrasing', 'flow' ],
15016 allowedRoles: true
15017 }
15018 }
15019 },
15020 abbr: {
15021 contentTypes: [ 'phrasing', 'flow' ],
15022 allowedRoles: true
15023 },
15024 address: {
15025 contentTypes: [ 'flow' ],
15026 allowedRoles: true
15027 },
15028 area: {
15029 variant: {
15030 href: {
15031 matches: '[href]',
15032 allowedRoles: false
15033 },
15034 default: {
15035 allowedRoles: [ 'button', 'link' ]
15036 }
15037 },
15038 contentTypes: [ 'phrasing', 'flow' ],
15039 namingMethods: [ 'altText' ]
15040 },
15041 article: {
15042 contentTypes: [ 'sectioning', 'flow' ],
15043 allowedRoles: [ 'feed', 'presentation', 'none', 'document', 'application', 'main', 'region' ],
15044 shadowRoot: true
15045 },
15046 aside: {
15047 contentTypes: [ 'sectioning', 'flow' ],
15048 allowedRoles: [ 'feed', 'note', 'presentation', 'none', 'region', 'search', 'doc-dedication', 'doc-example', 'doc-footnote', 'doc-glossary', 'doc-pullquote', 'doc-tip' ]
15049 },
15050 audio: {
15051 variant: {
15052 controls: {
15053 matches: '[controls]',
15054 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ]
15055 },
15056 default: {
15057 contentTypes: [ 'embedded', 'phrasing', 'flow' ]
15058 }
15059 },
15060 allowedRoles: [ 'application' ],
15061 chromiumRole: 'Audio'
15062 },
15063 b: {
15064 contentTypes: [ 'phrasing', 'flow' ],
15065 allowedRoles: true
15066 },
15067 base: {
15068 allowedRoles: false,
15069 noAriaAttrs: true
15070 },
15071 bdi: {
15072 contentTypes: [ 'phrasing', 'flow' ],
15073 allowedRoles: true
15074 },
15075 bdo: {
15076 contentTypes: [ 'phrasing', 'flow' ],
15077 allowedRoles: true
15078 },
15079 blockquote: {
15080 contentTypes: [ 'flow' ],
15081 allowedRoles: true,
15082 shadowRoot: true
15083 },
15084 body: {
15085 allowedRoles: false,
15086 shadowRoot: true
15087 },
15088 br: {
15089 contentTypes: [ 'phrasing', 'flow' ],
15090 allowedRoles: [ 'presentation', 'none' ],
15091 namingMethods: [ 'titleText', 'singleSpace' ],
15092 allowedAriaAttrs: [ 'aria-hidden' ]
15093 },
15094 button: {
15095 contentTypes: [ 'interactive', 'phrasing', 'flow' ],
15096 allowedRoles: [ 'checkbox', 'combobox', 'gridcell', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'separator', 'slider', 'switch', 'tab', 'treeitem' ],
15097 namingMethods: [ 'subtreeText' ]
15098 },
15099 canvas: {
15100 allowedRoles: true,
15101 contentTypes: [ 'embedded', 'phrasing', 'flow' ],
15102 chromiumRole: 'Canvas'
15103 },
15104 caption: {
15105 allowedRoles: false
15106 },
15107 cite: {
15108 contentTypes: [ 'phrasing', 'flow' ],
15109 allowedRoles: true
15110 },
15111 code: {
15112 contentTypes: [ 'phrasing', 'flow' ],
15113 allowedRoles: true
15114 },
15115 col: {
15116 allowedRoles: false,
15117 noAriaAttrs: true
15118 },
15119 colgroup: {
15120 allowedRoles: false,
15121 noAriaAttrs: true
15122 },
15123 data: {
15124 contentTypes: [ 'phrasing', 'flow' ],
15125 allowedRoles: true
15126 },
15127 datalist: {
15128 contentTypes: [ 'phrasing', 'flow' ],
15129 allowedRoles: false,
15130 noAriaAttrs: true,
15131 implicitAttrs: {
15132 'aria-multiselectable': 'false'
15133 }
15134 },
15135 dd: {
15136 allowedRoles: false
15137 },
15138 del: {
15139 contentTypes: [ 'phrasing', 'flow' ],
15140 allowedRoles: true
15141 },
15142 dfn: {
15143 contentTypes: [ 'phrasing', 'flow' ],
15144 allowedRoles: true
15145 },
15146 details: {
15147 contentTypes: [ 'interactive', 'flow' ],
15148 allowedRoles: false
15149 },
15150 dialog: {
15151 contentTypes: [ 'flow' ],
15152 allowedRoles: [ 'alertdialog' ]
15153 },
15154 div: {
15155 contentTypes: [ 'flow' ],
15156 allowedRoles: true,
15157 shadowRoot: true
15158 },
15159 dl: {
15160 contentTypes: [ 'flow' ],
15161 allowedRoles: [ 'group', 'list', 'presentation', 'none' ],
15162 chromiumRole: 'DescriptionList'
15163 },
15164 dt: {
15165 allowedRoles: [ 'listitem' ]
15166 },
15167 em: {
15168 contentTypes: [ 'phrasing', 'flow' ],
15169 allowedRoles: true
15170 },
15171 embed: {
15172 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ],
15173 allowedRoles: [ 'application', 'document', 'img', 'presentation', 'none' ],
15174 chromiumRole: 'EmbeddedObject'
15175 },
15176 fieldset: {
15177 contentTypes: [ 'flow' ],
15178 allowedRoles: [ 'none', 'presentation', 'radiogroup' ],
15179 namingMethods: [ 'fieldsetLegendText' ]
15180 },
15181 figcaption: {
15182 allowedRoles: [ 'group', 'none', 'presentation' ]
15183 },
15184 figure: {
15185 contentTypes: [ 'flow' ],
15186 allowedRoles: true,
15187 namingMethods: [ 'figureText', 'titleText' ]
15188 },
15189 footer: {
15190 contentTypes: [ 'flow' ],
15191 allowedRoles: [ 'group', 'none', 'presentation', 'doc-footnote' ],
15192 shadowRoot: true
15193 },
15194 form: {
15195 contentTypes: [ 'flow' ],
15196 allowedRoles: [ 'form', 'search', 'none', 'presentation' ]
15197 },
15198 h1: {
15199 contentTypes: [ 'heading', 'flow' ],
15200 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
15201 shadowRoot: true,
15202 implicitAttrs: {
15203 'aria-level': '1'
15204 }
15205 },
15206 h2: {
15207 contentTypes: [ 'heading', 'flow' ],
15208 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
15209 shadowRoot: true,
15210 implicitAttrs: {
15211 'aria-level': '2'
15212 }
15213 },
15214 h3: {
15215 contentTypes: [ 'heading', 'flow' ],
15216 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
15217 shadowRoot: true,
15218 implicitAttrs: {
15219 'aria-level': '3'
15220 }
15221 },
15222 h4: {
15223 contentTypes: [ 'heading', 'flow' ],
15224 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
15225 shadowRoot: true,
15226 implicitAttrs: {
15227 'aria-level': '4'
15228 }
15229 },
15230 h5: {
15231 contentTypes: [ 'heading', 'flow' ],
15232 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
15233 shadowRoot: true,
15234 implicitAttrs: {
15235 'aria-level': '5'
15236 }
15237 },
15238 h6: {
15239 contentTypes: [ 'heading', 'flow' ],
15240 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
15241 shadowRoot: true,
15242 implicitAttrs: {
15243 'aria-level': '6'
15244 }
15245 },
15246 head: {
15247 allowedRoles: false,
15248 noAriaAttrs: true
15249 },
15250 header: {
15251 contentTypes: [ 'flow' ],
15252 allowedRoles: [ 'group', 'none', 'presentation', 'doc-footnote' ],
15253 shadowRoot: true
15254 },
15255 hgroup: {
15256 contentTypes: [ 'heading', 'flow' ],
15257 allowedRoles: true
15258 },
15259 hr: {
15260 contentTypes: [ 'flow' ],
15261 allowedRoles: [ 'none', 'presentation', 'doc-pagebreak' ],
15262 namingMethods: [ 'titleText', 'singleSpace' ]
15263 },
15264 html: {
15265 allowedRoles: false,
15266 noAriaAttrs: true
15267 },
15268 i: {
15269 contentTypes: [ 'phrasing', 'flow' ],
15270 allowedRoles: true
15271 },
15272 iframe: {
15273 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ],
15274 allowedRoles: [ 'application', 'document', 'img', 'none', 'presentation' ],
15275 chromiumRole: 'Iframe'
15276 },
15277 img: {
15278 variant: {
15279 nonEmptyAlt: {
15280 matches: [ {
15281 attributes: {
15282 alt: '/.+/'
15283 }
15284 }, {
15285 hasAccessibleName: true
15286 } ],
15287 allowedRoles: [ 'button', 'checkbox', 'link', 'math', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'meter', 'option', 'progressbar', 'radio', 'scrollbar', 'separator', 'slider', 'switch', 'tab', 'treeitem', 'doc-cover' ]
15288 },
15289 usemap: {
15290 matches: '[usemap]',
15291 contentTypes: [ 'interactive', 'embedded', 'flow' ]
15292 },
15293 default: {
15294 allowedRoles: [ 'presentation', 'none' ],
15295 contentTypes: [ 'embedded', 'flow' ]
15296 }
15297 },
15298 namingMethods: [ 'altText' ]
15299 },
15300 input: {
15301 variant: {
15302 button: {
15303 matches: {
15304 properties: {
15305 type: 'button'
15306 }
15307 },
15308 allowedRoles: [ 'checkbox', 'combobox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'switch', 'tab' ]
15309 },
15310 buttonType: {
15311 matches: {
15312 properties: {
15313 type: [ 'button', 'submit', 'reset' ]
15314 }
15315 },
15316 namingMethods: [ 'valueText', 'titleText', 'buttonDefaultText' ]
15317 },
15318 checkboxPressed: {
15319 matches: {
15320 properties: {
15321 type: 'checkbox'
15322 },
15323 attributes: {
15324 'aria-pressed': '/.*/'
15325 }
15326 },
15327 allowedRoles: [ 'button', 'menuitemcheckbox', 'option', 'switch' ],
15328 implicitAttrs: {
15329 'aria-checked': 'false'
15330 }
15331 },
15332 checkbox: {
15333 matches: {
15334 properties: {
15335 type: 'checkbox'
15336 },
15337 attributes: {
15338 'aria-pressed': null
15339 }
15340 },
15341 allowedRoles: [ 'menuitemcheckbox', 'option', 'switch' ],
15342 implicitAttrs: {
15343 'aria-checked': 'false'
15344 }
15345 },
15346 noRoles: {
15347 matches: {
15348 properties: {
15349 type: [ 'color', 'date', 'datetime-local', 'file', 'month', 'number', 'password', 'range', 'reset', 'submit', 'time', 'week' ]
15350 }
15351 },
15352 allowedRoles: false
15353 },
15354 hidden: {
15355 matches: {
15356 properties: {
15357 type: 'hidden'
15358 }
15359 },
15360 contentTypes: [ 'flow' ],
15361 allowedRoles: false,
15362 noAriaAttrs: true
15363 },
15364 image: {
15365 matches: {
15366 properties: {
15367 type: 'image'
15368 }
15369 },
15370 allowedRoles: [ 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'radio', 'switch' ],
15371 namingMethods: [ 'altText', 'valueText', 'labelText', 'titleText', 'buttonDefaultText' ]
15372 },
15373 radio: {
15374 matches: {
15375 properties: {
15376 type: 'radio'
15377 }
15378 },
15379 allowedRoles: [ 'menuitemradio' ],
15380 implicitAttrs: {
15381 'aria-checked': 'false'
15382 }
15383 },
15384 textWithList: {
15385 matches: {
15386 properties: {
15387 type: 'text'
15388 },
15389 attributes: {
15390 list: '/.*/'
15391 }
15392 },
15393 allowedRoles: false
15394 },
15395 default: {
15396 contentTypes: [ 'interactive', 'flow' ],
15397 allowedRoles: [ 'combobox', 'searchbox', 'spinbutton' ],
15398 implicitAttrs: {
15399 'aria-valuenow': ''
15400 },
15401 namingMethods: [ 'labelText', 'placeholderText' ]
15402 }
15403 }
15404 },
15405 ins: {
15406 contentTypes: [ 'phrasing', 'flow' ],
15407 allowedRoles: true
15408 },
15409 kbd: {
15410 contentTypes: [ 'phrasing', 'flow' ],
15411 allowedRoles: true
15412 },
15413 label: {
15414 contentTypes: [ 'interactive', 'phrasing', 'flow' ],
15415 allowedRoles: false,
15416 chromiumRole: 'Label'
15417 },
15418 legend: {
15419 allowedRoles: false
15420 },
15421 li: {
15422 allowedRoles: [ 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'none', 'presentation', 'radio', 'separator', 'tab', 'treeitem', 'doc-biblioentry', 'doc-endnote' ],
15423 implicitAttrs: {
15424 'aria-setsize': '1',
15425 'aria-posinset': '1'
15426 }
15427 },
15428 link: {
15429 contentTypes: [ 'phrasing', 'flow' ],
15430 allowedRoles: false,
15431 noAriaAttrs: true
15432 },
15433 main: {
15434 contentTypes: [ 'flow' ],
15435 allowedRoles: false,
15436 shadowRoot: true
15437 },
15438 map: {
15439 contentTypes: [ 'phrasing', 'flow' ],
15440 allowedRoles: false,
15441 noAriaAttrs: true
15442 },
15443 math: {
15444 contentTypes: [ 'embedded', 'phrasing', 'flow' ],
15445 allowedRoles: false
15446 },
15447 mark: {
15448 contentTypes: [ 'phrasing', 'flow' ],
15449 allowedRoles: true
15450 },
15451 menu: {
15452 contentTypes: [ 'flow' ],
15453 allowedRoles: [ 'directory', 'group', 'listbox', 'menu', 'menubar', 'none', 'presentation', 'radiogroup', 'tablist', 'toolbar', 'tree' ]
15454 },
15455 meta: {
15456 variant: {
15457 itemprop: {
15458 matches: '[itemprop]',
15459 contentTypes: [ 'phrasing', 'flow' ]
15460 }
15461 },
15462 allowedRoles: false,
15463 noAriaAttrs: true
15464 },
15465 meter: {
15466 contentTypes: [ 'phrasing', 'flow' ],
15467 allowedRoles: false,
15468 chromiumRole: 'progressbar'
15469 },
15470 nav: {
15471 contentTypes: [ 'sectioning', 'flow' ],
15472 allowedRoles: [ 'doc-index', 'doc-pagelist', 'doc-toc', 'menu', 'menubar', 'none', 'presentation', 'tablist' ],
15473 shadowRoot: true
15474 },
15475 noscript: {
15476 contentTypes: [ 'phrasing', 'flow' ],
15477 allowedRoles: false,
15478 noAriaAttrs: true
15479 },
15480 object: {
15481 variant: {
15482 usemap: {
15483 matches: '[usemap]',
15484 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ]
15485 },
15486 default: {
15487 contentTypes: [ 'embedded', 'phrasing', 'flow' ]
15488 }
15489 },
15490 allowedRoles: [ 'application', 'document', 'img' ],
15491 chromiumRole: 'PluginObject'
15492 },
15493 ol: {
15494 contentTypes: [ 'flow' ],
15495 allowedRoles: [ 'directory', 'group', 'listbox', 'menu', 'menubar', 'none', 'presentation', 'radiogroup', 'tablist', 'toolbar', 'tree' ]
15496 },
15497 optgroup: {
15498 allowedRoles: false
15499 },
15500 option: {
15501 allowedRoles: false,
15502 implicitAttrs: {
15503 'aria-selected': 'false'
15504 }
15505 },
15506 output: {
15507 contentTypes: [ 'phrasing', 'flow' ],
15508 allowedRoles: true,
15509 namingMethods: [ 'subtreeText' ]
15510 },
15511 p: {
15512 contentTypes: [ 'flow' ],
15513 allowedRoles: true,
15514 shadowRoot: true
15515 },
15516 param: {
15517 allowedRoles: false,
15518 noAriaAttrs: true
15519 },
15520 picture: {
15521 contentTypes: [ 'phrasing', 'flow' ],
15522 allowedRoles: false,
15523 noAriaAttrs: true
15524 },
15525 pre: {
15526 contentTypes: [ 'flow' ],
15527 allowedRoles: true
15528 },
15529 progress: {
15530 contentTypes: [ 'phrasing', 'flow' ],
15531 allowedRoles: false,
15532 implicitAttrs: {
15533 'aria-valuemax': '100',
15534 'aria-valuemin': '0',
15535 'aria-valuenow': '0'
15536 }
15537 },
15538 q: {
15539 contentTypes: [ 'phrasing', 'flow' ],
15540 allowedRoles: true
15541 },
15542 rp: {
15543 allowedRoles: true
15544 },
15545 rt: {
15546 allowedRoles: true
15547 },
15548 ruby: {
15549 contentTypes: [ 'phrasing', 'flow' ],
15550 allowedRoles: true
15551 },
15552 s: {
15553 contentTypes: [ 'phrasing', 'flow' ],
15554 allowedRoles: true
15555 },
15556 samp: {
15557 contentTypes: [ 'phrasing', 'flow' ],
15558 allowedRoles: true
15559 },
15560 script: {
15561 contentTypes: [ 'phrasing', 'flow' ],
15562 allowedRoles: false,
15563 noAriaAttrs: true
15564 },
15565 search: {
15566 contentTypes: [ 'flow' ],
15567 allowedRoles: [ 'form', 'group', 'none', 'presentation', 'region', 'search' ]
15568 },
15569 section: {
15570 contentTypes: [ 'sectioning', 'flow' ],
15571 allowedRoles: [ 'alert', 'alertdialog', 'application', 'banner', 'complementary', 'contentinfo', 'dialog', 'document', 'feed', 'group', 'log', 'main', 'marquee', 'navigation', 'none', 'note', 'presentation', 'search', 'status', 'tabpanel', 'doc-abstract', 'doc-acknowledgments', 'doc-afterword', 'doc-appendix', 'doc-bibliography', 'doc-chapter', 'doc-colophon', 'doc-conclusion', 'doc-credit', 'doc-credits', 'doc-dedication', 'doc-endnotes', 'doc-epigraph', 'doc-epilogue', 'doc-errata', 'doc-example', 'doc-foreword', 'doc-glossary', 'doc-index', 'doc-introduction', 'doc-notice', 'doc-pagelist', 'doc-part', 'doc-preface', 'doc-prologue', 'doc-pullquote', 'doc-qna', 'doc-toc' ],
15572 shadowRoot: true
15573 },
15574 select: {
15575 variant: {
15576 combobox: {
15577 matches: {
15578 attributes: {
15579 multiple: null,
15580 size: [ null, '1' ]
15581 }
15582 },
15583 allowedRoles: [ 'menu' ]
15584 },
15585 default: {
15586 allowedRoles: false
15587 }
15588 },
15589 contentTypes: [ 'interactive', 'phrasing', 'flow' ],
15590 implicitAttrs: {
15591 'aria-valuenow': ''
15592 },
15593 namingMethods: [ 'labelText' ]
15594 },
15595 slot: {
15596 contentTypes: [ 'phrasing', 'flow' ],
15597 allowedRoles: false,
15598 noAriaAttrs: true
15599 },
15600 small: {
15601 contentTypes: [ 'phrasing', 'flow' ],
15602 allowedRoles: true
15603 },
15604 source: {
15605 allowedRoles: false,
15606 noAriaAttrs: true
15607 },
15608 span: {
15609 contentTypes: [ 'phrasing', 'flow' ],
15610 allowedRoles: true,
15611 shadowRoot: true
15612 },
15613 strong: {
15614 contentTypes: [ 'phrasing', 'flow' ],
15615 allowedRoles: true
15616 },
15617 style: {
15618 allowedRoles: false,
15619 noAriaAttrs: true
15620 },
15621 svg: {
15622 contentTypes: [ 'embedded', 'phrasing', 'flow' ],
15623 allowedRoles: true,
15624 chromiumRole: 'SVGRoot',
15625 namingMethods: [ 'svgTitleText' ]
15626 },
15627 sub: {
15628 contentTypes: [ 'phrasing', 'flow' ],
15629 allowedRoles: true
15630 },
15631 summary: {
15632 allowedRoles: false,
15633 namingMethods: [ 'subtreeText' ]
15634 },
15635 sup: {
15636 contentTypes: [ 'phrasing', 'flow' ],
15637 allowedRoles: true
15638 },
15639 table: {
15640 contentTypes: [ 'flow' ],
15641 allowedRoles: true,
15642 namingMethods: [ 'tableCaptionText', 'tableSummaryText' ]
15643 },
15644 tbody: {
15645 allowedRoles: true
15646 },
15647 template: {
15648 contentTypes: [ 'phrasing', 'flow' ],
15649 allowedRoles: false,
15650 noAriaAttrs: true
15651 },
15652 textarea: {
15653 contentTypes: [ 'interactive', 'phrasing', 'flow' ],
15654 allowedRoles: false,
15655 implicitAttrs: {
15656 'aria-valuenow': '',
15657 'aria-multiline': 'true'
15658 },
15659 namingMethods: [ 'labelText', 'placeholderText' ]
15660 },
15661 tfoot: {
15662 allowedRoles: true
15663 },
15664 thead: {
15665 allowedRoles: true
15666 },
15667 time: {
15668 contentTypes: [ 'phrasing', 'flow' ],
15669 allowedRoles: true
15670 },
15671 title: {
15672 allowedRoles: false,
15673 noAriaAttrs: true
15674 },
15675 td: {
15676 allowedRoles: true
15677 },
15678 th: {
15679 allowedRoles: true
15680 },
15681 tr: {
15682 allowedRoles: true
15683 },
15684 track: {
15685 allowedRoles: false,
15686 noAriaAttrs: true
15687 },
15688 u: {
15689 contentTypes: [ 'phrasing', 'flow' ],
15690 allowedRoles: true
15691 },
15692 ul: {
15693 contentTypes: [ 'flow' ],
15694 allowedRoles: [ 'directory', 'group', 'listbox', 'menu', 'menubar', 'none', 'presentation', 'radiogroup', 'tablist', 'toolbar', 'tree' ]
15695 },
15696 var: {
15697 contentTypes: [ 'phrasing', 'flow' ],
15698 allowedRoles: true
15699 },
15700 video: {
15701 variant: {
15702 controls: {
15703 matches: '[controls]',
15704 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ]
15705 },
15706 default: {
15707 contentTypes: [ 'embedded', 'phrasing', 'flow' ]
15708 }
15709 },
15710 allowedRoles: [ 'application' ],
15711 chromiumRole: 'video'
15712 },
15713 wbr: {
15714 contentTypes: [ 'phrasing', 'flow' ],
15715 allowedRoles: [ 'presentation', 'none' ],
15716 allowedAriaAttrs: [ 'aria-hidden' ]
15717 }
15718 };
15719 var html_elms_default = htmlElms;
15720 var cssColors = {
15721 aliceblue: [ 240, 248, 255 ],
15722 antiquewhite: [ 250, 235, 215 ],
15723 aqua: [ 0, 255, 255 ],
15724 aquamarine: [ 127, 255, 212 ],
15725 azure: [ 240, 255, 255 ],
15726 beige: [ 245, 245, 220 ],
15727 bisque: [ 255, 228, 196 ],
15728 black: [ 0, 0, 0 ],
15729 blanchedalmond: [ 255, 235, 205 ],
15730 blue: [ 0, 0, 255 ],
15731 blueviolet: [ 138, 43, 226 ],
15732 brown: [ 165, 42, 42 ],
15733 burlywood: [ 222, 184, 135 ],
15734 cadetblue: [ 95, 158, 160 ],
15735 chartreuse: [ 127, 255, 0 ],
15736 chocolate: [ 210, 105, 30 ],
15737 coral: [ 255, 127, 80 ],
15738 cornflowerblue: [ 100, 149, 237 ],
15739 cornsilk: [ 255, 248, 220 ],
15740 crimson: [ 220, 20, 60 ],
15741 cyan: [ 0, 255, 255 ],
15742 darkblue: [ 0, 0, 139 ],
15743 darkcyan: [ 0, 139, 139 ],
15744 darkgoldenrod: [ 184, 134, 11 ],
15745 darkgray: [ 169, 169, 169 ],
15746 darkgreen: [ 0, 100, 0 ],
15747 darkgrey: [ 169, 169, 169 ],
15748 darkkhaki: [ 189, 183, 107 ],
15749 darkmagenta: [ 139, 0, 139 ],
15750 darkolivegreen: [ 85, 107, 47 ],
15751 darkorange: [ 255, 140, 0 ],
15752 darkorchid: [ 153, 50, 204 ],
15753 darkred: [ 139, 0, 0 ],
15754 darksalmon: [ 233, 150, 122 ],
15755 darkseagreen: [ 143, 188, 143 ],
15756 darkslateblue: [ 72, 61, 139 ],
15757 darkslategray: [ 47, 79, 79 ],
15758 darkslategrey: [ 47, 79, 79 ],
15759 darkturquoise: [ 0, 206, 209 ],
15760 darkviolet: [ 148, 0, 211 ],
15761 deeppink: [ 255, 20, 147 ],
15762 deepskyblue: [ 0, 191, 255 ],
15763 dimgray: [ 105, 105, 105 ],
15764 dimgrey: [ 105, 105, 105 ],
15765 dodgerblue: [ 30, 144, 255 ],
15766 firebrick: [ 178, 34, 34 ],
15767 floralwhite: [ 255, 250, 240 ],
15768 forestgreen: [ 34, 139, 34 ],
15769 fuchsia: [ 255, 0, 255 ],
15770 gainsboro: [ 220, 220, 220 ],
15771 ghostwhite: [ 248, 248, 255 ],
15772 gold: [ 255, 215, 0 ],
15773 goldenrod: [ 218, 165, 32 ],
15774 gray: [ 128, 128, 128 ],
15775 green: [ 0, 128, 0 ],
15776 greenyellow: [ 173, 255, 47 ],
15777 grey: [ 128, 128, 128 ],
15778 honeydew: [ 240, 255, 240 ],
15779 hotpink: [ 255, 105, 180 ],
15780 indianred: [ 205, 92, 92 ],
15781 indigo: [ 75, 0, 130 ],
15782 ivory: [ 255, 255, 240 ],
15783 khaki: [ 240, 230, 140 ],
15784 lavender: [ 230, 230, 250 ],
15785 lavenderblush: [ 255, 240, 245 ],
15786 lawngreen: [ 124, 252, 0 ],
15787 lemonchiffon: [ 255, 250, 205 ],
15788 lightblue: [ 173, 216, 230 ],
15789 lightcoral: [ 240, 128, 128 ],
15790 lightcyan: [ 224, 255, 255 ],
15791 lightgoldenrodyellow: [ 250, 250, 210 ],
15792 lightgray: [ 211, 211, 211 ],
15793 lightgreen: [ 144, 238, 144 ],
15794 lightgrey: [ 211, 211, 211 ],
15795 lightpink: [ 255, 182, 193 ],
15796 lightsalmon: [ 255, 160, 122 ],
15797 lightseagreen: [ 32, 178, 170 ],
15798 lightskyblue: [ 135, 206, 250 ],
15799 lightslategray: [ 119, 136, 153 ],
15800 lightslategrey: [ 119, 136, 153 ],
15801 lightsteelblue: [ 176, 196, 222 ],
15802 lightyellow: [ 255, 255, 224 ],
15803 lime: [ 0, 255, 0 ],
15804 limegreen: [ 50, 205, 50 ],
15805 linen: [ 250, 240, 230 ],
15806 magenta: [ 255, 0, 255 ],
15807 maroon: [ 128, 0, 0 ],
15808 mediumaquamarine: [ 102, 205, 170 ],
15809 mediumblue: [ 0, 0, 205 ],
15810 mediumorchid: [ 186, 85, 211 ],
15811 mediumpurple: [ 147, 112, 219 ],
15812 mediumseagreen: [ 60, 179, 113 ],
15813 mediumslateblue: [ 123, 104, 238 ],
15814 mediumspringgreen: [ 0, 250, 154 ],
15815 mediumturquoise: [ 72, 209, 204 ],
15816 mediumvioletred: [ 199, 21, 133 ],
15817 midnightblue: [ 25, 25, 112 ],
15818 mintcream: [ 245, 255, 250 ],
15819 mistyrose: [ 255, 228, 225 ],
15820 moccasin: [ 255, 228, 181 ],
15821 navajowhite: [ 255, 222, 173 ],
15822 navy: [ 0, 0, 128 ],
15823 oldlace: [ 253, 245, 230 ],
15824 olive: [ 128, 128, 0 ],
15825 olivedrab: [ 107, 142, 35 ],
15826 orange: [ 255, 165, 0 ],
15827 orangered: [ 255, 69, 0 ],
15828 orchid: [ 218, 112, 214 ],
15829 palegoldenrod: [ 238, 232, 170 ],
15830 palegreen: [ 152, 251, 152 ],
15831 paleturquoise: [ 175, 238, 238 ],
15832 palevioletred: [ 219, 112, 147 ],
15833 papayawhip: [ 255, 239, 213 ],
15834 peachpuff: [ 255, 218, 185 ],
15835 peru: [ 205, 133, 63 ],
15836 pink: [ 255, 192, 203 ],
15837 plum: [ 221, 160, 221 ],
15838 powderblue: [ 176, 224, 230 ],
15839 purple: [ 128, 0, 128 ],
15840 rebeccapurple: [ 102, 51, 153 ],
15841 red: [ 255, 0, 0 ],
15842 rosybrown: [ 188, 143, 143 ],
15843 royalblue: [ 65, 105, 225 ],
15844 saddlebrown: [ 139, 69, 19 ],
15845 salmon: [ 250, 128, 114 ],
15846 sandybrown: [ 244, 164, 96 ],
15847 seagreen: [ 46, 139, 87 ],
15848 seashell: [ 255, 245, 238 ],
15849 sienna: [ 160, 82, 45 ],
15850 silver: [ 192, 192, 192 ],
15851 skyblue: [ 135, 206, 235 ],
15852 slateblue: [ 106, 90, 205 ],
15853 slategray: [ 112, 128, 144 ],
15854 slategrey: [ 112, 128, 144 ],
15855 snow: [ 255, 250, 250 ],
15856 springgreen: [ 0, 255, 127 ],
15857 steelblue: [ 70, 130, 180 ],
15858 tan: [ 210, 180, 140 ],
15859 teal: [ 0, 128, 128 ],
15860 thistle: [ 216, 191, 216 ],
15861 tomato: [ 255, 99, 71 ],
15862 turquoise: [ 64, 224, 208 ],
15863 violet: [ 238, 130, 238 ],
15864 wheat: [ 245, 222, 179 ],
15865 white: [ 255, 255, 255 ],
15866 whitesmoke: [ 245, 245, 245 ],
15867 yellow: [ 255, 255, 0 ],
15868 yellowgreen: [ 154, 205, 50 ]
15869 };
15870 var css_colors_default = cssColors;
15871 var originals = {
15872 ariaAttrs: aria_attrs_default,
15873 ariaRoles: _extends({}, aria_roles_default, dpub_roles_default, graphics_roles_default),
15874 htmlElms: html_elms_default,
15875 cssColors: css_colors_default
15876 };
15877 var standards = _extends({}, originals);
15878 function configureStandards(config) {
15879 Object.keys(standards).forEach(function(propName) {
15880 if (config[propName]) {
15881 standards[propName] = deep_merge_default(standards[propName], config[propName]);
15882 }
15883 });
15884 }
15885 function resetStandards() {
15886 Object.keys(standards).forEach(function(propName) {
15887 standards[propName] = originals[propName];
15888 });
15889 }
15890 var standards_default = standards;
15891 function isUnsupportedRole(role) {
15892 var roleDefinition = standards_default.ariaRoles[role];
15893 return roleDefinition ? !!roleDefinition.unsupported : false;
15894 }
15895 var is_unsupported_role_default = isUnsupportedRole;
15896 function isValidRole(role) {
15897 var _ref52 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref52.allowAbstract, _ref52$flagUnsupporte = _ref52.flagUnsupported, flagUnsupported = _ref52$flagUnsupporte === void 0 ? false : _ref52$flagUnsupporte;
15898 var roleDefinition = standards_default.ariaRoles[role];
15899 var isRoleUnsupported = is_unsupported_role_default(role);
15900 if (!roleDefinition || flagUnsupported && isRoleUnsupported) {
15901 return false;
15902 }
15903 return allowAbstract ? true : roleDefinition.type !== 'abstract';
15904 }
15905 var is_valid_role_default = isValidRole;
15906 function getExplicitRole(vNode) {
15907 var _ref53 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, fallback = _ref53.fallback, abstracts = _ref53.abstracts, dpub = _ref53.dpub;
15908 vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
15909 if (vNode.props.nodeType !== 1) {
15910 return null;
15911 }
15912 var roleAttr = (vNode.attr('role') || '').trim().toLowerCase();
15913 var roleList = fallback ? token_list_default(roleAttr) : [ roleAttr ];
15914 var firstValidRole = roleList.find(function(role) {
15915 if (!dpub && role.substr(0, 4) === 'doc-') {
15916 return false;
15917 }
15918 return is_valid_role_default(role, {
15919 allowAbstract: abstracts
15920 });
15921 });
15922 return firstValidRole || null;
15923 }
15924 var get_explicit_role_default = getExplicitRole;
15925 function getElementsByContentType(type2) {
15926 return Object.keys(standards_default.htmlElms).filter(function(nodeName2) {
15927 var elm = standards_default.htmlElms[nodeName2];
15928 if (elm.contentTypes) {
15929 return elm.contentTypes.includes(type2);
15930 }
15931 if (!elm.variant) {
15932 return false;
15933 }
15934 if (elm.variant['default'] && elm.variant['default'].contentTypes) {
15935 return elm.variant['default'].contentTypes.includes(type2);
15936 }
15937 return false;
15938 });
15939 }
15940 var get_elements_by_content_type_default = getElementsByContentType;
15941 function getGlobalAriaAttrs() {
15942 return cache_default.get('globalAriaAttrs', function() {
15943 return Object.keys(standards_default.ariaAttrs).filter(function(attrName) {
15944 return standards_default.ariaAttrs[attrName].global;
15945 });
15946 });
15947 }
15948 var get_global_aria_attrs_default = getGlobalAriaAttrs;
15949 function toGrid(node) {
15950 var table = [];
15951 var rows = node.rows;
15952 for (var _i11 = 0, rowLength = rows.length; _i11 < rowLength; _i11++) {
15953 var cells = rows[_i11].cells;
15954 table[_i11] = table[_i11] || [];
15955 var columnIndex = 0;
15956 for (var j = 0, cellLength = cells.length; j < cellLength; j++) {
15957 for (var colSpan = 0; colSpan < cells[j].colSpan; colSpan++) {
15958 var rowspanAttr = cells[j].getAttribute('rowspan');
15959 var rowspanValue = parseInt(rowspanAttr) === 0 || cells[j].rowspan === 0 ? rows.length : cells[j].rowSpan;
15960 for (var rowSpan = 0; rowSpan < rowspanValue; rowSpan++) {
15961 table[_i11 + rowSpan] = table[_i11 + rowSpan] || [];
15962 while (table[_i11 + rowSpan][columnIndex]) {
15963 columnIndex++;
15964 }
15965 table[_i11 + rowSpan][columnIndex] = cells[j];
15966 }
15967 columnIndex++;
15968 }
15969 }
15970 }
15971 return table;
15972 }
15973 var to_grid_default = memoize_default(toGrid);
15974 function getCellPosition(cell, tableGrid) {
15975 var rowIndex, index;
15976 if (!tableGrid) {
15977 tableGrid = to_grid_default(find_up_default(cell, 'table'));
15978 }
15979 for (rowIndex = 0; rowIndex < tableGrid.length; rowIndex++) {
15980 if (tableGrid[rowIndex]) {
15981 index = tableGrid[rowIndex].indexOf(cell);
15982 if (index !== -1) {
15983 return {
15984 x: index,
15985 y: rowIndex
15986 };
15987 }
15988 }
15989 }
15990 }
15991 var get_cell_position_default = memoize_default(getCellPosition);
15992 function _getScope(el) {
15993 var _nodeLookup1 = _nodeLookup(el), vNode = _nodeLookup1.vNode, cell = _nodeLookup1.domNode;
15994 var scope = vNode.attr('scope');
15995 var role = get_explicit_role_default(vNode);
15996 if (![ 'td', 'th' ].includes(vNode.props.nodeName)) {
15997 throw new TypeError('Expected TD or TH element');
15998 }
15999 if (role === 'columnheader') {
16000 return 'col';
16001 } else if (role === 'rowheader') {
16002 return 'row';
16003 } else if (scope === 'col' || scope === 'row') {
16004 return scope;
16005 } else if (vNode.props.nodeName !== 'th') {
16006 return false;
16007 } else if (!vNode.actualNode) {
16008 return 'auto';
16009 }
16010 var tableGrid = to_grid_default(find_up_default(cell, 'table'));
16011 var pos = get_cell_position_default(cell, tableGrid);
16012 var headerRow = tableGrid[pos.y].every(function(node) {
16013 return node.nodeName.toUpperCase() === 'TH';
16014 });
16015 if (headerRow) {
16016 return 'col';
16017 }
16018 var headerCol = tableGrid.map(function(col) {
16019 return col[pos.x];
16020 }).every(function(node) {
16021 return node && node.nodeName.toUpperCase() === 'TH';
16022 });
16023 if (headerCol) {
16024 return 'row';
16025 }
16026 return 'auto';
16027 }
16028 function isColumnHeader(element) {
16029 return [ 'col', 'auto' ].indexOf(_getScope(element)) !== -1;
16030 }
16031 var is_column_header_default = isColumnHeader;
16032 function isRowHeader(cell) {
16033 return [ 'row', 'auto' ].includes(_getScope(cell));
16034 }
16035 var is_row_header_default = isRowHeader;
16036 function sanitize(str) {
16037 if (!str) {
16038 return '';
16039 }
16040 return str.replace(/\r\n/g, '\n').replace(/\u00A0/g, ' ').replace(/[\s]{2,}/g, ' ').trim();
16041 }
16042 var sanitize_default = sanitize;
16043 var getSectioningContentSelector = function getSectioningContentSelector() {
16044 return cache_default.get('sectioningContentSelector', function() {
16045 return get_elements_by_content_type_default('sectioning').map(function(nodeName2) {
16046 return ''.concat(nodeName2, ':not([role])');
16047 }).join(', ') + ' , [role=article], [role=complementary], [role=navigation], [role=region]';
16048 });
16049 };
16050 var getSectioningContentPlusMainSelector = function getSectioningContentPlusMainSelector() {
16051 return cache_default.get('sectioningContentPlusMainSelector', function() {
16052 return getSectioningContentSelector() + ' , main:not([role]), [role=main]';
16053 });
16054 };
16055 function hasAccessibleName(vNode) {
16056 var _ref54 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref54$checkTitle = _ref54.checkTitle, checkTitle = _ref54$checkTitle === void 0 ? false : _ref54$checkTitle;
16057 return !!(sanitize_default(arialabelledby_text_default(vNode)) || sanitize_default(_arialabelText(vNode)) || checkTitle && (vNode === null || vNode === void 0 ? void 0 : vNode.props.nodeType) === 1 && sanitize_default(vNode.attr('title')));
16058 }
16059 var implicitHtmlRoles = {
16060 a: function a(vNode) {
16061 return vNode.hasAttr('href') ? 'link' : null;
16062 },
16063 area: function area(vNode) {
16064 return vNode.hasAttr('href') ? 'link' : null;
16065 },
16066 article: 'article',
16067 aside: function aside(vNode) {
16068 if (closest_default(vNode.parent, getSectioningContentSelector()) && !hasAccessibleName(vNode, {
16069 checkTitle: true
16070 })) {
16071 return null;
16072 }
16073 return 'complementary';
16074 },
16075 body: 'document',
16076 button: 'button',
16077 datalist: 'listbox',
16078 dd: 'definition',
16079 dfn: 'term',
16080 details: 'group',
16081 dialog: 'dialog',
16082 dt: 'term',
16083 fieldset: 'group',
16084 figure: 'figure',
16085 footer: function footer(vNode) {
16086 var sectioningElement = closest_default(vNode, getSectioningContentPlusMainSelector());
16087 return !sectioningElement ? 'contentinfo' : null;
16088 },
16089 form: function form(vNode) {
16090 return hasAccessibleName(vNode) ? 'form' : null;
16091 },
16092 h1: 'heading',
16093 h2: 'heading',
16094 h3: 'heading',
16095 h4: 'heading',
16096 h5: 'heading',
16097 h6: 'heading',
16098 header: function header(vNode) {
16099 var sectioningElement = closest_default(vNode, getSectioningContentPlusMainSelector());
16100 return !sectioningElement ? 'banner' : null;
16101 },
16102 hr: 'separator',
16103 img: function img(vNode) {
16104 var emptyAlt = vNode.hasAttr('alt') && !vNode.attr('alt');
16105 var hasGlobalAria = get_global_aria_attrs_default().find(function(attr) {
16106 return vNode.hasAttr(attr);
16107 });
16108 return emptyAlt && !hasGlobalAria && !_isFocusable(vNode) ? 'presentation' : 'img';
16109 },
16110 input: function input(vNode) {
16111 var suggestionsSourceElement;
16112 if (vNode.hasAttr('list')) {
16113 var listElement = idrefs_default(vNode.actualNode, 'list').filter(function(node) {
16114 return !!node;
16115 })[0];
16116 suggestionsSourceElement = listElement && listElement.nodeName.toLowerCase() === 'datalist';
16117 }
16118 switch (vNode.props.type) {
16119 case 'checkbox':
16120 return 'checkbox';
16121
16122 case 'number':
16123 return 'spinbutton';
16124
16125 case 'radio':
16126 return 'radio';
16127
16128 case 'range':
16129 return 'slider';
16130
16131 case 'search':
16132 return !suggestionsSourceElement ? 'searchbox' : 'combobox';
16133
16134 case 'button':
16135 case 'image':
16136 case 'reset':
16137 case 'submit':
16138 return 'button';
16139
16140 case 'text':
16141 case 'tel':
16142 case 'url':
16143 case 'email':
16144 case '':
16145 return !suggestionsSourceElement ? 'textbox' : 'combobox';
16146
16147 default:
16148 return 'textbox';
16149 }
16150 },
16151 li: 'listitem',
16152 main: 'main',
16153 math: 'math',
16154 menu: 'list',
16155 meter: 'meter',
16156 nav: 'navigation',
16157 ol: 'list',
16158 optgroup: 'group',
16159 option: 'option',
16160 output: 'status',
16161 progress: 'progressbar',
16162 search: 'search',
16163 section: function section(vNode) {
16164 return hasAccessibleName(vNode) ? 'region' : null;
16165 },
16166 select: function select(vNode) {
16167 return vNode.hasAttr('multiple') || parseInt(vNode.attr('size')) > 1 ? 'listbox' : 'combobox';
16168 },
16169 summary: 'button',
16170 table: 'table',
16171 tbody: 'rowgroup',
16172 td: function td(vNode) {
16173 var table = closest_default(vNode, 'table');
16174 var role = get_explicit_role_default(table);
16175 return [ 'grid', 'treegrid' ].includes(role) ? 'gridcell' : 'cell';
16176 },
16177 textarea: 'textbox',
16178 tfoot: 'rowgroup',
16179 th: function th(vNode) {
16180 if (is_column_header_default(vNode)) {
16181 return 'columnheader';
16182 }
16183 if (is_row_header_default(vNode)) {
16184 return 'rowheader';
16185 }
16186 },
16187 thead: 'rowgroup',
16188 tr: 'row',
16189 ul: 'list'
16190 };
16191 var implicit_html_roles_default = implicitHtmlRoles;
16192 function fromPrimative(someString, matcher) {
16193 var matcherType = _typeof(matcher);
16194 if (Array.isArray(matcher) && typeof someString !== 'undefined') {
16195 return matcher.includes(someString);
16196 }
16197 if (matcherType === 'function') {
16198 return !!matcher(someString);
16199 }
16200 if (someString !== null && someString !== void 0) {
16201 if (matcher instanceof RegExp) {
16202 return matcher.test(someString);
16203 }
16204 if (/^\/.*\/$/.test(matcher)) {
16205 var pattern = matcher.substring(1, matcher.length - 1);
16206 return new RegExp(pattern).test(someString);
16207 }
16208 }
16209 return matcher === someString;
16210 }
16211 var from_primative_default = fromPrimative;
16212 function hasAccessibleName2(vNode, matcher) {
16213 return from_primative_default(!!_accessibleTextVirtual(vNode), matcher);
16214 }
16215 var has_accessible_name_default = hasAccessibleName2;
16216 function fromFunction(getValue, matcher) {
16217 var matcherType = _typeof(matcher);
16218 if (matcherType !== 'object' || Array.isArray(matcher) || matcher instanceof RegExp) {
16219 throw new Error('Expect matcher to be an object');
16220 }
16221 return Object.keys(matcher).every(function(propName) {
16222 return from_primative_default(getValue(propName), matcher[propName]);
16223 });
16224 }
16225 var from_function_default = fromFunction;
16226 function attributes(vNode, matcher) {
16227 vNode = _nodeLookup(vNode).vNode;
16228 return from_function_default(function(attrName) {
16229 return vNode.attr(attrName);
16230 }, matcher);
16231 }
16232 var attributes_default = attributes;
16233 function condition(arg, matcher) {
16234 return !!matcher(arg);
16235 }
16236 function explicitRole(vNode, matcher) {
16237 return from_primative_default(get_explicit_role_default(vNode), matcher);
16238 }
16239 var explicit_role_default = explicitRole;
16240 function implicitRole(vNode, matcher) {
16241 return from_primative_default(implicit_role_default(vNode), matcher);
16242 }
16243 var implicit_role_default2 = implicitRole;
16244 function nodeName(vNode, matcher) {
16245 vNode = _nodeLookup(vNode).vNode;
16246 return from_primative_default(vNode.props.nodeName, matcher);
16247 }
16248 var node_name_default = nodeName;
16249 function properties(vNode, matcher) {
16250 vNode = _nodeLookup(vNode).vNode;
16251 return from_function_default(function(propName) {
16252 return vNode.props[propName];
16253 }, matcher);
16254 }
16255 var properties_default = properties;
16256 function semanticRole(vNode, matcher) {
16257 return from_primative_default(get_role_default(vNode), matcher);
16258 }
16259 var semantic_role_default = semanticRole;
16260 var matchers = {
16261 hasAccessibleName: has_accessible_name_default,
16262 attributes: attributes_default,
16263 condition: condition,
16264 explicitRole: explicit_role_default,
16265 implicitRole: implicit_role_default2,
16266 nodeName: node_name_default,
16267 properties: properties_default,
16268 semanticRole: semantic_role_default
16269 };
16270 function fromDefinition(vNode, definition) {
16271 vNode = _nodeLookup(vNode).vNode;
16272 if (Array.isArray(definition)) {
16273 return definition.some(function(definitionItem) {
16274 return fromDefinition(vNode, definitionItem);
16275 });
16276 }
16277 if (typeof definition === 'string') {
16278 return _matches(vNode, definition);
16279 }
16280 return Object.keys(definition).every(function(matcherName) {
16281 if (!matchers[matcherName]) {
16282 throw new Error('Unknown matcher type "'.concat(matcherName, '"'));
16283 }
16284 var matchMethod = matchers[matcherName];
16285 var matcher = definition[matcherName];
16286 return matchMethod(vNode, matcher);
16287 });
16288 }
16289 var from_definition_default = fromDefinition;
16290 function matches2(vNode, definition) {
16291 return from_definition_default(vNode, definition);
16292 }
16293 var matches_default = matches2;
16294 matches_default.hasAccessibleName = has_accessible_name_default;
16295 matches_default.attributes = attributes_default;
16296 matches_default.condition = condition;
16297 matches_default.explicitRole = explicit_role_default;
16298 matches_default.fromDefinition = from_definition_default;
16299 matches_default.fromFunction = from_function_default;
16300 matches_default.fromPrimative = from_primative_default;
16301 matches_default.implicitRole = implicit_role_default2;
16302 matches_default.nodeName = node_name_default;
16303 matches_default.properties = properties_default;
16304 matches_default.semanticRole = semantic_role_default;
16305 var matches_default2 = matches_default;
16306 function getElementSpec(vNode) {
16307 var _ref55 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref55$noMatchAccessi = _ref55.noMatchAccessibleName, noMatchAccessibleName = _ref55$noMatchAccessi === void 0 ? false : _ref55$noMatchAccessi;
16308 var standard = standards_default.htmlElms[vNode.props.nodeName];
16309 if (!standard) {
16310 return {};
16311 }
16312 if (!standard.variant) {
16313 return standard;
16314 }
16315 var variant = standard.variant, spec = _objectWithoutProperties(standard, _excluded9);
16316 for (var variantName in variant) {
16317 if (!variant.hasOwnProperty(variantName) || variantName === 'default') {
16318 continue;
16319 }
16320 var _variant$variantName = variant[variantName], matches4 = _variant$variantName.matches, props = _objectWithoutProperties(_variant$variantName, _excluded0);
16321 var matchProperties = Array.isArray(matches4) ? matches4 : [ matches4 ];
16322 for (var _i12 = 0; _i12 < matchProperties.length && noMatchAccessibleName; _i12++) {
16323 if (matchProperties[_i12].hasOwnProperty('hasAccessibleName')) {
16324 return standard;
16325 }
16326 }
16327 if (matches_default2(vNode, matches4)) {
16328 for (var propName in props) {
16329 if (props.hasOwnProperty(propName)) {
16330 spec[propName] = props[propName];
16331 }
16332 }
16333 }
16334 }
16335 for (var _propName in variant['default']) {
16336 if (variant['default'].hasOwnProperty(_propName) && typeof spec[_propName] === 'undefined') {
16337 spec[_propName] = variant['default'][_propName];
16338 }
16339 }
16340 return spec;
16341 }
16342 var get_element_spec_default = getElementSpec;
16343 function implicitRole2(node) {
16344 var _ref56 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref56.chromium;
16345 var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
16346 node = vNode.actualNode;
16347 if (!vNode) {
16348 throw new ReferenceError('Cannot get implicit role of a node outside the current scope.');
16349 }
16350 var nodeName2 = vNode.props.nodeName;
16351 var role = implicit_html_roles_default[nodeName2];
16352 if (!role && chromium) {
16353 var _get_element_spec_def = get_element_spec_default(vNode), chromiumRole = _get_element_spec_def.chromiumRole;
16354 return chromiumRole || null;
16355 }
16356 if (typeof role === 'function') {
16357 return role(vNode);
16358 }
16359 return role || null;
16360 }
16361 var implicit_role_default = implicitRole2;
16362 var inheritsPresentationChain = {
16363 td: [ 'tr' ],
16364 th: [ 'tr' ],
16365 tr: [ 'thead', 'tbody', 'tfoot', 'table' ],
16366 thead: [ 'table' ],
16367 tbody: [ 'table' ],
16368 tfoot: [ 'table' ],
16369 li: [ 'ol', 'ul' ],
16370 dt: [ 'dl', 'div' ],
16371 dd: [ 'dl', 'div' ],
16372 div: [ 'dl' ]
16373 };
16374 function getInheritedRole(vNode, explicitRoleOptions) {
16375 var parentNodeNames = inheritsPresentationChain[vNode.props.nodeName];
16376 if (!parentNodeNames) {
16377 return null;
16378 }
16379 if (!vNode.parent) {
16380 if (!vNode.actualNode) {
16381 return null;
16382 }
16383 throw new ReferenceError('Cannot determine role presentational inheritance of a required parent outside the current scope.');
16384 }
16385 if (!parentNodeNames.includes(vNode.parent.props.nodeName)) {
16386 return null;
16387 }
16388 var parentRole = get_explicit_role_default(vNode.parent, explicitRoleOptions);
16389 if ([ 'none', 'presentation' ].includes(parentRole) && !hasConflictResolution(vNode.parent)) {
16390 return parentRole;
16391 }
16392 if (parentRole) {
16393 return null;
16394 }
16395 return getInheritedRole(vNode.parent, explicitRoleOptions);
16396 }
16397 function resolveImplicitRole(vNode, _ref57) {
16398 var chromium = _ref57.chromium, explicitRoleOptions = _objectWithoutProperties(_ref57, _excluded1);
16399 var implicitRole3 = implicit_role_default(vNode, {
16400 chromium: chromium
16401 });
16402 if (!implicitRole3) {
16403 return null;
16404 }
16405 var presentationalRole = getInheritedRole(vNode, explicitRoleOptions);
16406 if (presentationalRole) {
16407 return presentationalRole;
16408 }
16409 return implicitRole3;
16410 }
16411 function hasConflictResolution(vNode) {
16412 var hasGlobalAria = get_global_aria_attrs_default().some(function(attr) {
16413 return vNode.hasAttr(attr);
16414 });
16415 return hasGlobalAria || _isFocusable(vNode);
16416 }
16417 function resolveRole(node) {
16418 var _ref58 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
16419 var noImplicit = _ref58.noImplicit, roleOptions = _objectWithoutProperties(_ref58, _excluded10);
16420 var _nodeLookup10 = _nodeLookup(node), vNode = _nodeLookup10.vNode;
16421 if (vNode.props.nodeType !== 1) {
16422 return null;
16423 }
16424 var explicitRole2 = get_explicit_role_default(vNode, roleOptions);
16425 if (!explicitRole2) {
16426 return noImplicit ? null : resolveImplicitRole(vNode, roleOptions);
16427 }
16428 if (![ 'presentation', 'none' ].includes(explicitRole2)) {
16429 return explicitRole2;
16430 }
16431 if (hasConflictResolution(vNode)) {
16432 return noImplicit ? null : resolveImplicitRole(vNode, roleOptions);
16433 }
16434 return explicitRole2;
16435 }
16436 function getRole(node) {
16437 var _ref59 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
16438 var noPresentational = _ref59.noPresentational, options = _objectWithoutProperties(_ref59, _excluded11);
16439 var role = resolveRole(node, options);
16440 if (noPresentational && [ 'presentation', 'none' ].includes(role)) {
16441 return null;
16442 }
16443 return role;
16444 }
16445 var get_role_default = getRole;
16446 var alwaysTitleElements = [ 'iframe' ];
16447 function titleText(node) {
16448 var _nodeLookup11 = _nodeLookup(node), vNode = _nodeLookup11.vNode;
16449 if (vNode.props.nodeType !== 1 || !node.hasAttr('title')) {
16450 return '';
16451 }
16452 if (!matches_default(vNode, alwaysTitleElements) && [ 'none', 'presentation' ].includes(get_role_default(vNode))) {
16453 return '';
16454 }
16455 return vNode.attr('title');
16456 }
16457 var title_text_default = titleText;
16458 function namedFromContents(vNode) {
16459 var _ref60 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref60.strict;
16460 vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
16461 if (vNode.props.nodeType !== 1) {
16462 return false;
16463 }
16464 var role = get_role_default(vNode);
16465 var roleDef = standards_default.ariaRoles[role];
16466 if (roleDef && roleDef.nameFromContent) {
16467 return true;
16468 }
16469 if (strict) {
16470 return false;
16471 }
16472 return !roleDef || [ 'presentation', 'none' ].includes(role);
16473 }
16474 var named_from_contents_default = namedFromContents;
16475 function getOwnedVirtual(virtualNode) {
16476 var actualNode = virtualNode.actualNode, children = virtualNode.children;
16477 if (!children) {
16478 throw new Error('getOwnedVirtual requires a virtual node');
16479 }
16480 if (virtualNode.hasAttr('aria-owns')) {
16481 var owns = idrefs_default(actualNode, 'aria-owns').filter(function(element) {
16482 return !!element;
16483 }).map(function(element) {
16484 return axe.utils.getNodeFromTree(element);
16485 });
16486 var uniqueOwns = owns.filter(function(own, index) {
16487 return owns.indexOf(own) === index;
16488 });
16489 var nativeChildren = children.filter(function(child) {
16490 return !uniqueOwns.includes(child);
16491 });
16492 return [].concat(_toConsumableArray(nativeChildren), _toConsumableArray(uniqueOwns));
16493 }
16494 return _toConsumableArray(children);
16495 }
16496 var get_owned_virtual_default = getOwnedVirtual;
16497 var unsupported_default = {
16498 accessibleNameFromFieldValue: [ 'progressbar' ]
16499 };
16500 function _isVisibleToScreenReaders(vNode) {
16501 vNode = _nodeLookup(vNode).vNode;
16502 return isVisibleToScreenReadersVirtual(vNode);
16503 }
16504 var isVisibleToScreenReadersVirtual = memoize_default(function isVisibleToScreenReadersMemoized(vNode, isAncestor) {
16505 if (ariaHidden(vNode) || _isInert(vNode, {
16506 skipAncestors: true,
16507 isAncestor: isAncestor
16508 })) {
16509 return false;
16510 }
16511 if (vNode.actualNode && vNode.props.nodeName === 'area') {
16512 return !areaHidden(vNode, isVisibleToScreenReadersVirtual);
16513 }
16514 if (_isHiddenForEveryone(vNode, {
16515 skipAncestors: true,
16516 isAncestor: isAncestor
16517 })) {
16518 return false;
16519 }
16520 if (!vNode.parent) {
16521 return true;
16522 }
16523 return isVisibleToScreenReadersVirtual(vNode.parent, true);
16524 });
16525 function visibleVirtual(element, screenReader, noRecursing) {
16526 var _nodeLookup12 = _nodeLookup(element), vNode = _nodeLookup12.vNode;
16527 var visibleMethod = screenReader ? _isVisibleToScreenReaders : _isVisibleOnScreen;
16528 var visible2 = !element.actualNode || element.actualNode && visibleMethod(element);
16529 var result = vNode.children.map(function(child) {
16530 var _child$props = child.props, nodeType = _child$props.nodeType, nodeValue = _child$props.nodeValue;
16531 if (nodeType === 3) {
16532 if (nodeValue && visible2) {
16533 return nodeValue;
16534 }
16535 } else if (!noRecursing) {
16536 return visibleVirtual(child, screenReader);
16537 }
16538 }).join('');
16539 return sanitize_default(result);
16540 }
16541 var visible_virtual_default = visibleVirtual;
16542 var nonTextInputTypes = [ 'button', 'checkbox', 'color', 'file', 'hidden', 'image', 'password', 'radio', 'reset', 'submit' ];
16543 function isNativeTextbox(node) {
16544 node = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
16545 var nodeName2 = node.props.nodeName;
16546 return nodeName2 === 'textarea' || nodeName2 === 'input' && !nonTextInputTypes.includes((node.attr('type') || '').toLowerCase());
16547 }
16548 var is_native_textbox_default = isNativeTextbox;
16549 function isNativeSelect(node) {
16550 node = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
16551 var nodeName2 = node.props.nodeName;
16552 return nodeName2 === 'select';
16553 }
16554 var is_native_select_default = isNativeSelect;
16555 function isAriaTextbox(node) {
16556 var role = get_explicit_role_default(node);
16557 return role === 'textbox';
16558 }
16559 var is_aria_textbox_default = isAriaTextbox;
16560 function isAriaListbox(node) {
16561 var role = get_explicit_role_default(node);
16562 return role === 'listbox';
16563 }
16564 var is_aria_listbox_default = isAriaListbox;
16565 function isAriaCombobox(node) {
16566 var role = get_explicit_role_default(node);
16567 return role === 'combobox';
16568 }
16569 var is_aria_combobox_default = isAriaCombobox;
16570 var rangeRoles = [ 'progressbar', 'scrollbar', 'slider', 'spinbutton' ];
16571 function isAriaRange(node) {
16572 var role = get_explicit_role_default(node);
16573 return rangeRoles.includes(role);
16574 }
16575 var is_aria_range_default = isAriaRange;
16576 var controlValueRoles = [ 'textbox', 'progressbar', 'scrollbar', 'slider', 'spinbutton', 'combobox', 'listbox' ];
16577 var _formControlValueMethods = {
16578 nativeTextboxValue: nativeTextboxValue,
16579 nativeSelectValue: nativeSelectValue,
16580 ariaTextboxValue: ariaTextboxValue,
16581 ariaListboxValue: ariaListboxValue,
16582 ariaComboboxValue: ariaComboboxValue,
16583 ariaRangeValue: ariaRangeValue
16584 };
16585 function formControlValue(virtualNode) {
16586 var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
16587 var actualNode = virtualNode.actualNode;
16588 var unsupportedRoles = unsupported_default.accessibleNameFromFieldValue || [];
16589 var role = get_role_default(virtualNode);
16590 if (context.startNode === virtualNode || !controlValueRoles.includes(role) || unsupportedRoles.includes(role)) {
16591 return '';
16592 }
16593 var valueMethods = Object.keys(_formControlValueMethods).map(function(name) {
16594 return _formControlValueMethods[name];
16595 });
16596 var valueString = valueMethods.reduce(function(accName, step) {
16597 return accName || step(virtualNode, context);
16598 }, '');
16599 if (context.debug) {
16600 log_default(valueString || '{empty-value}', actualNode, context);
16601 }
16602 return valueString;
16603 }
16604 function nativeTextboxValue(node) {
16605 var _nodeLookup13 = _nodeLookup(node), vNode = _nodeLookup13.vNode;
16606 if (is_native_textbox_default(vNode)) {
16607 return vNode.props.value || '';
16608 }
16609 return '';
16610 }
16611 function nativeSelectValue(node) {
16612 var _nodeLookup14 = _nodeLookup(node), vNode = _nodeLookup14.vNode;
16613 if (!is_native_select_default(vNode)) {
16614 return '';
16615 }
16616 var options = query_selector_all_default(vNode, 'option');
16617 var selectedOptions = options.filter(function(option) {
16618 return option.props.selected;
16619 });
16620 if (!selectedOptions.length) {
16621 selectedOptions.push(options[0]);
16622 }
16623 return selectedOptions.map(function(option) {
16624 return visible_virtual_default(option);
16625 }).join(' ') || '';
16626 }
16627 function ariaTextboxValue(node) {
16628 var _nodeLookup15 = _nodeLookup(node), vNode = _nodeLookup15.vNode, domNode = _nodeLookup15.domNode;
16629 if (!is_aria_textbox_default(vNode)) {
16630 return '';
16631 }
16632 if (!domNode || domNode && !_isHiddenForEveryone(domNode)) {
16633 return visible_virtual_default(vNode, true);
16634 } else {
16635 return domNode.textContent;
16636 }
16637 }
16638 function ariaListboxValue(node, context) {
16639 var _nodeLookup16 = _nodeLookup(node), vNode = _nodeLookup16.vNode;
16640 if (!is_aria_listbox_default(vNode)) {
16641 return '';
16642 }
16643 var selected = get_owned_virtual_default(vNode).filter(function(owned) {
16644 return get_role_default(owned) === 'option' && owned.attr('aria-selected') === 'true';
16645 });
16646 if (selected.length === 0) {
16647 return '';
16648 }
16649 return _accessibleTextVirtual(selected[0], context);
16650 }
16651 function ariaComboboxValue(node, context) {
16652 var _nodeLookup17 = _nodeLookup(node), vNode = _nodeLookup17.vNode;
16653 if (!is_aria_combobox_default(vNode)) {
16654 return '';
16655 }
16656 var listbox = get_owned_virtual_default(vNode).filter(function(elm) {
16657 return get_role_default(elm) === 'listbox';
16658 })[0];
16659 return listbox ? ariaListboxValue(listbox, context) : '';
16660 }
16661 function ariaRangeValue(node) {
16662 var _nodeLookup18 = _nodeLookup(node), vNode = _nodeLookup18.vNode;
16663 if (!is_aria_range_default(vNode) || !vNode.hasAttr('aria-valuenow')) {
16664 return '';
16665 }
16666 var valueNow = +vNode.attr('aria-valuenow');
16667 return !isNaN(valueNow) ? String(valueNow) : '0';
16668 }
16669 var form_control_value_default = formControlValue;
16670 function subtreeText(virtualNode) {
16671 var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
16672 var alreadyProcessed2 = _accessibleTextVirtual.alreadyProcessed;
16673 context.startNode = context.startNode || virtualNode;
16674 var _context = context, strict = _context.strict, inControlContext = _context.inControlContext, inLabelledByContext = _context.inLabelledByContext;
16675 var role = get_role_default(virtualNode);
16676 var _get_element_spec_def2 = get_element_spec_default(virtualNode, {
16677 noMatchAccessibleName: true
16678 }), contentTypes = _get_element_spec_def2.contentTypes;
16679 if (alreadyProcessed2(virtualNode, context) || virtualNode.props.nodeType !== 1 || contentTypes !== null && contentTypes !== void 0 && contentTypes.includes('embedded') || controlValueRoles.includes(role)) {
16680 return '';
16681 }
16682 if (!context.subtreeDescendant && !context.inLabelledByContext && !named_from_contents_default(virtualNode, {
16683 strict: strict
16684 })) {
16685 return '';
16686 }
16687 if (!strict) {
16688 var subtreeDescendant = !inControlContext && !inLabelledByContext;
16689 context = _extends({
16690 subtreeDescendant: subtreeDescendant
16691 }, context);
16692 }
16693 return get_owned_virtual_default(virtualNode).reduce(function(contentText, child) {
16694 return appendAccessibleText(contentText, child, context);
16695 }, '');
16696 }
16697 var phrasingElements = get_elements_by_content_type_default('phrasing').concat([ '#text' ]);
16698 function appendAccessibleText(contentText, virtualNode, context) {
16699 var nodeName2 = virtualNode.props.nodeName;
16700 var contentTextAdd = _accessibleTextVirtual(virtualNode, context);
16701 if (!contentTextAdd) {
16702 return contentText;
16703 }
16704 if (!phrasingElements.includes(nodeName2)) {
16705 if (contentTextAdd[0] !== ' ') {
16706 contentTextAdd += ' ';
16707 }
16708 if (contentText && contentText[contentText.length - 1] !== ' ') {
16709 contentTextAdd = ' ' + contentTextAdd;
16710 }
16711 }
16712 return contentText + contentTextAdd;
16713 }
16714 var subtree_text_default = subtreeText;
16715 function labelText(virtualNode) {
16716 var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
16717 var alreadyProcessed2 = _accessibleTextVirtual.alreadyProcessed;
16718 if (context.inControlContext || context.inLabelledByContext || alreadyProcessed2(virtualNode, context)) {
16719 return '';
16720 }
16721 if (!context.startNode) {
16722 context.startNode = virtualNode;
16723 }
16724 var labelContext = _extends({
16725 inControlContext: true
16726 }, context);
16727 var explicitLabels = getExplicitLabels(virtualNode);
16728 var implicitLabel = closest_default(virtualNode, 'label');
16729 var labels;
16730 if (implicitLabel) {
16731 labels = [].concat(_toConsumableArray(explicitLabels), [ implicitLabel.actualNode ]);
16732 labels.sort(node_sorter_default);
16733 } else {
16734 labels = explicitLabels;
16735 }
16736 return labels.map(function(label3) {
16737 return accessible_text_default(label3, labelContext);
16738 }).filter(function(text) {
16739 return text !== '';
16740 }).join(' ');
16741 }
16742 function getExplicitLabels(virtualNode) {
16743 if (!virtualNode.attr('id')) {
16744 return [];
16745 }
16746 if (!virtualNode.actualNode) {
16747 throw new TypeError('Cannot resolve explicit label reference for non-DOM nodes');
16748 }
16749 return find_elms_in_context_default({
16750 elm: 'label',
16751 attr: 'for',
16752 value: virtualNode.attr('id'),
16753 context: virtualNode.actualNode
16754 });
16755 }
16756 var label_text_default = labelText;
16757 var defaultButtonValues = {
16758 submit: 'Submit',
16759 image: 'Submit',
16760 reset: 'Reset',
16761 button: ''
16762 };
16763 var nativeTextMethods = {
16764 valueText: function valueText(vNode) {
16765 return vNode.props.value || '';
16766 },
16767 buttonDefaultText: function buttonDefaultText(vNode) {
16768 return defaultButtonValues[vNode.props.type] || '';
16769 },
16770 tableCaptionText: descendantText.bind(null, 'caption'),
16771 figureText: descendantText.bind(null, 'figcaption'),
16772 svgTitleText: descendantText.bind(null, 'title'),
16773 fieldsetLegendText: descendantText.bind(null, 'legend'),
16774 altText: attrText.bind(null, 'alt'),
16775 tableSummaryText: attrText.bind(null, 'summary'),
16776 titleText: title_text_default,
16777 subtreeText: subtree_text_default,
16778 labelText: label_text_default,
16779 singleSpace: function singleSpace() {
16780 return ' ';
16781 },
16782 placeholderText: attrText.bind(null, 'placeholder')
16783 };
16784 function attrText(attr, vNode) {
16785 return vNode.attr(attr) || '';
16786 }
16787 function descendantText(nodeName2, _ref61, context) {
16788 var actualNode = _ref61.actualNode;
16789 nodeName2 = nodeName2.toLowerCase();
16790 var nodeNames2 = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(',');
16791 var candidate = actualNode.querySelector(nodeNames2);
16792 if (!candidate || candidate.nodeName.toLowerCase() !== nodeName2) {
16793 return '';
16794 }
16795 return accessible_text_default(candidate, context);
16796 }
16797 var native_text_methods_default = nativeTextMethods;
16798 function _nativeTextAlternative(virtualNode) {
16799 var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
16800 var actualNode = virtualNode.actualNode;
16801 if (virtualNode.props.nodeType !== 1 || [ 'presentation', 'none' ].includes(get_role_default(virtualNode))) {
16802 return '';
16803 }
16804 var textMethods = findTextMethods(virtualNode);
16805 var accessibleName = textMethods.reduce(function(accName, step) {
16806 return accName || step(virtualNode, context);
16807 }, '');
16808 if (context.debug) {
16809 axe.log(accessibleName || '{empty-value}', actualNode, context);
16810 }
16811 return accessibleName;
16812 }
16813 function findTextMethods(virtualNode) {
16814 var elmSpec = get_element_spec_default(virtualNode, {
16815 noMatchAccessibleName: true
16816 });
16817 var methods = elmSpec.namingMethods || [];
16818 return methods.map(function(methodName) {
16819 return native_text_methods_default[methodName];
16820 });
16821 }
16822 function getUnicodeNonBmpRegExp() {
16823 return /[\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u20A0-\u20CF\u20D0-\u20FF\u2100-\u214F\u2150-\u218F\u2190-\u21FF\u2200-\u22FF\u2300-\u23FF\u2400-\u243F\u2440-\u245F\u2460-\u24FF\u2500-\u257F\u2580-\u259F\u25A0-\u25FF\u2600-\u26FF\u2700-\u27BF\uE000-\uF8FF]/g;
16824 }
16825 function getPunctuationRegExp() {
16826 return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&\xa3\xa2\xa5\xa7\u20ac()*+,\-.\/:;<=>?@\[\]^_`{|}~\xb1]/g;
16827 }
16828 function getSupplementaryPrivateUseRegExp() {
16829 return /[\uDB80-\uDBBF][\uDC00-\uDFFF]/g;
16830 }
16831 function getCategoryFormatRegExp() {
16832 return /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC38]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/g;
16833 }
16834 function hasUnicode(str, options) {
16835 var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;
16836 var value = false;
16837 if (emoji) {
16838 value || (value = emoji_regex_default().test(str));
16839 }
16840 if (nonBmp) {
16841 value || (value = getUnicodeNonBmpRegExp().test(str) || getSupplementaryPrivateUseRegExp().test(str) || getCategoryFormatRegExp().test(str));
16842 }
16843 if (punctuations) {
16844 value || (value = getPunctuationRegExp().test(str));
16845 }
16846 return value;
16847 }
16848 var has_unicode_default = hasUnicode;
16849 function _isIconLigature(textVNode) {
16850 var differenceThreshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .15;
16851 var occurrenceThreshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
16852 var nodeValue = textVNode.actualNode.nodeValue.trim();
16853 if (!sanitize_default(nodeValue) || has_unicode_default(nodeValue, {
16854 emoji: true,
16855 nonBmp: true
16856 })) {
16857 return false;
16858 }
16859 var canvasContext = cache_default.get('canvasContext', function() {
16860 return document.createElement('canvas').getContext('2d', {
16861 willReadFrequently: true
16862 });
16863 });
16864 var canvas = canvasContext.canvas;
16865 var fonts = cache_default.get('fonts', function() {
16866 return {};
16867 });
16868 var style = window.getComputedStyle(textVNode.parent.actualNode);
16869 var fontFamily = style.getPropertyValue('font-family');
16870 if (!fonts[fontFamily]) {
16871 fonts[fontFamily] = {
16872 occurrences: 0,
16873 numLigatures: 0
16874 };
16875 }
16876 var font = fonts[fontFamily];
16877 if (font.occurrences >= occurrenceThreshold) {
16878 if (font.numLigatures / font.occurrences === 1) {
16879 return true;
16880 } else if (font.numLigatures === 0) {
16881 return false;
16882 }
16883 }
16884 font.occurrences++;
16885 var fontSize = 30;
16886 var fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
16887 canvasContext.font = fontStyle;
16888 var firstChar = nodeValue.charAt(0);
16889 var width = canvasContext.measureText(firstChar).width;
16890 if (width === 0) {
16891 font.numLigatures++;
16892 return true;
16893 }
16894 if (width < 30) {
16895 var diff = 30 / width;
16896 width *= diff;
16897 fontSize *= diff;
16898 fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
16899 }
16900 canvas.width = width;
16901 canvas.height = fontSize;
16902 canvasContext.font = fontStyle;
16903 canvasContext.textAlign = 'left';
16904 canvasContext.textBaseline = 'top';
16905 canvasContext.fillText(firstChar, 0, 0);
16906 var compareData = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
16907 if (!compareData.some(function(pixel) {
16908 return pixel;
16909 })) {
16910 font.numLigatures++;
16911 return true;
16912 }
16913 canvasContext.clearRect(0, 0, width, fontSize);
16914 canvasContext.fillText(nodeValue, 0, 0);
16915 var compareWith = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
16916 var differences = compareData.reduce(function(diff, pixel, i) {
16917 if (pixel === 0 && compareWith[i] === 0) {
16918 return diff;
16919 }
16920 if (pixel !== 0 && compareWith[i] !== 0) {
16921 return diff;
16922 }
16923 return ++diff;
16924 }, 0);
16925 var expectedWidth = nodeValue.split('').reduce(function(totalWidth, _char2) {
16926 return totalWidth + canvasContext.measureText(_char2).width;
16927 }, 0);
16928 var actualWidth = canvasContext.measureText(nodeValue).width;
16929 var pixelDifference = differences / compareData.length;
16930 var sizeDifference = 1 - actualWidth / expectedWidth;
16931 if (pixelDifference >= differenceThreshold && sizeDifference >= differenceThreshold) {
16932 font.numLigatures++;
16933 return true;
16934 }
16935 return false;
16936 }
16937 function _accessibleTextVirtual(virtualNode) {
16938 var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
16939 context = prepareContext(virtualNode, context);
16940 if (shouldIgnoreHidden(virtualNode, context)) {
16941 return '';
16942 }
16943 if (shouldIgnoreIconLigature(virtualNode, context)) {
16944 return '';
16945 }
16946 var computationSteps = [ arialabelledby_text_default, _arialabelText, _nativeTextAlternative, form_control_value_default, subtree_text_default, textNodeValue, title_text_default ];
16947 var accessibleName = computationSteps.reduce(function(accName, step) {
16948 if (context.startNode === virtualNode) {
16949 accName = sanitize_default(accName);
16950 }
16951 if (accName !== '') {
16952 return accName;
16953 }
16954 return step(virtualNode, context);
16955 }, '');
16956 if (context.debug) {
16957 axe.log(accessibleName || '{empty-value}', virtualNode.actualNode, context);
16958 }
16959 return accessibleName;
16960 }
16961 function textNodeValue(virtualNode) {
16962 if (virtualNode.props.nodeType !== 3) {
16963 return '';
16964 }
16965 return virtualNode.props.nodeValue;
16966 }
16967 function shouldIgnoreHidden(virtualNode, context) {
16968 if (!virtualNode) {
16969 return false;
16970 }
16971 if (context.includeHidden && !nativelyHidden(virtualNode)) {
16972 return false;
16973 }
16974 if (virtualNode.props.nodeType !== 1) {
16975 return false;
16976 }
16977 return !_isVisibleToScreenReaders(virtualNode);
16978 }
16979 function shouldIgnoreIconLigature(virtualNode, context) {
16980 var _context$occurrenceTh;
16981 var ignoreIconLigature = context.ignoreIconLigature, pixelThreshold = context.pixelThreshold;
16982 var occurrenceThreshold = (_context$occurrenceTh = context.occurrenceThreshold) !== null && _context$occurrenceTh !== void 0 ? _context$occurrenceTh : context.occuranceThreshold;
16983 if (virtualNode.props.nodeType !== 3 || !ignoreIconLigature) {
16984 return false;
16985 }
16986 return _isIconLigature(virtualNode, pixelThreshold, occurrenceThreshold);
16987 }
16988 function prepareContext(virtualNode, context) {
16989 if (!context.startNode) {
16990 context = _extends({
16991 startNode: virtualNode
16992 }, context);
16993 }
16994 if (virtualNode.props.nodeType === 1 && context.inLabelledByContext && context.includeHidden === void 0) {
16995 context = _extends({
16996 includeHidden: !_isVisibleToScreenReaders(virtualNode)
16997 }, context);
16998 }
16999 return context;
17000 }
17001 _accessibleTextVirtual.alreadyProcessed = function alreadyProcessed(virtualnode, context) {
17002 context.processed = context.processed || [];
17003 if (context.processed.includes(virtualnode)) {
17004 return true;
17005 }
17006 context.processed.push(virtualnode);
17007 return false;
17008 };
17009 function removeUnicode(str, options) {
17010 var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;
17011 if (emoji) {
17012 str = str.replace(emoji_regex_default(), '');
17013 }
17014 if (nonBmp) {
17015 str = str.replace(getUnicodeNonBmpRegExp(), '').replace(getSupplementaryPrivateUseRegExp(), '').replace(getCategoryFormatRegExp(), '');
17016 }
17017 if (punctuations) {
17018 str = str.replace(getPunctuationRegExp(), '');
17019 }
17020 return str;
17021 }
17022 var remove_unicode_default = removeUnicode;
17023 function isHumanInterpretable(str) {
17024 if (isEmpty(str) || isNonDigitCharacter(str) || isSymbolicText(str) || isUnicodeOrPunctuation(str)) {
17025 return 0;
17026 }
17027 return 1;
17028 }
17029 function isEmpty(str) {
17030 return sanitize_default(str).length === 0;
17031 }
17032 function isNonDigitCharacter(str) {
17033 return str.length === 1 && str.match(/\D/);
17034 }
17035 function isSymbolicText(str) {
17036 var symbolicText = [ 'aa', 'abc' ];
17037 return symbolicText.includes(str.toLowerCase());
17038 }
17039 function isUnicodeOrPunctuation(str) {
17040 var noUnicodeStr = remove_unicode_default(str, {
17041 emoji: true,
17042 nonBmp: true,
17043 punctuations: true
17044 });
17045 return !sanitize_default(noUnicodeStr);
17046 }
17047 var is_human_interpretable_default = isHumanInterpretable;
17048 var _autocomplete = {
17049 stateTerms: [ 'on', 'off' ],
17050 standaloneTerms: [ 'name', 'honorific-prefix', 'given-name', 'additional-name', 'family-name', 'honorific-suffix', 'nickname', 'username', 'new-password', 'current-password', 'organization-title', 'organization', 'street-address', 'address-line1', 'address-line2', 'address-line3', 'address-level4', 'address-level3', 'address-level2', 'address-level1', 'country', 'country-name', 'postal-code', 'cc-name', 'cc-given-name', 'cc-additional-name', 'cc-family-name', 'cc-number', 'cc-exp', 'cc-exp-month', 'cc-exp-year', 'cc-csc', 'cc-type', 'transaction-currency', 'transaction-amount', 'language', 'bday', 'bday-day', 'bday-month', 'bday-year', 'sex', 'url', 'photo', 'one-time-code' ],
17051 qualifiers: [ 'home', 'work', 'mobile', 'fax', 'pager' ],
17052 qualifiedTerms: [ 'tel', 'tel-country-code', 'tel-national', 'tel-area-code', 'tel-local', 'tel-local-prefix', 'tel-local-suffix', 'tel-extension', 'email', 'impp' ],
17053 locations: [ 'billing', 'shipping' ]
17054 };
17055 function isValidAutocomplete(autocompleteValue) {
17056 var _ref62 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref62$looseTyped = _ref62.looseTyped, looseTyped = _ref62$looseTyped === void 0 ? false : _ref62$looseTyped, _ref62$stateTerms = _ref62.stateTerms, stateTerms = _ref62$stateTerms === void 0 ? [] : _ref62$stateTerms, _ref62$locations = _ref62.locations, locations = _ref62$locations === void 0 ? [] : _ref62$locations, _ref62$qualifiers = _ref62.qualifiers, qualifiers = _ref62$qualifiers === void 0 ? [] : _ref62$qualifiers, _ref62$standaloneTerm = _ref62.standaloneTerms, standaloneTerms = _ref62$standaloneTerm === void 0 ? [] : _ref62$standaloneTerm, _ref62$qualifiedTerms = _ref62.qualifiedTerms, qualifiedTerms = _ref62$qualifiedTerms === void 0 ? [] : _ref62$qualifiedTerms, _ref62$ignoredValues = _ref62.ignoredValues, ignoredValues = _ref62$ignoredValues === void 0 ? [] : _ref62$ignoredValues;
17057 autocompleteValue = autocompleteValue.toLowerCase().trim();
17058 stateTerms = stateTerms.concat(_autocomplete.stateTerms);
17059 if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') {
17060 return true;
17061 }
17062 qualifiers = qualifiers.concat(_autocomplete.qualifiers);
17063 locations = locations.concat(_autocomplete.locations);
17064 standaloneTerms = standaloneTerms.concat(_autocomplete.standaloneTerms);
17065 qualifiedTerms = qualifiedTerms.concat(_autocomplete.qualifiedTerms);
17066 var autocompleteTerms = autocompleteValue.split(/\s+/g);
17067 if (autocompleteTerms[autocompleteTerms.length - 1] === 'webauthn') {
17068 autocompleteTerms.pop();
17069 if (autocompleteTerms.length === 0) {
17070 return false;
17071 }
17072 }
17073 if (!looseTyped) {
17074 if (autocompleteTerms[0].length > 8 && autocompleteTerms[0].substr(0, 8) === 'section-') {
17075 autocompleteTerms.shift();
17076 }
17077 if (locations.includes(autocompleteTerms[0])) {
17078 autocompleteTerms.shift();
17079 }
17080 if (qualifiers.includes(autocompleteTerms[0])) {
17081 autocompleteTerms.shift();
17082 standaloneTerms = [];
17083 }
17084 if (autocompleteTerms.length !== 1) {
17085 return false;
17086 }
17087 }
17088 var purposeTerm = autocompleteTerms[autocompleteTerms.length - 1];
17089 if (ignoredValues.includes(purposeTerm)) {
17090 return void 0;
17091 }
17092 return standaloneTerms.includes(purposeTerm) || qualifiedTerms.includes(purposeTerm);
17093 }
17094 var is_valid_autocomplete_default = isValidAutocomplete;
17095 function labelVirtual(virtualNode) {
17096 var ref, candidate;
17097 if (virtualNode.attr('aria-labelledby')) {
17098 ref = idrefs_default(virtualNode.actualNode, 'aria-labelledby');
17099 candidate = ref.map(function(thing) {
17100 var vNode = get_node_from_tree_default(thing);
17101 return vNode ? visible_virtual_default(vNode) : '';
17102 }).join(' ').trim();
17103 if (candidate) {
17104 return candidate;
17105 }
17106 }
17107 candidate = virtualNode.attr('aria-label');
17108 if (candidate) {
17109 candidate = sanitize_default(candidate);
17110 if (candidate) {
17111 return candidate;
17112 }
17113 }
17114 return null;
17115 }
17116 var label_virtual_default = labelVirtual;
17117 function visible(element, screenReader, noRecursing) {
17118 element = get_node_from_tree_default(element);
17119 return visible_virtual_default(element, screenReader, noRecursing);
17120 }
17121 var visible_default = visible;
17122 function labelVirtual2(virtualNode) {
17123 var ref, candidate, doc;
17124 candidate = label_virtual_default(virtualNode);
17125 if (candidate) {
17126 return candidate;
17127 }
17128 if (virtualNode.attr('id')) {
17129 if (!virtualNode.actualNode) {
17130 throw new TypeError('Cannot resolve explicit label reference for non-DOM nodes');
17131 }
17132 var _id2 = escape_selector_default(virtualNode.attr('id'));
17133 doc = get_root_node_default2(virtualNode.actualNode);
17134 ref = doc.querySelector('label[for="' + _id2 + '"]');
17135 candidate = ref && visible_default(ref, true);
17136 if (candidate) {
17137 return candidate;
17138 }
17139 }
17140 ref = closest_default(virtualNode, 'label');
17141 candidate = ref && visible_virtual_default(ref, true);
17142 if (candidate) {
17143 return candidate;
17144 }
17145 return null;
17146 }
17147 var label_virtual_default2 = labelVirtual2;
17148 function label(node) {
17149 node = get_node_from_tree_default(node);
17150 return label_virtual_default2(node);
17151 }
17152 var label_default = label;
17153 var nativeElementType = [ {
17154 matches: [ {
17155 nodeName: 'textarea'
17156 }, {
17157 nodeName: 'input',
17158 properties: {
17159 type: [ 'text', 'password', 'search', 'tel', 'email', 'url' ]
17160 }
17161 } ],
17162 namingMethods: 'labelText'
17163 }, {
17164 matches: {
17165 nodeName: 'input',
17166 properties: {
17167 type: [ 'button', 'submit', 'reset' ]
17168 }
17169 },
17170 namingMethods: [ 'valueText', 'titleText', 'buttonDefaultText' ]
17171 }, {
17172 matches: {
17173 nodeName: 'input',
17174 properties: {
17175 type: 'image'
17176 }
17177 },
17178 namingMethods: [ 'altText', 'valueText', 'labelText', 'titleText', 'buttonDefaultText' ]
17179 }, {
17180 matches: 'button',
17181 namingMethods: 'subtreeText'
17182 }, {
17183 matches: 'fieldset',
17184 namingMethods: 'fieldsetLegendText'
17185 }, {
17186 matches: 'OUTPUT',
17187 namingMethods: 'subtreeText'
17188 }, {
17189 matches: [ {
17190 nodeName: 'select'
17191 }, {
17192 nodeName: 'input',
17193 properties: {
17194 type: /^(?!text|password|search|tel|email|url|button|submit|reset)/
17195 }
17196 } ],
17197 namingMethods: 'labelText'
17198 }, {
17199 matches: 'summary',
17200 namingMethods: 'subtreeText'
17201 }, {
17202 matches: 'figure',
17203 namingMethods: [ 'figureText', 'titleText' ]
17204 }, {
17205 matches: 'img',
17206 namingMethods: 'altText'
17207 }, {
17208 matches: 'table',
17209 namingMethods: [ 'tableCaptionText', 'tableSummaryText' ]
17210 }, {
17211 matches: [ 'hr', 'br' ],
17212 namingMethods: [ 'titleText', 'singleSpace' ]
17213 } ];
17214 var native_element_type_default = nativeElementType;
17215 function visibleTextNodes(vNode) {
17216 var parentVisible = _isVisibleOnScreen(vNode);
17217 var nodes = [];
17218 vNode.children.forEach(function(child) {
17219 if (child.actualNode.nodeType === 3) {
17220 if (parentVisible) {
17221 nodes.push(child);
17222 }
17223 } else {
17224 nodes = nodes.concat(visibleTextNodes(child));
17225 }
17226 });
17227 return nodes;
17228 }
17229 var visible_text_nodes_default = visibleTextNodes;
17230 var getVisibleChildTextRects = memoize_default(function getVisibleChildTextRectsMemoized(node) {
17231 var vNode = get_node_from_tree_default(node);
17232 var nodeRect = vNode.boundingClientRect;
17233 var clientRects = [];
17234 var overflowHiddenNodes = get_overflow_hidden_ancestors_default(vNode);
17235 node.childNodes.forEach(function(textNode) {
17236 if (textNode.nodeType !== 3 || sanitize_default(textNode.nodeValue) === '') {
17237 return;
17238 }
17239 var contentRects = getContentRects(textNode);
17240 if (isOutsideNodeBounds(contentRects, nodeRect)) {
17241 return;
17242 }
17243 clientRects.push.apply(clientRects, _toConsumableArray(filterHiddenRects(contentRects, overflowHiddenNodes)));
17244 });
17245 return clientRects.length ? clientRects : filterHiddenRects([ nodeRect ], overflowHiddenNodes);
17246 });
17247 var get_visible_child_text_rects_default = getVisibleChildTextRects;
17248 function getContentRects(node) {
17249 var range2 = document.createRange();
17250 range2.selectNodeContents(node);
17251 return Array.from(range2.getClientRects());
17252 }
17253 function isOutsideNodeBounds(rects, nodeRect) {
17254 return rects.some(function(rect) {
17255 var centerPoint = _getRectCenter(rect);
17256 return !_isPointInRect(centerPoint, nodeRect);
17257 });
17258 }
17259 function filterHiddenRects(contentRects, overflowHiddenNodes) {
17260 var visibleRects = [];
17261 contentRects.forEach(function(contentRect) {
17262 if (contentRect.width < 1 || contentRect.height < 1) {
17263 return;
17264 }
17265 var visibleRect = overflowHiddenNodes.reduce(function(rect, overflowNode) {
17266 return rect && _getIntersectionRect(rect, overflowNode.boundingClientRect);
17267 }, contentRect);
17268 if (visibleRect) {
17269 visibleRects.push(visibleRect);
17270 }
17271 });
17272 return visibleRects;
17273 }
17274 function getTextElementStack(node) {
17275 var grid = _getNodeGrid(node);
17276 if (!grid) {
17277 return [];
17278 }
17279 var clientRects = get_visible_child_text_rects_default(node);
17280 return clientRects.map(function(rect) {
17281 return getRectStack(grid, rect);
17282 });
17283 }
17284 var get_text_element_stack_default = getTextElementStack;
17285 var visualRoles = [ 'checkbox', 'img', 'meter', 'progressbar', 'scrollbar', 'radio', 'slider', 'spinbutton', 'textbox' ];
17286 function isVisualContent(el) {
17287 var _nodeLookup19 = _nodeLookup(el), vNode = _nodeLookup19.vNode;
17288 var role = axe.commons.aria.getExplicitRole(vNode);
17289 if (role) {
17290 return visualRoles.indexOf(role) !== -1;
17291 }
17292 switch (vNode.props.nodeName) {
17293 case 'img':
17294 case 'iframe':
17295 case 'object':
17296 case 'video':
17297 case 'audio':
17298 case 'canvas':
17299 case 'svg':
17300 case 'math':
17301 case 'button':
17302 case 'select':
17303 case 'textarea':
17304 case 'keygen':
17305 case 'progress':
17306 case 'meter':
17307 return true;
17308
17309 case 'input':
17310 return vNode.props.type !== 'hidden';
17311
17312 default:
17313 return false;
17314 }
17315 }
17316 var is_visual_content_default = isVisualContent;
17317 var hiddenTextElms = [ 'head', 'title', 'template', 'script', 'style', 'iframe', 'object', 'video', 'audio', 'noscript' ];
17318 function hasChildTextNodes(elm) {
17319 if (hiddenTextElms.includes(elm.props.nodeName)) {
17320 return false;
17321 }
17322 return elm.children.some(function(_ref63) {
17323 var props = _ref63.props;
17324 return props.nodeType === 3 && props.nodeValue.trim();
17325 });
17326 }
17327 function hasContentVirtual(elm, noRecursion, ignoreAria) {
17328 return hasChildTextNodes(elm) || is_visual_content_default(elm.actualNode) || !ignoreAria && !!label_virtual_default(elm) || !noRecursion && elm.children.some(function(child) {
17329 return child.actualNode.nodeType === 1 && hasContentVirtual(child);
17330 });
17331 }
17332 var has_content_virtual_default = hasContentVirtual;
17333 function hasContent(elm, noRecursion, ignoreAria) {
17334 elm = get_node_from_tree_default(elm);
17335 return has_content_virtual_default(elm, noRecursion, ignoreAria);
17336 }
17337 var has_content_default = hasContent;
17338 function _hasLangText(virtualNode) {
17339 if (typeof virtualNode.children === 'undefined' || hasChildTextNodes(virtualNode)) {
17340 return true;
17341 }
17342 if (virtualNode.props.nodeType === 1 && is_visual_content_default(virtualNode)) {
17343 return !!axe.commons.text.accessibleTextVirtual(virtualNode);
17344 }
17345 return virtualNode.children.some(function(child) {
17346 return !child.attr('lang') && _hasLangText(child) && !_isHiddenForEveryone(child);
17347 });
17348 }
17349 function insertedIntoFocusOrder(el) {
17350 var tabIndex = parse_tabindex_default(el.getAttribute('tabindex'));
17351 return tabIndex > -1 && _isFocusable(el) && !is_natively_focusable_default(el);
17352 }
17353 var inserted_into_focus_order_default = insertedIntoFocusOrder;
17354 function isHiddenWithCSS(el, descendentVisibilityValue) {
17355 var _nodeLookup20 = _nodeLookup(el), vNode = _nodeLookup20.vNode, domNode = _nodeLookup20.domNode;
17356 if (!vNode) {
17357 return _isHiddenWithCSS(domNode, descendentVisibilityValue);
17358 }
17359 if (vNode._isHiddenWithCSS === void 0) {
17360 vNode._isHiddenWithCSS = _isHiddenWithCSS(domNode, descendentVisibilityValue);
17361 }
17362 return vNode._isHiddenWithCSS;
17363 }
17364 function _isHiddenWithCSS(el, descendentVisibilityValue) {
17365 if (el.nodeType === 9) {
17366 return false;
17367 }
17368 if (el.nodeType === 11) {
17369 el = el.host;
17370 }
17371 if ([ 'STYLE', 'SCRIPT' ].includes(el.nodeName.toUpperCase())) {
17372 return false;
17373 }
17374 var style = window.getComputedStyle(el, null);
17375 if (!style) {
17376 throw new Error('Style does not exist for the given element.');
17377 }
17378 var displayValue = style.getPropertyValue('display');
17379 if (displayValue === 'none') {
17380 return true;
17381 }
17382 var HIDDEN_VISIBILITY_VALUES = [ 'hidden', 'collapse' ];
17383 var visibilityValue = style.getPropertyValue('visibility');
17384 if (HIDDEN_VISIBILITY_VALUES.includes(visibilityValue) && !descendentVisibilityValue) {
17385 return true;
17386 }
17387 if (HIDDEN_VISIBILITY_VALUES.includes(visibilityValue) && descendentVisibilityValue && HIDDEN_VISIBILITY_VALUES.includes(descendentVisibilityValue)) {
17388 return true;
17389 }
17390 var parent = get_composed_parent_default(el);
17391 if (parent && !HIDDEN_VISIBILITY_VALUES.includes(visibilityValue)) {
17392 return isHiddenWithCSS(parent, visibilityValue);
17393 }
17394 return false;
17395 }
17396 var is_hidden_with_css_default = isHiddenWithCSS;
17397 function isHTML5(doc) {
17398 var node = doc.doctype;
17399 if (node === null) {
17400 return false;
17401 }
17402 return node.name === 'html' && !node.publicId && !node.systemId;
17403 }
17404 var is_html5_default = isHTML5;
17405 function getRoleType(role) {
17406 var _window3;
17407 if (role instanceof abstract_virtual_node_default || (_window3 = window) !== null && _window3 !== void 0 && _window3.Node && role instanceof window.Node) {
17408 role = axe.commons.aria.getRole(role);
17409 }
17410 var roleDef = standards_default.ariaRoles[role];
17411 return (roleDef === null || roleDef === void 0 ? void 0 : roleDef.type) || null;
17412 }
17413 var get_role_type_default = getRoleType;
17414 var blockLike = [ 'block', 'list-item', 'table', 'flex', 'grid' ];
17415 var inlineBlockLike = [ 'inline-block', 'inline-flex', 'inline-grid' ];
17416 function isInTextBlock(node) {
17417 var _ref64 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, noLengthCompare = _ref64.noLengthCompare, _ref64$includeInlineB = _ref64.includeInlineBlock, includeInlineBlock = _ref64$includeInlineB === void 0 ? false : _ref64$includeInlineB;
17418 var _nodeLookup21 = _nodeLookup(node), vNode = _nodeLookup21.vNode, domNode = _nodeLookup21.domNode;
17419 if (isBlock(domNode) || !includeInlineBlock && isInlineBlockLike(vNode)) {
17420 return false;
17421 }
17422 var virtualParent = getBlockParent(domNode);
17423 var parentText = '';
17424 var widgetText = '';
17425 var inBrBlock = 0;
17426 walkDomNode(virtualParent, function(currNode) {
17427 if (currNode === virtualParent.actualNode) {
17428 return true;
17429 }
17430 if (inBrBlock === 2) {
17431 return false;
17432 }
17433 if (currNode.nodeType === 3) {
17434 parentText += currNode.nodeValue;
17435 }
17436 if (currNode.nodeType !== 1) {
17437 return;
17438 }
17439 var nodeName2 = (currNode.nodeName || '').toUpperCase();
17440 if (currNode === domNode) {
17441 inBrBlock = 1;
17442 }
17443 var nodeIsBlock = isBlock(currNode);
17444 if (nodeIsBlock || [ 'BR', 'HR' ].includes(nodeName2)) {
17445 if (inBrBlock === 0) {
17446 parentText = '';
17447 widgetText = '';
17448 } else {
17449 inBrBlock = 2;
17450 }
17451 }
17452 if (nodeIsBlock || currNode.style.display === 'none' || currNode.style.overflow === 'hidden' || ![ '', null, 'none' ].includes(currNode.style['float']) || ![ '', null, 'relative' ].includes(currNode.style.position)) {
17453 return false;
17454 } else if (get_role_type_default(currNode) === 'widget') {
17455 widgetText += currNode.textContent;
17456 return false;
17457 }
17458 });
17459 parentText = sanitize_default(parentText);
17460 if (noLengthCompare) {
17461 return parentText.length !== 0;
17462 }
17463 widgetText = sanitize_default(widgetText);
17464 return parentText.length > widgetText.length;
17465 }
17466 var is_in_text_block_default = isInTextBlock;
17467 function isBlock(node) {
17468 var _nodeLookup22 = _nodeLookup(node), vNode = _nodeLookup22.vNode;
17469 var display2 = vNode.getComputedStylePropertyValue('display');
17470 return blockLike.includes(display2) || display2.substr(0, 6) === 'table-';
17471 }
17472 function isInlineBlockLike(vNode) {
17473 var display2 = vNode.getComputedStylePropertyValue('display');
17474 return inlineBlockLike.includes(display2);
17475 }
17476 function walkDomNode(node, functor) {
17477 if (functor(node.actualNode) !== false) {
17478 node.children.forEach(function(child) {
17479 return walkDomNode(child, functor);
17480 });
17481 }
17482 }
17483 function getBlockParent(node) {
17484 var parentBlock = get_composed_parent_default(node);
17485 while (parentBlock && !isBlock(parentBlock)) {
17486 parentBlock = get_composed_parent_default(parentBlock);
17487 }
17488 return get_node_from_tree_default(parentBlock);
17489 }
17490 function isModalOpen(options) {
17491 options = options || {};
17492 var modalPercent = options.modalPercent || .75;
17493 if (cache_default.get('isModalOpen')) {
17494 return cache_default.get('isModalOpen');
17495 }
17496 var definiteModals = query_selector_all_filter_default(axe._tree[0], 'dialog, [role=dialog], [aria-modal=true]', _isVisibleOnScreen);
17497 if (definiteModals.length) {
17498 cache_default.set('isModalOpen', true);
17499 return true;
17500 }
17501 var viewport = get_viewport_size_default(window);
17502 var percentWidth = viewport.width * modalPercent;
17503 var percentHeight = viewport.height * modalPercent;
17504 var x = (viewport.width - percentWidth) / 2;
17505 var y = (viewport.height - percentHeight) / 2;
17506 var points = [ {
17507 x: x,
17508 y: y
17509 }, {
17510 x: viewport.width - x,
17511 y: y
17512 }, {
17513 x: viewport.width / 2,
17514 y: viewport.height / 2
17515 }, {
17516 x: x,
17517 y: viewport.height - y
17518 }, {
17519 x: viewport.width - x,
17520 y: viewport.height - y
17521 } ];
17522 var stacks = points.map(function(point) {
17523 return Array.from(document.elementsFromPoint(point.x, point.y));
17524 });
17525 var _loop7 = function _loop7() {
17526 var modalElement = stacks[_i13].find(function(elm) {
17527 var style = window.getComputedStyle(elm);
17528 return parseInt(style.width, 10) >= percentWidth && parseInt(style.height, 10) >= percentHeight && style.getPropertyValue('pointer-events') !== 'none' && (style.position === 'absolute' || style.position === 'fixed');
17529 });
17530 if (modalElement && stacks.every(function(stack) {
17531 return stack.includes(modalElement);
17532 })) {
17533 cache_default.set('isModalOpen', true);
17534 return {
17535 v: true
17536 };
17537 }
17538 }, _ret3;
17539 for (var _i13 = 0; _i13 < stacks.length; _i13++) {
17540 _ret3 = _loop7();
17541 if (_ret3) {
17542 return _ret3.v;
17543 }
17544 }
17545 cache_default.set('isModalOpen', void 0);
17546 return void 0;
17547 }
17548 var is_modal_open_default = isModalOpen;
17549 function _isMultiline(domNode) {
17550 var margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
17551 var range2 = domNode.ownerDocument.createRange();
17552 range2.setStart(domNode, 0);
17553 range2.setEnd(domNode, domNode.childNodes.length);
17554 var lastLineEnd = 0;
17555 var lineCount = 0;
17556 var _iterator1 = _createForOfIteratorHelper(range2.getClientRects()), _step1;
17557 try {
17558 for (_iterator1.s(); !(_step1 = _iterator1.n()).done; ) {
17559 var rect = _step1.value;
17560 if (rect.height <= margin) {
17561 continue;
17562 }
17563 if (lastLineEnd > rect.top + margin) {
17564 lastLineEnd = Math.max(lastLineEnd, rect.bottom);
17565 } else if (lineCount === 0) {
17566 lastLineEnd = rect.bottom;
17567 lineCount++;
17568 } else {
17569 return true;
17570 }
17571 }
17572 } catch (err) {
17573 _iterator1.e(err);
17574 } finally {
17575 _iterator1.f();
17576 }
17577 return false;
17578 }
17579 function isNode(element) {
17580 return element instanceof window.Node;
17581 }
17582 var is_node_default = isNode;
17583 var cacheKey = 'color.incompleteData';
17584 var incompleteData = {
17585 set: function set(key, reason) {
17586 if (typeof key !== 'string') {
17587 throw new Error('Incomplete data: key must be a string');
17588 }
17589 var data = cache_default.get(cacheKey, function() {
17590 return {};
17591 });
17592 if (reason) {
17593 data[key] = reason;
17594 }
17595 return data[key];
17596 },
17597 get: function get(key) {
17598 var data = cache_default.get(cacheKey);
17599 return data === null || data === void 0 ? void 0 : data[key];
17600 },
17601 clear: function clear() {
17602 cache_default.set(cacheKey, {});
17603 }
17604 };
17605 var incomplete_data_default = incompleteData;
17606 function elementHasImage(elm, style) {
17607 var graphicNodes = [ 'IMG', 'CANVAS', 'OBJECT', 'IFRAME', 'VIDEO', 'SVG' ];
17608 var nodeName2 = elm.nodeName.toUpperCase();
17609 if (graphicNodes.includes(nodeName2)) {
17610 incomplete_data_default.set('bgColor', 'imgNode');
17611 return true;
17612 }
17613 style = style || window.getComputedStyle(elm);
17614 var bgImageStyle = style.getPropertyValue('background-image');
17615 var hasBgImage = bgImageStyle !== 'none';
17616 if (hasBgImage) {
17617 var hasGradient = /gradient/.test(bgImageStyle);
17618 incomplete_data_default.set('bgColor', hasGradient ? 'bgGradient' : 'bgImage');
17619 }
17620 return hasBgImage;
17621 }
17622 var element_has_image_default = elementHasImage;
17623 var hexRegex = /^#[0-9a-f]{3,8}$/i;
17624 var hslRegex = /hsl\(\s*([-\d.]+)(rad|turn)/;
17625 var _Color2 = (_r = new WeakMap(), _g = new WeakMap(), _b = new WeakMap(), _red = new WeakMap(),
17626 _green = new WeakMap(), _blue = new WeakMap(), _Class3_brand = new WeakSet(),
17627 function() {
17628 function Color2(red, green, blue) {
17629 var alpha = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
17630 _classCallCheck(this, Color2);
17631 _classPrivateMethodInitSpec(this, _Class3_brand);
17632 _classPrivateFieldInitSpec(this, _r, void 0);
17633 _classPrivateFieldInitSpec(this, _g, void 0);
17634 _classPrivateFieldInitSpec(this, _b, void 0);
17635 _classPrivateFieldInitSpec(this, _red, void 0);
17636 _classPrivateFieldInitSpec(this, _green, void 0);
17637 _classPrivateFieldInitSpec(this, _blue, void 0);
17638 if (red instanceof _Color2) {
17639 var r = red.r, g2 = red.g, b2 = red.b;
17640 this.r = r;
17641 this.g = g2;
17642 this.b = b2;
17643 this.alpha = red.alpha;
17644 return;
17645 }
17646 this.red = red;
17647 this.green = green;
17648 this.blue = blue;
17649 this.alpha = alpha;
17650 }
17651 return _createClass(Color2, [ {
17652 key: 'r',
17653 get: function get() {
17654 return _classPrivateFieldGet(_r, this);
17655 },
17656 set: function set(value) {
17657 _classPrivateFieldSet(_r, this, value);
17658 _classPrivateFieldSet(_red, this, Math.round(clamp(value, 0, 1) * 255));
17659 }
17660 }, {
17661 key: 'g',
17662 get: function get() {
17663 return _classPrivateFieldGet(_g, this);
17664 },
17665 set: function set(value) {
17666 _classPrivateFieldSet(_g, this, value);
17667 _classPrivateFieldSet(_green, this, Math.round(clamp(value, 0, 1) * 255));
17668 }
17669 }, {
17670 key: 'b',
17671 get: function get() {
17672 return _classPrivateFieldGet(_b, this);
17673 },
17674 set: function set(value) {
17675 _classPrivateFieldSet(_b, this, value);
17676 _classPrivateFieldSet(_blue, this, Math.round(clamp(value, 0, 1) * 255));
17677 }
17678 }, {
17679 key: 'red',
17680 get: function get() {
17681 return _classPrivateFieldGet(_red, this);
17682 },
17683 set: function set(value) {
17684 _classPrivateFieldSet(_r, this, value / 255);
17685 _classPrivateFieldSet(_red, this, clamp(value, 0, 255));
17686 }
17687 }, {
17688 key: 'green',
17689 get: function get() {
17690 return _classPrivateFieldGet(_green, this);
17691 },
17692 set: function set(value) {
17693 _classPrivateFieldSet(_g, this, value / 255);
17694 _classPrivateFieldSet(_green, this, clamp(value, 0, 255));
17695 }
17696 }, {
17697 key: 'blue',
17698 get: function get() {
17699 return _classPrivateFieldGet(_blue, this);
17700 },
17701 set: function set(value) {
17702 _classPrivateFieldSet(_b, this, value / 255);
17703 _classPrivateFieldSet(_blue, this, clamp(value, 0, 255));
17704 }
17705 }, {
17706 key: 'toHexString',
17707 value: function toHexString() {
17708 var redString = Math.round(this.red).toString(16);
17709 var greenString = Math.round(this.green).toString(16);
17710 var blueString = Math.round(this.blue).toString(16);
17711 return '#' + (this.red > 15.5 ? redString : '0' + redString) + (this.green > 15.5 ? greenString : '0' + greenString) + (this.blue > 15.5 ? blueString : '0' + blueString);
17712 }
17713 }, {
17714 key: 'toJSON',
17715 value: function toJSON() {
17716 var red = this.red, green = this.green, blue = this.blue, alpha = this.alpha;
17717 return {
17718 red: red,
17719 green: green,
17720 blue: blue,
17721 alpha: alpha
17722 };
17723 }
17724 }, {
17725 key: 'parseString',
17726 value: function parseString(colorString) {
17727 colorString = colorString.replace(hslRegex, function(match, angle, unit) {
17728 var value = angle + unit;
17729 switch (unit) {
17730 case 'rad':
17731 return match.replace(value, radToDeg(angle));
17732
17733 case 'turn':
17734 return match.replace(value, turnToDeg(angle));
17735 }
17736 });
17737 try {
17738 var prototypeArrayFrom;
17739 if ('Prototype' in window && 'Version' in window.Prototype) {
17740 prototypeArrayFrom = Array.from;
17741 Array.from = import_from2['default'];
17742 }
17743 var _color2 = new _Color(colorString).toGamut({
17744 space: 'srgb',
17745 method: 'clip'
17746 }).to('srgb');
17747 if (prototypeArrayFrom) {
17748 Array.from = prototypeArrayFrom;
17749 prototypeArrayFrom = null;
17750 }
17751 this.r = _color2.r;
17752 this.g = _color2.g;
17753 this.b = _color2.b;
17754 this.alpha = +_color2.alpha;
17755 } catch (_unused4) {
17756 incomplete_data_default.set('colorParse', colorString);
17757 throw new Error('Unable to parse color "'.concat(colorString, '"'));
17758 }
17759 return this;
17760 }
17761 }, {
17762 key: 'parseRgbString',
17763 value: function parseRgbString(colorString) {
17764 this.parseString(colorString);
17765 }
17766 }, {
17767 key: 'parseHexString',
17768 value: function parseHexString(colorString) {
17769 if (!colorString.match(hexRegex) || [ 6, 8 ].includes(colorString.length)) {
17770 return;
17771 }
17772 this.parseString(colorString);
17773 }
17774 }, {
17775 key: 'parseColorFnString',
17776 value: function parseColorFnString(colorString) {
17777 this.parseString(colorString);
17778 }
17779 }, {
17780 key: 'getRelativeLuminance',
17781 value: function getRelativeLuminance() {
17782 var rSRGB = this.r, gSRGB = this.g, bSRGB = this.b;
17783 var r = rSRGB <= .04045 ? rSRGB / 12.92 : Math.pow((rSRGB + .055) / 1.055, 2.4);
17784 var g2 = gSRGB <= .04045 ? gSRGB / 12.92 : Math.pow((gSRGB + .055) / 1.055, 2.4);
17785 var b2 = bSRGB <= .04045 ? bSRGB / 12.92 : Math.pow((bSRGB + .055) / 1.055, 2.4);
17786 return .2126 * r + .7152 * g2 + .0722 * b2;
17787 }
17788 }, {
17789 key: 'getLuminosity',
17790 value: function getLuminosity() {
17791 return .3 * this.r + .59 * this.g + .11 * this.b;
17792 }
17793 }, {
17794 key: 'setLuminosity',
17795 value: function setLuminosity(L) {
17796 var d2 = L - this.getLuminosity();
17797 return _assertClassBrand(_Class3_brand, this, _add).call(this, d2).clip();
17798 }
17799 }, {
17800 key: 'getSaturation',
17801 value: function getSaturation() {
17802 return Math.max(this.r, this.g, this.b) - Math.min(this.r, this.g, this.b);
17803 }
17804 }, {
17805 key: 'setSaturation',
17806 value: function setSaturation(s) {
17807 var C = new _Color2(this);
17808 var colorEntires = [ {
17809 name: 'r',
17810 value: C.r
17811 }, {
17812 name: 'g',
17813 value: C.g
17814 }, {
17815 name: 'b',
17816 value: C.b
17817 } ];
17818 var _colorEntires$sort = colorEntires.sort(function(a2, b2) {
17819 return a2.value - b2.value;
17820 }), _colorEntires$sort2 = _slicedToArray(_colorEntires$sort, 3), Cmin = _colorEntires$sort2[0], Cmid = _colorEntires$sort2[1], Cmax = _colorEntires$sort2[2];
17821 if (Cmax.value > Cmin.value) {
17822 Cmid.value = (Cmid.value - Cmin.value) * s / (Cmax.value - Cmin.value);
17823 Cmax.value = s;
17824 } else {
17825 Cmid.value = Cmax.value = 0;
17826 }
17827 Cmin.value = 0;
17828 C[Cmax.name] = Cmax.value;
17829 C[Cmin.name] = Cmin.value;
17830 C[Cmid.name] = Cmid.value;
17831 return C;
17832 }
17833 }, {
17834 key: 'clip',
17835 value: function clip() {
17836 var C = new _Color2(this);
17837 var L = C.getLuminosity();
17838 var n2 = Math.min(C.r, C.g, C.b);
17839 var x = Math.max(C.r, C.g, C.b);
17840 if (n2 < 0) {
17841 C.r = L + (C.r - L) * L / (L - n2);
17842 C.g = L + (C.g - L) * L / (L - n2);
17843 C.b = L + (C.b - L) * L / (L - n2);
17844 }
17845 if (x > 1) {
17846 C.r = L + (C.r - L) * (1 - L) / (x - L);
17847 C.g = L + (C.g - L) * (1 - L) / (x - L);
17848 C.b = L + (C.b - L) * (1 - L) / (x - L);
17849 }
17850 return C;
17851 }
17852 } ]);
17853 }());
17854 function _add(value) {
17855 var C = new _Color2(this);
17856 C.r += value;
17857 C.g += value;
17858 C.b += value;
17859 return C;
17860 }
17861 var color_default = _Color2;
17862 function clamp(value, min, max2) {
17863 return Math.min(Math.max(min, value), max2);
17864 }
17865 function radToDeg(rad) {
17866 return rad * 180 / Math.PI;
17867 }
17868 function turnToDeg(turn) {
17869 return turn * 360;
17870 }
17871 function getOwnBackgroundColor(elmStyle) {
17872 var bgColor = new color_default();
17873 bgColor.parseString(elmStyle.getPropertyValue('background-color'));
17874 if (bgColor.alpha !== 0) {
17875 var opacity = elmStyle.getPropertyValue('opacity');
17876 bgColor.alpha = bgColor.alpha * opacity;
17877 }
17878 return bgColor;
17879 }
17880 var get_own_background_color_default = getOwnBackgroundColor;
17881 function isOpaque(node) {
17882 var style = window.getComputedStyle(node);
17883 return element_has_image_default(node, style) || get_own_background_color_default(style).alpha === 1;
17884 }
17885 var is_opaque_default = isOpaque;
17886 function _isSkipLink(element) {
17887 if (!element.href) {
17888 return false;
17889 }
17890 var firstPageLink = cache_default.get('firstPageLink', generateFirstPageLink);
17891 if (!firstPageLink) {
17892 return true;
17893 }
17894 return element.compareDocumentPosition(firstPageLink.actualNode) === element.DOCUMENT_POSITION_FOLLOWING;
17895 }
17896 function generateFirstPageLink() {
17897 var firstPageLink;
17898 if (!window.location.origin) {
17899 firstPageLink = query_selector_all_default(axe._tree, 'a:not([href^="#"]):not([href^="/#"]):not([href^="javascript:"])')[0];
17900 } else {
17901 firstPageLink = query_selector_all_default(axe._tree, 'a[href]:not([href^="javascript:"])').find(function(link) {
17902 return !_isCurrentPageLink(link.actualNode);
17903 });
17904 }
17905 return firstPageLink || null;
17906 }
17907 var clipRegex2 = /rect\s*\(([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px\s*\)/;
17908 var clipPathRegex2 = /(\w+)\((\d+)/;
17909 function isClipped(style) {
17910 var matchesClip = style.getPropertyValue('clip').match(clipRegex2);
17911 var matchesClipPath = style.getPropertyValue('clip-path').match(clipPathRegex2);
17912 if (matchesClip && matchesClip.length === 5) {
17913 var position = style.getPropertyValue('position');
17914 if ([ 'fixed', 'absolute' ].includes(position)) {
17915 return matchesClip[3] - matchesClip[1] <= 0 && matchesClip[2] - matchesClip[4] <= 0;
17916 }
17917 }
17918 if (matchesClipPath) {
17919 var type2 = matchesClipPath[1];
17920 var value = parseInt(matchesClipPath[2], 10);
17921 switch (type2) {
17922 case 'inset':
17923 return value >= 50;
17924
17925 case 'circle':
17926 return value === 0;
17927
17928 default:
17929 }
17930 }
17931 return false;
17932 }
17933 function isAreaVisible(el, screenReader, recursed) {
17934 var mapEl = find_up_default(el, 'map');
17935 if (!mapEl) {
17936 return false;
17937 }
17938 var mapElName = mapEl.getAttribute('name');
17939 if (!mapElName) {
17940 return false;
17941 }
17942 var mapElRootNode = get_root_node_default2(el);
17943 if (!mapElRootNode || mapElRootNode.nodeType !== 9) {
17944 return false;
17945 }
17946 var refs = query_selector_all_default(axe._tree, 'img[usemap="#'.concat(escape_selector_default(mapElName), '"]'));
17947 if (!refs || !refs.length) {
17948 return false;
17949 }
17950 return refs.some(function(_ref65) {
17951 var actualNode = _ref65.actualNode;
17952 return isVisible(actualNode, screenReader, recursed);
17953 });
17954 }
17955 function isVisible(el, screenReader, recursed) {
17956 var _window$Node2;
17957 if (!el) {
17958 throw new TypeError('Cannot determine if element is visible for non-DOM nodes');
17959 }
17960 var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
17961 el = vNode ? vNode.actualNode : el;
17962 var cacheName = '_isVisible' + (screenReader ? 'ScreenReader' : '');
17963 var _ref66 = (_window$Node2 = window.Node) !== null && _window$Node2 !== void 0 ? _window$Node2 : {}, DOCUMENT_NODE = _ref66.DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE = _ref66.DOCUMENT_FRAGMENT_NODE;
17964 var nodeType = vNode ? vNode.props.nodeType : el.nodeType;
17965 var nodeName2 = vNode ? vNode.props.nodeName : el.nodeName.toLowerCase();
17966 if (vNode && typeof vNode[cacheName] !== 'undefined') {
17967 return vNode[cacheName];
17968 }
17969 if (nodeType === DOCUMENT_NODE) {
17970 return true;
17971 }
17972 if ([ 'style', 'script', 'noscript', 'template' ].includes(nodeName2)) {
17973 return false;
17974 }
17975 if (el && nodeType === DOCUMENT_FRAGMENT_NODE) {
17976 el = el.host;
17977 }
17978 if (screenReader) {
17979 var ariaHiddenValue = vNode ? vNode.attr('aria-hidden') : el.getAttribute('aria-hidden');
17980 if (ariaHiddenValue === 'true') {
17981 return false;
17982 }
17983 }
17984 if (!el) {
17985 var parent2 = vNode.parent;
17986 var visible3 = true;
17987 if (parent2) {
17988 visible3 = isVisible(parent2, screenReader, true);
17989 }
17990 if (vNode) {
17991 vNode[cacheName] = visible3;
17992 }
17993 return visible3;
17994 }
17995 var style = window.getComputedStyle(el, null);
17996 if (style === null) {
17997 return false;
17998 }
17999 if (nodeName2 === 'area') {
18000 return isAreaVisible(el, screenReader, recursed);
18001 }
18002 if (style.getPropertyValue('display') === 'none') {
18003 return false;
18004 }
18005 var elHeight = parseInt(style.getPropertyValue('height'));
18006 var elWidth = parseInt(style.getPropertyValue('width'));
18007 var scroll = get_scroll_default(el);
18008 var scrollableWithZeroHeight = scroll && elHeight === 0;
18009 var scrollableWithZeroWidth = scroll && elWidth === 0;
18010 var posAbsoluteOverflowHiddenAndSmall = style.getPropertyValue('position') === 'absolute' && (elHeight < 2 || elWidth < 2) && style.getPropertyValue('overflow') === 'hidden';
18011 if (!screenReader && (isClipped(style) || style.getPropertyValue('opacity') === '0' || scrollableWithZeroHeight || scrollableWithZeroWidth || posAbsoluteOverflowHiddenAndSmall)) {
18012 return false;
18013 }
18014 if (!recursed && (style.getPropertyValue('visibility') === 'hidden' || !screenReader && is_offscreen_default(el))) {
18015 return false;
18016 }
18017 var parent = el.assignedSlot ? el.assignedSlot : el.parentNode;
18018 var visible2 = false;
18019 if (parent) {
18020 visible2 = isVisible(parent, screenReader, true);
18021 }
18022 if (vNode) {
18023 vNode[cacheName] = visible2;
18024 }
18025 return visible2;
18026 }
18027 var is_visible_default = isVisible;
18028 function reduceToElementsBelowFloating(elements, targetNode) {
18029 var floatingPositions = [ 'fixed', 'sticky' ];
18030 var finalElements = [];
18031 var targetFound = false;
18032 for (var index = 0; index < elements.length; ++index) {
18033 var currentNode = elements[index];
18034 if (currentNode === targetNode) {
18035 targetFound = true;
18036 }
18037 var style = window.getComputedStyle(currentNode);
18038 if (!targetFound && floatingPositions.indexOf(style.position) !== -1) {
18039 finalElements = [];
18040 continue;
18041 }
18042 finalElements.push(currentNode);
18043 }
18044 return finalElements;
18045 }
18046 var reduce_to_elements_below_floating_default = reduceToElementsBelowFloating;
18047 function _visuallyContains(node, parent) {
18048 var parentScrollAncestor = getScrollAncestor(parent);
18049 do {
18050 var nextScrollAncestor = getScrollAncestor(node);
18051 if (nextScrollAncestor === parentScrollAncestor || nextScrollAncestor === parent) {
18052 return contains2(node, parent);
18053 }
18054 node = nextScrollAncestor;
18055 } while (node);
18056 return false;
18057 }
18058 function getScrollAncestor(node) {
18059 var vNode = get_node_from_tree_default(node);
18060 var ancestor = vNode.parent;
18061 while (ancestor) {
18062 if (get_scroll_default(ancestor.actualNode)) {
18063 return ancestor.actualNode;
18064 }
18065 ancestor = ancestor.parent;
18066 }
18067 }
18068 function contains2(node, parent) {
18069 var style = window.getComputedStyle(parent);
18070 var overflow = style.getPropertyValue('overflow');
18071 if (style.getPropertyValue('display') === 'inline') {
18072 return true;
18073 }
18074 var clientRects = Array.from(node.getClientRects());
18075 var boundingRect = parent.getBoundingClientRect();
18076 var rect = {
18077 left: boundingRect.left,
18078 top: boundingRect.top,
18079 width: boundingRect.width,
18080 height: boundingRect.height
18081 };
18082 if ([ 'scroll', 'auto' ].includes(overflow) || parent instanceof window.HTMLHtmlElement) {
18083 rect.width = parent.scrollWidth;
18084 rect.height = parent.scrollHeight;
18085 }
18086 if (clientRects.length === 1 && overflow === 'hidden' && style.getPropertyValue('white-space') === 'nowrap') {
18087 clientRects[0] = rect;
18088 }
18089 return clientRects.some(function(clientRect) {
18090 return !(Math.ceil(clientRect.left) < Math.floor(rect.left) || Math.ceil(clientRect.top) < Math.floor(rect.top) || Math.floor(clientRect.left + clientRect.width) > Math.ceil(rect.left + rect.width) || Math.floor(clientRect.top + clientRect.height) > Math.ceil(rect.top + rect.height));
18091 });
18092 }
18093 function shadowElementsFromPoint(nodeX, nodeY) {
18094 var root = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document;
18095 var i = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
18096 if (i > 999) {
18097 throw new Error('Infinite loop detected');
18098 }
18099 return Array.from(root.elementsFromPoint(nodeX, nodeY) || []).filter(function(nodes) {
18100 return get_root_node_default2(nodes) === root;
18101 }).reduce(function(stack, elm) {
18102 if (is_shadow_root_default(elm)) {
18103 var shadowStack = shadowElementsFromPoint(nodeX, nodeY, elm.shadowRoot, i + 1);
18104 stack = stack.concat(shadowStack);
18105 if (stack.length && _visuallyContains(stack[0], elm)) {
18106 stack.push(elm);
18107 }
18108 } else {
18109 stack.push(elm);
18110 }
18111 return stack;
18112 }, []);
18113 }
18114 var shadow_elements_from_point_default = shadowElementsFromPoint;
18115 function urlPropsFromAttribute(node, attribute) {
18116 if (!node.hasAttribute(attribute)) {
18117 return void 0;
18118 }
18119 var nodeName2 = node.nodeName.toUpperCase();
18120 var parser2 = node;
18121 if (![ 'A', 'AREA' ].includes(nodeName2) || node.ownerSVGElement) {
18122 parser2 = document.createElement('a');
18123 parser2.href = node.getAttribute(attribute);
18124 }
18125 var protocol = [ 'https:', 'ftps:' ].includes(parser2.protocol) ? parser2.protocol.replace(/s:$/, ':') : parser2.protocol;
18126 var parserPathname = /^\//.test(parser2.pathname) ? parser2.pathname : '/'.concat(parser2.pathname);
18127 var _getPathnameOrFilenam = getPathnameOrFilename(parserPathname), pathname = _getPathnameOrFilenam.pathname, filename = _getPathnameOrFilenam.filename;
18128 return {
18129 protocol: protocol,
18130 hostname: parser2.hostname,
18131 port: getPort(parser2.port),
18132 pathname: /\/$/.test(pathname) ? pathname : ''.concat(pathname, '/'),
18133 search: getSearchPairs(parser2.search),
18134 hash: getHashRoute(parser2.hash),
18135 filename: filename
18136 };
18137 }
18138 function getPort(port) {
18139 var excludePorts = [ '443', '80' ];
18140 return !excludePorts.includes(port) ? port : '';
18141 }
18142 function getPathnameOrFilename(pathname) {
18143 var filename = pathname.split('/').pop();
18144 if (!filename || filename.indexOf('.') === -1) {
18145 return {
18146 pathname: pathname,
18147 filename: ''
18148 };
18149 }
18150 return {
18151 pathname: pathname.replace(filename, ''),
18152 filename: /index./.test(filename) ? '' : filename
18153 };
18154 }
18155 function getSearchPairs(searchStr) {
18156 var query = {};
18157 if (!searchStr || !searchStr.length) {
18158 return query;
18159 }
18160 var pairs = searchStr.substring(1).split('&');
18161 if (!pairs || !pairs.length) {
18162 return query;
18163 }
18164 for (var index = 0; index < pairs.length; index++) {
18165 var pair = pairs[index];
18166 var _pair$split = pair.split('='), _pair$split2 = _slicedToArray(_pair$split, 2), _key9 = _pair$split2[0], _pair$split2$ = _pair$split2[1], value = _pair$split2$ === void 0 ? '' : _pair$split2$;
18167 query[decodeURIComponent(_key9)] = decodeURIComponent(value);
18168 }
18169 return query;
18170 }
18171 function getHashRoute(hash) {
18172 if (!hash) {
18173 return '';
18174 }
18175 var hashRegex = /#!?\/?/g;
18176 var hasMatch = hash.match(hashRegex);
18177 if (!hasMatch) {
18178 return '';
18179 }
18180 var _hasMatch = _slicedToArray(hasMatch, 1), matchedStr = _hasMatch[0];
18181 if (matchedStr === '#') {
18182 return '';
18183 }
18184 return hash;
18185 }
18186 var url_props_from_attribute_default = urlPropsFromAttribute;
18187 function visuallyOverlaps(rect, parent) {
18188 var parentRect = parent.getBoundingClientRect();
18189 var parentTop = parentRect.top;
18190 var parentLeft = parentRect.left;
18191 var parentScrollArea = {
18192 top: parentTop - parent.scrollTop,
18193 bottom: parentTop - parent.scrollTop + parent.scrollHeight,
18194 left: parentLeft - parent.scrollLeft,
18195 right: parentLeft - parent.scrollLeft + parent.scrollWidth
18196 };
18197 if (rect.left > parentScrollArea.right && rect.left > parentRect.right || rect.top > parentScrollArea.bottom && rect.top > parentRect.bottom || rect.right < parentScrollArea.left && rect.right < parentRect.left || rect.bottom < parentScrollArea.top && rect.bottom < parentRect.top) {
18198 return false;
18199 }
18200 var style = window.getComputedStyle(parent);
18201 if (rect.left > parentRect.right || rect.top > parentRect.bottom) {
18202 return style.overflow === 'scroll' || style.overflow === 'auto' || parent instanceof window.HTMLBodyElement || parent instanceof window.HTMLHtmlElement;
18203 }
18204 return true;
18205 }
18206 var visually_overlaps_default = visuallyOverlaps;
18207 var nodeIndex2 = 0;
18208 var VirtualNode = function(_abstract_virtual_nod) {
18209 function VirtualNode(node, parent, shadowId) {
18210 var _this4;
18211 _classCallCheck(this, VirtualNode);
18212 _this4 = _callSuper(this, VirtualNode);
18213 _this4.shadowId = shadowId;
18214 _this4.children = [];
18215 _this4.actualNode = node;
18216 _this4.parent = parent;
18217 if (!parent) {
18218 nodeIndex2 = 0;
18219 }
18220 _this4.nodeIndex = nodeIndex2++;
18221 _this4._isHidden = null;
18222 _this4._cache = {};
18223 _this4._isXHTML = is_xhtml_default(node.ownerDocument);
18224 if (node.nodeName.toLowerCase() === 'input') {
18225 var type2 = node.getAttribute('type');
18226 type2 = _this4._isXHTML ? type2 : (type2 || '').toLowerCase();
18227 if (!valid_input_type_default().includes(type2)) {
18228 type2 = 'text';
18229 }
18230 _this4._type = type2;
18231 }
18232 if (cache_default.get('nodeMap')) {
18233 cache_default.get('nodeMap').set(node, _this4);
18234 }
18235 return _this4;
18236 }
18237 _inherits(VirtualNode, _abstract_virtual_nod);
18238 return _createClass(VirtualNode, [ {
18239 key: 'props',
18240 get: function get() {
18241 if (!this._cache.hasOwnProperty('props')) {
18242 var _this$actualNode = this.actualNode, nodeType = _this$actualNode.nodeType, nodeName2 = _this$actualNode.nodeName, _id3 = _this$actualNode.id, nodeValue = _this$actualNode.nodeValue;
18243 this._cache.props = {
18244 nodeType: nodeType,
18245 nodeName: this._isXHTML ? nodeName2 : nodeName2.toLowerCase(),
18246 id: _id3,
18247 type: this._type,
18248 nodeValue: nodeValue
18249 };
18250 if (nodeType === 1) {
18251 this._cache.props.multiple = this.actualNode.multiple;
18252 this._cache.props.value = this.actualNode.value;
18253 this._cache.props.selected = this.actualNode.selected;
18254 this._cache.props.checked = this.actualNode.checked;
18255 this._cache.props.indeterminate = this.actualNode.indeterminate;
18256 }
18257 }
18258 return this._cache.props;
18259 }
18260 }, {
18261 key: 'attr',
18262 value: function attr(attrName) {
18263 if (typeof this.actualNode.getAttribute !== 'function') {
18264 return null;
18265 }
18266 return this.actualNode.getAttribute(attrName);
18267 }
18268 }, {
18269 key: 'hasAttr',
18270 value: function hasAttr(attrName) {
18271 if (typeof this.actualNode.hasAttribute !== 'function') {
18272 return false;
18273 }
18274 return this.actualNode.hasAttribute(attrName);
18275 }
18276 }, {
18277 key: 'attrNames',
18278 get: function get() {
18279 if (!this._cache.hasOwnProperty('attrNames')) {
18280 var attrs;
18281 if (this.actualNode.attributes instanceof window.NamedNodeMap) {
18282 attrs = this.actualNode.attributes;
18283 } else {
18284 attrs = this.actualNode.cloneNode(false).attributes;
18285 }
18286 this._cache.attrNames = Array.from(attrs).map(function(attr) {
18287 return attr.name;
18288 });
18289 }
18290 return this._cache.attrNames;
18291 }
18292 }, {
18293 key: 'getComputedStylePropertyValue',
18294 value: function getComputedStylePropertyValue(property) {
18295 var key = 'computedStyle_' + property;
18296 if (!this._cache.hasOwnProperty(key)) {
18297 if (!this._cache.hasOwnProperty('computedStyle')) {
18298 this._cache.computedStyle = window.getComputedStyle(this.actualNode);
18299 }
18300 this._cache[key] = this._cache.computedStyle.getPropertyValue(property);
18301 }
18302 return this._cache[key];
18303 }
18304 }, {
18305 key: 'isFocusable',
18306 get: function get() {
18307 if (!this._cache.hasOwnProperty('isFocusable')) {
18308 this._cache.isFocusable = _isFocusable(this.actualNode);
18309 }
18310 return this._cache.isFocusable;
18311 }
18312 }, {
18313 key: 'tabbableElements',
18314 get: function get() {
18315 if (!this._cache.hasOwnProperty('tabbableElements')) {
18316 this._cache.tabbableElements = get_tabbable_elements_default(this);
18317 }
18318 return this._cache.tabbableElements;
18319 }
18320 }, {
18321 key: 'clientRects',
18322 get: function get() {
18323 if (!this._cache.hasOwnProperty('clientRects')) {
18324 this._cache.clientRects = Array.from(this.actualNode.getClientRects()).filter(function(rect) {
18325 return rect.width > 0;
18326 });
18327 }
18328 return this._cache.clientRects;
18329 }
18330 }, {
18331 key: 'boundingClientRect',
18332 get: function get() {
18333 if (!this._cache.hasOwnProperty('boundingClientRect')) {
18334 this._cache.boundingClientRect = this.actualNode.getBoundingClientRect();
18335 }
18336 return this._cache.boundingClientRect;
18337 }
18338 } ]);
18339 }(abstract_virtual_node_default);
18340 var virtual_node_default = VirtualNode;
18341 function tokenList(str) {
18342 return (str || '').trim().replace(/\s{2,}/g, ' ').split(' ');
18343 }
18344 var token_list_default = tokenList;
18345 var idsKey = ' [idsMap]';
18346 function getNodesMatchingExpression(domTree, expressions, filter) {
18347 var selectorMap = domTree[0]._selectorMap;
18348 if (!selectorMap) {
18349 return;
18350 }
18351 var shadowId = domTree[0].shadowId;
18352 for (var _i14 = 0; _i14 < expressions.length; _i14++) {
18353 if (expressions[_i14].length > 1 && expressions[_i14].some(function(expression) {
18354 return isGlobalSelector(expression);
18355 })) {
18356 return;
18357 }
18358 }
18359 var nodeSet = new Set();
18360 expressions.forEach(function(expression) {
18361 var _matchingNodes$nodes;
18362 var matchingNodes = findMatchingNodes(expression, selectorMap, shadowId);
18363 matchingNodes === null || matchingNodes === void 0 || (_matchingNodes$nodes = matchingNodes.nodes) === null || _matchingNodes$nodes === void 0 || _matchingNodes$nodes.forEach(function(node) {
18364 if (matchingNodes.isComplexSelector && !_matchesExpression(node, expression)) {
18365 return;
18366 }
18367 nodeSet.add(node);
18368 });
18369 });
18370 var matchedNodes = [];
18371 nodeSet.forEach(function(node) {
18372 return matchedNodes.push(node);
18373 });
18374 if (filter) {
18375 matchedNodes = matchedNodes.filter(filter);
18376 }
18377 return matchedNodes.sort(function(a2, b2) {
18378 return a2.nodeIndex - b2.nodeIndex;
18379 });
18380 }
18381 function findMatchingNodes(expression, selectorMap, shadowId) {
18382 var exp = expression[expression.length - 1];
18383 var nodes = null;
18384 var isComplexSelector = expression.length > 1 || !!exp.pseudos || !!exp.classes;
18385 if (isGlobalSelector(exp)) {
18386 nodes = selectorMap['*'];
18387 } else {
18388 if (exp.id) {
18389 var _selectorMap$idsKey$e;
18390 if (!selectorMap[idsKey] || !Object.hasOwn(selectorMap[idsKey], exp.id) || !((_selectorMap$idsKey$e = selectorMap[idsKey][exp.id]) !== null && _selectorMap$idsKey$e !== void 0 && _selectorMap$idsKey$e.length)) {
18391 return;
18392 }
18393 nodes = selectorMap[idsKey][exp.id].filter(function(node) {
18394 return node.shadowId === shadowId;
18395 });
18396 }
18397 if (exp.tag && exp.tag !== '*') {
18398 var _selectorMap$exp$tag;
18399 if (!((_selectorMap$exp$tag = selectorMap[exp.tag]) !== null && _selectorMap$exp$tag !== void 0 && _selectorMap$exp$tag.length)) {
18400 return;
18401 }
18402 var cachedNodes = selectorMap[exp.tag];
18403 nodes = nodes ? getSharedValues(cachedNodes, nodes) : cachedNodes;
18404 }
18405 if (exp.classes) {
18406 var _selectorMap$Class;
18407 if (!((_selectorMap$Class = selectorMap['[class]']) !== null && _selectorMap$Class !== void 0 && _selectorMap$Class.length)) {
18408 return;
18409 }
18410 var _cachedNodes = selectorMap['[class]'];
18411 nodes = nodes ? getSharedValues(_cachedNodes, nodes) : _cachedNodes;
18412 }
18413 if (exp.attributes) {
18414 for (var _i15 = 0; _i15 < exp.attributes.length; _i15++) {
18415 var _selectorMap;
18416 var attr = exp.attributes[_i15];
18417 if (attr.type === 'attrValue') {
18418 isComplexSelector = true;
18419 }
18420 if (!((_selectorMap = selectorMap['['.concat(attr.key, ']')]) !== null && _selectorMap !== void 0 && _selectorMap.length)) {
18421 return;
18422 }
18423 var _cachedNodes2 = selectorMap['['.concat(attr.key, ']')];
18424 nodes = nodes ? getSharedValues(_cachedNodes2, nodes) : _cachedNodes2;
18425 }
18426 }
18427 }
18428 return {
18429 nodes: nodes,
18430 isComplexSelector: isComplexSelector
18431 };
18432 }
18433 function isGlobalSelector(expression) {
18434 return expression.tag === '*' && !expression.attributes && !expression.id && !expression.classes;
18435 }
18436 function getSharedValues(a2, b2) {
18437 return a2.filter(function(node) {
18438 return b2.includes(node);
18439 });
18440 }
18441 function cacheSelector(key, vNode, map) {
18442 if (!Object.hasOwn(map, key)) {
18443 map[key] = [];
18444 }
18445 map[key].push(vNode);
18446 }
18447 function cacheNodeSelectors(vNode, selectorMap) {
18448 if (vNode.props.nodeType !== 1) {
18449 return;
18450 }
18451 cacheSelector(vNode.props.nodeName, vNode, selectorMap);
18452 cacheSelector('*', vNode, selectorMap);
18453 vNode.attrNames.forEach(function(attrName) {
18454 if (attrName === 'id') {
18455 selectorMap[idsKey] = selectorMap[idsKey] || {};
18456 token_list_default(vNode.attr(attrName)).forEach(function(value) {
18457 cacheSelector(value, vNode, selectorMap[idsKey]);
18458 });
18459 }
18460 cacheSelector('['.concat(attrName, ']'), vNode, selectorMap);
18461 });
18462 }
18463 var hasShadowRoot;
18464 function _getFlattenedTree() {
18465 var node = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.documentElement;
18466 var shadowId = arguments.length > 1 ? arguments[1] : undefined;
18467 hasShadowRoot = false;
18468 var selectorMap = {};
18469 cache_default.set('nodeMap', new WeakMap());
18470 cache_default.set('selectorMap', selectorMap);
18471 var tree = flattenTree(node, shadowId, null);
18472 tree[0]._selectorMap = selectorMap;
18473 tree[0]._hasShadowRoot = hasShadowRoot;
18474 return tree;
18475 }
18476 function getSlotChildren(node) {
18477 var childNodes = [];
18478 node = node.firstChild;
18479 while (node) {
18480 childNodes.push(node);
18481 node = node.nextSibling;
18482 }
18483 return childNodes;
18484 }
18485 function createNode(node, parent, shadowId) {
18486 var vNode = new virtual_node_default(node, parent, shadowId);
18487 cacheNodeSelectors(vNode, cache_default.get('selectorMap'));
18488 return vNode;
18489 }
18490 function createChildren(childNodes, parent, shadowId) {
18491 var children = [];
18492 childNodes.forEach(function(childNode) {
18493 var child = flattenTree(childNode, shadowId, parent);
18494 if (child) {
18495 children.push.apply(children, _toConsumableArray(child));
18496 }
18497 });
18498 return children;
18499 }
18500 function flattenTree(node, shadowId, parent) {
18501 var vNode, childNodes;
18502 if (node.documentElement) {
18503 node = node.documentElement;
18504 }
18505 var nodeName2 = node.nodeName.toLowerCase();
18506 if (is_shadow_root_default(node)) {
18507 hasShadowRoot = true;
18508 vNode = createNode(node, parent, shadowId);
18509 shadowId = 'a' + Math.random().toString().substring(2);
18510 childNodes = Array.from(node.shadowRoot.childNodes);
18511 vNode.children = createChildren(childNodes, vNode, shadowId);
18512 return [ vNode ];
18513 }
18514 if (nodeName2 === 'content' && typeof node.getDistributedNodes === 'function') {
18515 childNodes = Array.from(node.getDistributedNodes());
18516 return createChildren(childNodes, parent, shadowId);
18517 }
18518 if (nodeName2 === 'slot' && typeof node.assignedNodes === 'function') {
18519 childNodes = Array.from(node.assignedNodes());
18520 if (!childNodes.length) {
18521 childNodes = getSlotChildren(node);
18522 }
18523 var styl = window.getComputedStyle(node);
18524 if (false) {
18525 vNode = createNode(node, parent, shadowId);
18526 vNode.children = createChildren(childNodes, vNode, shadowId);
18527 return [ vNode ];
18528 }
18529 return createChildren(childNodes, parent, shadowId);
18530 }
18531 if (node.nodeType === document.ELEMENT_NODE) {
18532 vNode = createNode(node, parent, shadowId);
18533 childNodes = Array.from(node.childNodes);
18534 vNode.children = createChildren(childNodes, vNode, shadowId);
18535 return [ vNode ];
18536 }
18537 if (node.nodeType === document.TEXT_NODE) {
18538 return [ createNode(node, parent) ];
18539 }
18540 return void 0;
18541 }
18542 function getBaseLang(lang) {
18543 if (!lang) {
18544 return '';
18545 }
18546 return lang.trim().split('-')[0].toLowerCase();
18547 }
18548 var get_base_lang_default = getBaseLang;
18549 function failureSummary(nodeData) {
18550 var failingChecks = {};
18551 failingChecks.none = nodeData.none.concat(nodeData.all);
18552 failingChecks.any = nodeData.any;
18553 return Object.keys(failingChecks).map(function(key) {
18554 if (!failingChecks[key].length) {
18555 return;
18556 }
18557 var sum = axe._audit.data.failureSummaries[key];
18558 if (sum && typeof sum.failureMessage === 'function') {
18559 return sum.failureMessage(failingChecks[key].map(function(check) {
18560 return check.message || '';
18561 }));
18562 }
18563 }).filter(function(i) {
18564 return i !== void 0;
18565 }).join('\n\n');
18566 }
18567 var failure_summary_default = failureSummary;
18568 function incompleteFallbackMessage() {
18569 var message = axe._audit.data.incompleteFallbackMessage;
18570 if (typeof message === 'function') {
18571 message = message();
18572 }
18573 if (typeof message !== 'string') {
18574 return '';
18575 }
18576 return message;
18577 }
18578 var resultKeys = constants_default.resultGroups;
18579 function processAggregate(results, options) {
18580 var resultObject = axe.utils.aggregateResult(results);
18581 resultKeys.forEach(function(key) {
18582 if (options.resultTypes && !options.resultTypes.includes(key)) {
18583 (resultObject[key] || []).forEach(function(ruleResult) {
18584 if (Array.isArray(ruleResult.nodes) && ruleResult.nodes.length > 0) {
18585 ruleResult.nodes = [ ruleResult.nodes[0] ];
18586 }
18587 });
18588 }
18589 resultObject[key] = (resultObject[key] || []).map(function(ruleResult) {
18590 ruleResult = Object.assign({}, ruleResult);
18591 if (Array.isArray(ruleResult.nodes) && ruleResult.nodes.length > 0) {
18592 ruleResult.nodes = ruleResult.nodes.map(function(subResult) {
18593 if (_typeof(subResult.node) === 'object') {
18594 var serialElm = trimElementSpec(subResult.node, options);
18595 Object.assign(subResult, serialElm);
18596 }
18597 delete subResult.result;
18598 delete subResult.node;
18599 normalizeRelatedNodes(subResult, options);
18600 return subResult;
18601 });
18602 }
18603 resultKeys.forEach(function(resultKey) {
18604 return delete ruleResult[resultKey];
18605 });
18606 delete ruleResult.pageLevel;
18607 delete ruleResult.result;
18608 return ruleResult;
18609 });
18610 });
18611 return resultObject;
18612 }
18613 function normalizeRelatedNodes(node, options) {
18614 [ 'any', 'all', 'none' ].forEach(function(type2) {
18615 if (!Array.isArray(node[type2])) {
18616 return;
18617 }
18618 node[type2].filter(function(checkRes) {
18619 return Array.isArray(checkRes.relatedNodes);
18620 }).forEach(function(checkRes) {
18621 checkRes.relatedNodes = checkRes.relatedNodes.map(function(relatedNode) {
18622 return trimElementSpec(relatedNode, options);
18623 });
18624 });
18625 });
18626 }
18627 function trimElementSpec() {
18628 var elmSpec = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
18629 var runOptions = arguments.length > 1 ? arguments[1] : undefined;
18630 elmSpec = node_serializer_default.dqElmToSpec(elmSpec, runOptions);
18631 var serialElm = {};
18632 if (axe._audit.noHtml) {
18633 serialElm.html = null;
18634 } else {
18635 var _elmSpec$source;
18636 serialElm.html = (_elmSpec$source = elmSpec.source) !== null && _elmSpec$source !== void 0 ? _elmSpec$source : 'Undefined';
18637 }
18638 if (runOptions.elementRef && !elmSpec.fromFrame) {
18639 var _elmSpec$element;
18640 serialElm.element = (_elmSpec$element = elmSpec.element) !== null && _elmSpec$element !== void 0 ? _elmSpec$element : null;
18641 }
18642 if (runOptions.selectors !== false || elmSpec.fromFrame) {
18643 var _elmSpec$selector;
18644 serialElm.target = (_elmSpec$selector = elmSpec.selector) !== null && _elmSpec$selector !== void 0 ? _elmSpec$selector : [ ':root' ];
18645 }
18646 if (runOptions.ancestry) {
18647 var _elmSpec$ancestry;
18648 serialElm.ancestry = (_elmSpec$ancestry = elmSpec.ancestry) !== null && _elmSpec$ancestry !== void 0 ? _elmSpec$ancestry : [ ':root' ];
18649 }
18650 if (runOptions.xpath) {
18651 var _elmSpec$xpath;
18652 serialElm.xpath = (_elmSpec$xpath = elmSpec.xpath) !== null && _elmSpec$xpath !== void 0 ? _elmSpec$xpath : [ '/' ];
18653 }
18654 return serialElm;
18655 }
18656 var dataRegex = /\$\{\s?data\s?\}/g;
18657 function substitute(str, data) {
18658 if (typeof data === 'string') {
18659 return str.replace(dataRegex, data);
18660 }
18661 for (var prop in data) {
18662 if (data.hasOwnProperty(prop)) {
18663 var regex = new RegExp('\\${\\s?data\\.' + prop + '\\s?}', 'g');
18664 var replace = typeof data[prop] === 'undefined' ? '' : String(data[prop]);
18665 str = str.replace(regex, replace);
18666 }
18667 }
18668 return str;
18669 }
18670 function processMessage(message, data) {
18671 if (!message) {
18672 return;
18673 }
18674 if (Array.isArray(data)) {
18675 data.values = data.join(', ');
18676 if (typeof message.singular === 'string' && typeof message.plural === 'string') {
18677 var str2 = data.length === 1 ? message.singular : message.plural;
18678 return substitute(str2, data);
18679 }
18680 return substitute(message, data);
18681 }
18682 if (typeof message === 'string') {
18683 return substitute(message, data);
18684 }
18685 if (typeof data === 'string') {
18686 var _str = message[data];
18687 return substitute(_str, data);
18688 }
18689 var str = message['default'] || incompleteFallbackMessage();
18690 if (data && data.messageKey && message[data.messageKey]) {
18691 str = message[data.messageKey];
18692 }
18693 return processMessage(str, data);
18694 }
18695 var process_message_default = processMessage;
18696 function getCheckMessage(checkId, type2, data) {
18697 var check = axe._audit.data.checks[checkId];
18698 if (!check) {
18699 throw new Error('Cannot get message for unknown check: '.concat(checkId, '.'));
18700 }
18701 if (!check.messages[type2]) {
18702 throw new Error('Check "'.concat(checkId, '"" does not have a "').concat(type2, '" message.'));
18703 }
18704 return process_message_default(check.messages[type2], data);
18705 }
18706 var get_check_message_default = getCheckMessage;
18707 function getCheckOption(check, ruleID, options) {
18708 var ruleCheckOption = ((options.rules && options.rules[ruleID] || {}).checks || {})[check.id];
18709 var checkOption = (options.checks || {})[check.id];
18710 var enabled = check.enabled;
18711 var opts = check.options;
18712 if (checkOption) {
18713 if (checkOption.hasOwnProperty('enabled')) {
18714 enabled = checkOption.enabled;
18715 }
18716 if (checkOption.hasOwnProperty('options')) {
18717 opts = checkOption.options;
18718 }
18719 }
18720 if (ruleCheckOption) {
18721 if (ruleCheckOption.hasOwnProperty('enabled')) {
18722 enabled = ruleCheckOption.enabled;
18723 }
18724 if (ruleCheckOption.hasOwnProperty('options')) {
18725 opts = ruleCheckOption.options;
18726 }
18727 }
18728 return {
18729 enabled: enabled,
18730 options: opts,
18731 absolutePaths: options.absolutePaths
18732 };
18733 }
18734 var get_check_option_default = getCheckOption;
18735 function _getEnvironmentData() {
18736 var _win$location;
18737 var metadata = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
18738 var win = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window;
18739 if (metadata && _typeof(metadata) === 'object') {
18740 return metadata;
18741 } else if (_typeof(win) !== 'object') {
18742 return {};
18743 }
18744 return {
18745 testEngine: {
18746 name: 'axe-core',
18747 version: axe.version
18748 },
18749 testRunner: {
18750 name: axe._audit.brand
18751 },
18752 testEnvironment: getTestEnvironment(win),
18753 timestamp: new Date().toISOString(),
18754 url: (_win$location = win.location) === null || _win$location === void 0 ? void 0 : _win$location.href
18755 };
18756 }
18757 function getTestEnvironment(win) {
18758 if (!win.navigator || _typeof(win.navigator) !== 'object') {
18759 return {};
18760 }
18761 var navigator = win.navigator, innerHeight = win.innerHeight, innerWidth = win.innerWidth;
18762 var _ref67 = getOrientation(win) || {}, angle = _ref67.angle, type2 = _ref67.type;
18763 return {
18764 userAgent: navigator.userAgent,
18765 windowWidth: innerWidth,
18766 windowHeight: innerHeight,
18767 orientationAngle: angle,
18768 orientationType: type2
18769 };
18770 }
18771 function getOrientation(_ref68) {
18772 var screen = _ref68.screen;
18773 return screen.orientation || screen.msOrientation || screen.mozOrientation;
18774 }
18775 function createFrameContext(frame, _ref69) {
18776 var focusable = _ref69.focusable, page = _ref69.page;
18777 return {
18778 node: frame,
18779 include: [],
18780 exclude: [],
18781 initiator: false,
18782 focusable: focusable && frameFocusable(frame),
18783 size: getBoundingSize(frame),
18784 page: page
18785 };
18786 }
18787 function frameFocusable(frame) {
18788 var tabIndex = parse_tabindex_default(frame.getAttribute('tabindex'));
18789 return tabIndex === null || tabIndex >= 0;
18790 }
18791 function getBoundingSize(domNode) {
18792 var width = parseInt(domNode.getAttribute('width'), 10);
18793 var height = parseInt(domNode.getAttribute('height'), 10);
18794 if (isNaN(width) || isNaN(height)) {
18795 var rect = domNode.getBoundingClientRect();
18796 width = isNaN(width) ? rect.width : width;
18797 height = isNaN(height) ? rect.height : height;
18798 }
18799 return {
18800 width: width,
18801 height: height
18802 };
18803 }
18804 function normalizeContext(contextSpec) {
18805 if (_isContextObject(contextSpec)) {
18806 var msg = ' must be used inside include or exclude. It should not be on the same object.';
18807 assert2(!_objectHasOwn(contextSpec, 'fromFrames'), 'fromFrames' + msg);
18808 assert2(!_objectHasOwn(contextSpec, 'fromShadowDom'), 'fromShadowDom' + msg);
18809 } else if (_isContextProp(contextSpec)) {
18810 contextSpec = {
18811 include: contextSpec,
18812 exclude: []
18813 };
18814 } else {
18815 return {
18816 include: [ document ],
18817 exclude: []
18818 };
18819 }
18820 var include = normalizeContextList(contextSpec.include);
18821 if (include.length === 0) {
18822 include.push(document);
18823 }
18824 var exclude = normalizeContextList(contextSpec.exclude);
18825 return {
18826 include: include,
18827 exclude: exclude
18828 };
18829 }
18830 function normalizeContextList() {
18831 var selectorList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
18832 var normalizedList = [];
18833 if (!_isArrayLike(selectorList)) {
18834 selectorList = [ selectorList ];
18835 }
18836 for (var _i16 = 0; _i16 < selectorList.length; _i16++) {
18837 var normalizedSelector = normalizeContextSelector(selectorList[_i16]);
18838 if (normalizedSelector) {
18839 normalizedList.push(normalizedSelector);
18840 }
18841 }
18842 return normalizedList;
18843 }
18844 function normalizeContextSelector(selector) {
18845 if (selector instanceof window.Node) {
18846 return selector;
18847 }
18848 if (typeof selector === 'string') {
18849 return [ selector ];
18850 }
18851 if (_isLabelledFramesSelector(selector)) {
18852 assertLabelledFrameSelector(selector);
18853 selector = selector.fromFrames;
18854 } else if (_isLabelledShadowDomSelector(selector)) {
18855 selector = [ selector ];
18856 }
18857 return normalizeFrameSelectors(selector);
18858 }
18859 function normalizeFrameSelectors(frameSelectors) {
18860 if (!Array.isArray(frameSelectors)) {
18861 return;
18862 }
18863 var normalizedSelectors = [];
18864 var _iterator10 = _createForOfIteratorHelper(frameSelectors), _step10;
18865 try {
18866 for (_iterator10.s(); !(_step10 = _iterator10.n()).done; ) {
18867 var selector = _step10.value;
18868 if (_isLabelledShadowDomSelector(selector)) {
18869 assertLabelledShadowDomSelector(selector);
18870 selector = selector.fromShadowDom;
18871 }
18872 if (typeof selector !== 'string' && !isShadowSelector(selector)) {
18873 return;
18874 }
18875 normalizedSelectors.push(selector);
18876 }
18877 } catch (err) {
18878 _iterator10.e(err);
18879 } finally {
18880 _iterator10.f();
18881 }
18882 return normalizedSelectors;
18883 }
18884 function assertLabelledFrameSelector(selector) {
18885 assert2(Array.isArray(selector.fromFrames), 'fromFrames property must be an array');
18886 assert2(selector.fromFrames.every(function(fromFrameSelector) {
18887 return !_objectHasOwn(fromFrameSelector, 'fromFrames');
18888 }), 'Invalid context; fromFrames selector must be appended, rather than nested');
18889 assert2(!_objectHasOwn(selector, 'fromShadowDom'), 'fromFrames and fromShadowDom cannot be used on the same object');
18890 }
18891 function assertLabelledShadowDomSelector(selector) {
18892 assert2(Array.isArray(selector.fromShadowDom), 'fromShadowDom property must be an array');
18893 assert2(selector.fromShadowDom.every(function(fromShadowDomSelector) {
18894 return !_objectHasOwn(fromShadowDomSelector, 'fromFrames');
18895 }), 'shadow selector must be inside fromFrame instead');
18896 assert2(selector.fromShadowDom.every(function(fromShadowDomSelector) {
18897 return !_objectHasOwn(fromShadowDomSelector, 'fromShadowDom');
18898 }), 'fromShadowDom selector must be appended, rather than nested');
18899 }
18900 function isShadowSelector(selector) {
18901 return Array.isArray(selector) && selector.every(function(str) {
18902 return typeof str === 'string';
18903 });
18904 }
18905 function assert2(bool, str) {
18906 assert_default(bool, 'Invalid context; '.concat(str, '\nSee: https://github.com/dequelabs/axe-core/blob/master/doc/context.md'));
18907 }
18908 function parseSelectorArray(context, type2) {
18909 var result = [];
18910 for (var _i17 = 0, l = context[type2].length; _i17 < l; _i17++) {
18911 var item = context[type2][_i17];
18912 if (item instanceof window.Node) {
18913 if (item.documentElement instanceof window.Node) {
18914 result.push(context.flatTree[0]);
18915 } else if (item.host instanceof window.Node) {
18916 var children = Array.from(item.children).map(function(child) {
18917 return get_node_from_tree_default(child);
18918 });
18919 result.push.apply(result, _toConsumableArray(children));
18920 } else {
18921 result.push(get_node_from_tree_default(item));
18922 }
18923 } else if (item && item.length) {
18924 if (item.length > 1) {
18925 pushUniqueFrameSelector(context, type2, item);
18926 } else {
18927 var nodeList = _shadowSelectAll(item[0]);
18928 result.push.apply(result, _toConsumableArray(nodeList.map(function(node) {
18929 return get_node_from_tree_default(node);
18930 })));
18931 }
18932 }
18933 }
18934 return result.filter(function(r) {
18935 return r;
18936 });
18937 }
18938 function pushUniqueFrameSelector(context, type2, selectorArray) {
18939 context.frames = context.frames || [];
18940 var frameSelector = selectorArray.shift();
18941 var frames = _shadowSelectAll(frameSelector);
18942 frames.forEach(function(frame) {
18943 var frameContext = context.frames.find(function(result) {
18944 return result.node === frame;
18945 });
18946 if (!frameContext) {
18947 frameContext = createFrameContext(frame, context);
18948 context.frames.push(frameContext);
18949 }
18950 frameContext[type2].push(selectorArray);
18951 });
18952 }
18953 function Context(spec, flatTree) {
18954 var _spec, _spec2, _spec3, _spec4, _this5 = this;
18955 spec = clone2(spec);
18956 this.frames = [];
18957 this.page = typeof ((_spec = spec) === null || _spec === void 0 ? void 0 : _spec.page) === 'boolean' ? spec.page : void 0;
18958 this.initiator = typeof ((_spec2 = spec) === null || _spec2 === void 0 ? void 0 : _spec2.initiator) === 'boolean' ? spec.initiator : true;
18959 this.focusable = typeof ((_spec3 = spec) === null || _spec3 === void 0 ? void 0 : _spec3.focusable) === 'boolean' ? spec.focusable : true;
18960 this.size = _typeof((_spec4 = spec) === null || _spec4 === void 0 ? void 0 : _spec4.size) === 'object' ? spec.size : {};
18961 spec = normalizeContext(spec);
18962 this.flatTree = flatTree !== null && flatTree !== void 0 ? flatTree : _getFlattenedTree(getRootNode2(spec));
18963 this.exclude = spec.exclude;
18964 this.include = spec.include;
18965 this.include = parseSelectorArray(this, 'include');
18966 this.exclude = parseSelectorArray(this, 'exclude');
18967 _select('frame, iframe', this).forEach(function(frame) {
18968 if (_isNodeInContext(frame, _this5)) {
18969 pushUniqueFrame(_this5, frame.actualNode);
18970 }
18971 });
18972 if (typeof this.page === 'undefined') {
18973 this.page = isPageContext(this);
18974 this.frames.forEach(function(frame) {
18975 frame.page = _this5.page;
18976 });
18977 }
18978 validateContext(this);
18979 if (!Array.isArray(this.include)) {
18980 this.include = Array.from(this.include);
18981 }
18982 this.include.sort(node_sorter_default);
18983 }
18984 function pushUniqueFrame(context, frame) {
18985 if (!_isVisibleToScreenReaders(frame) || find_by_default(context.frames, 'node', frame)) {
18986 return;
18987 }
18988 context.frames.push(createFrameContext(frame, context));
18989 }
18990 function isPageContext(_ref70) {
18991 var include = _ref70.include;
18992 return include.length === 1 && include[0].actualNode === document.documentElement;
18993 }
18994 function validateContext(context) {
18995 if (context.include.length === 0 && context.frames.length === 0) {
18996 var env = _respondable.isInFrame() ? 'frame' : 'page';
18997 throw new Error('No elements found for include in ' + env + ' Context');
18998 }
18999 }
19000 function getRootNode2(_ref71) {
19001 var include = _ref71.include, exclude = _ref71.exclude;
19002 var selectors = Array.from(include).concat(Array.from(exclude));
19003 for (var _i18 = 0; _i18 < selectors.length; _i18++) {
19004 var item = selectors[_i18];
19005 if (item instanceof window.Element) {
19006 return item.ownerDocument.documentElement;
19007 }
19008 if (item instanceof window.Document) {
19009 return item.documentElement;
19010 }
19011 }
19012 return document.documentElement;
19013 }
19014 function _getFrameContexts(context) {
19015 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
19016 if (options.iframes === false) {
19017 return [];
19018 }
19019 var _Context = new Context(context), frames = _Context.frames;
19020 return frames.map(function(_ref72) {
19021 var node = _ref72.node, frameContext = _objectWithoutProperties(_ref72, _excluded12);
19022 frameContext.initiator = false;
19023 var frameSelector = _getAncestry(node);
19024 return {
19025 frameSelector: frameSelector,
19026 frameContext: frameContext
19027 };
19028 });
19029 }
19030 function _getRule(ruleId) {
19031 var rule = axe._audit.rules.find(function(_ref73) {
19032 var id = _ref73.id;
19033 return id === ruleId;
19034 });
19035 if (!rule) {
19036 throw new Error('Cannot find rule by id: '.concat(ruleId));
19037 }
19038 return rule;
19039 }
19040 function getScroll(elm) {
19041 var buffer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
19042 var overflowX = elm.scrollWidth > elm.clientWidth + buffer;
19043 var overflowY = elm.scrollHeight > elm.clientHeight + buffer;
19044 if (!(overflowX || overflowY)) {
19045 return;
19046 }
19047 var style = window.getComputedStyle(elm);
19048 var scrollableX = isScrollable(style, 'overflow-x');
19049 var scrollableY = isScrollable(style, 'overflow-y');
19050 if (overflowX && scrollableX || overflowY && scrollableY) {
19051 return {
19052 elm: elm,
19053 top: elm.scrollTop,
19054 left: elm.scrollLeft
19055 };
19056 }
19057 }
19058 function isScrollable(style, prop) {
19059 var overflowProp = style.getPropertyValue(prop);
19060 return [ 'scroll', 'auto' ].includes(overflowProp);
19061 }
19062 var get_scroll_default = memoize_default(getScroll);
19063 function getElmScrollRecursive(root) {
19064 return Array.from(root.children || root.childNodes || []).reduce(function(scrolls, elm) {
19065 var scroll = get_scroll_default(elm);
19066 if (scroll) {
19067 scrolls.push(scroll);
19068 }
19069 return scrolls.concat(getElmScrollRecursive(elm));
19070 }, []);
19071 }
19072 function getScrollState() {
19073 var win = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
19074 var root = win.document.documentElement;
19075 var windowScroll = [ win.pageXOffset !== void 0 ? {
19076 elm: win,
19077 top: win.pageYOffset,
19078 left: win.pageXOffset
19079 } : {
19080 elm: root,
19081 top: root.scrollTop,
19082 left: root.scrollLeft
19083 } ];
19084 return windowScroll.concat(getElmScrollRecursive(document.body));
19085 }
19086 var get_scroll_state_default = getScrollState;
19087 function _getStandards() {
19088 return clone2(standards_default);
19089 }
19090 function getStyleSheetFactory(dynamicDoc) {
19091 if (!dynamicDoc) {
19092 throw new Error('axe.utils.getStyleSheetFactory should be invoked with an argument');
19093 }
19094 return function(options) {
19095 var data = options.data, _options$isCrossOrigi = options.isCrossOrigin, isCrossOrigin = _options$isCrossOrigi === void 0 ? false : _options$isCrossOrigi, shadowId = options.shadowId, root = options.root, priority = options.priority, _options$isLink = options.isLink, isLink = _options$isLink === void 0 ? false : _options$isLink;
19096 var style = dynamicDoc.createElement('style');
19097 if (isLink) {
19098 var text = dynamicDoc.createTextNode('@import "'.concat(data.href, '"'));
19099 style.appendChild(text);
19100 } else {
19101 style.appendChild(dynamicDoc.createTextNode(data));
19102 }
19103 dynamicDoc.head.appendChild(style);
19104 return {
19105 sheet: style.sheet,
19106 isCrossOrigin: isCrossOrigin,
19107 shadowId: shadowId,
19108 root: root,
19109 priority: priority
19110 };
19111 };
19112 }
19113 var get_stylesheet_factory_default = getStyleSheetFactory;
19114 var styleSheet;
19115 function injectStyle(style) {
19116 if (styleSheet && styleSheet.parentNode) {
19117 if (styleSheet.styleSheet === void 0) {
19118 styleSheet.appendChild(document.createTextNode(style));
19119 } else {
19120 styleSheet.styleSheet.cssText += style;
19121 }
19122 return styleSheet;
19123 }
19124 if (!style) {
19125 return;
19126 }
19127 var head = document.head || document.getElementsByTagName('head')[0];
19128 styleSheet = document.createElement('style');
19129 styleSheet.type = 'text/css';
19130 if (styleSheet.styleSheet === void 0) {
19131 styleSheet.appendChild(document.createTextNode(style));
19132 } else {
19133 styleSheet.styleSheet.cssText = style;
19134 }
19135 head.appendChild(styleSheet);
19136 return styleSheet;
19137 }
19138 var inject_style_default = injectStyle;
19139 function _isArrayLike(arr) {
19140 return !!arr && _typeof(arr) === 'object' && typeof arr.length === 'number' && arr instanceof window.Node === false;
19141 }
19142 function _objectHasOwn(obj, prop) {
19143 if (!obj || _typeof(obj) !== 'object') {
19144 return false;
19145 }
19146 return Object.prototype.hasOwnProperty.call(obj, prop);
19147 }
19148 function _isContextSpec(contextSpec) {
19149 return _isContextObject(contextSpec) || _isContextProp(contextSpec);
19150 }
19151 function _isContextObject(contextSpec) {
19152 return [ 'include', 'exclude' ].some(function(prop) {
19153 return _objectHasOwn(contextSpec, prop) && _isContextProp(contextSpec[prop]);
19154 });
19155 }
19156 function _isContextProp(contextList) {
19157 return typeof contextList === 'string' || contextList instanceof window.Node || _isLabelledFramesSelector(contextList) || _isLabelledShadowDomSelector(contextList) || _isArrayLike(contextList);
19158 }
19159 function _isLabelledFramesSelector(selector) {
19160 return _objectHasOwn(selector, 'fromFrames');
19161 }
19162 function _isLabelledShadowDomSelector(selector) {
19163 return _objectHasOwn(selector, 'fromShadowDom');
19164 }
19165 function isHidden(el, recursed) {
19166 var node = get_node_from_tree_default(el);
19167 if (el.nodeType === 9) {
19168 return false;
19169 }
19170 if (el.nodeType === 11) {
19171 el = el.host;
19172 }
19173 if (node && node._isHidden !== null) {
19174 return node._isHidden;
19175 }
19176 var style = window.getComputedStyle(el, null);
19177 if (!style || !el.parentNode || style.getPropertyValue('display') === 'none' || !recursed && style.getPropertyValue('visibility') === 'hidden' || el.getAttribute('aria-hidden') === 'true') {
19178 return true;
19179 }
19180 var parent = el.assignedSlot ? el.assignedSlot : el.parentNode;
19181 var hidden = isHidden(parent, true);
19182 if (node) {
19183 node._isHidden = hidden;
19184 }
19185 return hidden;
19186 }
19187 var is_hidden_default = isHidden;
19188 function isHtmlElement(node) {
19189 var _node$props$nodeName, _node$props;
19190 var nodeName2 = (_node$props$nodeName = (_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.nodeName) !== null && _node$props$nodeName !== void 0 ? _node$props$nodeName : node.nodeName.toLowerCase();
19191 if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
19192 return false;
19193 }
19194 return !!standards_default.htmlElms[nodeName2];
19195 }
19196 var is_html_element_default = isHtmlElement;
19197 function _isNodeInContext(node, _ref74) {
19198 var _ref74$include = _ref74.include, include = _ref74$include === void 0 ? [] : _ref74$include, _ref74$exclude = _ref74.exclude, exclude = _ref74$exclude === void 0 ? [] : _ref74$exclude;
19199 var filterInclude = include.filter(function(candidate) {
19200 return _contains(candidate, node);
19201 });
19202 if (filterInclude.length === 0) {
19203 return false;
19204 }
19205 var filterExcluded = exclude.filter(function(candidate) {
19206 return _contains(candidate, node);
19207 });
19208 if (filterExcluded.length === 0) {
19209 return true;
19210 }
19211 var deepestInclude = getDeepest(filterInclude);
19212 var deepestExclude = getDeepest(filterExcluded);
19213 return _contains(deepestExclude, deepestInclude);
19214 }
19215 function getDeepest(collection) {
19216 var deepest;
19217 var _iterator11 = _createForOfIteratorHelper(collection), _step11;
19218 try {
19219 for (_iterator11.s(); !(_step11 = _iterator11.n()).done; ) {
19220 var node = _step11.value;
19221 if (!deepest || !_contains(node, deepest)) {
19222 deepest = node;
19223 }
19224 }
19225 } catch (err) {
19226 _iterator11.e(err);
19227 } finally {
19228 _iterator11.f();
19229 }
19230 return deepest;
19231 }
19232 function _matchAncestry(ancestryA, ancestryB) {
19233 if (ancestryA.length !== ancestryB.length) {
19234 return false;
19235 }
19236 return ancestryA.every(function(selectorA, ancestorIndex) {
19237 var selectorB = ancestryB[ancestorIndex];
19238 if (!Array.isArray(selectorA)) {
19239 return selectorA === selectorB;
19240 }
19241 if (selectorA.length !== selectorB.length) {
19242 return false;
19243 }
19244 return selectorA.every(function(str, selectorIndex) {
19245 return selectorB[selectorIndex] === str;
19246 });
19247 });
19248 }
19249 function nodeSorter(nodeA, nodeB) {
19250 nodeA = nodeA.actualNode || nodeA;
19251 nodeB = nodeB.actualNode || nodeB;
19252 if (nodeA === nodeB) {
19253 return 0;
19254 }
19255 if (nodeA.compareDocumentPosition(nodeB) & 4) {
19256 return -1;
19257 } else {
19258 return 1;
19259 }
19260 }
19261 var node_sorter_default = nodeSorter;
19262 function _nodeLookup(node) {
19263 if (node instanceof abstract_virtual_node_default) {
19264 return {
19265 vNode: node,
19266 domNode: node.actualNode
19267 };
19268 }
19269 return {
19270 vNode: get_node_from_tree_default(node),
19271 domNode: node
19272 };
19273 }
19274 function parseSameOriginStylesheet(sheet, options, priority, importedUrls) {
19275 var isCrossOrigin = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
19276 var rules = Array.from(sheet.cssRules);
19277 if (!rules) {
19278 return Promise.resolve();
19279 }
19280 var cssImportRules = rules.filter(function(r) {
19281 return r.type === 3;
19282 });
19283 if (!cssImportRules.length) {
19284 return Promise.resolve({
19285 isCrossOrigin: isCrossOrigin,
19286 priority: priority,
19287 root: options.rootNode,
19288 shadowId: options.shadowId,
19289 sheet: sheet
19290 });
19291 }
19292 var cssImportUrlsNotAlreadyImported = cssImportRules.filter(function(rule) {
19293 return rule.href;
19294 }).map(function(rule) {
19295 return rule.href;
19296 }).filter(function(url) {
19297 return !importedUrls.includes(url);
19298 });
19299 var promises = cssImportUrlsNotAlreadyImported.map(function(importUrl, cssRuleIndex) {
19300 var newPriority = [].concat(_toConsumableArray(priority), [ cssRuleIndex ]);
19301 var isCrossOriginRequest = /^https?:\/\/|^\/\//i.test(importUrl);
19302 return parse_crossorigin_stylesheet_default(importUrl, options, newPriority, importedUrls, isCrossOriginRequest);
19303 });
19304 var nonImportCSSRules = rules.filter(function(r) {
19305 return r.type !== 3;
19306 });
19307 if (!nonImportCSSRules.length) {
19308 return Promise.all(promises);
19309 }
19310 promises.push(Promise.resolve(options.convertDataToStylesheet({
19311 data: nonImportCSSRules.map(function(rule) {
19312 return rule.cssText;
19313 }).join(),
19314 isCrossOrigin: isCrossOrigin,
19315 priority: priority,
19316 root: options.rootNode,
19317 shadowId: options.shadowId
19318 })));
19319 return Promise.all(promises);
19320 }
19321 var parse_sameorigin_stylesheet_default = parseSameOriginStylesheet;
19322 function parseStylesheet(sheet, options, priority, importedUrls) {
19323 var isCrossOrigin = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
19324 var isSameOrigin = isSameOriginStylesheet(sheet);
19325 if (isSameOrigin) {
19326 return parse_sameorigin_stylesheet_default(sheet, options, priority, importedUrls, isCrossOrigin);
19327 }
19328 return parse_crossorigin_stylesheet_default(sheet.href, options, priority, importedUrls, true);
19329 }
19330 function isSameOriginStylesheet(sheet) {
19331 try {
19332 var rules = sheet.cssRules;
19333 if (!rules && sheet.href) {
19334 return false;
19335 }
19336 return true;
19337 } catch (e) {
19338 return false;
19339 }
19340 }
19341 var parse_stylesheet_default = parseStylesheet;
19342 function parseCrossOriginStylesheet(url, options, priority, importedUrls, isCrossOrigin) {
19343 importedUrls.push(url);
19344 return new Promise(function(resolve, reject) {
19345 var request = new window.XMLHttpRequest();
19346 request.open('GET', url);
19347 request.timeout = constants_default.preload.timeout;
19348 request.addEventListener('error', reject);
19349 request.addEventListener('timeout', reject);
19350 request.addEventListener('loadend', function(event) {
19351 if (event.loaded && request.responseText) {
19352 return resolve(request.responseText);
19353 }
19354 reject(request.responseText);
19355 });
19356 request.send();
19357 }).then(function(data) {
19358 var result = options.convertDataToStylesheet({
19359 data: data,
19360 isCrossOrigin: isCrossOrigin,
19361 priority: priority,
19362 root: options.rootNode,
19363 shadowId: options.shadowId
19364 });
19365 return parse_stylesheet_default(result.sheet, options, priority, importedUrls, result.isCrossOrigin);
19366 });
19367 }
19368 var parse_crossorigin_stylesheet_default = parseCrossOriginStylesheet;
19369 function parseTabindex(value) {
19370 if (typeof value !== 'string') {
19371 return null;
19372 }
19373 var match = value.trim().match(/^([-+]?\d+)/);
19374 if (match) {
19375 return Number(match[1]);
19376 }
19377 return null;
19378 }
19379 var parse_tabindex_default = parseTabindex;
19380 var performanceTimer = function() {
19381 function now() {
19382 if (window.performance && window.performance) {
19383 return window.performance.now();
19384 }
19385 }
19386 var axeStartTime = now();
19387 var axeStarted = false;
19388 return {
19389 start: function start() {
19390 this.reset();
19391 axeStarted = true;
19392 this.mark('mark_axe_start');
19393 },
19394 end: function end() {
19395 this.mark('mark_axe_end');
19396 this.measure('axe', 'mark_axe_start', 'mark_axe_end', true);
19397 this.logMeasures('axe');
19398 this.clearMark('mark_axe_start', 'mark_axe_end');
19399 axeStarted = false;
19400 },
19401 auditStart: function auditStart() {
19402 if (!axeStarted) {
19403 this.reset();
19404 }
19405 this.mark('mark_audit_start');
19406 },
19407 auditEnd: function auditEnd() {
19408 this.mark('mark_audit_end');
19409 this.measure('audit_start_to_end', 'mark_audit_start', 'mark_audit_end', true);
19410 this.logMeasures();
19411 this.clearMark('mark_audit_start', 'mark_audit_end');
19412 },
19413 mark: function mark(markName) {
19414 var _window$performance;
19415 if ((_window$performance = window.performance) !== null && _window$performance !== void 0 && _window$performance.mark) {
19416 window.performance.mark(markName);
19417 }
19418 },
19419 measure: function measure(measureName, startMark, endMark) {
19420 var _window$performance2;
19421 var keepMarks = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
19422 if (!((_window$performance2 = window.performance) !== null && _window$performance2 !== void 0 && _window$performance2.measure)) {
19423 return;
19424 }
19425 try {
19426 window.performance.measure(measureName, startMark, endMark);
19427 } catch (e) {
19428 this._log(e);
19429 }
19430 if (!keepMarks) {
19431 this.clearMark(startMark, endMark);
19432 }
19433 },
19434 logMeasures: function logMeasures(measureName) {
19435 var _this6 = this, _window$performance3, _window$performance4;
19436 var last2 = function last2(arr) {
19437 return Array.isArray(arr) ? arr[arr.length - 1] : arr;
19438 };
19439 var logMeasure = function logMeasure(req) {
19440 _this6._log('Measure ' + req.name + ' took ' + req.duration + 'ms');
19441 };
19442 if (!((_window$performance3 = window.performance) !== null && _window$performance3 !== void 0 && _window$performance3.getEntriesByType) || !((_window$performance4 = window.performance) !== null && _window$performance4 !== void 0 && _window$performance4.getEntriesByName)) {
19443 return;
19444 }
19445 var axeStart = last2(window.performance.getEntriesByName('mark_axe_start')) || last2(window.performance.getEntriesByName('mark_audit_start'));
19446 if (!axeStart) {
19447 this._log('Axe must be started before using performanceTimer');
19448 return;
19449 }
19450 var measures = window.performance.getEntriesByType('measure').filter(function(measure) {
19451 return measure.startTime >= axeStart.startTime;
19452 });
19453 for (var _i19 = 0; _i19 < measures.length; ++_i19) {
19454 var req = measures[_i19];
19455 if (req.name === measureName) {
19456 logMeasure(req);
19457 return;
19458 } else if (!measureName) {
19459 logMeasure(req);
19460 }
19461 }
19462 },
19463 timeElapsed: function timeElapsed() {
19464 var currentTime = now();
19465 return currentTime - axeStartTime;
19466 },
19467 clearMark: function clearMark() {
19468 var _window$performance5;
19469 if (!((_window$performance5 = window.performance) !== null && _window$performance5 !== void 0 && _window$performance5.clearMarks)) {
19470 return;
19471 }
19472 for (var _len7 = arguments.length, markNames = new Array(_len7), _key0 = 0; _key0 < _len7; _key0++) {
19473 markNames[_key0] = arguments[_key0];
19474 }
19475 for (var _i20 = 0, _markNames = markNames; _i20 < _markNames.length; _i20++) {
19476 var markName = _markNames[_i20];
19477 window.performance.clearMarks(markName);
19478 }
19479 },
19480 reset: function reset() {
19481 axeStartTime = now();
19482 },
19483 _log: function _log(message) {
19484 log_default(message);
19485 }
19486 };
19487 }();
19488 var performance_timer_default = performanceTimer;
19489 function _pollyfillElementsFromPoint() {
19490 if (document.elementsFromPoint) {
19491 return document.elementsFromPoint;
19492 }
19493 if (document.msElementsFromPoint) {
19494 return document.msElementsFromPoint;
19495 }
19496 var usePointer = function() {
19497 var element = document.createElement('x');
19498 element.style.cssText = 'pointer-events:auto';
19499 return element.style.pointerEvents === 'auto';
19500 }();
19501 var cssProp = usePointer ? 'pointer-events' : 'visibility';
19502 var cssDisableVal = usePointer ? 'none' : 'hidden';
19503 var style = document.createElement('style');
19504 style.innerHTML = usePointer ? '* { pointer-events: all }' : '* { visibility: visible }';
19505 return function(x, y) {
19506 var current, i, d2;
19507 var elements = [];
19508 var previousPointerEvents = [];
19509 document.head.appendChild(style);
19510 while ((current = document.elementFromPoint(x, y)) && elements.indexOf(current) === -1) {
19511 elements.push(current);
19512 previousPointerEvents.push({
19513 value: current.style.getPropertyValue(cssProp),
19514 priority: current.style.getPropertyPriority(cssProp)
19515 });
19516 current.style.setProperty(cssProp, cssDisableVal, 'important');
19517 }
19518 if (elements.indexOf(document.documentElement) < elements.length - 1) {
19519 elements.splice(elements.indexOf(document.documentElement), 1);
19520 elements.push(document.documentElement);
19521 }
19522 for (i = previousPointerEvents.length; !!(d2 = previousPointerEvents[--i]); ) {
19523 elements[i].style.setProperty(cssProp, d2.value ? d2.value : '', d2.priority);
19524 }
19525 document.head.removeChild(style);
19526 return elements;
19527 };
19528 }
19529 if (typeof window.addEventListener === 'function') {
19530 document.elementsFromPoint = _pollyfillElementsFromPoint();
19531 }
19532 function uniqueArray(arr1, arr2) {
19533 return arr1.concat(arr2).filter(function(elem, pos, arr) {
19534 return arr.indexOf(elem) === pos;
19535 });
19536 }
19537 var unique_array_default = uniqueArray;
19538 function createLocalVariables(vNodes, anyLevel, thisLevel, parentShadowId, recycledLocalVariable) {
19539 var retVal = recycledLocalVariable || {};
19540 retVal.vNodes = vNodes;
19541 retVal.vNodesIndex = 0;
19542 retVal.anyLevel = anyLevel;
19543 retVal.thisLevel = thisLevel;
19544 retVal.parentShadowId = parentShadowId;
19545 return retVal;
19546 }
19547 function matchExpressions(domTree, expressions, filter) {
19548 var recycledLocalVariables = cache_default.get('qsa.recycledLocalVariables', function() {
19549 return [];
19550 });
19551 var stack = [];
19552 var vNodes = Array.isArray(domTree) ? domTree : [ domTree ];
19553 var currentLevel = createLocalVariables(vNodes, expressions, null, domTree[0].shadowId, recycledLocalVariables.pop());
19554 var result = [];
19555 while (currentLevel.vNodesIndex < currentLevel.vNodes.length) {
19556 var _currentLevel$anyLeve, _currentLevel$thisLev;
19557 var vNode = currentLevel.vNodes[currentLevel.vNodesIndex++];
19558 var childOnly = null;
19559 var childAny = null;
19560 var combinedLength = (((_currentLevel$anyLeve = currentLevel.anyLevel) === null || _currentLevel$anyLeve === void 0 ? void 0 : _currentLevel$anyLeve.length) || 0) + (((_currentLevel$thisLev = currentLevel.thisLevel) === null || _currentLevel$thisLev === void 0 ? void 0 : _currentLevel$thisLev.length) || 0);
19561 var added = false;
19562 for (var _i21 = 0; _i21 < combinedLength; _i21++) {
19563 var _currentLevel$anyLeve2, _currentLevel$anyLeve3, _currentLevel$anyLeve4;
19564 var exp = _i21 < (((_currentLevel$anyLeve2 = currentLevel.anyLevel) === null || _currentLevel$anyLeve2 === void 0 ? void 0 : _currentLevel$anyLeve2.length) || 0) ? currentLevel.anyLevel[_i21] : currentLevel.thisLevel[_i21 - (((_currentLevel$anyLeve3 = currentLevel.anyLevel) === null || _currentLevel$anyLeve3 === void 0 ? void 0 : _currentLevel$anyLeve3.length) || 0)];
19565 if ((!exp[0].id || vNode.shadowId === currentLevel.parentShadowId) && _matchesExpression(vNode, exp[0])) {
19566 if (exp.length === 1) {
19567 if (!added && (!filter || filter(vNode))) {
19568 result.push(vNode);
19569 added = true;
19570 }
19571 } else {
19572 var rest = exp.slice(1);
19573 if ([ ' ', '>' ].includes(rest[0].combinator) === false) {
19574 throw new Error('axe.utils.querySelectorAll does not support the combinator: ' + exp[1].combinator);
19575 }
19576 if (rest[0].combinator === '>') {
19577 (childOnly = childOnly || []).push(rest);
19578 } else {
19579 (childAny = childAny || []).push(rest);
19580 }
19581 }
19582 }
19583 if ((!exp[0].id || vNode.shadowId === currentLevel.parentShadowId) && (_currentLevel$anyLeve4 = currentLevel.anyLevel) !== null && _currentLevel$anyLeve4 !== void 0 && _currentLevel$anyLeve4.includes(exp)) {
19584 (childAny = childAny || []).push(exp);
19585 }
19586 }
19587 if (vNode.children && vNode.children.length) {
19588 stack.push(currentLevel);
19589 currentLevel = createLocalVariables(vNode.children, childAny, childOnly, vNode.shadowId, recycledLocalVariables.pop());
19590 }
19591 while (currentLevel.vNodesIndex === currentLevel.vNodes.length && stack.length) {
19592 recycledLocalVariables.push(currentLevel);
19593 currentLevel = stack.pop();
19594 }
19595 }
19596 return result;
19597 }
19598 function querySelectorAllFilter(domTree, selector, filter) {
19599 domTree = Array.isArray(domTree) ? domTree : [ domTree ];
19600 var expressions = _convertSelector(selector);
19601 var nodes = getNodesMatchingExpression(domTree, expressions, filter);
19602 if (nodes) {
19603 return nodes;
19604 }
19605 return matchExpressions(domTree, expressions, filter);
19606 }
19607 var query_selector_all_filter_default = querySelectorAllFilter;
19608 function preloadCssom(_ref75) {
19609 var _ref75$treeRoot = _ref75.treeRoot, treeRoot = _ref75$treeRoot === void 0 ? axe._tree[0] : _ref75$treeRoot;
19610 var rootNodes = getAllRootNodesInTree(treeRoot);
19611 if (!rootNodes.length) {
19612 return Promise.resolve();
19613 }
19614 var dynamicDoc = document.implementation.createHTMLDocument('Dynamic document for loading cssom');
19615 var convertDataToStylesheet = get_stylesheet_factory_default(dynamicDoc);
19616 return getCssomForAllRootNodes(rootNodes, convertDataToStylesheet).then(function(assets) {
19617 return flattenAssets(assets);
19618 });
19619 }
19620 var preload_cssom_default = preloadCssom;
19621 function getAllRootNodesInTree(tree) {
19622 var ids = [];
19623 var rootNodes = query_selector_all_filter_default(tree, '*', function(node) {
19624 if (ids.includes(node.shadowId)) {
19625 return false;
19626 }
19627 ids.push(node.shadowId);
19628 return true;
19629 }).map(function(node) {
19630 return {
19631 shadowId: node.shadowId,
19632 rootNode: get_root_node_default(node.actualNode)
19633 };
19634 });
19635 return unique_array_default(rootNodes, []);
19636 }
19637 function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet) {
19638 var promises = [];
19639 rootNodes.forEach(function(_ref76, index) {
19640 var rootNode = _ref76.rootNode, shadowId = _ref76.shadowId;
19641 var sheets = getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet);
19642 if (!sheets) {
19643 return Promise.all(promises);
19644 }
19645 var rootIndex = index + 1;
19646 var parseOptions = {
19647 rootNode: rootNode,
19648 shadowId: shadowId,
19649 convertDataToStylesheet: convertDataToStylesheet,
19650 rootIndex: rootIndex
19651 };
19652 var importedUrls = [];
19653 var p2 = Promise.all(sheets.map(function(sheet, sheetIndex) {
19654 var priority = [ rootIndex, sheetIndex ];
19655 return parse_stylesheet_default(sheet, parseOptions, priority, importedUrls);
19656 }));
19657 promises.push(p2);
19658 });
19659 return Promise.all(promises);
19660 }
19661 function flattenAssets(assets) {
19662 return assets.reduce(function(acc, val) {
19663 return Array.isArray(val) ? acc.concat(flattenAssets(val)) : acc.concat(val);
19664 }, []);
19665 }
19666 function getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet) {
19667 var sheets;
19668 if (rootNode.nodeType === 11 && shadowId) {
19669 sheets = getStylesheetsFromDocumentFragment(rootNode, convertDataToStylesheet);
19670 } else {
19671 sheets = getStylesheetsFromDocument(rootNode);
19672 }
19673 return filterStylesheetsWithSameHref(sheets);
19674 }
19675 function getStylesheetsFromDocumentFragment(rootNode, convertDataToStylesheet) {
19676 return Array.from(rootNode.children).filter(filerStyleAndLinkAttributesInDocumentFragment).reduce(function(out, node) {
19677 var nodeName2 = node.nodeName.toUpperCase();
19678 var data = nodeName2 === 'STYLE' ? node.textContent : node;
19679 var isLink = nodeName2 === 'LINK';
19680 var stylesheet = convertDataToStylesheet({
19681 data: data,
19682 isLink: isLink,
19683 root: rootNode
19684 });
19685 if (stylesheet.sheet) {
19686 out.push(stylesheet.sheet);
19687 }
19688 return out;
19689 }, []);
19690 }
19691 function getStylesheetsFromDocument(rootNode) {
19692 return Array.from(rootNode.styleSheets).filter(function(sheet) {
19693 if (!sheet.media) {
19694 return false;
19695 }
19696 return filterMediaIsPrint(sheet.media.mediaText);
19697 });
19698 }
19699 function filerStyleAndLinkAttributesInDocumentFragment(node) {
19700 var nodeName2 = node.nodeName.toUpperCase();
19701 var linkHref = node.getAttribute('href');
19702 var linkRel = node.getAttribute('rel');
19703 var isLink = nodeName2 === 'LINK' && linkHref && linkRel && node.rel.toUpperCase().includes('STYLESHEET');
19704 var isStyle = nodeName2 === 'STYLE';
19705 return isStyle || isLink && filterMediaIsPrint(node.media);
19706 }
19707 function filterMediaIsPrint(media) {
19708 if (!media) {
19709 return true;
19710 }
19711 return !media.toUpperCase().includes('PRINT');
19712 }
19713 function filterStylesheetsWithSameHref(sheets) {
19714 var hrefs = [];
19715 return sheets.filter(function(sheet) {
19716 if (!sheet.href) {
19717 return true;
19718 }
19719 if (hrefs.includes(sheet.href)) {
19720 return false;
19721 }
19722 hrefs.push(sheet.href);
19723 return true;
19724 });
19725 }
19726 function preloadMedia(_ref77) {
19727 var _ref77$treeRoot = _ref77.treeRoot, treeRoot = _ref77$treeRoot === void 0 ? axe._tree[0] : _ref77$treeRoot;
19728 var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video[autoplay], audio[autoplay]', function(_ref78) {
19729 var actualNode = _ref78.actualNode;
19730 if (actualNode.preload === 'none' && actualNode.readyState === 0 && actualNode.networkState !== actualNode.NETWORK_LOADING) {
19731 return false;
19732 }
19733 if (actualNode.hasAttribute('paused') || actualNode.hasAttribute('muted')) {
19734 return false;
19735 }
19736 if (actualNode.hasAttribute('src')) {
19737 return !!actualNode.getAttribute('src');
19738 }
19739 var sourceWithSrc = Array.from(actualNode.getElementsByTagName('source')).filter(function(source) {
19740 return !!source.getAttribute('src');
19741 });
19742 if (sourceWithSrc.length <= 0) {
19743 return false;
19744 }
19745 return true;
19746 });
19747 return Promise.all(mediaVirtualNodes.map(function(_ref79) {
19748 var actualNode = _ref79.actualNode;
19749 return isMediaElementReady(actualNode);
19750 }));
19751 }
19752 var preload_media_default = preloadMedia;
19753 function isMediaElementReady(elm) {
19754 return new Promise(function(resolve) {
19755 if (elm.readyState > 0) {
19756 resolve(elm);
19757 }
19758 function onMediaReady() {
19759 elm.removeEventListener('loadedmetadata', onMediaReady);
19760 resolve(elm);
19761 }
19762 elm.addEventListener('loadedmetadata', onMediaReady);
19763 });
19764 }
19765 function _preload(options) {
19766 var preloadFunctionsMap = {
19767 cssom: preload_cssom_default,
19768 media: preload_media_default
19769 };
19770 if (!_shouldPreload(options)) {
19771 return Promise.resolve();
19772 }
19773 return new Promise(function(resolve, reject) {
19774 var _getPreloadConfig2 = _getPreloadConfig(options), assets = _getPreloadConfig2.assets, timeout = _getPreloadConfig2.timeout;
19775 var preloadTimeout = setTimeout(function() {
19776 return reject(new Error('Preload assets timed out.'));
19777 }, timeout);
19778 Promise.all(assets.map(function(asset) {
19779 return preloadFunctionsMap[asset](options).then(function(results) {
19780 return _defineProperty({}, asset, results);
19781 });
19782 })).then(function(results) {
19783 var preloadAssets = results.reduce(function(out, result) {
19784 return _extends({}, out, result);
19785 }, {});
19786 clearTimeout(preloadTimeout);
19787 resolve(preloadAssets);
19788 })['catch'](function(err2) {
19789 clearTimeout(preloadTimeout);
19790 reject(err2);
19791 });
19792 });
19793 }
19794 function isValidPreloadObject(preloadObj) {
19795 return _typeof(preloadObj) === 'object' && Array.isArray(preloadObj.assets);
19796 }
19797 function _shouldPreload(options) {
19798 if (!options || options.preload === void 0 || options.preload === null) {
19799 return true;
19800 }
19801 if (typeof options.preload === 'boolean') {
19802 return options.preload;
19803 }
19804 return isValidPreloadObject(options.preload);
19805 }
19806 function _getPreloadConfig(options) {
19807 var _constants_default$pr = constants_default.preload, assets = _constants_default$pr.assets, timeout = _constants_default$pr.timeout;
19808 var config = {
19809 assets: assets,
19810 timeout: timeout
19811 };
19812 if (!options.preload) {
19813 return config;
19814 }
19815 if (typeof options.preload === 'boolean') {
19816 return config;
19817 }
19818 var areRequestedAssetsValid = options.preload.assets.every(function(a2) {
19819 return assets.includes(a2.toLowerCase());
19820 });
19821 if (!areRequestedAssetsValid) {
19822 throw new Error('Requested assets, not supported. Supported assets are: '.concat(assets.join(', '), '.'));
19823 }
19824 config.assets = unique_array_default(options.preload.assets.map(function(a2) {
19825 return a2.toLowerCase();
19826 }), []);
19827 if (options.preload.timeout && typeof options.preload.timeout === 'number' && !isNaN(options.preload.timeout)) {
19828 config.timeout = options.preload.timeout;
19829 }
19830 return config;
19831 }
19832 function _publishMetaData(ruleResult) {
19833 var checksData = axe._audit.data.checks || {};
19834 var rulesData = axe._audit.data.rules || {};
19835 var rule = find_by_default(axe._audit.rules, 'id', ruleResult.id) || {};
19836 ruleResult.tags = clone2(rule.tags || []);
19837 var shouldBeTrue = extender(checksData, true, rule);
19838 var shouldBeFalse = extender(checksData, false, rule);
19839 ruleResult.nodes.forEach(function(detail) {
19840 detail.any.forEach(shouldBeTrue);
19841 detail.all.forEach(shouldBeTrue);
19842 detail.none.forEach(shouldBeFalse);
19843 });
19844 extend_meta_data_default(ruleResult, clone2(rulesData[ruleResult.id] || {}));
19845 }
19846 function getIncompleteReason(checkData, messages) {
19847 function getDefaultMsg(message) {
19848 if (message.incomplete && message.incomplete['default']) {
19849 return message.incomplete['default'];
19850 } else {
19851 return incompleteFallbackMessage();
19852 }
19853 }
19854 if (checkData && checkData.missingData) {
19855 try {
19856 var msg = messages.incomplete[checkData.missingData[0].reason];
19857 if (!msg) {
19858 throw new Error();
19859 }
19860 return msg;
19861 } catch (_unused5) {
19862 if (typeof checkData.missingData === 'string') {
19863 return messages.incomplete[checkData.missingData];
19864 } else {
19865 return getDefaultMsg(messages);
19866 }
19867 }
19868 } else if (checkData && checkData.messageKey) {
19869 return messages.incomplete[checkData.messageKey];
19870 } else {
19871 return getDefaultMsg(messages);
19872 }
19873 }
19874 function extender(checksData, shouldBeTrue, rule) {
19875 return function(check) {
19876 var sourceData = checksData[check.id] || {};
19877 var messages = sourceData.messages || {};
19878 var data = Object.assign({}, sourceData);
19879 delete data.messages;
19880 if (!rule.reviewOnFail && check.result === void 0) {
19881 if (_typeof(messages.incomplete) === 'object' && !Array.isArray(check.data)) {
19882 data.message = getIncompleteReason(check.data, messages);
19883 }
19884 if (!data.message) {
19885 data.message = messages.incomplete;
19886 }
19887 } else {
19888 data.message = check.result === shouldBeTrue ? messages.pass : messages.fail;
19889 }
19890 if (typeof data.message !== 'function') {
19891 data.message = process_message_default(data.message, check.data);
19892 }
19893 extend_meta_data_default(check, data);
19894 };
19895 }
19896 function querySelectorAll(domTree, selector) {
19897 return query_selector_all_filter_default(domTree, selector);
19898 }
19899 var query_selector_all_default = querySelectorAll;
19900 function matchTags(rule, runOnly) {
19901 var include, exclude;
19902 var defaultExclude = axe._audit && axe._audit.tagExclude ? axe._audit.tagExclude : [];
19903 if (runOnly.hasOwnProperty('include') || runOnly.hasOwnProperty('exclude')) {
19904 include = runOnly.include || [];
19905 include = Array.isArray(include) ? include : [ include ];
19906 exclude = runOnly.exclude || [];
19907 exclude = Array.isArray(exclude) ? exclude : [ exclude ];
19908 exclude = exclude.concat(defaultExclude.filter(function(tag) {
19909 return include.indexOf(tag) === -1;
19910 }));
19911 } else {
19912 include = Array.isArray(runOnly) ? runOnly : [ runOnly ];
19913 exclude = defaultExclude.filter(function(tag) {
19914 return include.indexOf(tag) === -1;
19915 });
19916 }
19917 var matching = include.some(function(tag) {
19918 return rule.tags.indexOf(tag) !== -1;
19919 });
19920 if (matching || include.length === 0 && rule.enabled !== false) {
19921 return exclude.every(function(tag) {
19922 return rule.tags.indexOf(tag) === -1;
19923 });
19924 } else {
19925 return false;
19926 }
19927 }
19928 function ruleShouldRun(rule, context, options) {
19929 var runOnly = options.runOnly || {};
19930 var ruleOptions = (options.rules || {})[rule.id];
19931 if (rule.pageLevel && !context.page) {
19932 return false;
19933 } else if (runOnly.type === 'rule') {
19934 return runOnly.values.indexOf(rule.id) !== -1;
19935 } else if (ruleOptions && typeof ruleOptions.enabled === 'boolean') {
19936 return ruleOptions.enabled;
19937 } else if (runOnly.type === 'tag' && runOnly.values) {
19938 return matchTags(rule, runOnly.values);
19939 } else {
19940 return matchTags(rule, []);
19941 }
19942 }
19943 var rule_should_run_default = ruleShouldRun;
19944 function _filterHtmlAttrs(element, filterAttrs) {
19945 if (!filterAttrs) {
19946 return element;
19947 }
19948 var node = element.cloneNode(false);
19949 var attributes2 = get_node_attributes_default(node);
19950 if (node.nodeType === 1) {
19951 var outerHTML = node.outerHTML;
19952 node = cache_default.get(outerHTML, function() {
19953 return setNodeAttributes(node, attributes2, element, filterAttrs);
19954 });
19955 } else {
19956 node = setNodeAttributes(node, attributes2, element, filterAttrs);
19957 }
19958 Array.from(element.childNodes).forEach(function(child) {
19959 node.appendChild(_filterHtmlAttrs(child, filterAttrs));
19960 });
19961 return node;
19962 }
19963 function setNodeAttributes(node, attributes2, element, filterAttrs) {
19964 if (!attributes2) {
19965 return node;
19966 }
19967 node = document.createElement(node.nodeName);
19968 Array.from(attributes2).forEach(function(attr) {
19969 if (!attributeMatches(element, attr.name, filterAttrs)) {
19970 node.setAttribute(attr.name, attr.value);
19971 }
19972 });
19973 return node;
19974 }
19975 function attributeMatches(node, attrName, filterAttrs) {
19976 if (typeof filterAttrs[attrName] === 'undefined') {
19977 return false;
19978 }
19979 if (filterAttrs[attrName] === true) {
19980 return true;
19981 }
19982 return element_matches_default(node, filterAttrs[attrName]);
19983 }
19984 function _select(selector, context) {
19985 var result = [];
19986 var candidate;
19987 if (axe._selectCache) {
19988 for (var j = 0, l = axe._selectCache.length; j < l; j++) {
19989 var item = axe._selectCache[j];
19990 if (item.selector === selector) {
19991 return item.result;
19992 }
19993 }
19994 }
19995 var outerIncludes = getOuterIncludes(context.include);
19996 var isInContext = getContextFilter(context);
19997 for (var _i22 = 0; _i22 < outerIncludes.length; _i22++) {
19998 candidate = outerIncludes[_i22];
19999 var nodes = query_selector_all_filter_default(candidate, selector, isInContext);
20000 result = mergeArrayUniques(result, nodes);
20001 }
20002 if (axe._selectCache) {
20003 axe._selectCache.push({
20004 selector: selector,
20005 result: result
20006 });
20007 }
20008 return result;
20009 }
20010 function getOuterIncludes(includes) {
20011 return includes.reduce(function(res, el) {
20012 if (!res.length || !_contains(res[res.length - 1], el)) {
20013 res.push(el);
20014 }
20015 return res;
20016 }, []);
20017 }
20018 function getContextFilter(context) {
20019 if (!context.exclude || context.exclude.length === 0) {
20020 return null;
20021 }
20022 return function(node) {
20023 return _isNodeInContext(node, context);
20024 };
20025 }
20026 function mergeArrayUniques(arr1, arr2) {
20027 if (arr1.length === 0) {
20028 return arr2;
20029 }
20030 if (arr1.length < arr2.length) {
20031 var temp = arr1;
20032 arr1 = arr2;
20033 arr2 = temp;
20034 }
20035 for (var _i23 = 0, l = arr2.length; _i23 < l; _i23++) {
20036 if (!arr1.includes(arr2[_i23])) {
20037 arr1.push(arr2[_i23]);
20038 }
20039 }
20040 return arr1;
20041 }
20042 function _serializeError(err2) {
20043 var iteration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
20044 if (_typeof(err2) !== 'object' || err2 === null) {
20045 return {
20046 message: String(err2)
20047 };
20048 }
20049 var serial = {};
20050 var _iterator12 = _createForOfIteratorHelper(constants_default.serializableErrorProps), _step12;
20051 try {
20052 for (_iterator12.s(); !(_step12 = _iterator12.n()).done; ) {
20053 var prop = _step12.value;
20054 if ([ 'string', 'number', 'boolean' ].includes(_typeof(err2[prop]))) {
20055 serial[prop] = err2[prop];
20056 }
20057 }
20058 } catch (err) {
20059 _iterator12.e(err);
20060 } finally {
20061 _iterator12.f();
20062 }
20063 if (err2.cause) {
20064 serial.cause = iteration < 10 ? _serializeError(err2.cause, iteration + 1) : '...';
20065 }
20066 return serial;
20067 }
20068 var RuleError = function(_Error) {
20069 function RuleError(_ref81) {
20070 var _error$name;
20071 var _this7;
20072 var error = _ref81.error, ruleId = _ref81.ruleId, method = _ref81.method, errorNode = _ref81.errorNode;
20073 _classCallCheck(this, RuleError);
20074 _this7 = _callSuper(this, RuleError);
20075 _this7.name = (_error$name = error.name) !== null && _error$name !== void 0 ? _error$name : 'RuleError';
20076 _this7.message = error.message;
20077 _this7.stack = error.stack;
20078 if (error.cause) {
20079 _this7.cause = _serializeError(error.cause);
20080 }
20081 if (ruleId) {
20082 _this7.ruleId = ruleId;
20083 _this7.message += ' Skipping '.concat(_this7.ruleId, ' rule.');
20084 }
20085 if (method) {
20086 _this7.method = method;
20087 }
20088 if (errorNode) {
20089 _this7.errorNode = errorNode;
20090 }
20091 return _this7;
20092 }
20093 _inherits(RuleError, _Error);
20094 return _createClass(RuleError);
20095 }(_wrapNativeSuper(Error));
20096 var rule_error_default = RuleError;
20097 function setScroll(elm, top, left) {
20098 if (elm === window) {
20099 return elm.scroll(left, top);
20100 } else {
20101 elm.scrollTop = top;
20102 elm.scrollLeft = left;
20103 }
20104 }
20105 function setScrollState(scrollState) {
20106 scrollState.forEach(function(_ref82) {
20107 var elm = _ref82.elm, top = _ref82.top, left = _ref82.left;
20108 return setScroll(elm, top, left);
20109 });
20110 }
20111 var set_scroll_state_default = setScrollState;
20112 function _shadowSelect(selectors) {
20113 var selectorArr = Array.isArray(selectors) ? _toConsumableArray(selectors) : [ selectors ];
20114 return selectRecursive(selectorArr, document);
20115 }
20116 function selectRecursive(selectors, doc) {
20117 var selectorStr = selectors.shift();
20118 var elm = selectorStr ? doc.querySelector(selectorStr) : null;
20119 if (selectors.length === 0) {
20120 return elm;
20121 }
20122 if (!(elm !== null && elm !== void 0 && elm.shadowRoot)) {
20123 return null;
20124 }
20125 return selectRecursive(selectors, elm.shadowRoot);
20126 }
20127 function _shadowSelectAll(selectors) {
20128 var doc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;
20129 var selectorArr = Array.isArray(selectors) ? _toConsumableArray(selectors) : [ selectors ];
20130 if (selectors.length === 0) {
20131 return [];
20132 }
20133 return selectAllRecursive(selectorArr, doc);
20134 }
20135 function selectAllRecursive(_ref83, doc) {
20136 var _ref84 = _toArray(_ref83), selectorStr = _ref84[0], restSelector = _arrayLikeToArray(_ref84).slice(1);
20137 var elms = doc.querySelectorAll(selectorStr);
20138 if (restSelector.length === 0) {
20139 return Array.from(elms);
20140 }
20141 var selected = [];
20142 var _iterator13 = _createForOfIteratorHelper(elms), _step13;
20143 try {
20144 for (_iterator13.s(); !(_step13 = _iterator13.n()).done; ) {
20145 var elm = _step13.value;
20146 if (elm !== null && elm !== void 0 && elm.shadowRoot) {
20147 selected.push.apply(selected, _toConsumableArray(selectAllRecursive(restSelector, elm.shadowRoot)));
20148 }
20149 }
20150 } catch (err) {
20151 _iterator13.e(err);
20152 } finally {
20153 _iterator13.f();
20154 }
20155 return selected;
20156 }
20157 function validInputTypes() {
20158 return [ 'hidden', 'text', 'search', 'tel', 'url', 'email', 'password', 'date', 'month', 'week', 'time', 'datetime-local', 'number', 'range', 'color', 'checkbox', 'radio', 'file', 'submit', 'image', 'reset', 'button' ];
20159 }
20160 var valid_input_type_default = validInputTypes;
20161 var langs = [ , [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, , , , , , 1, 1, 1, 1, , , 1, 1, 1, , 1, , 1, , 1, 1 ], [ 1, 1, 1, , 1, 1, , 1, 1, 1, , 1, , , 1, 1, 1, , , 1, 1, 1, , , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , , , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1 ], [ , 1, , , , , , 1, , 1, , , , , 1, , 1, , , 1, 1, 1, , 1, , , 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, , , 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, 1, , , 1, , , , 1, 1, 1, 1, , 1, , 1, , 1, , , , , , 1 ], [ 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, , 1, , 1, , , , , 1, , 1, 1, 1, 1, 1, , , , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, , 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , 1, , , 1, , 1, , , , 1, 1, 1, , , , , , , , , , , 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1 ], [ 1, 1, 1, 1, 1, , , 1, , , 1, , , 1, 1, 1, , , , , 1, , , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1 ], [ , 1, , 1, 1, 1, , 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, , , 1, 1, , , , , , 1, 1 ], [ 1, 1, 1, , , , , 1, , , , 1, 1, , 1, , , , , , 1, , , , , 1 ], [ , 1, , , 1, , , 1, , , , , , 1 ], [ , 1, , 1, , , , 1, , , , 1 ], [ 1, , 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , , 1, , , 1, , 1, 1, , 1, , 1, , , , , 1, , 1 ], [ , 1, , , , 1, , , 1, 1, , 1, , 1, 1, 1, 1, , 1, 1, , , 1, , , 1 ], [ , 1, 1, , , , , , 1, , , , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], [ , 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, 1, , 1, , , , 1, 1, 1, , 1, , 1 ], [ , 1, , 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, , , 1, 1, 1 ], [ , 1, 1, 1, , , , 1, 1, 1, , 1, 1, , , 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, , 1, 1, 1, , 1, , , , , 1, 1, 1, , , 1, , 1, , , 1, 1 ], [ , , , , 1, , , , , , , , , , , , , , , , , 1 ], [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, 1, 1, , 1, 1, , , , 1, 1, 1, 1, 1, , , 1, 1, 1, , , , 1, 1 ], [ 1, 1, 1, 1, , , , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , , , , , , 1, , , , , , , 1 ], [ , 1, 1, , 1, 1, , 1, , , , , , , , , , , , , 1 ], [ , , , , , , , , 1 ], [ 1, 1, 1, , , , , , , , , , , , , 1 ], [ , , , , , , , , 1, , , 1, , , 1, 1, , , , , 1 ] ], [ , [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ , , , 1, , , , , , , , , , , , , , , 1 ], [ , 1, , , 1, 1, , 1, , 1, 1, , , , 1, 1, , , 1, 1, , , , 1 ], [ 1, , , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, , , 1, , , , 1 ], , [ , 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, , , 1, 1, 1, 1, , 1, 1, , 1 ], [ , 1, , , 1, , , 1, , 1, , , 1, 1, 1, 1, , , 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, , , 1, , , 1, , 1 ], [ , 1, , , , , , 1, , , , 1, 1, , , , , , 1, 1, , , , , 1 ], [ , , , , , , , 1, , , , 1, , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, 1, , , 1, 1, , 1, 1, 1, 1, 1 ], [ , 1, , , 1, 1, , 1, , 1, 1, 1, , , 1, 1, , , 1, , 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, , 1, 1, , 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ , , , , , , , , , , , , , , , , 1 ], , [ , 1, 1, 1, 1, 1, , 1, 1, 1, , , 1, , 1, 1, , 1, 1, 1, 1, 1, , 1, , 1 ], [ , , 1, , , 1, , , 1, 1, , 1, 1, , 1, 1, , 1, , , , , , , , , 1 ], [ , 1, 1, , 1, , , , 1, 1, , 1, , 1, 1, 1, 1, , 1, 1, 1, 1, , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ 1, 1 ], [ , 1, , , , , , , , , , 1, 1, , , , , , 1, 1, , 1, , 1, , 1, 1 ], , [ , 1, 1, , 1, , , 1, , 1, , , , 1, 1, 1, , , 1, , , 1, , , , 1 ], [ 1, 1, , , 1, 1, , 1, , , , , 1, , 1 ] ], [ , [ , 1 ], [ , , , 1, , , , 1, , , , 1, , , , 1, , , 1, , , 1 ], [ , , , , , , , , , , , , , , , , , , 1, 1, , , , , , 1 ], , [ 1, , , , , 1 ], [ , 1, , , , 1, , , , 1 ], [ , 1, , , , , , , , , , , 1, 1, , 1, , , , , , , , , 1, 1 ], [ , , , , , , , , , , , , , , , , , , , 1, , 1 ], [ , , , , , , , , , , , , , , , , 1, , , , 1, , 1 ], [ , 1 ], [ , 1, , 1, , 1, , 1, , 1, , 1, 1, 1, , 1, 1, , 1, , , , , , , 1 ], [ 1, , , , , 1, , , 1, 1, , 1, , 1, , 1, 1, , , , , 1, , , 1 ], [ , 1, 1, , , 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, , 1, , 1, , , , 1, 1, 1, 1, , 1, 1, , , 1, 1, 1, 1 ], [ 1, , , , , , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , 1 ], , [ , 1, , , , , , 1, 1, 1, , 1, , , , 1, , , 1, 1, 1, , , 1 ], [ 1, , , , , 1, , 1, 1, 1, , 1, 1, 1, 1, 1, , 1, , 1, , 1, , , 1, 1 ], [ 1, , 1, 1, , , , , 1, , , , , , 1, 1, , , 1, 1, 1, 1, , , 1, , 1 ], [ 1, , , , 1, , , , , , , , , , , , , 1 ], [ , , , , , 1, , , 1, , , , , , 1 ], [ , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , , 1 ], [ , 1, , , , , , , , , , , , , , 1 ], [ , 1, , , , 1 ] ], [ , [ 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , 1, 1, , , 1, 1, 1 ], [ , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , 1 ], , [ , , , , , , , , , , , , , , , , , , 1 ], [ 1, , , , , , , , , 1, , , , 1 ], [ , , , , , , , , , , , , , , , , , , 1 ], , [ 1, 1, , , , 1, 1, , , , , , 1, , , , 1, , 1, , 1, 1, , 1 ], [ 1 ], [ , , , , , , , , , , , 1, , , , , , , , , , , 1 ], [ , 1, , , , , , , 1, 1, , , 1, , 1, , , , 1, , , , , , , 1 ], [ , , , , , , , , , , , , , , , , 1, , , , , 1 ], [ , , 1, , , , , 1, , 1 ], [ 1, , , , 1, , , , , 1, , , , 1, 1, , , , 1, 1, , , , , 1 ], [ , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , 1 ], [ 1, , , 1, 1, , , , , , , 1, , 1, , 1, 1, 1, 1, 1, 1 ], [ , , , , , 1, , , , , , , 1, , , , , , , 1 ], , [ , , 1, 1, 1, 1, 1, , 1, 1, 1, , , 1, 1, , , 1, 1, , 1, 1, 1, , , 1 ], [ , , , , , , , , , , , , , , , , , , 1 ], [ , 1, , , , 1 ], , [ 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , , , 1, 1, 1, 1, , , , , , 1, , 1, , , , 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , , 1 ], [ , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, , 1, , , 1, 1, 1, 1, 1 ], [ , , , , , , , , , , , 1, , , , , , , , , 1, , , , 1 ], [ , 1, 1, , 1, 1, , 1, , , , 1, 1, , 1, 1, , , 1, , 1, 1, , 1 ], [ , 1, , 1, , 1, , , 1, , , 1, 1, , 1, 1, , , 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , , , , , , , , , 1, , 1, , 1, 1, , , , 1, , , 1 ], [ , 1, , , 1, 1, , , , , , , , , 1, 1, 1, , , , , 1 ], [ 1, , 1, 1, 1, , , , 1, 1, 1, 1, 1, , , 1, , , 1, , , 1, , 1, , 1 ], [ , 1, 1, , 1, 1, , 1, 1, , , , 1, 1, 1, , , 1, 1, , , 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, , 1, , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , 1, , , , , , , , , 1 ], [ , 1, , , , , , , , 1, , , , , 1, , , , 1, , , 1 ], [ , 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , , , 1, , 1, , , , , 1, 1, 1, 1, 1, , , 1, , , , 1 ], [ , 1, , , , , , , , 1, , , , , , , , , , , , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ 1, 1, , 1, , 1, 1, , , , 1, , 1, 1, 1, 1, 1, , 1, 1, , , , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, , 1, 1, , , 1, 1, , , , 1, , 1, 1, , 1, 1 ], [ , , , , , , , , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, , 1, 1, 1, 1, , 1, , , 1, 1, 1, 1, , , 1, , , , , , , 1, 1 ], [ , 1, , , , , , , , 1, , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1 ], [ , 1, 1, , , , , , , , , , , , 1, 1, , , , , , 1 ], [ , 1, , , , , , , 1 ], [ , , , , , , , , , , , , , , 1, , , , , 1, , , , , , 1 ], [ 1, 1, , , 1, , , 1, 1, 1, , , , 1 ], , [ , , , , , , , , , , , , , 1, , , , , , , , , , 1 ], [ , , , , , , , , , 1, , , , , , , , , 1, , , , , , , 1 ], [ 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, , , 1, , 1, , , 1, 1 ], [ , , , , , , , , , 1 ], [ , 1, , , , 1, , , 1, , , 1, , , 1, , , , , 1 ], [ , 1, 1, , 1, 1, , , , , , , , , , , , , , , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, , , , 1, , 1 ], [ 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, , 1, 1, , 1, 1 ], [ , , , , , , , , , , , , , , , 1, , , , 1 ], , [ 1, 1, , 1, , 1, , , , , , 1, , 1, , 1, 1, , 1, , 1, 1, , 1, 1, , 1 ], [ , , 1, , , , , , 1, , , , 1, , 1, , , , , 1 ], [ 1, , , , , , , , , 1, , , , , , 1, , , , 1, , 1, , , 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , 1, , 1, , , , , , 1, , , 1, , , , , , , , 1 ], [ , 1, , 1, , , , , , , , , , , , 1 ], , [ 1, 1, , , , , , , , , , , , , , , , , , , , , , 1, 1 ], [ 1 ] ], [ , [ 1, , , , , , , , , 1, , , , , 1, , 1, , 1 ], [ , 1, 1, , 1, 1, , 1, 1, 1, , , 1, 1, 1, , , , 1, , , 1, , , , 1 ], [ , 1, , , , , , , 1, , , , 1, , , , , , 1 ], [ 1, 1, 1, 1, 1, 1, , , , 1, , , , , , , , , 1, 1, 1, 1 ], [ 1 ], [ , 1, 1, , , 1, 1, , , , , 1, , 1, , , , , , , , 1, , , , 1 ], [ 1, , 1, , , 1, , 1, , , , , 1, 1, 1, 1, , , , 1, , , , 1 ], [ , , 1, , , , , , , 1, , , , , , , 1, , , , , , , 1 ], [ 1, , , , , , , , , , , , , , 1, , , , 1 ], [ , , , 1, , 1, , , , , 1, , , , 1, 1, , , , 1 ], [ 1, , , , , 1, , , 1, 1, , 1, 1, , , 1, 1, , 1, 1, 1, , 1, 1, 1, , 1 ], [ , 1, 1, , , , , 1, , 1, , 1, 1, 1, , 1, 1, , , 1, , 1, 1, 1 ], [ , 1, , , , 1, , , , 1, , , 1, , 1, 1, , , 1, 1, 1, , , , , 1 ], [ 1, , 1, 1, , 1, , 1, 1, , 1, , 1, 1, 1, 1, 1, , , 1, 1, , , , , , 1 ], [ 1, , , , , , , , , , , , , , , , , , 1, , , 1, , 1 ], [ , , , , , , , , , 1, , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , , , 1, , 1 ], [ , 1, , , , 1, , , 1, 1, , 1, , , 1, 1, , , 1, , , 1, , , 1, 1 ], [ 1, 1, , 1, 1, 1, , 1, 1, 1, , 1, , 1, 1, 1, , , 1, , 1, 1, 1 ], [ 1, , 1, 1, 1, 1, , , , 1, , 1, 1, 1, , 1, , , 1, 1, 1, , 1, 1, 1, 1, 1 ], [ 1, , , , , , , , , , , , , 1 ], [ , , 1, , , , , , , , , , , , , , , , , , , , 1 ], [ 1, , , , , , , , , , , 1, , 1, , 1, , , , 1 ], [ , , , 1, , , , , , , , , 1 ], [ , 1, , , , , , , , , , , , , , 1, , , , , , , , , 1 ], [ , , , , , , , , 1, 1, , , , 1, , , , , 1, , , , , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, 1, 1 ], [ , , , , , 1, , , , 1, 1, 1, , 1, 1, 1, , , 1, , 1, 1, , 1 ], [ , , , , , , , , , , , , , , , , , , , 1, 1 ], [ , 1, , , , , , 1, , , , , , , , , , , , , 1 ], [ , , 1, , , 1, , 1, 1, 1, , 1, 1, , 1, , , , 1, , 1, 1 ], , [ , , 1, , , 1, , , , , , 1, , , , 1 ], [ , , , , , , , , , 1, , , , , , , , , , 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, , , 1, 1, , 1, , 1, , , 1, 1, 1, , , 1 ], [ , , , , , 1, , , , , , , , , , , , , 1 ], [ , 1, , , , , , , , , , , , 1, , 1, 1, , 1, 1, , 1 ], [ , , , , , 1, , , , , , , , , , , , , , 1 ], [ , 1, 1, 1, 1, , , , , 1, , , 1, , 1, , , , 1, 1, , , , 1, 1 ], [ , 1, , , 1, , , 1, , 1, 1, , 1, , , , , , , 1 ], [ , , 1, , 1, , , 1, , , , , , , , , , , 1, 1, , , , 1 ], [ , 1, , , , , , , , , , , , , , , , , 1, , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, , , , , , , , , , , , , , , , 1, , 1, 1 ], [ , , , , , , , , , , , , 1 ], , [ , 1, 1, 1, 1, , , , 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, , 1 ], [ 1, , , , 1, , , , , , , , , , 1 ], [ 1, , , , , , , , , 1 ], , [ , 1, , , , 1, , , , , , , , , , , , , , , , , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, , , , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , 1, 1, 1, 1, , 1, , , , 1, 1, , , 1, 1, , 1 ], [ , 1, 1, , 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , , , , , , , , , , 1 ], [ 1, 1, 1, , , , , 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , , , , 1 ], [ , 1, , , , , , , 1, 1, , , 1, 1, 1, , 1, , , 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, , , , 1, , , , 1, , , 1, , , , 1, , , , , , , 1, 1 ], [ , 1, 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, , 1, , , 1, 1, 1, 1, , 1, 1, 1, 1, , , , 1, , 1, , 1, , , 1 ], [ 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , 1, , , , , , , , , 1, 1, , , , , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , 1 ], [ , 1, , 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, , , 1, , 1, , 1, , , , 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1 ], [ 1, , , 1, , , , 1, 1, 1, , , , , 1, 1, , , , 1, , 1 ], [ 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ 1, 1, , , , , , , , 1, , 1, 1, , , , , , , 1, , 1 ], [ , 1, , , , 1, , 1, 1, , , , 1, 1, , 1, , , , 1, 1, 1, , 1 ], [ , , , , , , , , , , , , , 1 ], [ , 1, , , , , , 1, , , , , , , 1 ], [ , , , , , , , , 1, , , , 1, , 1, , , , , , , , , , , , 1 ] ], [ , [ , 1, 1, , 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], [ , 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, , 1 ], [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , 1, , , , , , , , 1, , , , , , 1, , , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, , , , 1, 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, , , 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ 1, 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, , , 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, , , , , 1, 1, 1, , , 1, , 1, 1, , , , 1, , 1, , , 1, 1 ], [ , , , , , , , 1, , , , 1, 1, 1, 1, 1, , 1, , , 1, , , , , 1 ], [ 1, 1, 1, 1, , 1, 1, 1, , 1, , 1, 1, 1, 1, , 1, , 1, , 1, 1, , , 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , , 1, 1, , 1, , 1, 1, 1, , 1, , 1, 1, , 1, 1, , 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , , , , , , , 1, , , , , 1, , 1 ], [ , 1, 1, 1, , 1, , 1, , 1, , , , 1, , 1, , , 1, , , , , 1, 1, 1 ], [ , 1, , , 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, , 1, 1, , , 1, , , 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, , , , , 1, , 1, , 1, , , , , 1, 1, , 1, , , , 1, 1 ] ], [ , [ , 1, , 1, , , , , , , , 1, , , , , , , 1, , , , 1 ], [ , , , , , , , , , 1, , 1, 1, 1, , 1, , , 1, , 1, 1 ], [ 1, 1, , , , , , , 1, , , , , 1, , 1, , , , , , 1 ], [ , 1, , , , , , , , , , 1, , , , , , , , , 1, 1 ], , [ , , , , , , , , , , , , , , , 1, , , , 1, , 1 ], [ , , 1, 1, , 1, , 1, , , , , , , , 1, , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , , 1, 1 ], [ , 1, , , , 1, , , , , , , , , 1 ], [ 1, , 1, 1, , , , 1, , , , , , , , , 1, , , 1, , , 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, , 1, 1, , 1, , 1 ], [ , 1, , , 1, 1, , , , , , 1, , 1, , 1, , , 1, , 1, 1 ], [ 1, 1, 1, 1, , 1, , 1, , 1, , 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , , 1, , 1, , 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, , 1, 1 ], [ , , , , 1, , , 1, , , , , , , 1, , , , 1, 1 ], [ , 1, , , , , , , , , , 1, , 1, , 1, , , , , 1, , , , , 1 ], , [ 1, 1, , 1, , 1, , 1, 1, , , , , , 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, , , , , , 1, , , , , 1, 1, 1, , , , 1, 1, , , 1 ], [ , 1, 1, , 1, 1, , , , 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, , , 1, , , , 1, , , , 1, 1 ], [ , , , , 1 ], [ , , , , , , , , , 1, , , 1 ], , [ , , 1, , 1, , , , , , , , , 1, , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , 1, 1, , 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , , , , 1 ], [ , 1, , 1, , , , , , 1, , , , , 1, 1, , , , , 1, 1 ], [ , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, , , 1, , 1, 1, 1 ], [ , 1, , , , 1, , , , , , , 1 ], [ , 1, , , 1, , , 1, , 1, , 1, 1, , 1, , , , , 1, , 1, , , , 1, 1 ], [ , 1, , , 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, 1, , , , 1, 1, , , , , , 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1 ], [ , 1, , , , 1, , , , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , 1, , , , , , , , 1, , , , , , , , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1 ], [ 1, 1, , , , , , , 1, 1, , , , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, , 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1 ], , [ , 1, 1, , , , , 1, , 1, , , , 1, 1, 1, , , 1, , , , , 1 ], [ , , , , , , , , , , , , , 1 ], [ , , , , , 1, , , , , , , , 1, 1, , , , , 1, , 1, , , 1, 1 ], [ , , , , , 1, , , 1, , , , , , 1 ] ], [ , [ , 1 ], , , , , , , , , , , , , , , , , , , , [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, 1 ], [ , 1, , 1, , 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, , , , 1, , 1, 1 ], [ , 1, , 1, , 1, , , 1, , , , , 1, , , , , , 1, 1 ], [ , 1, , 1, , , , , 1, , , , 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ , 1, , , , , , , , , , , , , , , 1 ] ], [ , [ , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , 1, , , , , , , , , 1, 1, , , , 1 ], [ , , , , , , 1 ], [ , , 1 ], [ , 1, 1, , , 1, , 1, , 1, 1, , 1, 1, 1, , , , 1, 1, 1, , , , , 1 ], , [ , 1, , , , 1, , , , , , 1, , , 1, , , , 1, 1, , 1 ], [ , , , , , , , 1, , , , , , , , , 1 ], [ , 1, 1, , , 1, 1, , , , , , 1, 1, 1, , , , 1, , 1, 1 ], [ , , , , , , , 1, , 1, , , , , , , , , , 1 ], [ , 1, 1, , , , , , 1, 1, , , , 1, , , , , , , 1, , , 1 ], , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, , 1, , , 1, , , , , 1, , 1, , 1, , 1, , , , , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , , , , 1, 1, , 1, 1, , 1, , , 1, , 1 ], [ , , , , , , , , , , , , , , 1, , , , , , 1 ], , [ , , , , , , , , , 1, , , , 1, , 1, , , , , 1 ], [ , , 1, , , , , , , 1, , 1, 1, 1, 1, , , , , , , , , 1 ], [ , , , 1, , , , , 1, , , , , 1, , , , , , 1, , , , 1 ], [ 1, , 1, 1, , 1, 1, 1, 1, 1, , 1, , , , 1, 1, 1, , , 1, 1, , , , 1, 1 ], , [ 1, 1, , , , , , , , , , 1, 1, 1, , 1, , , 1 ], [ , , , , 1, , , , , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , 1, , , , , 1, , 1 ], [ , , , , , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , , 1, , , 1, , , , , , , , 1, , , , , , 1, , , , 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, , , , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , , 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ 1, 1, , , , , , , 1, , 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, , , 1 ], [ 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], [ 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, , , , , , 1, , 1, , , , , 1, 1, , , , , 1 ], [ 1, , 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , 1, 1, , 1, , 1, , , , 1, 1, 1, 1, 1, , , 1, 1, , 1, , 1 ], [ , 1, 1, 1, 1, , , , , 1, , 1, 1, 1, 1, 1, , , 1, 1, , , , 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, , , , , 1, , 1, , 1, , , 1, , , 1, 1, , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , , , , , , , 1, , , , , 1, 1, , , 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , , 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , , , 1, , 1, 1, , 1, 1, 1, 1, 1, , , 1, , 1, , 1 ], [ 1, 1, 1, , 1, 1, 1, 1, , , , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , , 1, , , , , , , , , , 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , 1, 1, , , , 1, , 1, 1, 1, 1, 1, , , , 1, 1, 1, , 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1 ], [ , 1, 1, 1, , 1, , 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, 1 ], [ 1, 1, , , , 1, , , 1, 1, 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, , 1, 1, 1 ], [ , 1, , , , , , , 1, , 1, , 1, 1, 1, 1, , , , , , , , , 1 ] ], [ , [ , , , , , , , , , , , , , 1, 1, , , , 1 ], [ , 1, , , , , , , , 1, , , 1, , , , , , 1, , , 1, , , , 1 ], , [ , 1, , , , 1, , 1, , 1, 1, , 1, 1, , , , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , 1 ], [ 1, 1, 1, , , 1, , , 1, , , , , , 1, 1, , , , , , , , , , 1 ], [ , 1, , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , 1, , , 1 ], [ , , , , , , , , , 1 ], [ 1, 1, , , , , , 1, 1, 1, , 1, 1, , , , 1, 1, , 1, , 1, 1, 1, , 1 ], [ , 1, 1, 1, , 1, 1, , , 1, , 1, 1, 1, 1, , , , , , , 1, , 1, , 1 ], [ , 1, 1, 1, 1, , , 1, , 1, , , , 1, 1, 1, 1, , 1, 1, , 1 ], [ , 1, , , 1, 1, , 1, , 1, , 1, , 1, 1, , 1, , 1, , , 1, , , 1, , 1 ], [ , , , , , , , , , , , 1, , , 1 ], [ , , , , , , , , , 1, , , , , , , , , , , , , 1 ], , [ 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , , , , 1, 1, , 1, , , , , 1, , , 1, , 1 ], [ , 1, , , , 1, , , 1, , , , , , , , 1, , 1, , , 1 ], [ , , , , , , , , , , , , , 1, 1, , , , 1, , , 1 ], [ , , , , , 1, , , 1, , , , 1 ], [ , 1 ], , [ , 1 ], [ 1, , , , , , , , , , , , , , 1, , , , , 1 ] ], [ , [ , 1, , , , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, , 1, 1, , , 1 ], [ , , 1, , , , , , , , , 1 ], , , [ 1, , , 1, 1, , , , , , , , 1, 1, , 1, 1, , 1 ], , [ , , , , , , , , , , , , , , , , , , 1, , 1 ], , [ 1, , , 1, 1, , 1, 1, , , , , 1, , 1, , , , , 1, 1, , 1 ], [ , , , , , , , , , , , 1 ], [ , 1, , , , , , , , 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, , , , , 1 ], [ , , , , , , , , , , , , , , , , 1, , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , , , , , , , , , , , 1, , 1, , , 1 ], [ 1, , , , , , , , , , , , , , , , , , 1, , 1 ], , , [ , 1, , , , , , , , , , , , , , 1, , , , 1, 1 ], [ , , , , , , , , , 1, , , 1, , 1, , , , , , , , 1 ], [ , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , 1, 1, , , , , , 1 ], , [ , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , , 1, 1, , 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, , , , , , , , 1 ], [ , , , , 1, , , 1, , , 1, 1, , , , , , , , , 1, 1, , , , 1 ], [ , 1, , 1, 1, , , 1, 1, 1, , , , 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ , , , , , , , 1 ], [ , 1, 1, , , , , 1, , 1, , , , , , 1, , , , , , 1, , 1, , 1 ], [ , 1, , , , , , 1, , , , 1, , , , , , , , , , 1 ], [ , , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, , 1, 1, 1, 1, , 1 ], [ , 1, , , , , , , , 1 ], [ , 1, 1, , 1, , , , , , , , 1, , , , , , 1, , , 1, , 1, , 1 ], [ , 1, , 1, , 1, , 1, 1, 1, , 1, 1, 1, , 1, , , 1, 1, , 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, , , , 1, 1, 1, , , , 1, 1, , , 1, 1 ], [ , , 1, 1, 1, 1, , 1, , 1, , 1, , 1, 1, 1, 1, , , , , 1, , 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, , , 1, 1, , , , 1, , 1 ], [ , , , 1 ], , [ , 1, 1, , 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, , , , , , 1, , 1, , 1, , , , , , , 1, 1, , 1, 1 ], [ , , 1, , , , 1, , 1, 1, , 1, , 1, , , , , , , , , , 1 ], [ , 1, 1, , 1, , , , 1, , , , 1, 1, 1, , , , 1, , 1, 1, 1, , 1, 1 ], , [ , 1, 1, , , , , , , , , , , , , 1, , , 1, , , , , 1 ], [ , 1, , , , , , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, , , , , , , 1, , , , 1, 1, , , , 1, , , , , , , 1 ] ], [ , [ , 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, , 1, , 1, 1, , , 1, 1, 1, 1, , 1, , , , , 1, 1, 1 ], [ , , 1, 1, , 1, , 1, 1, , , , 1, 1, 1, 1, , , 1, , 1, 1, 1, 1, , 1 ], [ , 1, , 1, , , , , , , , 1, , 1, , 1, , 1, , , , , , , , 1 ], [ , , 1, , 1, , , 1, , , , , 1, 1, , , 1, , 1, 1, 1, 1 ], [ , 1 ], [ , 1, 1, , 1, , 1, 1, , 1, , , 1, 1, 1, , , , 1, , , 1, , 1 ], [ 1, 1, , 1, 1, 1, , , , , , , , 1, , , , , 1, , 1, 1, 1 ], [ , 1, 1, , , , , , , 1, , , 1, , 1, , 1, , 1, 1, , , 1, , , 1 ], [ , , 1, , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, , 1, , , , , 1, 1, 1, , , 1, , 1, , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, , , , 1, 1 ], [ , , , 1, 1, , , 1, , 1, , 1, , 1, 1, 1, 1, , 1, , , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, , 1, 1, , 1, , 1, , , , 1, 1, , , 1, 1, , 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , , 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, , 1, , , 1, , , 1, , 1, 1, 1, 1, 1, , 1, , 1, 1 ], [ , , , , , 1, , , , 1, , , , , 1, 1, , , , 1 ], [ , 1, , 1, 1, 1, , 1, , , 1, 1, 1, , , 1, , , 1, , 1, , , 1 ], [ , , 1, , , , , , , , , 1, , 1, , , , , 1, , 1 ], [ , 1, 1, , , , , , , , 1, 1, 1, , , , , , , , 1, , , , , 1 ], [ , , , , , , , , 1, , , , , 1, , , 1 ] ], [ , [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, , , , , , , , , 1, 1 ], [ , , , , , , , , 1, , , , 1, , 1, , 1, , 1 ], [ , 1, , , 1, 1, , 1, , , , 1, , , , , , , , 1 ], [ , 1, , 1, , 1, , , , 1, 1, , 1, , 1, , , , 1, 1, 1, 1, 1, , , 1 ], , [ , 1, , , , , , , , 1, , , 1, 1, , , 1, , 1, 1, , 1, , 1 ], [ , 1, , , 1, , , , , , , , 1, , , , , , , 1 ], [ 1, 1, , , , , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], , [ , 1, , , , , , 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, , 1, 1, , , , 1 ], [ , 1, 1, , , 1, , 1, , 1, , , 1, 1, 1, 1, , , 1, , , 1, , , , 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, , 1 ], [ , 1, 1, , 1, 1, , 1, 1, , , 1, 1, , 1, 1, , 1, , 1, , 1 ], [ 1, , 1, , , , , 1, , 1, , 1, 1, 1, 1, , , , , 1, 1, , , , 1, 1 ], [ , 1, 1, , , , , 1, 1, , , 1, , 1, 1, 1, 1, , , , , , , , , , 1 ], , [ , 1, 1, , , 1, , , , 1, , 1, 1, 1, 1, 1, , , , 1, , , , 1, , 1 ], [ , , , 1, 1, , , 1, , , , , 1, 1, 1, 1, 1, , 1, 1, , , , , , 1 ], [ , 1, , , , , , , , , , , 1, , , , 1, , , , , , , 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, 1, 1 ], [ , 1, , , , , , , , , , , , , , , , , , , 1 ], [ , 1, , , , , , 1, , , , , 1, , 1, , , 1, 1, , 1, 1, , 1 ], [ , 1, , , , , , 1, , , , , 1, 1, , , , , , , , 1, , , , 1 ], [ , , , , , , , , , , , , , , , , , , 1, , , 1, , , , , 1 ], [ , , , , , , , 1, , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, , 1, , , , , , , 1, , , , , , , , 1, 1, , 1 ], [ , 1, , , 1, , , , 1 ], [ , , , , , , , , , , 1 ], [ , 1, , , , , , 1, 1, , , , , 1, 1 ], , [ , 1, 1, , , , , , 1, , , , , 1, 1, , , , 1 ], [ 1, , 1, , 1, , , , , 1, , , , , 1, , , , , , , , , 1, 1 ], [ , 1, 1, , , , , , , , , 1, 1, 1, 1, , , , 1, , , , , 1, , , 1 ], , [ , 1, 1, , 1, , , 1, 1, , , 1, , , 1, 1, 1, , 1, , 1, 1, 1, , , , 1 ], [ , 1, , , , 1, , , , , 1, , , 1, 1, , , 1, , 1, , 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , 1, 1, , 1, , , , 1, , , , , , , , 1 ], [ , , , 1, , , , , 1, , , , , 1, , 1, , 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , , , 1 ], [ , 1, , , , , , 1, , , , , , , 1, 1, 1, , , 1 ], [ , 1, , , , , , , , , , 1, 1, 1, , , , , 1, , , 1 ], [ , , , , , 1, , 1, , , , , 1, 1, 1, , 1, 1, , 1, 1, 1, , , 1, 1 ], [ 1, 1, , , , , , , 1, , , , , 1, 1, , , , , , , , , , , 1 ], , [ , 1 ], [ , , , , , , , , , , , , , , , , , , , , , , , , 1 ], [ , , 1, , , , , 1, , , 1, , , , 1, , 1 ], [ , 1, , , , , , , , , 1 ] ] ];
20162 function isValidLang(lang) {
20163 var array = langs;
20164 while (lang.length < 3) {
20165 lang += '`';
20166 }
20167 for (var _i24 = 0; _i24 <= lang.length - 1; _i24++) {
20168 var index = lang.charCodeAt(_i24) - 96;
20169 array = array[index];
20170 if (!array) {
20171 return false;
20172 }
20173 }
20174 return true;
20175 }
20176 function _validLangs(langArray) {
20177 langArray = Array.isArray(langArray) ? langArray : langs;
20178 var codes = [];
20179 langArray.forEach(function(lang, index) {
20180 var _char3 = String.fromCharCode(index + 96).replace('`', '');
20181 if (Array.isArray(lang)) {
20182 codes = codes.concat(_validLangs(lang).map(function(newLang) {
20183 return _char3 + newLang;
20184 }));
20185 } else {
20186 codes.push(_char3);
20187 }
20188 });
20189 return codes;
20190 }
20191 var valid_langs_default = isValidLang;
20192 var SerialVirtualNode = function(_abstract_virtual_nod2) {
20193 function SerialVirtualNode(serialNode) {
20194 var _this8;
20195 _classCallCheck(this, SerialVirtualNode);
20196 _this8 = _callSuper(this, SerialVirtualNode);
20197 _this8._props = normaliseProps(serialNode);
20198 _this8._attrs = normaliseAttrs(serialNode);
20199 return _this8;
20200 }
20201 _inherits(SerialVirtualNode, _abstract_virtual_nod2);
20202 return _createClass(SerialVirtualNode, [ {
20203 key: 'props',
20204 get: function get() {
20205 return this._props;
20206 }
20207 }, {
20208 key: 'attr',
20209 value: function attr(attrName) {
20210 var _this$_attrs$attrName;
20211 return (_this$_attrs$attrName = this._attrs[attrName]) !== null && _this$_attrs$attrName !== void 0 ? _this$_attrs$attrName : null;
20212 }
20213 }, {
20214 key: 'hasAttr',
20215 value: function hasAttr(attrName) {
20216 return this._attrs[attrName] !== void 0;
20217 }
20218 }, {
20219 key: 'attrNames',
20220 get: function get() {
20221 return Object.keys(this._attrs);
20222 }
20223 } ]);
20224 }(abstract_virtual_node_default);
20225 var nodeNamesToTypes = {
20226 '#cdata-section': 2,
20227 '#text': 3,
20228 '#comment': 8,
20229 '#document': 9,
20230 '#document-fragment': 11
20231 };
20232 var nodeTypeToName = {};
20233 var nodeNames = Object.keys(nodeNamesToTypes);
20234 nodeNames.forEach(function(nodeName2) {
20235 nodeTypeToName[nodeNamesToTypes[nodeName2]] = nodeName2;
20236 });
20237 function normaliseProps(serialNode) {
20238 var _serialNode$nodeName, _ref85, _serialNode$nodeType;
20239 var nodeName2 = (_serialNode$nodeName = serialNode.nodeName) !== null && _serialNode$nodeName !== void 0 ? _serialNode$nodeName : nodeTypeToName[serialNode.nodeType];
20240 var nodeType = (_ref85 = (_serialNode$nodeType = serialNode.nodeType) !== null && _serialNode$nodeType !== void 0 ? _serialNode$nodeType : nodeNamesToTypes[serialNode.nodeName]) !== null && _ref85 !== void 0 ? _ref85 : 1;
20241 assert_default(typeof nodeType === 'number', 'nodeType has to be a number, got \''.concat(nodeType, '\''));
20242 assert_default(typeof nodeName2 === 'string', 'nodeName has to be a string, got \''.concat(nodeName2, '\''));
20243 nodeName2 = nodeName2.toLowerCase();
20244 var type2 = null;
20245 if (nodeName2 === 'input') {
20246 type2 = (serialNode.type || serialNode.attributes && serialNode.attributes.type || '').toLowerCase();
20247 if (!valid_input_type_default().includes(type2)) {
20248 type2 = 'text';
20249 }
20250 }
20251 var props = _extends({}, serialNode, {
20252 nodeType: nodeType,
20253 nodeName: nodeName2
20254 });
20255 if (type2) {
20256 props.type = type2;
20257 }
20258 delete props.attributes;
20259 return Object.freeze(props);
20260 }
20261 function normaliseAttrs(_ref86) {
20262 var _ref86$attributes = _ref86.attributes, attributes2 = _ref86$attributes === void 0 ? {} : _ref86$attributes;
20263 var attrMap = {
20264 htmlFor: 'for',
20265 className: 'class'
20266 };
20267 return Object.keys(attributes2).reduce(function(attrs, attrName) {
20268 var value = attributes2[attrName];
20269 assert_default(_typeof(value) !== 'object' || value === null, 'expects attributes not to be an object, \''.concat(attrName, '\' was'));
20270 if (value !== void 0) {
20271 var mappedName = attrMap[attrName] || attrName;
20272 attrs[mappedName] = value !== null ? String(value) : null;
20273 }
20274 return attrs;
20275 }, {});
20276 }
20277 var serial_virtual_node_default = SerialVirtualNode;
20278 function cleanup(resolve, reject) {
20279 resolve = resolve || function res() {};
20280 reject = reject || axe.log;
20281 if (!axe._audit) {
20282 throw new Error('No audit configured');
20283 }
20284 var q = axe.utils.queue();
20285 var cleanupErrors = [];
20286 Object.keys(axe.plugins).forEach(function(key) {
20287 q.defer(function(res) {
20288 var rej = function rej2(err2) {
20289 cleanupErrors.push(err2);
20290 res();
20291 };
20292 try {
20293 axe.plugins[key].cleanup(res, rej);
20294 } catch (err2) {
20295 rej(err2);
20296 }
20297 });
20298 });
20299 var flattenedTree = axe.utils.getFlattenedTree(document.body);
20300 axe.utils.querySelectorAll(flattenedTree, 'iframe, frame').forEach(function(node) {
20301 q.defer(function(res, rej) {
20302 return axe.utils.sendCommandToFrame(node.actualNode, {
20303 command: 'cleanup-plugin'
20304 }, res, rej);
20305 });
20306 });
20307 q.then(function(results) {
20308 if (cleanupErrors.length === 0) {
20309 resolve(results);
20310 } else {
20311 reject(cleanupErrors);
20312 }
20313 })['catch'](reject);
20314 }
20315 var cleanup_default = cleanup;
20316 var reporters = {};
20317 var defaultReporter;
20318 function hasReporter(reporterName) {
20319 return reporters.hasOwnProperty(reporterName);
20320 }
20321 function getReporter(reporter) {
20322 if (typeof reporter === 'string' && reporters[reporter]) {
20323 return reporters[reporter];
20324 }
20325 if (typeof reporter === 'function') {
20326 return reporter;
20327 }
20328 return defaultReporter;
20329 }
20330 function addReporter(name, cb, isDefault) {
20331 reporters[name] = cb;
20332 if (isDefault) {
20333 defaultReporter = cb;
20334 }
20335 }
20336 function configure(spec) {
20337 var audit = axe._audit;
20338 if (!audit) {
20339 throw new Error('No audit configured');
20340 }
20341 if (spec.axeVersion || spec.ver) {
20342 var specVersion = spec.axeVersion || spec.ver;
20343 if (!/^\d+\.\d+\.\d+(-canary)?/.test(specVersion)) {
20344 throw new Error('Invalid configured version '.concat(specVersion));
20345 }
20346 var _specVersion$split = specVersion.split('-'), _specVersion$split2 = _slicedToArray(_specVersion$split, 2), version = _specVersion$split2[0], canary = _specVersion$split2[1];
20347 var _version$split$map = version.split('.').map(Number), _version$split$map2 = _slicedToArray(_version$split$map, 3), major = _version$split$map2[0], minor = _version$split$map2[1], patch = _version$split$map2[2];
20348 var _axe$version$split = axe.version.split('-'), _axe$version$split2 = _slicedToArray(_axe$version$split, 2), axeVersion = _axe$version$split2[0], axeCanary = _axe$version$split2[1];
20349 var _axeVersion$split$map = axeVersion.split('.').map(Number), _axeVersion$split$map2 = _slicedToArray(_axeVersion$split$map, 3), axeMajor = _axeVersion$split$map2[0], axeMinor = _axeVersion$split$map2[1], axePatch = _axeVersion$split$map2[2];
20350 if (major !== axeMajor || axeMinor < minor || axeMinor === minor && axePatch < patch || major === axeMajor && minor === axeMinor && patch === axePatch && canary && canary !== axeCanary) {
20351 throw new Error('Configured version '.concat(specVersion, ' is not compatible with current axe version ').concat(axe.version));
20352 }
20353 }
20354 if (spec.reporter && (typeof spec.reporter === 'function' || hasReporter(spec.reporter))) {
20355 audit.reporter = spec.reporter;
20356 }
20357 if (spec.checks) {
20358 if (!Array.isArray(spec.checks)) {
20359 throw new TypeError('Checks property must be an array');
20360 }
20361 spec.checks.forEach(function(check) {
20362 if (!check.id) {
20363 throw new TypeError('Configured check '.concat(JSON.stringify(check), ' is invalid. Checks must be an object with at least an id property'));
20364 }
20365 audit.addCheck(check);
20366 });
20367 }
20368 var modifiedRules = [];
20369 if (spec.rules) {
20370 if (!Array.isArray(spec.rules)) {
20371 throw new TypeError('Rules property must be an array');
20372 }
20373 spec.rules.forEach(function(rule) {
20374 if (!rule.id) {
20375 throw new TypeError('Configured rule '.concat(JSON.stringify(rule), ' is invalid. Rules must be an object with at least an id property'));
20376 }
20377 modifiedRules.push(rule.id);
20378 audit.addRule(rule);
20379 });
20380 }
20381 if (spec.disableOtherRules) {
20382 audit.rules.forEach(function(rule) {
20383 if (modifiedRules.includes(rule.id) === false) {
20384 rule.enabled = false;
20385 }
20386 });
20387 }
20388 if (typeof spec.branding !== 'undefined') {
20389 audit.setBranding(spec.branding);
20390 } else {
20391 audit._constructHelpUrls();
20392 }
20393 if (spec.tagExclude) {
20394 audit.tagExclude = spec.tagExclude;
20395 }
20396 if (spec.locale) {
20397 audit.applyLocale(spec.locale);
20398 }
20399 if (spec.standards) {
20400 configureStandards(spec.standards);
20401 }
20402 if (spec.noHtml) {
20403 audit.noHtml = true;
20404 }
20405 if (spec.allowedOrigins) {
20406 if (!Array.isArray(spec.allowedOrigins)) {
20407 throw new TypeError('Allowed origins property must be an array');
20408 }
20409 if (spec.allowedOrigins.includes('*')) {
20410 throw new Error('"*" is not allowed. Use "'.concat(constants_default.allOrigins, '" instead'));
20411 }
20412 audit.setAllowedOrigins(spec.allowedOrigins);
20413 }
20414 }
20415 var configure_default = configure;
20416 function frameMessenger2(frameHandler) {
20417 _respondable.updateMessenger(frameHandler);
20418 }
20419 function getRules(tags) {
20420 tags = tags || [];
20421 var matchingRules = !tags.length ? axe._audit.rules : axe._audit.rules.filter(function(item) {
20422 return !!tags.filter(function(tag) {
20423 return item.tags.indexOf(tag) !== -1;
20424 }).length;
20425 });
20426 var ruleData = axe._audit.data.rules || {};
20427 return matchingRules.map(function(matchingRule) {
20428 var rd = ruleData[matchingRule.id] || {};
20429 return {
20430 ruleId: matchingRule.id,
20431 description: rd.description,
20432 help: rd.help,
20433 helpUrl: rd.helpUrl,
20434 tags: matchingRule.tags,
20435 actIds: matchingRule.actIds
20436 };
20437 });
20438 }
20439 var get_rules_default = getRules;
20440 function hiddenContentEvaluate(node, options, virtualNode) {
20441 var allowlist = [ 'SCRIPT', 'HEAD', 'TITLE', 'NOSCRIPT', 'STYLE', 'TEMPLATE' ];
20442 if (!allowlist.includes(node.nodeName.toUpperCase()) && has_content_virtual_default(virtualNode)) {
20443 var styles = window.getComputedStyle(node);
20444 if (styles.getPropertyValue('display') === 'none') {
20445 return void 0;
20446 } else if (styles.getPropertyValue('visibility') === 'hidden') {
20447 var parent = get_composed_parent_default(node);
20448 var parentStyle = parent && window.getComputedStyle(parent);
20449 if (!parentStyle || parentStyle.getPropertyValue('visibility') !== 'hidden') {
20450 return void 0;
20451 }
20452 }
20453 }
20454 return true;
20455 }
20456 var hidden_content_evaluate_default = hiddenContentEvaluate;
20457 var table_exports = {};
20458 __export(table_exports, {
20459 getAllCells: function getAllCells() {
20460 return get_all_cells_default;
20461 },
20462 getCellPosition: function getCellPosition() {
20463 return get_cell_position_default;
20464 },
20465 getHeaders: function getHeaders() {
20466 return get_headers_default;
20467 },
20468 getScope: function getScope() {
20469 return _getScope;
20470 },
20471 isColumnHeader: function isColumnHeader() {
20472 return is_column_header_default;
20473 },
20474 isDataCell: function isDataCell() {
20475 return is_data_cell_default;
20476 },
20477 isDataTable: function isDataTable() {
20478 return is_data_table_default;
20479 },
20480 isHeader: function isHeader() {
20481 return is_header_default;
20482 },
20483 isRowHeader: function isRowHeader() {
20484 return is_row_header_default;
20485 },
20486 toArray: function toArray() {
20487 return to_grid_default;
20488 },
20489 toGrid: function toGrid() {
20490 return to_grid_default;
20491 },
20492 traverse: function traverse() {
20493 return traverse_default;
20494 }
20495 });
20496 function getAllCells(tableElm) {
20497 var rowIndex, cellIndex, rowLength, cellLength;
20498 var cells = [];
20499 for (rowIndex = 0, rowLength = tableElm.rows.length; rowIndex < rowLength; rowIndex++) {
20500 for (cellIndex = 0, cellLength = tableElm.rows[rowIndex].cells.length; cellIndex < cellLength; cellIndex++) {
20501 cells.push(tableElm.rows[rowIndex].cells[cellIndex]);
20502 }
20503 }
20504 return cells;
20505 }
20506 var get_all_cells_default = getAllCells;
20507 function traverseForHeaders(headerType, position, tableGrid) {
20508 var property = headerType === 'row' ? '_rowHeaders' : '_colHeaders';
20509 var predicate = headerType === 'row' ? is_row_header_default : is_column_header_default;
20510 var startCell = tableGrid[position.y][position.x];
20511 var colspan = startCell.colSpan - 1;
20512 var rowspanAttr = startCell.getAttribute('rowspan');
20513 var rowspanValue = parseInt(rowspanAttr) === 0 || startCell.rowspan === 0 ? tableGrid.length : startCell.rowSpan;
20514 var rowspan = rowspanValue - 1;
20515 var rowStart = position.y + rowspan;
20516 var colStart = position.x + colspan;
20517 var rowEnd = headerType === 'row' ? position.y : 0;
20518 var colEnd = headerType === 'row' ? 0 : position.x;
20519 var headers;
20520 var cells = [];
20521 for (var row = rowStart; row >= rowEnd && !headers; row--) {
20522 for (var col = colStart; col >= colEnd; col--) {
20523 var cell = tableGrid[row] ? tableGrid[row][col] : void 0;
20524 if (!cell) {
20525 continue;
20526 }
20527 var vNode = axe.utils.getNodeFromTree(cell);
20528 if (vNode[property]) {
20529 headers = vNode[property];
20530 break;
20531 }
20532 cells.push(cell);
20533 }
20534 }
20535 headers = (headers || []).concat(cells.filter(predicate));
20536 cells.forEach(function(tableCell) {
20537 var vNode = axe.utils.getNodeFromTree(tableCell);
20538 vNode[property] = headers;
20539 });
20540 return headers;
20541 }
20542 function getHeaders(cell, tableGrid) {
20543 if (cell.getAttribute('headers')) {
20544 var headers = idrefs_default(cell, 'headers');
20545 if (headers.filter(function(header) {
20546 return header;
20547 }).length) {
20548 return headers;
20549 }
20550 }
20551 if (!tableGrid) {
20552 tableGrid = to_grid_default(find_up_default(cell, 'table'));
20553 }
20554 var position = get_cell_position_default(cell, tableGrid);
20555 var rowHeaders = traverseForHeaders('row', position, tableGrid);
20556 var colHeaders = traverseForHeaders('col', position, tableGrid);
20557 return [].concat(rowHeaders, colHeaders).reverse();
20558 }
20559 var get_headers_default = getHeaders;
20560 function isDataCell(cell) {
20561 if (!cell.children.length && !cell.textContent.trim()) {
20562 return false;
20563 }
20564 var role = get_explicit_role_default(cell);
20565 if (role) {
20566 return [ 'cell', 'gridcell' ].includes(role);
20567 } else {
20568 return cell.nodeName.toUpperCase() === 'TD';
20569 }
20570 }
20571 var is_data_cell_default = isDataCell;
20572 function isDataTable(node) {
20573 var role = get_explicit_role_default(node);
20574 if ((role === 'presentation' || role === 'none') && !_isFocusable(node)) {
20575 return false;
20576 }
20577 if (node.getAttribute('contenteditable') === 'true' || find_up_default(node, '[contenteditable="true"]')) {
20578 return true;
20579 }
20580 if (role === 'grid' || role === 'treegrid' || role === 'table') {
20581 return true;
20582 }
20583 if (get_role_type_default(role) === 'landmark') {
20584 return true;
20585 }
20586 if (node.getAttribute('datatable') === '0') {
20587 return false;
20588 }
20589 if (node.getAttribute('summary')) {
20590 return true;
20591 }
20592 if (node.tHead || node.tFoot || node.caption) {
20593 return true;
20594 }
20595 for (var childIndex = 0, childLength = node.children.length; childIndex < childLength; childIndex++) {
20596 if (node.children[childIndex].nodeName.toUpperCase() === 'COLGROUP') {
20597 return true;
20598 }
20599 }
20600 var cells = 0;
20601 var rowLength = node.rows.length;
20602 var row, cell;
20603 var hasBorder = false;
20604 for (var rowIndex = 0; rowIndex < rowLength; rowIndex++) {
20605 row = node.rows[rowIndex];
20606 for (var cellIndex = 0, cellLength = row.cells.length; cellIndex < cellLength; cellIndex++) {
20607 cell = row.cells[cellIndex];
20608 if (cell.nodeName.toUpperCase() === 'TH') {
20609 return true;
20610 }
20611 if (!hasBorder && (cell.offsetWidth !== cell.clientWidth || cell.offsetHeight !== cell.clientHeight)) {
20612 hasBorder = true;
20613 }
20614 if (cell.getAttribute('scope') || cell.getAttribute('headers') || cell.getAttribute('abbr')) {
20615 return true;
20616 }
20617 if ([ 'columnheader', 'rowheader' ].includes(get_explicit_role_default(cell))) {
20618 return true;
20619 }
20620 if (cell.children.length === 1 && cell.children[0].nodeName.toUpperCase() === 'ABBR') {
20621 return true;
20622 }
20623 cells++;
20624 }
20625 }
20626 if (node.getElementsByTagName('table').length) {
20627 return false;
20628 }
20629 if (rowLength < 2) {
20630 return false;
20631 }
20632 var sampleRow = node.rows[Math.ceil(rowLength / 2)];
20633 if (sampleRow.cells.length === 1 && sampleRow.cells[0].colSpan === 1) {
20634 return false;
20635 }
20636 if (sampleRow.cells.length >= 5) {
20637 return true;
20638 }
20639 if (hasBorder) {
20640 return true;
20641 }
20642 var bgColor, bgImage;
20643 for (var _rowIndex = 0; _rowIndex < rowLength; _rowIndex++) {
20644 row = node.rows[_rowIndex];
20645 if (bgColor && bgColor !== window.getComputedStyle(row).getPropertyValue('background-color')) {
20646 return true;
20647 } else {
20648 bgColor = window.getComputedStyle(row).getPropertyValue('background-color');
20649 }
20650 if (bgImage && bgImage !== window.getComputedStyle(row).getPropertyValue('background-image')) {
20651 return true;
20652 } else {
20653 bgImage = window.getComputedStyle(row).getPropertyValue('background-image');
20654 }
20655 }
20656 if (rowLength >= 20) {
20657 return true;
20658 }
20659 if (get_element_coordinates_default(node).width > get_viewport_size_default(window).width * .95) {
20660 return false;
20661 }
20662 if (cells < 10) {
20663 return false;
20664 }
20665 if (node.querySelector('object, embed, iframe, applet')) {
20666 return false;
20667 }
20668 return true;
20669 }
20670 var is_data_table_default = isDataTable;
20671 function isHeader(cell) {
20672 if (is_column_header_default(cell) || is_row_header_default(cell)) {
20673 return true;
20674 }
20675 if (cell.getAttribute('id')) {
20676 var _id4 = escape_selector_default(cell.getAttribute('id'));
20677 return !!document.querySelector('[headers~="'.concat(_id4, '"]'));
20678 }
20679 return false;
20680 }
20681 var is_header_default = isHeader;
20682 function traverseTable(dir, position, tableGrid, callback) {
20683 var result;
20684 var cell = tableGrid[position.y] ? tableGrid[position.y][position.x] : void 0;
20685 if (!cell) {
20686 return [];
20687 }
20688 if (typeof callback === 'function') {
20689 result = callback(cell, position, tableGrid);
20690 if (result === true) {
20691 return [ cell ];
20692 }
20693 }
20694 result = traverseTable(dir, {
20695 x: position.x + dir.x,
20696 y: position.y + dir.y
20697 }, tableGrid, callback);
20698 result.unshift(cell);
20699 return result;
20700 }
20701 function traverse(dir, startPos, tableGrid, callback) {
20702 if (Array.isArray(startPos)) {
20703 callback = tableGrid;
20704 tableGrid = startPos;
20705 startPos = {
20706 x: 0,
20707 y: 0
20708 };
20709 }
20710 if (typeof dir === 'string') {
20711 switch (dir) {
20712 case 'left':
20713 dir = {
20714 x: -1,
20715 y: 0
20716 };
20717 break;
20718
20719 case 'up':
20720 dir = {
20721 x: 0,
20722 y: -1
20723 };
20724 break;
20725
20726 case 'right':
20727 dir = {
20728 x: 1,
20729 y: 0
20730 };
20731 break;
20732
20733 case 'down':
20734 dir = {
20735 x: 0,
20736 y: 1
20737 };
20738 break;
20739 }
20740 }
20741 return traverseTable(dir, {
20742 x: startPos.x + dir.x,
20743 y: startPos.y + dir.y
20744 }, tableGrid, callback);
20745 }
20746 var traverse_default = traverse;
20747 var aria_exports = {};
20748 __export(aria_exports, {
20749 allowedAttr: function allowedAttr() {
20750 return allowed_attr_default;
20751 },
20752 arialabelText: function arialabelText() {
20753 return _arialabelText;
20754 },
20755 arialabelledbyText: function arialabelledbyText() {
20756 return arialabelledby_text_default;
20757 },
20758 getAccessibleRefs: function getAccessibleRefs() {
20759 return get_accessible_refs_default;
20760 },
20761 getElementUnallowedRoles: function getElementUnallowedRoles() {
20762 return get_element_unallowed_roles_default;
20763 },
20764 getExplicitRole: function getExplicitRole() {
20765 return get_explicit_role_default;
20766 },
20767 getImplicitRole: function getImplicitRole() {
20768 return implicit_role_default;
20769 },
20770 getOwnedVirtual: function getOwnedVirtual() {
20771 return get_owned_virtual_default;
20772 },
20773 getRole: function getRole() {
20774 return get_role_default;
20775 },
20776 getRoleType: function getRoleType() {
20777 return get_role_type_default;
20778 },
20779 getRolesByType: function getRolesByType() {
20780 return get_roles_by_type_default;
20781 },
20782 getRolesWithNameFromContents: function getRolesWithNameFromContents() {
20783 return get_roles_with_name_from_contents_default;
20784 },
20785 implicitNodes: function implicitNodes() {
20786 return implicit_nodes_default;
20787 },
20788 implicitRole: function implicitRole() {
20789 return implicit_role_default;
20790 },
20791 isAccessibleRef: function isAccessibleRef() {
20792 return is_accessible_ref_default;
20793 },
20794 isAriaRoleAllowedOnElement: function isAriaRoleAllowedOnElement() {
20795 return is_aria_role_allowed_on_element_default;
20796 },
20797 isComboboxPopup: function isComboboxPopup() {
20798 return _isComboboxPopup;
20799 },
20800 isUnsupportedRole: function isUnsupportedRole() {
20801 return is_unsupported_role_default;
20802 },
20803 isValidRole: function isValidRole() {
20804 return is_valid_role_default;
20805 },
20806 label: function label() {
20807 return label_default2;
20808 },
20809 labelVirtual: function labelVirtual() {
20810 return label_virtual_default;
20811 },
20812 lookupTable: function lookupTable() {
20813 return lookup_table_default;
20814 },
20815 namedFromContents: function namedFromContents() {
20816 return named_from_contents_default;
20817 },
20818 requiredAttr: function requiredAttr() {
20819 return required_attr_default;
20820 },
20821 requiredContext: function requiredContext() {
20822 return required_context_default;
20823 },
20824 requiredOwned: function requiredOwned() {
20825 return required_owned_default;
20826 },
20827 validateAttr: function validateAttr() {
20828 return validate_attr_default;
20829 },
20830 validateAttrValue: function validateAttrValue() {
20831 return validate_attr_value_default;
20832 }
20833 });
20834 function allowedAttr(role) {
20835 var roleDef = standards_default.ariaRoles[role];
20836 var attrs = _toConsumableArray(get_global_aria_attrs_default());
20837 if (!roleDef) {
20838 return attrs;
20839 }
20840 if (roleDef.allowedAttrs) {
20841 attrs.push.apply(attrs, _toConsumableArray(roleDef.allowedAttrs));
20842 }
20843 if (roleDef.requiredAttrs) {
20844 attrs.push.apply(attrs, _toConsumableArray(roleDef.requiredAttrs));
20845 }
20846 return attrs;
20847 }
20848 var allowed_attr_default = allowedAttr;
20849 var idRefsRegex = /^idrefs?$/;
20850 function cacheIdRefs(node, idRefs, refAttrs) {
20851 if (node.hasAttribute) {
20852 if (node.nodeName.toUpperCase() === 'LABEL' && node.hasAttribute('for')) {
20853 var _id5 = node.getAttribute('for');
20854 if (!idRefs.has(_id5)) {
20855 idRefs.set(_id5, [ node ]);
20856 } else {
20857 idRefs.get(_id5).push(node);
20858 }
20859 }
20860 for (var _i25 = 0; _i25 < refAttrs.length; ++_i25) {
20861 var attr = refAttrs[_i25];
20862 var attrValue = sanitize_default(node.getAttribute(attr) || '');
20863 if (!attrValue) {
20864 continue;
20865 }
20866 var _iterator14 = _createForOfIteratorHelper(token_list_default(attrValue)), _step14;
20867 try {
20868 for (_iterator14.s(); !(_step14 = _iterator14.n()).done; ) {
20869 var token = _step14.value;
20870 if (!idRefs.has(token)) {
20871 idRefs.set(token, [ node ]);
20872 } else {
20873 idRefs.get(token).push(node);
20874 }
20875 }
20876 } catch (err) {
20877 _iterator14.e(err);
20878 } finally {
20879 _iterator14.f();
20880 }
20881 }
20882 }
20883 for (var _i26 = 0; _i26 < node.childNodes.length; _i26++) {
20884 if (node.childNodes[_i26].nodeType === 1) {
20885 cacheIdRefs(node.childNodes[_i26], idRefs, refAttrs);
20886 }
20887 }
20888 }
20889 function getAccessibleRefs(node) {
20890 var _idRefs$get;
20891 node = node.actualNode || node;
20892 var root = get_root_node_default2(node);
20893 root = root.documentElement || root;
20894 var idRefsByRoot = cache_default.get('idRefsByRoot', function() {
20895 return new Map();
20896 });
20897 var idRefs = idRefsByRoot.get(root);
20898 if (!idRefs) {
20899 idRefs = new Map();
20900 idRefsByRoot.set(root, idRefs);
20901 var refAttrs = Object.keys(standards_default.ariaAttrs).filter(function(attr) {
20902 var type2 = standards_default.ariaAttrs[attr].type;
20903 return idRefsRegex.test(type2);
20904 });
20905 cacheIdRefs(root, idRefs, refAttrs);
20906 }
20907 return (_idRefs$get = idRefs.get(node.id)) !== null && _idRefs$get !== void 0 ? _idRefs$get : [];
20908 }
20909 var get_accessible_refs_default = getAccessibleRefs;
20910 function isAriaRoleAllowedOnElement(node, role) {
20911 var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
20912 var implicitRole3 = implicit_role_default(vNode);
20913 var spec = get_element_spec_default(vNode);
20914 if (Array.isArray(spec.allowedRoles)) {
20915 return spec.allowedRoles.includes(role);
20916 }
20917 if (role === implicitRole3) {
20918 return false;
20919 }
20920 return !!spec.allowedRoles;
20921 }
20922 var is_aria_role_allowed_on_element_default = isAriaRoleAllowedOnElement;
20923 var dpubRoles2 = [ 'doc-backlink', 'doc-biblioentry', 'doc-biblioref', 'doc-cover', 'doc-endnote', 'doc-glossref', 'doc-noteref' ];
20924 var landmarkRoles = {
20925 header: 'banner',
20926 footer: 'contentinfo'
20927 };
20928 function getRoleSegments(vNode) {
20929 var roles = [];
20930 if (!vNode) {
20931 return roles;
20932 }
20933 if (vNode.hasAttr('role')) {
20934 var nodeRoles = token_list_default(vNode.attr('role').toLowerCase());
20935 roles = roles.concat(nodeRoles);
20936 }
20937 return roles.filter(function(role) {
20938 return is_valid_role_default(role);
20939 });
20940 }
20941 function getElementUnallowedRoles(node) {
20942 var allowImplicit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
20943 var _nodeLookup23 = _nodeLookup(node), vNode = _nodeLookup23.vNode;
20944 if (!is_html_element_default(vNode)) {
20945 return [];
20946 }
20947 var nodeName2 = vNode.props.nodeName;
20948 var implicitRole3 = implicit_role_default(vNode) || landmarkRoles[nodeName2];
20949 var roleSegments = getRoleSegments(vNode);
20950 return roleSegments.filter(function(role) {
20951 return !roleIsAllowed(role, vNode, allowImplicit, implicitRole3);
20952 });
20953 }
20954 function roleIsAllowed(role, vNode, allowImplicit, implicitRole3) {
20955 if (allowImplicit && role === implicitRole3) {
20956 return true;
20957 }
20958 if (dpubRoles2.includes(role) && get_role_type_default(role) !== implicitRole3) {
20959 return false;
20960 }
20961 return is_aria_role_allowed_on_element_default(vNode, role);
20962 }
20963 var get_element_unallowed_roles_default = getElementUnallowedRoles;
20964 function getAriaRolesByType(type2) {
20965 return Object.keys(standards_default.ariaRoles).filter(function(roleName) {
20966 return standards_default.ariaRoles[roleName].type === type2;
20967 });
20968 }
20969 var get_aria_roles_by_type_default = getAriaRolesByType;
20970 function getRolesByType(roleType) {
20971 return get_aria_roles_by_type_default(roleType);
20972 }
20973 var get_roles_by_type_default = getRolesByType;
20974 function getAriaRolesSupportingNameFromContent() {
20975 return cache_default.get('ariaRolesNameFromContent', function() {
20976 return Object.keys(standards_default.ariaRoles).filter(function(roleName) {
20977 return standards_default.ariaRoles[roleName].nameFromContent;
20978 });
20979 });
20980 }
20981 var get_aria_roles_supporting_name_from_content_default = getAriaRolesSupportingNameFromContent;
20982 function getRolesWithNameFromContents() {
20983 return get_aria_roles_supporting_name_from_content_default();
20984 }
20985 var get_roles_with_name_from_contents_default = getRolesWithNameFromContents;
20986 var isNull = function isNull(value) {
20987 return value === null;
20988 };
20989 var isNotNull = function isNotNull(value) {
20990 return value !== null;
20991 };
20992 var lookupTable = {};
20993 lookupTable.attributes = {
20994 'aria-activedescendant': {
20995 type: 'idref',
20996 allowEmpty: true,
20997 unsupported: false
20998 },
20999 'aria-atomic': {
21000 type: 'boolean',
21001 values: [ 'true', 'false' ],
21002 unsupported: false
21003 },
21004 'aria-autocomplete': {
21005 type: 'nmtoken',
21006 values: [ 'inline', 'list', 'both', 'none' ],
21007 unsupported: false
21008 },
21009 'aria-busy': {
21010 type: 'boolean',
21011 values: [ 'true', 'false' ],
21012 unsupported: false
21013 },
21014 'aria-checked': {
21015 type: 'nmtoken',
21016 values: [ 'true', 'false', 'mixed', 'undefined' ],
21017 unsupported: false
21018 },
21019 'aria-colcount': {
21020 type: 'int',
21021 unsupported: false
21022 },
21023 'aria-colindex': {
21024 type: 'int',
21025 unsupported: false
21026 },
21027 'aria-colspan': {
21028 type: 'int',
21029 unsupported: false
21030 },
21031 'aria-controls': {
21032 type: 'idrefs',
21033 allowEmpty: true,
21034 unsupported: false
21035 },
21036 'aria-current': {
21037 type: 'nmtoken',
21038 allowEmpty: true,
21039 values: [ 'page', 'step', 'location', 'date', 'time', 'true', 'false' ],
21040 unsupported: false
21041 },
21042 'aria-describedby': {
21043 type: 'idrefs',
21044 allowEmpty: true,
21045 unsupported: false
21046 },
21047 'aria-describedat': {
21048 unsupported: true,
21049 unstandardized: true
21050 },
21051 'aria-details': {
21052 type: 'idref',
21053 allowEmpty: true,
21054 unsupported: false
21055 },
21056 'aria-disabled': {
21057 type: 'boolean',
21058 values: [ 'true', 'false' ],
21059 unsupported: false
21060 },
21061 'aria-dropeffect': {
21062 type: 'nmtokens',
21063 values: [ 'copy', 'move', 'reference', 'execute', 'popup', 'none' ],
21064 unsupported: false
21065 },
21066 'aria-errormessage': {
21067 type: 'idref',
21068 allowEmpty: true,
21069 unsupported: false
21070 },
21071 'aria-expanded': {
21072 type: 'nmtoken',
21073 values: [ 'true', 'false', 'undefined' ],
21074 unsupported: false
21075 },
21076 'aria-flowto': {
21077 type: 'idrefs',
21078 allowEmpty: true,
21079 unsupported: false
21080 },
21081 'aria-grabbed': {
21082 type: 'nmtoken',
21083 values: [ 'true', 'false', 'undefined' ],
21084 unsupported: false
21085 },
21086 'aria-haspopup': {
21087 type: 'nmtoken',
21088 allowEmpty: true,
21089 values: [ 'true', 'false', 'menu', 'listbox', 'tree', 'grid', 'dialog' ],
21090 unsupported: false
21091 },
21092 'aria-hidden': {
21093 type: 'boolean',
21094 values: [ 'true', 'false' ],
21095 unsupported: false
21096 },
21097 'aria-invalid': {
21098 type: 'nmtoken',
21099 allowEmpty: true,
21100 values: [ 'true', 'false', 'spelling', 'grammar' ],
21101 unsupported: false
21102 },
21103 'aria-keyshortcuts': {
21104 type: 'string',
21105 allowEmpty: true,
21106 unsupported: false
21107 },
21108 'aria-label': {
21109 type: 'string',
21110 allowEmpty: true,
21111 unsupported: false
21112 },
21113 'aria-labelledby': {
21114 type: 'idrefs',
21115 allowEmpty: true,
21116 unsupported: false
21117 },
21118 'aria-level': {
21119 type: 'int',
21120 unsupported: false
21121 },
21122 'aria-live': {
21123 type: 'nmtoken',
21124 values: [ 'off', 'polite', 'assertive' ],
21125 unsupported: false
21126 },
21127 'aria-modal': {
21128 type: 'boolean',
21129 values: [ 'true', 'false' ],
21130 unsupported: false
21131 },
21132 'aria-multiline': {
21133 type: 'boolean',
21134 values: [ 'true', 'false' ],
21135 unsupported: false
21136 },
21137 'aria-multiselectable': {
21138 type: 'boolean',
21139 values: [ 'true', 'false' ],
21140 unsupported: false
21141 },
21142 'aria-orientation': {
21143 type: 'nmtoken',
21144 values: [ 'horizontal', 'vertical' ],
21145 unsupported: false
21146 },
21147 'aria-owns': {
21148 type: 'idrefs',
21149 allowEmpty: true,
21150 unsupported: false
21151 },
21152 'aria-placeholder': {
21153 type: 'string',
21154 allowEmpty: true,
21155 unsupported: false
21156 },
21157 'aria-posinset': {
21158 type: 'int',
21159 unsupported: false
21160 },
21161 'aria-pressed': {
21162 type: 'nmtoken',
21163 values: [ 'true', 'false', 'mixed', 'undefined' ],
21164 unsupported: false
21165 },
21166 'aria-readonly': {
21167 type: 'boolean',
21168 values: [ 'true', 'false' ],
21169 unsupported: false
21170 },
21171 'aria-relevant': {
21172 type: 'nmtokens',
21173 values: [ 'additions', 'removals', 'text', 'all' ],
21174 unsupported: false
21175 },
21176 'aria-required': {
21177 type: 'boolean',
21178 values: [ 'true', 'false' ],
21179 unsupported: false
21180 },
21181 'aria-roledescription': {
21182 type: 'string',
21183 allowEmpty: true,
21184 unsupported: false
21185 },
21186 'aria-rowcount': {
21187 type: 'int',
21188 unsupported: false
21189 },
21190 'aria-rowindex': {
21191 type: 'int',
21192 unsupported: false
21193 },
21194 'aria-rowspan': {
21195 type: 'int',
21196 unsupported: false
21197 },
21198 'aria-selected': {
21199 type: 'nmtoken',
21200 values: [ 'true', 'false', 'undefined' ],
21201 unsupported: false
21202 },
21203 'aria-setsize': {
21204 type: 'int',
21205 unsupported: false
21206 },
21207 'aria-sort': {
21208 type: 'nmtoken',
21209 values: [ 'ascending', 'descending', 'other', 'none' ],
21210 unsupported: false
21211 },
21212 'aria-valuemax': {
21213 type: 'decimal',
21214 unsupported: false
21215 },
21216 'aria-valuemin': {
21217 type: 'decimal',
21218 unsupported: false
21219 },
21220 'aria-valuenow': {
21221 type: 'decimal',
21222 unsupported: false
21223 },
21224 'aria-valuetext': {
21225 type: 'string',
21226 unsupported: false
21227 }
21228 };
21229 lookupTable.globalAttributes = [ 'aria-atomic', 'aria-busy', 'aria-controls', 'aria-current', 'aria-describedby', 'aria-details', 'aria-disabled', 'aria-dropeffect', 'aria-flowto', 'aria-grabbed', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-keyshortcuts', 'aria-label', 'aria-labelledby', 'aria-live', 'aria-owns', 'aria-relevant', 'aria-roledescription' ];
21230 lookupTable.role = {
21231 alert: {
21232 type: 'widget',
21233 attributes: {
21234 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21235 },
21236 owned: null,
21237 nameFrom: [ 'author' ],
21238 context: null,
21239 unsupported: false,
21240 allowedElements: [ 'section' ]
21241 },
21242 alertdialog: {
21243 type: 'widget',
21244 attributes: {
21245 allowed: [ 'aria-expanded', 'aria-modal', 'aria-errormessage' ]
21246 },
21247 owned: null,
21248 nameFrom: [ 'author' ],
21249 context: null,
21250 unsupported: false,
21251 allowedElements: [ 'dialog', 'section' ]
21252 },
21253 application: {
21254 type: 'landmark',
21255 attributes: {
21256 allowed: [ 'aria-expanded', 'aria-errormessage', 'aria-activedescendant' ]
21257 },
21258 owned: null,
21259 nameFrom: [ 'author' ],
21260 context: null,
21261 unsupported: false,
21262 allowedElements: [ 'article', 'audio', 'embed', 'iframe', 'object', 'section', 'svg', 'video' ]
21263 },
21264 article: {
21265 type: 'structure',
21266 attributes: {
21267 allowed: [ 'aria-expanded', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
21268 },
21269 owned: null,
21270 nameFrom: [ 'author' ],
21271 context: null,
21272 implicit: [ 'article' ],
21273 unsupported: false
21274 },
21275 banner: {
21276 type: 'landmark',
21277 attributes: {
21278 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21279 },
21280 owned: null,
21281 nameFrom: [ 'author' ],
21282 context: null,
21283 implicit: [ 'header' ],
21284 unsupported: false,
21285 allowedElements: [ 'section' ]
21286 },
21287 button: {
21288 type: 'widget',
21289 attributes: {
21290 allowed: [ 'aria-expanded', 'aria-pressed', 'aria-errormessage' ]
21291 },
21292 owned: null,
21293 nameFrom: [ 'author', 'contents' ],
21294 context: null,
21295 implicit: [ 'button', 'input[type="button"]', 'input[type="image"]', 'input[type="reset"]', 'input[type="submit"]', 'summary' ],
21296 unsupported: false,
21297 allowedElements: [ {
21298 nodeName: 'a',
21299 attributes: {
21300 href: isNotNull
21301 }
21302 } ]
21303 },
21304 cell: {
21305 type: 'structure',
21306 attributes: {
21307 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-rowindex', 'aria-rowspan', 'aria-errormessage' ]
21308 },
21309 owned: null,
21310 nameFrom: [ 'author', 'contents' ],
21311 context: [ 'row' ],
21312 implicit: [ 'td', 'th' ],
21313 unsupported: false
21314 },
21315 checkbox: {
21316 type: 'widget',
21317 attributes: {
21318 allowed: [ 'aria-checked', 'aria-required', 'aria-readonly', 'aria-errormessage' ]
21319 },
21320 owned: null,
21321 nameFrom: [ 'author', 'contents' ],
21322 context: null,
21323 implicit: [ 'input[type="checkbox"]' ],
21324 unsupported: false,
21325 allowedElements: [ 'button' ]
21326 },
21327 columnheader: {
21328 type: 'structure',
21329 attributes: {
21330 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort', 'aria-errormessage' ]
21331 },
21332 owned: null,
21333 nameFrom: [ 'author', 'contents' ],
21334 context: [ 'row' ],
21335 implicit: [ 'th' ],
21336 unsupported: false
21337 },
21338 combobox: {
21339 type: 'composite',
21340 attributes: {
21341 allowed: [ 'aria-autocomplete', 'aria-required', 'aria-activedescendant', 'aria-orientation', 'aria-errormessage' ],
21342 required: [ 'aria-expanded' ]
21343 },
21344 owned: {
21345 all: [ 'listbox', 'tree', 'grid', 'dialog', 'textbox' ]
21346 },
21347 nameFrom: [ 'author' ],
21348 context: null,
21349 unsupported: false,
21350 allowedElements: [ {
21351 nodeName: 'input',
21352 properties: {
21353 type: [ 'text', 'search', 'tel', 'url', 'email' ]
21354 }
21355 } ]
21356 },
21357 command: {
21358 nameFrom: [ 'author' ],
21359 type: 'abstract',
21360 unsupported: false
21361 },
21362 complementary: {
21363 type: 'landmark',
21364 attributes: {
21365 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21366 },
21367 owned: null,
21368 nameFrom: [ 'author' ],
21369 context: null,
21370 implicit: [ 'aside' ],
21371 unsupported: false,
21372 allowedElements: [ 'section' ]
21373 },
21374 composite: {
21375 nameFrom: [ 'author' ],
21376 type: 'abstract',
21377 unsupported: false
21378 },
21379 contentinfo: {
21380 type: 'landmark',
21381 attributes: {
21382 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21383 },
21384 owned: null,
21385 nameFrom: [ 'author' ],
21386 context: null,
21387 implicit: [ 'footer' ],
21388 unsupported: false,
21389 allowedElements: [ 'section' ]
21390 },
21391 definition: {
21392 type: 'structure',
21393 attributes: {
21394 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21395 },
21396 owned: null,
21397 nameFrom: [ 'author' ],
21398 context: null,
21399 implicit: [ 'dd', 'dfn' ],
21400 unsupported: false
21401 },
21402 dialog: {
21403 type: 'widget',
21404 attributes: {
21405 allowed: [ 'aria-expanded', 'aria-modal', 'aria-errormessage' ]
21406 },
21407 owned: null,
21408 nameFrom: [ 'author' ],
21409 context: null,
21410 implicit: [ 'dialog' ],
21411 unsupported: false,
21412 allowedElements: [ 'section' ]
21413 },
21414 directory: {
21415 type: 'structure',
21416 attributes: {
21417 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21418 },
21419 owned: null,
21420 nameFrom: [ 'author', 'contents' ],
21421 context: null,
21422 unsupported: false,
21423 allowedElements: [ 'ol', 'ul' ]
21424 },
21425 document: {
21426 type: 'structure',
21427 attributes: {
21428 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21429 },
21430 owned: null,
21431 nameFrom: [ 'author' ],
21432 context: null,
21433 implicit: [ 'body' ],
21434 unsupported: false,
21435 allowedElements: [ 'article', 'embed', 'iframe', 'object', 'section', 'svg' ]
21436 },
21437 'doc-abstract': {
21438 type: 'section',
21439 attributes: {
21440 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21441 },
21442 owned: null,
21443 nameFrom: [ 'author' ],
21444 context: null,
21445 unsupported: false,
21446 allowedElements: [ 'section' ]
21447 },
21448 'doc-acknowledgments': {
21449 type: 'landmark',
21450 attributes: {
21451 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21452 },
21453 owned: null,
21454 nameFrom: [ 'author' ],
21455 context: null,
21456 unsupported: false,
21457 allowedElements: [ 'section' ]
21458 },
21459 'doc-afterword': {
21460 type: 'landmark',
21461 attributes: {
21462 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21463 },
21464 owned: null,
21465 nameFrom: [ 'author' ],
21466 context: null,
21467 unsupported: false,
21468 allowedElements: [ 'section' ]
21469 },
21470 'doc-appendix': {
21471 type: 'landmark',
21472 attributes: {
21473 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21474 },
21475 owned: null,
21476 nameFrom: [ 'author' ],
21477 context: null,
21478 unsupported: false,
21479 allowedElements: [ 'section' ]
21480 },
21481 'doc-backlink': {
21482 type: 'link',
21483 attributes: {
21484 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21485 },
21486 owned: null,
21487 nameFrom: [ 'author', 'contents' ],
21488 context: null,
21489 unsupported: false,
21490 allowedElements: [ {
21491 nodeName: 'a',
21492 attributes: {
21493 href: isNotNull
21494 }
21495 } ]
21496 },
21497 'doc-biblioentry': {
21498 type: 'listitem',
21499 attributes: {
21500 allowed: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
21501 },
21502 owned: null,
21503 nameFrom: [ 'author' ],
21504 context: [ 'doc-bibliography' ],
21505 unsupported: false,
21506 allowedElements: [ 'li' ]
21507 },
21508 'doc-bibliography': {
21509 type: 'landmark',
21510 attributes: {
21511 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21512 },
21513 owned: {
21514 one: [ 'doc-biblioentry' ]
21515 },
21516 nameFrom: [ 'author' ],
21517 context: null,
21518 unsupported: false,
21519 allowedElements: [ 'section' ]
21520 },
21521 'doc-biblioref': {
21522 type: 'link',
21523 attributes: {
21524 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21525 },
21526 owned: null,
21527 nameFrom: [ 'author', 'contents' ],
21528 context: null,
21529 unsupported: false,
21530 allowedElements: [ {
21531 nodeName: 'a',
21532 attributes: {
21533 href: isNotNull
21534 }
21535 } ]
21536 },
21537 'doc-chapter': {
21538 type: 'landmark',
21539 attributes: {
21540 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21541 },
21542 owned: null,
21543 namefrom: [ 'author' ],
21544 context: null,
21545 unsupported: false,
21546 allowedElements: [ 'section' ]
21547 },
21548 'doc-colophon': {
21549 type: 'section',
21550 attributes: {
21551 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21552 },
21553 owned: null,
21554 namefrom: [ 'author' ],
21555 context: null,
21556 unsupported: false,
21557 allowedElements: [ 'section' ]
21558 },
21559 'doc-conclusion': {
21560 type: 'landmark',
21561 attributes: {
21562 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21563 },
21564 owned: null,
21565 namefrom: [ 'author' ],
21566 context: null,
21567 unsupported: false,
21568 allowedElements: [ 'section' ]
21569 },
21570 'doc-cover': {
21571 type: 'img',
21572 attributes: {
21573 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21574 },
21575 owned: null,
21576 namefrom: [ 'author' ],
21577 context: null,
21578 unsupported: false
21579 },
21580 'doc-credit': {
21581 type: 'section',
21582 attributes: {
21583 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21584 },
21585 owned: null,
21586 namefrom: [ 'author' ],
21587 context: null,
21588 unsupported: false,
21589 allowedElements: [ 'section' ]
21590 },
21591 'doc-credits': {
21592 type: 'landmark',
21593 attributes: {
21594 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21595 },
21596 owned: null,
21597 namefrom: [ 'author' ],
21598 context: null,
21599 unsupported: false,
21600 allowedElements: [ 'section' ]
21601 },
21602 'doc-dedication': {
21603 type: 'section',
21604 attributes: {
21605 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21606 },
21607 owned: null,
21608 namefrom: [ 'author' ],
21609 context: null,
21610 unsupported: false,
21611 allowedElements: [ 'section' ]
21612 },
21613 'doc-endnote': {
21614 type: 'listitem',
21615 attributes: {
21616 allowed: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
21617 },
21618 owned: null,
21619 namefrom: [ 'author' ],
21620 context: [ 'doc-endnotes' ],
21621 unsupported: false,
21622 allowedElements: [ 'li' ]
21623 },
21624 'doc-endnotes': {
21625 type: 'landmark',
21626 attributes: {
21627 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21628 },
21629 owned: {
21630 one: [ 'doc-endnote' ]
21631 },
21632 namefrom: [ 'author' ],
21633 context: null,
21634 unsupported: false,
21635 allowedElements: [ 'section' ]
21636 },
21637 'doc-epigraph': {
21638 type: 'section',
21639 attributes: {
21640 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21641 },
21642 owned: null,
21643 namefrom: [ 'author' ],
21644 context: null,
21645 unsupported: false
21646 },
21647 'doc-epilogue': {
21648 type: 'landmark',
21649 attributes: {
21650 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21651 },
21652 owned: null,
21653 namefrom: [ 'author' ],
21654 context: null,
21655 unsupported: false,
21656 allowedElements: [ 'section' ]
21657 },
21658 'doc-errata': {
21659 type: 'landmark',
21660 attributes: {
21661 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21662 },
21663 owned: null,
21664 namefrom: [ 'author' ],
21665 context: null,
21666 unsupported: false,
21667 allowedElements: [ 'section' ]
21668 },
21669 'doc-example': {
21670 type: 'section',
21671 attributes: {
21672 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21673 },
21674 owned: null,
21675 namefrom: [ 'author' ],
21676 context: null,
21677 unsupported: false,
21678 allowedElements: [ 'aside', 'section' ]
21679 },
21680 'doc-footnote': {
21681 type: 'section',
21682 attributes: {
21683 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21684 },
21685 owned: null,
21686 namefrom: [ 'author' ],
21687 context: null,
21688 unsupported: false,
21689 allowedElements: [ 'aside', 'footer', 'header' ]
21690 },
21691 'doc-foreword': {
21692 type: 'landmark',
21693 attributes: {
21694 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21695 },
21696 owned: null,
21697 namefrom: [ 'author' ],
21698 context: null,
21699 unsupported: false,
21700 allowedElements: [ 'section' ]
21701 },
21702 'doc-glossary': {
21703 type: 'landmark',
21704 attributes: {
21705 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21706 },
21707 owned: [ 'term', 'definition' ],
21708 namefrom: [ 'author' ],
21709 context: null,
21710 unsupported: false,
21711 allowedElements: [ 'dl' ]
21712 },
21713 'doc-glossref': {
21714 type: 'link',
21715 attributes: {
21716 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21717 },
21718 owned: null,
21719 namefrom: [ 'author', 'contents' ],
21720 context: null,
21721 unsupported: false,
21722 allowedElements: [ {
21723 nodeName: 'a',
21724 attributes: {
21725 href: isNotNull
21726 }
21727 } ]
21728 },
21729 'doc-index': {
21730 type: 'navigation',
21731 attributes: {
21732 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21733 },
21734 owned: null,
21735 namefrom: [ 'author' ],
21736 context: null,
21737 unsupported: false,
21738 allowedElements: [ 'nav', 'section' ]
21739 },
21740 'doc-introduction': {
21741 type: 'landmark',
21742 attributes: {
21743 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21744 },
21745 owned: null,
21746 namefrom: [ 'author' ],
21747 context: null,
21748 unsupported: false,
21749 allowedElements: [ 'section' ]
21750 },
21751 'doc-noteref': {
21752 type: 'link',
21753 attributes: {
21754 allowed: [ 'aria-expanded' ]
21755 },
21756 owned: null,
21757 namefrom: [ 'author', 'contents' ],
21758 context: null,
21759 unsupported: false,
21760 allowedElements: [ {
21761 nodeName: 'a',
21762 attributes: {
21763 href: isNotNull
21764 }
21765 } ]
21766 },
21767 'doc-notice': {
21768 type: 'note',
21769 attributes: {
21770 allowed: [ 'aria-expanded' ]
21771 },
21772 owned: null,
21773 namefrom: [ 'author' ],
21774 context: null,
21775 unsupported: false,
21776 allowedElements: [ 'section' ]
21777 },
21778 'doc-pagebreak': {
21779 type: 'separator',
21780 attributes: {
21781 allowed: [ 'aria-expanded' ]
21782 },
21783 owned: null,
21784 namefrom: [ 'author' ],
21785 context: null,
21786 unsupported: false,
21787 allowedElements: [ 'hr' ]
21788 },
21789 'doc-pagelist': {
21790 type: 'navigation',
21791 attributes: {
21792 allowed: [ 'aria-expanded' ]
21793 },
21794 owned: null,
21795 namefrom: [ 'author' ],
21796 context: null,
21797 unsupported: false,
21798 allowedElements: [ 'nav', 'section' ]
21799 },
21800 'doc-part': {
21801 type: 'landmark',
21802 attributes: {
21803 allowed: [ 'aria-expanded' ]
21804 },
21805 owned: null,
21806 namefrom: [ 'author' ],
21807 context: null,
21808 unsupported: false,
21809 allowedElements: [ 'section' ]
21810 },
21811 'doc-preface': {
21812 type: 'landmark',
21813 attributes: {
21814 allowed: [ 'aria-expanded' ]
21815 },
21816 owned: null,
21817 namefrom: [ 'author' ],
21818 context: null,
21819 unsupported: false,
21820 allowedElements: [ 'section' ]
21821 },
21822 'doc-prologue': {
21823 type: 'landmark',
21824 attributes: {
21825 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21826 },
21827 owned: null,
21828 namefrom: [ 'author' ],
21829 context: null,
21830 unsupported: false,
21831 allowedElements: [ 'section' ]
21832 },
21833 'doc-pullquote': {
21834 type: 'none',
21835 attributes: {
21836 allowed: [ 'aria-expanded' ]
21837 },
21838 owned: null,
21839 namefrom: [ 'author' ],
21840 context: null,
21841 unsupported: false,
21842 allowedElements: [ 'aside', 'section' ]
21843 },
21844 'doc-qna': {
21845 type: 'section',
21846 attributes: {
21847 allowed: [ 'aria-expanded' ]
21848 },
21849 owned: null,
21850 namefrom: [ 'author' ],
21851 context: null,
21852 unsupported: false,
21853 allowedElements: [ 'section' ]
21854 },
21855 'doc-subtitle': {
21856 type: 'sectionhead',
21857 attributes: {
21858 allowed: [ 'aria-expanded' ]
21859 },
21860 owned: null,
21861 namefrom: [ 'author' ],
21862 context: null,
21863 unsupported: false,
21864 allowedElements: {
21865 nodeName: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ]
21866 }
21867 },
21868 'doc-tip': {
21869 type: 'note',
21870 attributes: {
21871 allowed: [ 'aria-expanded' ]
21872 },
21873 owned: null,
21874 namefrom: [ 'author' ],
21875 context: null,
21876 unsupported: false,
21877 allowedElements: [ 'aside' ]
21878 },
21879 'doc-toc': {
21880 type: 'navigation',
21881 attributes: {
21882 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21883 },
21884 owned: null,
21885 namefrom: [ 'author' ],
21886 context: null,
21887 unsupported: false,
21888 allowedElements: [ 'nav', 'section' ]
21889 },
21890 feed: {
21891 type: 'structure',
21892 attributes: {
21893 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21894 },
21895 owned: {
21896 one: [ 'article' ]
21897 },
21898 nameFrom: [ 'author' ],
21899 context: null,
21900 unsupported: false,
21901 allowedElements: [ 'article', 'aside', 'section' ]
21902 },
21903 figure: {
21904 type: 'structure',
21905 attributes: {
21906 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21907 },
21908 owned: null,
21909 nameFrom: [ 'author', 'contents' ],
21910 context: null,
21911 implicit: [ 'figure' ],
21912 unsupported: false
21913 },
21914 form: {
21915 type: 'landmark',
21916 attributes: {
21917 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21918 },
21919 owned: null,
21920 nameFrom: [ 'author' ],
21921 context: null,
21922 implicit: [ 'form' ],
21923 unsupported: false
21924 },
21925 grid: {
21926 type: 'composite',
21927 attributes: {
21928 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-colcount', 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-rowcount', 'aria-errormessage' ]
21929 },
21930 owned: {
21931 one: [ 'rowgroup', 'row' ]
21932 },
21933 nameFrom: [ 'author' ],
21934 context: null,
21935 implicit: [ 'table' ],
21936 unsupported: false
21937 },
21938 gridcell: {
21939 type: 'widget',
21940 attributes: {
21941 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-selected', 'aria-readonly', 'aria-required', 'aria-errormessage' ]
21942 },
21943 owned: null,
21944 nameFrom: [ 'author', 'contents' ],
21945 context: [ 'row' ],
21946 implicit: [ 'td', 'th' ],
21947 unsupported: false
21948 },
21949 group: {
21950 type: 'structure',
21951 attributes: {
21952 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-errormessage' ]
21953 },
21954 owned: null,
21955 nameFrom: [ 'author' ],
21956 context: null,
21957 implicit: [ 'details', 'optgroup' ],
21958 unsupported: false,
21959 allowedElements: [ 'dl', 'figcaption', 'fieldset', 'figure', 'footer', 'header', 'ol', 'ul' ]
21960 },
21961 heading: {
21962 type: 'structure',
21963 attributes: {
21964 required: [ 'aria-level' ],
21965 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21966 },
21967 owned: null,
21968 nameFrom: [ 'author', 'contents' ],
21969 context: null,
21970 implicit: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ],
21971 unsupported: false
21972 },
21973 img: {
21974 type: 'structure',
21975 attributes: {
21976 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21977 },
21978 owned: null,
21979 nameFrom: [ 'author' ],
21980 context: null,
21981 implicit: [ 'img' ],
21982 unsupported: false,
21983 allowedElements: [ 'embed', 'iframe', 'object', 'svg' ]
21984 },
21985 input: {
21986 nameFrom: [ 'author' ],
21987 type: 'abstract',
21988 unsupported: false
21989 },
21990 landmark: {
21991 nameFrom: [ 'author' ],
21992 type: 'abstract',
21993 unsupported: false
21994 },
21995 link: {
21996 type: 'widget',
21997 attributes: {
21998 allowed: [ 'aria-expanded', 'aria-errormessage' ]
21999 },
22000 owned: null,
22001 nameFrom: [ 'author', 'contents' ],
22002 context: null,
22003 implicit: [ 'a[href]', 'area[href]' ],
22004 unsupported: false,
22005 allowedElements: [ 'button', {
22006 nodeName: 'input',
22007 properties: {
22008 type: [ 'image', 'button' ]
22009 }
22010 } ]
22011 },
22012 list: {
22013 type: 'structure',
22014 attributes: {
22015 allowed: [ 'aria-expanded', 'aria-errormessage' ]
22016 },
22017 owned: {
22018 all: [ 'listitem' ]
22019 },
22020 nameFrom: [ 'author' ],
22021 context: null,
22022 implicit: [ 'ol', 'ul', 'dl' ],
22023 unsupported: false
22024 },
22025 listbox: {
22026 type: 'composite',
22027 attributes: {
22028 allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
22029 },
22030 owned: {
22031 all: [ 'option' ]
22032 },
22033 nameFrom: [ 'author' ],
22034 context: null,
22035 implicit: [ 'select' ],
22036 unsupported: false,
22037 allowedElements: [ 'ol', 'ul' ]
22038 },
22039 listitem: {
22040 type: 'structure',
22041 attributes: {
22042 allowed: [ 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-errormessage' ]
22043 },
22044 owned: null,
22045 nameFrom: [ 'author', 'contents' ],
22046 context: [ 'list' ],
22047 implicit: [ 'li', 'dt' ],
22048 unsupported: false
22049 },
22050 log: {
22051 type: 'widget',
22052 attributes: {
22053 allowed: [ 'aria-expanded', 'aria-errormessage' ]
22054 },
22055 owned: null,
22056 nameFrom: [ 'author' ],
22057 context: null,
22058 unsupported: false,
22059 allowedElements: [ 'section' ]
22060 },
22061 main: {
22062 type: 'landmark',
22063 attributes: {
22064 allowed: [ 'aria-expanded', 'aria-errormessage' ]
22065 },
22066 owned: null,
22067 nameFrom: [ 'author' ],
22068 context: null,
22069 implicit: [ 'main' ],
22070 unsupported: false,
22071 allowedElements: [ 'article', 'section' ]
22072 },
22073 marquee: {
22074 type: 'widget',
22075 attributes: {
22076 allowed: [ 'aria-expanded', 'aria-errormessage' ]
22077 },
22078 owned: null,
22079 nameFrom: [ 'author' ],
22080 context: null,
22081 unsupported: false,
22082 allowedElements: [ 'section' ]
22083 },
22084 math: {
22085 type: 'structure',
22086 attributes: {
22087 allowed: [ 'aria-expanded', 'aria-errormessage' ]
22088 },
22089 owned: null,
22090 nameFrom: [ 'author' ],
22091 context: null,
22092 implicit: [ 'math' ],
22093 unsupported: false
22094 },
22095 menu: {
22096 type: 'composite',
22097 attributes: {
22098 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
22099 },
22100 owned: {
22101 one: [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ]
22102 },
22103 nameFrom: [ 'author' ],
22104 context: null,
22105 implicit: [ 'menu[type="context"]' ],
22106 unsupported: false,
22107 allowedElements: [ 'ol', 'ul' ]
22108 },
22109 menubar: {
22110 type: 'composite',
22111 attributes: {
22112 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
22113 },
22114 owned: {
22115 one: [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ]
22116 },
22117 nameFrom: [ 'author' ],
22118 context: null,
22119 unsupported: false,
22120 allowedElements: [ 'ol', 'ul' ]
22121 },
22122 menuitem: {
22123 type: 'widget',
22124 attributes: {
22125 allowed: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-errormessage' ]
22126 },
22127 owned: null,
22128 nameFrom: [ 'author', 'contents' ],
22129 context: [ 'menu', 'menubar' ],
22130 implicit: [ 'menuitem[type="command"]' ],
22131 unsupported: false,
22132 allowedElements: [ 'button', 'li', {
22133 nodeName: 'iput',
22134 properties: {
22135 type: [ 'image', 'button' ]
22136 }
22137 }, {
22138 nodeName: 'a',
22139 attributes: {
22140 href: isNotNull
22141 }
22142 } ]
22143 },
22144 menuitemcheckbox: {
22145 type: 'widget',
22146 attributes: {
22147 allowed: [ 'aria-checked', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
22148 },
22149 owned: null,
22150 nameFrom: [ 'author', 'contents' ],
22151 context: [ 'menu', 'menubar' ],
22152 implicit: [ 'menuitem[type="checkbox"]' ],
22153 unsupported: false,
22154 allowedElements: [ {
22155 nodeName: [ 'button', 'li' ]
22156 }, {
22157 nodeName: 'input',
22158 properties: {
22159 type: [ 'checkbox', 'image', 'button' ]
22160 }
22161 }, {
22162 nodeName: 'a',
22163 attributes: {
22164 href: isNotNull
22165 }
22166 } ]
22167 },
22168 menuitemradio: {
22169 type: 'widget',
22170 attributes: {
22171 allowed: [ 'aria-checked', 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
22172 },
22173 owned: null,
22174 nameFrom: [ 'author', 'contents' ],
22175 context: [ 'menu', 'menubar' ],
22176 implicit: [ 'menuitem[type="radio"]' ],
22177 unsupported: false,
22178 allowedElements: [ {
22179 nodeName: [ 'button', 'li' ]
22180 }, {
22181 nodeName: 'input',
22182 properties: {
22183 type: [ 'image', 'button', 'radio' ]
22184 }
22185 }, {
22186 nodeName: 'a',
22187 attributes: {
22188 href: isNotNull
22189 }
22190 } ]
22191 },
22192 navigation: {
22193 type: 'landmark',
22194 attributes: {
22195 allowed: [ 'aria-expanded', 'aria-errormessage' ]
22196 },
22197 owned: null,
22198 nameFrom: [ 'author' ],
22199 context: null,
22200 implicit: [ 'nav' ],
22201 unsupported: false,
22202 allowedElements: [ 'section' ]
22203 },
22204 none: {
22205 type: 'structure',
22206 attributes: null,
22207 owned: null,
22208 nameFrom: [ 'author' ],
22209 context: null,
22210 unsupported: false,
22211 allowedElements: [ {
22212 nodeName: [ 'article', 'aside', 'dl', 'embed', 'figcaption', 'fieldset', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'iframe', 'li', 'ol', 'section', 'ul' ]
22213 }, {
22214 nodeName: 'img',
22215 attributes: {
22216 alt: isNotNull
22217 }
22218 } ]
22219 },
22220 note: {
22221 type: 'structure',
22222 attributes: {
22223 allowed: [ 'aria-expanded', 'aria-errormessage' ]
22224 },
22225 owned: null,
22226 nameFrom: [ 'author' ],
22227 context: null,
22228 unsupported: false,
22229 allowedElements: [ 'aside' ]
22230 },
22231 option: {
22232 type: 'widget',
22233 attributes: {
22234 allowed: [ 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-checked', 'aria-errormessage' ]
22235 },
22236 owned: null,
22237 nameFrom: [ 'author', 'contents' ],
22238 context: [ 'listbox' ],
22239 implicit: [ 'option' ],
22240 unsupported: false,
22241 allowedElements: [ {
22242 nodeName: [ 'button', 'li' ]
22243 }, {
22244 nodeName: 'input',
22245 properties: {
22246 type: [ 'checkbox', 'button' ]
22247 }
22248 }, {
22249 nodeName: 'a',
22250 attributes: {
22251 href: isNotNull
22252 }
22253 } ]
22254 },
22255 presentation: {
22256 type: 'structure',
22257 attributes: null,
22258 owned: null,
22259 nameFrom: [ 'author' ],
22260 context: null,
22261 unsupported: false,
22262 allowedElements: [ {
22263 nodeName: [ 'article', 'aside', 'dl', 'embed', 'figcaption', 'fieldset', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'iframe', 'li', 'ol', 'section', 'ul' ]
22264 }, {
22265 nodeName: 'img',
22266 attributes: {
22267 alt: isNotNull
22268 }
22269 } ]
22270 },
22271 progressbar: {
22272 type: 'widget',
22273 attributes: {
22274 allowed: [ 'aria-valuetext', 'aria-valuenow', 'aria-valuemax', 'aria-valuemin', 'aria-expanded', 'aria-errormessage' ]
22275 },
22276 owned: null,
22277 nameFrom: [ 'author' ],
22278 context: null,
22279 implicit: [ 'progress' ],
22280 unsupported: false
22281 },
22282 radio: {
22283 type: 'widget',
22284 attributes: {
22285 allowed: [ 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-required', 'aria-errormessage', 'aria-checked' ]
22286 },
22287 owned: null,
22288 nameFrom: [ 'author', 'contents' ],
22289 context: null,
22290 implicit: [ 'input[type="radio"]' ],
22291 unsupported: false,
22292 allowedElements: [ {
22293 nodeName: [ 'button', 'li' ]
22294 }, {
22295 nodeName: 'input',
22296 properties: {
22297 type: [ 'image', 'button' ]
22298 }
22299 } ]
22300 },
22301 radiogroup: {
22302 type: 'composite',
22303 attributes: {
22304 allowed: [ 'aria-activedescendant', 'aria-required', 'aria-expanded', 'aria-readonly', 'aria-errormessage', 'aria-orientation' ]
22305 },
22306 owned: {
22307 all: [ 'radio' ]
22308 },
22309 nameFrom: [ 'author' ],
22310 context: null,
22311 unsupported: false,
22312 allowedElements: {
22313 nodeName: [ 'ol', 'ul', 'fieldset' ]
22314 }
22315 },
22316 range: {
22317 nameFrom: [ 'author' ],
22318 type: 'abstract',
22319 unsupported: false
22320 },
22321 region: {
22322 type: 'landmark',
22323 attributes: {
22324 allowed: [ 'aria-expanded', 'aria-errormessage' ]
22325 },
22326 owned: null,
22327 nameFrom: [ 'author' ],
22328 context: null,
22329 implicit: [ 'section[aria-label]', 'section[aria-labelledby]', 'section[title]' ],
22330 unsupported: false,
22331 allowedElements: {
22332 nodeName: [ 'article', 'aside' ]
22333 }
22334 },
22335 roletype: {
22336 type: 'abstract',
22337 unsupported: false
22338 },
22339 row: {
22340 type: 'structure',
22341 attributes: {
22342 allowed: [ 'aria-activedescendant', 'aria-colindex', 'aria-expanded', 'aria-level', 'aria-selected', 'aria-rowindex', 'aria-errormessage' ]
22343 },
22344 owned: {
22345 one: [ 'cell', 'columnheader', 'rowheader', 'gridcell' ]
22346 },
22347 nameFrom: [ 'author', 'contents' ],
22348 context: [ 'rowgroup', 'grid', 'treegrid', 'table' ],
22349 implicit: [ 'tr' ],
22350 unsupported: false
22351 },
22352 rowgroup: {
22353 type: 'structure',
22354 attributes: {
22355 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-errormessage' ]
22356 },
22357 owned: {
22358 all: [ 'row' ]
22359 },
22360 nameFrom: [ 'author', 'contents' ],
22361 context: [ 'grid', 'table', 'treegrid' ],
22362 implicit: [ 'tbody', 'thead', 'tfoot' ],
22363 unsupported: false
22364 },
22365 rowheader: {
22366 type: 'structure',
22367 attributes: {
22368 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort', 'aria-errormessage' ]
22369 },
22370 owned: null,
22371 nameFrom: [ 'author', 'contents' ],
22372 context: [ 'row' ],
22373 implicit: [ 'th' ],
22374 unsupported: false
22375 },
22376 scrollbar: {
22377 type: 'widget',
22378 attributes: {
22379 required: [ 'aria-controls', 'aria-valuenow' ],
22380 allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ]
22381 },
22382 owned: null,
22383 nameFrom: [ 'author' ],
22384 context: null,
22385 unsupported: false
22386 },
22387 search: {
22388 type: 'landmark',
22389 attributes: {
22390 allowed: [ 'aria-expanded', 'aria-errormessage' ]
22391 },
22392 owned: null,
22393 nameFrom: [ 'author' ],
22394 context: null,
22395 unsupported: false,
22396 allowedElements: {
22397 nodeName: [ 'aside', 'form', 'section' ]
22398 }
22399 },
22400 searchbox: {
22401 type: 'widget',
22402 attributes: {
22403 allowed: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required', 'aria-placeholder', 'aria-errormessage' ]
22404 },
22405 owned: null,
22406 nameFrom: [ 'author' ],
22407 context: null,
22408 implicit: [ 'input[type="search"]' ],
22409 unsupported: false,
22410 allowedElements: {
22411 nodeName: 'input',
22412 properties: {
22413 type: 'text'
22414 }
22415 }
22416 },
22417 section: {
22418 nameFrom: [ 'author', 'contents' ],
22419 type: 'abstract',
22420 unsupported: false
22421 },
22422 sectionhead: {
22423 nameFrom: [ 'author', 'contents' ],
22424 type: 'abstract',
22425 unsupported: false
22426 },
22427 select: {
22428 nameFrom: [ 'author' ],
22429 type: 'abstract',
22430 unsupported: false
22431 },
22432 separator: {
22433 type: 'structure',
22434 attributes: {
22435 allowed: [ 'aria-expanded', 'aria-orientation', 'aria-valuenow', 'aria-valuemax', 'aria-valuemin', 'aria-valuetext', 'aria-errormessage' ]
22436 },
22437 owned: null,
22438 nameFrom: [ 'author' ],
22439 context: null,
22440 implicit: [ 'hr' ],
22441 unsupported: false,
22442 allowedElements: [ 'li' ]
22443 },
22444 slider: {
22445 type: 'widget',
22446 attributes: {
22447 allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-readonly', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ],
22448 required: [ 'aria-valuenow' ]
22449 },
22450 owned: null,
22451 nameFrom: [ 'author' ],
22452 context: null,
22453 implicit: [ 'input[type="range"]' ],
22454 unsupported: false
22455 },
22456 spinbutton: {
22457 type: 'widget',
22458 attributes: {
22459 allowed: [ 'aria-valuetext', 'aria-required', 'aria-readonly', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ],
22460 required: [ 'aria-valuenow' ]
22461 },
22462 owned: null,
22463 nameFrom: [ 'author' ],
22464 context: null,
22465 implicit: [ 'input[type="number"]' ],
22466 unsupported: false,
22467 allowedElements: {
22468 nodeName: 'input',
22469 properties: {
22470 type: [ 'text', 'tel' ]
22471 }
22472 }
22473 },
22474 status: {
22475 type: 'widget',
22476 attributes: {
22477 allowed: [ 'aria-expanded', 'aria-errormessage' ]
22478 },
22479 owned: null,
22480 nameFrom: [ 'author' ],
22481 context: null,
22482 implicit: [ 'output' ],
22483 unsupported: false,
22484 allowedElements: [ 'section' ]
22485 },
22486 structure: {
22487 type: 'abstract',
22488 unsupported: false
22489 },
22490 switch: {
22491 type: 'widget',
22492 attributes: {
22493 allowed: [ 'aria-errormessage' ],
22494 required: [ 'aria-checked' ]
22495 },
22496 owned: null,
22497 nameFrom: [ 'author', 'contents' ],
22498 context: null,
22499 unsupported: false,
22500 allowedElements: [ 'button', {
22501 nodeName: 'input',
22502 properties: {
22503 type: [ 'checkbox', 'image', 'button' ]
22504 }
22505 }, {
22506 nodeName: 'a',
22507 attributes: {
22508 href: isNotNull
22509 }
22510 } ]
22511 },
22512 tab: {
22513 type: 'widget',
22514 attributes: {
22515 allowed: [ 'aria-selected', 'aria-expanded', 'aria-setsize', 'aria-posinset', 'aria-errormessage' ]
22516 },
22517 owned: null,
22518 nameFrom: [ 'author', 'contents' ],
22519 context: [ 'tablist' ],
22520 unsupported: false,
22521 allowedElements: [ {
22522 nodeName: [ 'button', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'li' ]
22523 }, {
22524 nodeName: 'input',
22525 properties: {
22526 type: 'button'
22527 }
22528 }, {
22529 nodeName: 'a',
22530 attributes: {
22531 href: isNotNull
22532 }
22533 } ]
22534 },
22535 table: {
22536 type: 'structure',
22537 attributes: {
22538 allowed: [ 'aria-colcount', 'aria-rowcount', 'aria-errormessage' ]
22539 },
22540 owned: {
22541 one: [ 'rowgroup', 'row' ]
22542 },
22543 nameFrom: [ 'author', 'contents' ],
22544 context: null,
22545 implicit: [ 'table' ],
22546 unsupported: false
22547 },
22548 tablist: {
22549 type: 'composite',
22550 attributes: {
22551 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-errormessage' ]
22552 },
22553 owned: {
22554 all: [ 'tab' ]
22555 },
22556 nameFrom: [ 'author' ],
22557 context: null,
22558 unsupported: false,
22559 allowedElements: [ 'ol', 'ul' ]
22560 },
22561 tabpanel: {
22562 type: 'widget',
22563 attributes: {
22564 allowed: [ 'aria-expanded', 'aria-errormessage' ]
22565 },
22566 owned: null,
22567 nameFrom: [ 'author' ],
22568 context: null,
22569 unsupported: false,
22570 allowedElements: [ 'section' ]
22571 },
22572 term: {
22573 type: 'structure',
22574 attributes: {
22575 allowed: [ 'aria-expanded', 'aria-errormessage' ]
22576 },
22577 owned: null,
22578 nameFrom: [ 'author', 'contents' ],
22579 context: null,
22580 implicit: [ 'dt' ],
22581 unsupported: false
22582 },
22583 textbox: {
22584 type: 'widget',
22585 attributes: {
22586 allowed: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required', 'aria-placeholder', 'aria-errormessage' ]
22587 },
22588 owned: null,
22589 nameFrom: [ 'author' ],
22590 context: null,
22591 implicit: [ 'input[type="text"]', 'input[type="email"]', 'input[type="password"]', 'input[type="tel"]', 'input[type="url"]', 'input:not([type])', 'textarea' ],
22592 unsupported: false
22593 },
22594 timer: {
22595 type: 'widget',
22596 attributes: {
22597 allowed: [ 'aria-expanded', 'aria-errormessage' ]
22598 },
22599 owned: null,
22600 nameFrom: [ 'author' ],
22601 context: null,
22602 unsupported: false
22603 },
22604 toolbar: {
22605 type: 'structure',
22606 attributes: {
22607 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
22608 },
22609 owned: null,
22610 nameFrom: [ 'author' ],
22611 context: null,
22612 implicit: [ 'menu[type="toolbar"]' ],
22613 unsupported: false,
22614 allowedElements: [ 'ol', 'ul' ]
22615 },
22616 tooltip: {
22617 type: 'structure',
22618 attributes: {
22619 allowed: [ 'aria-expanded', 'aria-errormessage' ]
22620 },
22621 owned: null,
22622 nameFrom: [ 'author', 'contents' ],
22623 context: null,
22624 unsupported: false
22625 },
22626 tree: {
22627 type: 'composite',
22628 attributes: {
22629 allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-required', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
22630 },
22631 owned: {
22632 all: [ 'treeitem' ]
22633 },
22634 nameFrom: [ 'author' ],
22635 context: null,
22636 unsupported: false,
22637 allowedElements: [ 'ol', 'ul' ]
22638 },
22639 treegrid: {
22640 type: 'composite',
22641 attributes: {
22642 allowed: [ 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-rowcount', 'aria-orientation', 'aria-errormessage' ]
22643 },
22644 owned: {
22645 one: [ 'rowgroup', 'row' ]
22646 },
22647 nameFrom: [ 'author' ],
22648 context: null,
22649 unsupported: false
22650 },
22651 treeitem: {
22652 type: 'widget',
22653 attributes: {
22654 allowed: [ 'aria-checked', 'aria-selected', 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
22655 },
22656 owned: null,
22657 nameFrom: [ 'author', 'contents' ],
22658 context: [ 'group', 'tree' ],
22659 unsupported: false,
22660 allowedElements: [ 'li', {
22661 nodeName: 'a',
22662 attributes: {
22663 href: isNotNull
22664 }
22665 } ]
22666 },
22667 widget: {
22668 type: 'abstract',
22669 unsupported: false
22670 },
22671 window: {
22672 nameFrom: [ 'author' ],
22673 type: 'abstract',
22674 unsupported: false
22675 }
22676 };
22677 lookupTable.implicitHtmlRole = implicit_html_roles_default;
22678 lookupTable.elementsAllowedNoRole = [ {
22679 nodeName: [ 'base', 'body', 'caption', 'col', 'colgroup', 'datalist', 'dd', 'details', 'dt', 'head', 'html', 'keygen', 'label', 'legend', 'main', 'map', 'math', 'meta', 'meter', 'noscript', 'optgroup', 'param', 'picture', 'progress', 'script', 'source', 'style', 'template', 'textarea', 'title', 'track' ]
22680 }, {
22681 nodeName: 'area',
22682 attributes: {
22683 href: isNotNull
22684 }
22685 }, {
22686 nodeName: 'input',
22687 properties: {
22688 type: [ 'color', 'data', 'datatime', 'file', 'hidden', 'month', 'number', 'password', 'range', 'reset', 'submit', 'time', 'week' ]
22689 }
22690 }, {
22691 nodeName: 'link',
22692 attributes: {
22693 href: isNotNull
22694 }
22695 }, {
22696 nodeName: 'menu',
22697 attributes: {
22698 type: 'context'
22699 }
22700 }, {
22701 nodeName: 'menuitem',
22702 attributes: {
22703 type: [ 'command', 'checkbox', 'radio' ]
22704 }
22705 }, {
22706 nodeName: 'select',
22707 condition: function condition(vNode) {
22708 if (!(vNode instanceof axe.AbstractVirtualNode)) {
22709 vNode = axe.utils.getNodeFromTree(vNode);
22710 }
22711 return Number(vNode.attr('size')) > 1;
22712 },
22713 properties: {
22714 multiple: true
22715 }
22716 }, {
22717 nodeName: [ 'clippath', 'cursor', 'defs', 'desc', 'feblend', 'fecolormatrix', 'fecomponenttransfer', 'fecomposite', 'feconvolvematrix', 'fediffuselighting', 'fedisplacementmap', 'fedistantlight', 'fedropshadow', 'feflood', 'fefunca', 'fefuncb', 'fefuncg', 'fefuncr', 'fegaussianblur', 'feimage', 'femerge', 'femergenode', 'femorphology', 'feoffset', 'fepointlight', 'fespecularlighting', 'fespotlight', 'fetile', 'feturbulence', 'filter', 'hatch', 'hatchpath', 'lineargradient', 'marker', 'mask', 'meshgradient', 'meshpatch', 'meshrow', 'metadata', 'mpath', 'pattern', 'radialgradient', 'solidcolor', 'stop', 'switch', 'view' ]
22718 } ];
22719 lookupTable.elementsAllowedAnyRole = [ {
22720 nodeName: 'a',
22721 attributes: {
22722 href: isNull
22723 }
22724 }, {
22725 nodeName: 'img',
22726 attributes: {
22727 alt: isNull
22728 }
22729 }, {
22730 nodeName: [ 'abbr', 'address', 'canvas', 'div', 'p', 'pre', 'blockquote', 'ins', 'del', 'output', 'span', 'table', 'tbody', 'thead', 'tfoot', 'td', 'em', 'strong', 'small', 's', 'cite', 'q', 'dfn', 'abbr', 'time', 'code', 'var', 'samp', 'kbd', 'sub', 'sup', 'i', 'b', 'u', 'mark', 'ruby', 'rt', 'rp', 'bdi', 'bdo', 'br', 'wbr', 'th', 'tr' ]
22731 } ];
22732 lookupTable.evaluateRoleForElement = {
22733 A: function A(_ref87) {
22734 var node = _ref87.node, out = _ref87.out;
22735 if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
22736 return true;
22737 }
22738 if (node.href.length) {
22739 return out;
22740 }
22741 return true;
22742 },
22743 AREA: function AREA(_ref88) {
22744 var node = _ref88.node;
22745 return !node.href;
22746 },
22747 BUTTON: function BUTTON(_ref89) {
22748 var node = _ref89.node, role = _ref89.role, out = _ref89.out;
22749 if (node.getAttribute('type') === 'menu') {
22750 return role === 'menuitem';
22751 }
22752 return out;
22753 },
22754 IMG: function IMG(_ref90) {
22755 var node = _ref90.node, role = _ref90.role, out = _ref90.out;
22756 switch (node.alt) {
22757 case null:
22758 return out;
22759
22760 case '':
22761 return role === 'presentation' || role === 'none';
22762
22763 default:
22764 return role !== 'presentation' && role !== 'none';
22765 }
22766 },
22767 INPUT: function INPUT(_ref91) {
22768 var node = _ref91.node, role = _ref91.role, out = _ref91.out;
22769 switch (node.type) {
22770 case 'button':
22771 case 'image':
22772 return out;
22773
22774 case 'checkbox':
22775 if (role === 'button' && node.hasAttribute('aria-pressed')) {
22776 return true;
22777 }
22778 return out;
22779
22780 case 'radio':
22781 return role === 'menuitemradio';
22782
22783 case 'text':
22784 return role === 'combobox' || role === 'searchbox' || role === 'spinbutton';
22785
22786 case 'tel':
22787 return role === 'combobox' || role === 'spinbutton';
22788
22789 case 'url':
22790 case 'search':
22791 case 'email':
22792 return role === 'combobox';
22793
22794 default:
22795 return false;
22796 }
22797 },
22798 LI: function LI(_ref92) {
22799 var node = _ref92.node, out = _ref92.out;
22800 var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
22801 if (hasImplicitListitemRole) {
22802 return out;
22803 }
22804 return true;
22805 },
22806 MENU: function MENU(_ref93) {
22807 var node = _ref93.node;
22808 if (node.getAttribute('type') === 'context') {
22809 return false;
22810 }
22811 return true;
22812 },
22813 OPTION: function OPTION(_ref94) {
22814 var node = _ref94.node;
22815 var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
22816 return !withinOptionList;
22817 },
22818 SELECT: function SELECT(_ref95) {
22819 var node = _ref95.node, role = _ref95.role;
22820 return !node.multiple && node.size <= 1 && role === 'menu';
22821 },
22822 SVG: function SVG(_ref96) {
22823 var node = _ref96.node, out = _ref96.out;
22824 if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
22825 return true;
22826 }
22827 return out;
22828 }
22829 };
22830 lookupTable.rolesOfType = {
22831 widget: [ 'button', 'checkbox', 'dialog', 'gridcell', 'link', 'log', 'marquee', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'radio', 'scrollbar', 'searchbox', 'slider', 'spinbutton', 'status', 'switch', 'tab', 'tabpanel', 'textbox', 'timer', 'tooltip', 'tree', 'treeitem' ]
22832 };
22833 var lookup_table_default = lookupTable;
22834 function implicitNodes(role) {
22835 var implicit = null;
22836 var roles = lookup_table_default.role[role];
22837 if (roles && roles.implicit) {
22838 implicit = clone2(roles.implicit);
22839 }
22840 return implicit;
22841 }
22842 var implicit_nodes_default = implicitNodes;
22843 function isAccessibleRef(node) {
22844 return !!get_accessible_refs_default(node).length;
22845 }
22846 var is_accessible_ref_default = isAccessibleRef;
22847 function _isComboboxPopup(virtualNode) {
22848 var _ref97 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, popupRoles = _ref97.popupRoles;
22849 var role = get_role_default(virtualNode);
22850 popupRoles !== null && popupRoles !== void 0 ? popupRoles : popupRoles = aria_attrs_default['aria-haspopup'].values;
22851 if (!popupRoles.includes(role)) {
22852 return false;
22853 }
22854 var vParent = nearestParentWithRole(virtualNode);
22855 if (isCombobox(vParent)) {
22856 return true;
22857 }
22858 var id = virtualNode.props.id;
22859 if (!id) {
22860 return false;
22861 }
22862 if (!virtualNode.actualNode) {
22863 throw new Error('Unable to determine combobox popup without an actualNode');
22864 }
22865 var root = get_root_node_default(virtualNode.actualNode);
22866 var ownedCombobox = root.querySelectorAll('[aria-owns~="'.concat(id, '"][role~="combobox"]:not(select),\n [aria-controls~="').concat(id, '"][role~="combobox"]:not(select)'));
22867 return Array.from(ownedCombobox).some(isCombobox);
22868 }
22869 var isCombobox = function isCombobox(node) {
22870 return node && get_role_default(node) === 'combobox';
22871 };
22872 function nearestParentWithRole(vNode) {
22873 while (vNode = vNode.parent) {
22874 if (get_role_default(vNode, {
22875 noPresentational: true
22876 }) !== null) {
22877 return vNode;
22878 }
22879 }
22880 return null;
22881 }
22882 function label2(node) {
22883 node = get_node_from_tree_default(node);
22884 return label_virtual_default(node);
22885 }
22886 var label_default2 = label2;
22887 function requiredAttr(role) {
22888 var roleDef = standards_default.ariaRoles[role];
22889 if (!roleDef || !Array.isArray(roleDef.requiredAttrs)) {
22890 return [];
22891 }
22892 return _toConsumableArray(roleDef.requiredAttrs);
22893 }
22894 var required_attr_default = requiredAttr;
22895 function requiredContext(role) {
22896 var roleDef = standards_default.ariaRoles[role];
22897 if (!roleDef || !Array.isArray(roleDef.requiredContext)) {
22898 return null;
22899 }
22900 return _toConsumableArray(roleDef.requiredContext);
22901 }
22902 var required_context_default = requiredContext;
22903 function requiredOwned(role) {
22904 var roleDef = standards_default.ariaRoles[role];
22905 if (!roleDef || !Array.isArray(roleDef.requiredOwned)) {
22906 return null;
22907 }
22908 return _toConsumableArray(roleDef.requiredOwned);
22909 }
22910 var required_owned_default = requiredOwned;
22911 function validateAttrValue(vNode, attr) {
22912 vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
22913 var matches4;
22914 var list;
22915 var value = vNode.attr(attr);
22916 var attrInfo = standards_default.ariaAttrs[attr];
22917 if (!attrInfo) {
22918 return true;
22919 }
22920 if (attrInfo.allowEmpty && (!value || value.trim() === '')) {
22921 return true;
22922 }
22923 switch (attrInfo.type) {
22924 case 'boolean':
22925 return [ 'true', 'false' ].includes(value.toLowerCase());
22926
22927 case 'nmtoken':
22928 return typeof value === 'string' && attrInfo.values.includes(value.toLowerCase());
22929
22930 case 'nmtokens':
22931 list = token_list_default(value);
22932 return list.reduce(function(result, token) {
22933 return result && attrInfo.values.includes(token);
22934 }, list.length !== 0);
22935
22936 case 'idref':
22937 try {
22938 var doc = get_root_node_default2(vNode.actualNode);
22939 return !!(value && doc.getElementById(value));
22940 } catch (_unused6) {
22941 throw new TypeError('Cannot resolve id references for partial DOM');
22942 }
22943
22944 case 'idrefs':
22945 return idrefs_default(vNode, attr).some(function(node) {
22946 return !!node;
22947 });
22948
22949 case 'string':
22950 return value.trim() !== '';
22951
22952 case 'decimal':
22953 matches4 = value.match(/^[-+]?([0-9]*)\.?([0-9]*)$/);
22954 return !!(matches4 && (matches4[1] || matches4[2]));
22955
22956 case 'int':
22957 var minValue = typeof attrInfo.minValue !== 'undefined' ? attrInfo.minValue : -Infinity;
22958 return /^[-+]?[0-9]+$/.test(value) && parseInt(value) >= minValue;
22959 }
22960 }
22961 var validate_attr_value_default = validateAttrValue;
22962 function validateAttr(att) {
22963 var attrDefinition = standards_default.ariaAttrs[att];
22964 return !!attrDefinition;
22965 }
22966 var validate_attr_default = validateAttr;
22967 function thHasDataCellsEvaluate(node) {
22968 var cells = get_all_cells_default(node);
22969 var checkResult = this;
22970 var reffedHeaders = [];
22971 cells.forEach(function(cell) {
22972 var headers2 = cell.getAttribute('headers');
22973 if (headers2) {
22974 reffedHeaders = reffedHeaders.concat(headers2.split(/\s+/));
22975 }
22976 var ariaLabel = cell.getAttribute('aria-labelledby');
22977 if (ariaLabel) {
22978 reffedHeaders = reffedHeaders.concat(ariaLabel.split(/\s+/));
22979 }
22980 });
22981 var headers = cells.filter(function(cell) {
22982 if (sanitize_default(cell.textContent) === '') {
22983 return false;
22984 }
22985 return cell.nodeName.toUpperCase() === 'TH' || [ 'rowheader', 'columnheader' ].indexOf(get_explicit_role_default(cell)) !== -1;
22986 });
22987 var tableGrid = to_grid_default(node);
22988 var out = true;
22989 headers.forEach(function(header) {
22990 if (header.getAttribute('id') && reffedHeaders.includes(header.getAttribute('id'))) {
22991 return;
22992 }
22993 var pos = get_cell_position_default(header, tableGrid);
22994 var hasCell = false;
22995 if (is_column_header_default(header)) {
22996 hasCell = traverse_default('down', pos, tableGrid).find(function(cell) {
22997 return !is_column_header_default(cell) && get_headers_default(cell, tableGrid).includes(header);
22998 });
22999 }
23000 if (!hasCell && is_row_header_default(header)) {
23001 hasCell = traverse_default('right', pos, tableGrid).find(function(cell) {
23002 return !is_row_header_default(cell) && get_headers_default(cell, tableGrid).includes(header);
23003 });
23004 }
23005 if (!hasCell) {
23006 checkResult.relatedNodes(header);
23007 }
23008 out = out && hasCell;
23009 });
23010 return out ? true : void 0;
23011 }
23012 var th_has_data_cells_evaluate_default = thHasDataCellsEvaluate;
23013 var messageKeys = [ 'cell-header-not-in-table', 'cell-header-not-th', 'header-refs-self', 'empty-hdrs' ];
23014 var notInTable = messageKeys[0], notTh = messageKeys[1], selfRef = messageKeys[2], emptyHdrs = messageKeys[3];
23015 function tdHeadersAttrEvaluate(node) {
23016 var cells = [];
23017 var cellRoleById = {};
23018 for (var rowIndex = 0; rowIndex < node.rows.length; rowIndex++) {
23019 var row = node.rows[rowIndex];
23020 for (var cellIndex = 0; cellIndex < row.cells.length; cellIndex++) {
23021 var cell = row.cells[cellIndex];
23022 cells.push(cell);
23023 var cellId = cell.getAttribute('id');
23024 if (cellId) {
23025 cellRoleById[cellId] = get_role_default(cell);
23026 }
23027 }
23028 }
23029 var badCells = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, selfRef, new Set()), notInTable, new Set()), notTh, new Set()), emptyHdrs, new Set());
23030 cells.forEach(function(cell) {
23031 if (!cell.hasAttribute('headers') || !_isVisibleToScreenReaders(cell)) {
23032 return;
23033 }
23034 var headersAttr = cell.getAttribute('headers').trim();
23035 if (!headersAttr) {
23036 badCells[emptyHdrs].add(cell);
23037 return;
23038 }
23039 var cellId = cell.getAttribute('id');
23040 var headers = token_list_default(headersAttr);
23041 headers.forEach(function(headerId) {
23042 if (cellId && headerId === cellId) {
23043 badCells[selfRef].add(cell);
23044 } else if (!cellRoleById[headerId]) {
23045 badCells[notInTable].add(cell);
23046 } else if (![ 'columnheader', 'rowheader' ].includes(cellRoleById[headerId])) {
23047 badCells[notTh].add(cell);
23048 }
23049 });
23050 });
23051 var _iterator15 = _createForOfIteratorHelper(messageKeys), _step15;
23052 try {
23053 for (_iterator15.s(); !(_step15 = _iterator15.n()).done; ) {
23054 var messageKey = _step15.value;
23055 if (badCells[messageKey].size > 0) {
23056 this.relatedNodes(_toConsumableArray(badCells[messageKey]));
23057 if (messageKey === emptyHdrs) {
23058 return void 0;
23059 }
23060 this.data({
23061 messageKey: messageKey
23062 });
23063 return false;
23064 }
23065 }
23066 } catch (err) {
23067 _iterator15.e(err);
23068 } finally {
23069 _iterator15.f();
23070 }
23071 return true;
23072 }
23073 function tdHasHeaderEvaluate(node) {
23074 var badCells = [];
23075 var cells = get_all_cells_default(node);
23076 var tableGrid = to_grid_default(node);
23077 cells.forEach(function(cell) {
23078 if (has_content_default(cell) && is_data_cell_default(cell) && !label_default2(cell)) {
23079 var hasHeaders = get_headers_default(cell, tableGrid).some(function(header) {
23080 return header !== null && !!has_content_default(header);
23081 });
23082 if (!hasHeaders) {
23083 badCells.push(cell);
23084 }
23085 }
23086 });
23087 if (badCells.length) {
23088 this.relatedNodes(badCells);
23089 return false;
23090 }
23091 return true;
23092 }
23093 var td_has_header_evaluate_default = tdHasHeaderEvaluate;
23094 function scopeValueEvaluate(node, options) {
23095 var value = node.getAttribute('scope').toLowerCase();
23096 return options.values.indexOf(value) !== -1;
23097 }
23098 var scope_value_evaluate_default = scopeValueEvaluate;
23099 var same_caption_summary_evaluate_default = sameCaptionSummaryEvaluate;
23100 function sameCaptionSummaryEvaluate(node, options, virtualNode) {
23101 if (virtualNode.children === void 0) {
23102 return void 0;
23103 }
23104 var summary = virtualNode.attr('summary');
23105 var captionNode = virtualNode.children.find(isCaptionNode);
23106 var caption = captionNode ? sanitize_default(subtree_text_default(captionNode)) : false;
23107 if (!caption || !summary) {
23108 return false;
23109 }
23110 return sanitize_default(summary).toLowerCase() === sanitize_default(caption).toLowerCase();
23111 }
23112 function isCaptionNode(virtualNode) {
23113 return virtualNode.props.nodeName === 'caption';
23114 }
23115 function html5ScopeEvaluate(node) {
23116 if (!is_html5_default(document)) {
23117 return true;
23118 }
23119 return node.nodeName.toUpperCase() === 'TH';
23120 }
23121 var html5_scope_evaluate_default = html5ScopeEvaluate;
23122 function captionFakedEvaluate(node) {
23123 var table = to_grid_default(node);
23124 var firstRow = table[0];
23125 if (table.length <= 1 || firstRow.length <= 1 || node.rows.length <= 1) {
23126 return true;
23127 }
23128 return firstRow.reduce(function(out, curr, i) {
23129 return out || curr !== firstRow[i + 1] && firstRow[i + 1] !== void 0;
23130 }, false);
23131 }
23132 var caption_faked_evaluate_default = captionFakedEvaluate;
23133 function svgNonEmptyTitleEvaluate(node, options, virtualNode) {
23134 if (!virtualNode.children) {
23135 return void 0;
23136 }
23137 var titleNode = virtualNode.children.find(function(_ref98) {
23138 var props = _ref98.props;
23139 return props.nodeName === 'title';
23140 });
23141 if (!titleNode) {
23142 this.data({
23143 messageKey: 'noTitle'
23144 });
23145 return false;
23146 }
23147 try {
23148 var titleText2 = subtree_text_default(titleNode, {
23149 includeHidden: true
23150 }).trim();
23151 if (titleText2 === '') {
23152 this.data({
23153 messageKey: 'emptyTitle'
23154 });
23155 return false;
23156 }
23157 } catch (_unused7) {
23158 return void 0;
23159 }
23160 return true;
23161 }
23162 var svg_non_empty_title_evaluate_default = svgNonEmptyTitleEvaluate;
23163 var standards_exports = {};
23164 __export(standards_exports, {
23165 getAriaRolesByType: function getAriaRolesByType() {
23166 return get_aria_roles_by_type_default;
23167 },
23168 getAriaRolesSupportingNameFromContent: function getAriaRolesSupportingNameFromContent() {
23169 return get_aria_roles_supporting_name_from_content_default;
23170 },
23171 getElementSpec: function getElementSpec() {
23172 return get_element_spec_default;
23173 },
23174 getElementsByContentType: function getElementsByContentType() {
23175 return get_elements_by_content_type_default;
23176 },
23177 getGlobalAriaAttrs: function getGlobalAriaAttrs() {
23178 return get_global_aria_attrs_default;
23179 },
23180 implicitHtmlRoles: function implicitHtmlRoles() {
23181 return implicit_html_roles_default;
23182 }
23183 });
23184 function presentationalRoleEvaluate(node, options, virtualNode) {
23185 var explicitRole2 = get_explicit_role_default(virtualNode);
23186 if ([ 'presentation', 'none' ].includes(explicitRole2) && [ 'iframe', 'frame' ].includes(virtualNode.props.nodeName) && virtualNode.hasAttr('title')) {
23187 this.data({
23188 messageKey: 'iframe',
23189 nodeName: virtualNode.props.nodeName
23190 });
23191 return false;
23192 }
23193 var role = get_role_default(virtualNode);
23194 if ([ 'presentation', 'none' ].includes(role)) {
23195 this.data({
23196 role: role
23197 });
23198 return true;
23199 }
23200 if (![ 'presentation', 'none' ].includes(explicitRole2)) {
23201 return false;
23202 }
23203 var hasGlobalAria = get_global_aria_attrs_default().some(function(attr) {
23204 return virtualNode.hasAttr(attr);
23205 });
23206 var focusable = _isFocusable(virtualNode);
23207 var messageKey;
23208 if (hasGlobalAria && !focusable) {
23209 messageKey = 'globalAria';
23210 } else if (!hasGlobalAria && focusable) {
23211 messageKey = 'focusable';
23212 } else {
23213 messageKey = 'both';
23214 }
23215 this.data({
23216 messageKey: messageKey,
23217 role: role
23218 });
23219 return false;
23220 }
23221 function nonEmptyIfPresentEvaluate(node, options, virtualNode) {
23222 var nodeName2 = virtualNode.props.nodeName;
23223 var type2 = (virtualNode.attr('type') || '').toLowerCase();
23224 var label3 = virtualNode.attr('value');
23225 if (label3) {
23226 this.data({
23227 messageKey: 'has-label'
23228 });
23229 }
23230 if (nodeName2 === 'input' && [ 'submit', 'reset' ].includes(type2)) {
23231 return label3 === null;
23232 }
23233 return false;
23234 }
23235 var non_empty_if_present_evaluate_default = nonEmptyIfPresentEvaluate;
23236 function isOnScreenEvaluate(node) {
23237 return _isVisibleOnScreen(node);
23238 }
23239 var is_on_screen_evaluate_default = isOnScreenEvaluate;
23240 function inlineStyleProperty(node, options) {
23241 var cssProperty = options.cssProperty, absoluteValues = options.absoluteValues, minValue = options.minValue, maxValue = options.maxValue, _options$normalValue = options.normalValue, normalValue = _options$normalValue === void 0 ? 0 : _options$normalValue, noImportant = options.noImportant, multiLineOnly = options.multiLineOnly;
23242 if (!noImportant && node.style.getPropertyPriority(cssProperty) !== 'important' || multiLineOnly && !_isMultiline(node)) {
23243 return true;
23244 }
23245 var data = {};
23246 if (typeof minValue === 'number') {
23247 data.minValue = minValue;
23248 }
23249 if (typeof maxValue === 'number') {
23250 data.maxValue = maxValue;
23251 }
23252 var declaredPropValue = node.style.getPropertyValue(cssProperty);
23253 if ([ 'inherit', 'unset', 'revert', 'revert-layer' ].includes(declaredPropValue)) {
23254 this.data(_extends({
23255 value: declaredPropValue
23256 }, data));
23257 return true;
23258 }
23259 var value = getNumberValue(node, {
23260 absoluteValues: absoluteValues,
23261 cssProperty: cssProperty,
23262 normalValue: normalValue
23263 });
23264 this.data(_extends({
23265 value: value
23266 }, data));
23267 if (typeof value !== 'number') {
23268 return void 0;
23269 }
23270 if ((typeof minValue !== 'number' || value >= minValue) && (typeof maxValue !== 'number' || value <= maxValue)) {
23271 return true;
23272 }
23273 return false;
23274 }
23275 function getNumberValue(domNode, _ref99) {
23276 var cssProperty = _ref99.cssProperty, absoluteValues = _ref99.absoluteValues, normalValue = _ref99.normalValue;
23277 var computedStyle = window.getComputedStyle(domNode);
23278 var cssPropValue = computedStyle.getPropertyValue(cssProperty);
23279 if (cssPropValue === 'normal') {
23280 return normalValue;
23281 }
23282 var parsedValue = parseFloat(cssPropValue);
23283 if (absoluteValues) {
23284 return parsedValue;
23285 }
23286 var fontSize = parseFloat(computedStyle.getPropertyValue('font-size'));
23287 var value = Math.round(parsedValue / fontSize * 100) / 100;
23288 if (isNaN(value)) {
23289 return cssPropValue;
23290 }
23291 return value;
23292 }
23293 function hasAltEvaluate(node, options, virtualNode) {
23294 var nodeName2 = virtualNode.props.nodeName;
23295 if (![ 'img', 'input', 'area' ].includes(nodeName2)) {
23296 return false;
23297 }
23298 return virtualNode.hasAttr('alt');
23299 }
23300 var has_alt_evaluate_default = hasAltEvaluate;
23301 function existsEvaluate() {
23302 return void 0;
23303 }
23304 var exists_evaluate_default = existsEvaluate;
23305 function docHasTitleEvaluate() {
23306 var title = document.title;
23307 return !!sanitize_default(title);
23308 }
23309 var doc_has_title_evaluate_default = docHasTitleEvaluate;
23310 function avoidInlineSpacingEvaluate(node, options) {
23311 var overriddenProperties = options.cssProperties.filter(function(property) {
23312 if (node.style.getPropertyPriority(property) === 'important') {
23313 return property;
23314 }
23315 });
23316 if (overriddenProperties.length > 0) {
23317 this.data(overriddenProperties);
23318 return false;
23319 }
23320 return true;
23321 }
23322 var avoid_inline_spacing_evaluate_default = avoidInlineSpacingEvaluate;
23323 function ariaLabelledbyEvaluate(node, options, virtualNode) {
23324 try {
23325 return !!sanitize_default(arialabelledby_text_default(virtualNode));
23326 } catch (_unused8) {
23327 return void 0;
23328 }
23329 }
23330 var aria_labelledby_evaluate_default = ariaLabelledbyEvaluate;
23331 function ariaLabelEvaluate(node, options, virtualNode) {
23332 return !!sanitize_default(_arialabelText(virtualNode));
23333 }
23334 var aria_label_evaluate_default = ariaLabelEvaluate;
23335 function duplicateIdEvaluate(node) {
23336 var id = node.getAttribute('id').trim();
23337 if (!id) {
23338 return true;
23339 }
23340 var root = get_root_node_default2(node);
23341 var matchingNodes = Array.from(root.querySelectorAll('[id="'.concat(escape_selector_default(id), '"]'))).filter(function(foundNode) {
23342 return foundNode !== node;
23343 });
23344 if (matchingNodes.length) {
23345 this.relatedNodes(matchingNodes);
23346 }
23347 this.data(id);
23348 return matchingNodes.length === 0;
23349 }
23350 var duplicate_id_evaluate_default = duplicateIdEvaluate;
23351 function duplicateIdAfter(results) {
23352 var uniqueIds = [];
23353 return results.filter(function(r) {
23354 if (uniqueIds.indexOf(r.data) === -1) {
23355 uniqueIds.push(r.data);
23356 return true;
23357 }
23358 return false;
23359 });
23360 }
23361 var duplicate_id_after_default = duplicateIdAfter;
23362 function uniqueFrameTitleEvaluate(node, options, vNode) {
23363 var title = sanitize_default(vNode.attr('title')).toLowerCase();
23364 this.data(title);
23365 return true;
23366 }
23367 var unique_frame_title_evaluate_default = uniqueFrameTitleEvaluate;
23368 function uniqueFrameTitleAfter(results) {
23369 var titles = {};
23370 results.forEach(function(r) {
23371 titles[r.data] = titles[r.data] !== void 0 ? ++titles[r.data] : 0;
23372 });
23373 results.forEach(function(r) {
23374 r.result = !!titles[r.data];
23375 });
23376 return results;
23377 }
23378 var unique_frame_title_after_default = uniqueFrameTitleAfter;
23379 function skipLinkEvaluate(node) {
23380 var target = get_element_by_reference_default(node, 'href');
23381 if (target) {
23382 return _isVisibleToScreenReaders(target) || void 0;
23383 }
23384 return false;
23385 }
23386 var skip_link_evaluate_default = skipLinkEvaluate;
23387 var implicitAriaLiveRoles = [ 'alert', 'log', 'status' ];
23388 function regionEvaluate(node, options, virtualNode) {
23389 this.data({
23390 isIframe: [ 'iframe', 'frame' ].includes(virtualNode.props.nodeName)
23391 });
23392 var regionlessNodes = cache_default.get('regionlessNodes', function() {
23393 return getRegionlessNodes(options);
23394 });
23395 return !regionlessNodes.includes(virtualNode);
23396 }
23397 function getRegionlessNodes(options) {
23398 var regionlessNodes = findRegionlessElms(axe._tree[0], options).map(function(vNode) {
23399 while (vNode.parent && !vNode.parent._hasRegionDescendant && vNode.parent.actualNode !== document.body) {
23400 vNode = vNode.parent;
23401 }
23402 return vNode;
23403 }).filter(function(vNode, index, array) {
23404 return array.indexOf(vNode) === index;
23405 });
23406 return regionlessNodes;
23407 }
23408 function findRegionlessElms(virtualNode, options) {
23409 var node = virtualNode.actualNode;
23410 if (get_role_default(virtualNode) === 'button' || isRegion(virtualNode, options) || [ 'iframe', 'frame' ].includes(virtualNode.props.nodeName) || _isSkipLink(virtualNode.actualNode) && get_element_by_reference_default(virtualNode.actualNode, 'href') || !_isVisibleToScreenReaders(node)) {
23411 var vNode = virtualNode;
23412 while (vNode) {
23413 vNode._hasRegionDescendant = true;
23414 vNode = vNode.parent;
23415 }
23416 if ([ 'iframe', 'frame' ].includes(virtualNode.props.nodeName)) {
23417 return [ virtualNode ];
23418 }
23419 return [];
23420 } else if (node !== document.body && has_content_default(node, true) && !isShallowlyHidden(virtualNode)) {
23421 return [ virtualNode ];
23422 } else {
23423 return virtualNode.children.filter(function(_ref100) {
23424 var actualNode = _ref100.actualNode;
23425 return actualNode.nodeType === 1;
23426 }).map(function(vNode) {
23427 return findRegionlessElms(vNode, options);
23428 }).reduce(function(a2, b2) {
23429 return a2.concat(b2);
23430 }, []);
23431 }
23432 }
23433 function isShallowlyHidden(virtualNode) {
23434 return [ 'none', 'presentation' ].includes(get_role_default(virtualNode)) && !hasChildTextNodes(virtualNode);
23435 }
23436 function isRegion(virtualNode, options) {
23437 var node = virtualNode.actualNode;
23438 var role = get_role_default(virtualNode);
23439 var ariaLive = (node.getAttribute('aria-live') || '').toLowerCase().trim();
23440 var landmarkRoles2 = get_aria_roles_by_type_default('landmark');
23441 if ([ 'assertive', 'polite' ].includes(ariaLive) || implicitAriaLiveRoles.includes(role)) {
23442 return true;
23443 }
23444 if (landmarkRoles2.includes(role)) {
23445 return true;
23446 }
23447 if (options.regionMatcher && matches_default2(virtualNode, options.regionMatcher)) {
23448 return true;
23449 }
23450 return false;
23451 }
23452 function regionAfter(results) {
23453 var iframeResults = results.filter(function(r) {
23454 return r.data.isIframe;
23455 });
23456 results.forEach(function(r) {
23457 if (r.result || r.node.ancestry.length === 1) {
23458 return;
23459 }
23460 var frameAncestry = r.node.ancestry.slice(0, -1);
23461 var _iterator16 = _createForOfIteratorHelper(iframeResults), _step16;
23462 try {
23463 for (_iterator16.s(); !(_step16 = _iterator16.n()).done; ) {
23464 var iframeResult = _step16.value;
23465 if (_matchAncestry(frameAncestry, iframeResult.node.ancestry)) {
23466 r.result = iframeResult.result;
23467 break;
23468 }
23469 }
23470 } catch (err) {
23471 _iterator16.e(err);
23472 } finally {
23473 _iterator16.f();
23474 }
23475 });
23476 iframeResults.forEach(function(r) {
23477 if (!r.result) {
23478 r.result = true;
23479 }
23480 });
23481 return results;
23482 }
23483 var region_after_default = regionAfter;
23484 function normalizeFontWeight(weight) {
23485 switch (weight) {
23486 case 'lighter':
23487 return 100;
23488
23489 case 'normal':
23490 return 400;
23491
23492 case 'bold':
23493 return 700;
23494
23495 case 'bolder':
23496 return 900;
23497 }
23498 weight = parseInt(weight);
23499 return !isNaN(weight) ? weight : 400;
23500 }
23501 function getTextContainer(elm) {
23502 var nextNode = elm;
23503 var outerText = elm.textContent.trim();
23504 var innerText = outerText;
23505 while (innerText === outerText && nextNode !== void 0) {
23506 var _i27 = -1;
23507 elm = nextNode;
23508 if (elm.children.length === 0) {
23509 return elm;
23510 }
23511 do {
23512 _i27++;
23513 innerText = elm.children[_i27].textContent.trim();
23514 } while (innerText === '' && _i27 + 1 < elm.children.length);
23515 nextNode = elm.children[_i27];
23516 }
23517 return elm;
23518 }
23519 function getStyleValues(node) {
23520 var style = window.getComputedStyle(getTextContainer(node));
23521 return {
23522 fontWeight: normalizeFontWeight(style.getPropertyValue('font-weight')),
23523 fontSize: parseInt(style.getPropertyValue('font-size')),
23524 isItalic: style.getPropertyValue('font-style') === 'italic'
23525 };
23526 }
23527 function isHeaderStyle(styleA, styleB, margins) {
23528 return margins.reduce(function(out, margin) {
23529 return out || (!margin.size || styleA.fontSize / margin.size > styleB.fontSize) && (!margin.weight || styleA.fontWeight - margin.weight > styleB.fontWeight) && (!margin.italic || styleA.isItalic && !styleB.isItalic);
23530 }, false);
23531 }
23532 function pAsHeadingEvaluate(node, options, virtualNode) {
23533 var siblings = Array.from(node.parentNode.children);
23534 var currentIndex = siblings.indexOf(node);
23535 options = options || {};
23536 var margins = options.margins || [];
23537 var nextSibling = siblings.slice(currentIndex + 1).find(function(elm) {
23538 return elm.nodeName.toUpperCase() === 'P';
23539 });
23540 var prevSibling = siblings.slice(0, currentIndex).reverse().find(function(elm) {
23541 return elm.nodeName.toUpperCase() === 'P';
23542 });
23543 var currStyle = getStyleValues(node);
23544 var nextStyle = nextSibling ? getStyleValues(nextSibling) : null;
23545 var prevStyle = prevSibling ? getStyleValues(prevSibling) : null;
23546 var optionsPassLength = options.passLength;
23547 var optionsFailLength = options.failLength;
23548 var headingLength = node.textContent.trim().length;
23549 var paragraphLength = nextSibling === null || nextSibling === void 0 ? void 0 : nextSibling.textContent.trim().length;
23550 if (headingLength > paragraphLength * optionsPassLength) {
23551 return true;
23552 }
23553 if (!nextStyle || !isHeaderStyle(currStyle, nextStyle, margins)) {
23554 return true;
23555 }
23556 var blockquote = find_up_virtual_default(virtualNode, 'blockquote');
23557 if (blockquote && blockquote.nodeName.toUpperCase() === 'BLOCKQUOTE') {
23558 return void 0;
23559 }
23560 if (prevStyle && !isHeaderStyle(currStyle, prevStyle, margins)) {
23561 return void 0;
23562 }
23563 if (headingLength > paragraphLength * optionsFailLength) {
23564 return void 0;
23565 }
23566 return false;
23567 }
23568 var p_as_heading_evaluate_default = pAsHeadingEvaluate;
23569 var separatorRegex = /[;,\s]/;
23570 var validRedirectNumRegex = /^[0-9.]+$/;
23571 function metaRefreshEvaluate(node, options, virtualNode) {
23572 var _ref101 = options || {}, minDelay = _ref101.minDelay, maxDelay = _ref101.maxDelay;
23573 var content = (virtualNode.attr('content') || '').trim();
23574 var _content$split = content.split(separatorRegex), _content$split2 = _slicedToArray(_content$split, 1), redirectStr = _content$split2[0];
23575 if (!redirectStr.match(validRedirectNumRegex)) {
23576 return true;
23577 }
23578 var redirectDelay = parseFloat(redirectStr);
23579 this.data({
23580 redirectDelay: redirectDelay
23581 });
23582 if (typeof minDelay === 'number' && redirectDelay <= options.minDelay) {
23583 return true;
23584 }
23585 if (typeof maxDelay === 'number' && redirectDelay > options.maxDelay) {
23586 return true;
23587 }
23588 return false;
23589 }
23590 function internalLinkPresentEvaluate(node, options, virtualNode) {
23591 var links = query_selector_all_default(virtualNode, 'a[href]');
23592 return links.some(function(vLink) {
23593 return /^#[^/!]/.test(vLink.attr('href'));
23594 });
23595 }
23596 var internal_link_present_evaluate_default = internalLinkPresentEvaluate;
23597 var commons_exports = {};
23598 __export(commons_exports, {
23599 aria: function aria() {
23600 return aria_exports;
23601 },
23602 color: function color() {
23603 return color_exports;
23604 },
23605 dom: function dom() {
23606 return dom_exports;
23607 },
23608 forms: function forms() {
23609 return forms_exports;
23610 },
23611 matches: function matches() {
23612 return matches_default2;
23613 },
23614 math: function math() {
23615 return math_exports;
23616 },
23617 standards: function standards() {
23618 return standards_exports;
23619 },
23620 table: function table() {
23621 return table_exports;
23622 },
23623 text: function text() {
23624 return text_exports;
23625 },
23626 utils: function utils() {
23627 return utils_exports;
23628 }
23629 });
23630 var color_exports = {};
23631 __export(color_exports, {
23632 Color: function Color() {
23633 return color_default;
23634 },
23635 centerPointOfRect: function centerPointOfRect() {
23636 return center_point_of_rect_default;
23637 },
23638 elementHasImage: function elementHasImage() {
23639 return element_has_image_default;
23640 },
23641 elementIsDistinct: function elementIsDistinct() {
23642 return element_is_distinct_default;
23643 },
23644 filteredRectStack: function filteredRectStack() {
23645 return filtered_rect_stack_default;
23646 },
23647 flattenColors: function flattenColors() {
23648 return _flattenColors;
23649 },
23650 flattenShadowColors: function flattenShadowColors() {
23651 return _flattenShadowColors;
23652 },
23653 getBackgroundColor: function getBackgroundColor() {
23654 return _getBackgroundColor2;
23655 },
23656 getBackgroundStack: function getBackgroundStack() {
23657 return _getBackgroundStack;
23658 },
23659 getContrast: function getContrast() {
23660 return get_contrast_default;
23661 },
23662 getForegroundColor: function getForegroundColor() {
23663 return _getForegroundColor;
23664 },
23665 getOwnBackgroundColor: function getOwnBackgroundColor() {
23666 return get_own_background_color_default;
23667 },
23668 getRectStack: function getRectStack() {
23669 return get_rect_stack_default;
23670 },
23671 getStackingContext: function getStackingContext() {
23672 return _getStackingContext;
23673 },
23674 getStrokeColorsFromShadows: function getStrokeColorsFromShadows() {
23675 return _getStrokeColorsFromShadows;
23676 },
23677 getTextShadowColors: function getTextShadowColors() {
23678 return _getTextShadowColors;
23679 },
23680 hasValidContrastRatio: function hasValidContrastRatio() {
23681 return has_valid_contrast_ratio_default;
23682 },
23683 incompleteData: function incompleteData() {
23684 return incomplete_data_default;
23685 },
23686 parseTextShadows: function parseTextShadows() {
23687 return _parseTextShadows;
23688 },
23689 stackingContextToColor: function stackingContextToColor() {
23690 return _stackingContextToColor;
23691 }
23692 });
23693 function centerPointOfRect(rect) {
23694 if (rect.left > window.innerWidth) {
23695 return void 0;
23696 }
23697 if (rect.top > window.innerHeight) {
23698 return void 0;
23699 }
23700 var x = Math.min(Math.ceil(rect.left + rect.width / 2), window.innerWidth - 1);
23701 var y = Math.min(Math.ceil(rect.top + rect.height / 2), window.innerHeight - 1);
23702 return {
23703 x: x,
23704 y: y
23705 };
23706 }
23707 var center_point_of_rect_default = centerPointOfRect;
23708 function _getFonts(style) {
23709 return style.getPropertyValue('font-family').split(/[,;]/g).map(function(font) {
23710 return font.trim().toLowerCase();
23711 });
23712 }
23713 function elementIsDistinct(node, ancestorNode) {
23714 var nodeStyle = window.getComputedStyle(node);
23715 if (nodeStyle.getPropertyValue('background-image') !== 'none') {
23716 return true;
23717 }
23718 var hasBorder = [ 'border-bottom', 'border-top', 'outline' ].reduce(function(result, edge) {
23719 var borderClr = new color_default();
23720 borderClr.parseString(nodeStyle.getPropertyValue(edge + '-color'));
23721 return result || nodeStyle.getPropertyValue(edge + '-style') !== 'none' && parseFloat(nodeStyle.getPropertyValue(edge + '-width')) > 0 && borderClr.alpha !== 0;
23722 }, false);
23723 if (hasBorder) {
23724 return true;
23725 }
23726 var parentStyle = window.getComputedStyle(ancestorNode);
23727 if (_getFonts(nodeStyle)[0] !== _getFonts(parentStyle)[0]) {
23728 return true;
23729 }
23730 var hasStyle = [ 'text-decoration-line', 'text-decoration-style', 'font-weight', 'font-style', 'font-size' ].reduce(function(result, cssProp) {
23731 return result || nodeStyle.getPropertyValue(cssProp) !== parentStyle.getPropertyValue(cssProp);
23732 }, false);
23733 var tDec = nodeStyle.getPropertyValue('text-decoration');
23734 if (tDec.split(' ').length < 3) {
23735 hasStyle = hasStyle || tDec !== parentStyle.getPropertyValue('text-decoration');
23736 }
23737 return hasStyle;
23738 }
23739 var element_is_distinct_default = elementIsDistinct;
23740 function getRectStack2(elm) {
23741 var boundingStack = get_element_stack_default(elm);
23742 var filteredArr = get_text_element_stack_default(elm);
23743 if (!filteredArr || filteredArr.length <= 1) {
23744 return [ boundingStack ];
23745 }
23746 if (filteredArr.some(function(stack) {
23747 return stack === void 0;
23748 })) {
23749 return null;
23750 }
23751 filteredArr.splice(0, 0, boundingStack);
23752 return filteredArr;
23753 }
23754 var get_rect_stack_default = getRectStack2;
23755 function filteredRectStack(elm) {
23756 var rectStack = get_rect_stack_default(elm);
23757 if (rectStack && rectStack.length === 1) {
23758 return rectStack[0];
23759 }
23760 if (rectStack && rectStack.length > 1) {
23761 var boundingStack = rectStack.shift();
23762 var isSame;
23763 rectStack.forEach(function(rectList, index) {
23764 if (index === 0) {
23765 return;
23766 }
23767 var rectA = rectStack[index - 1], rectB = rectStack[index];
23768 isSame = rectA.every(function(element, elementIndex) {
23769 return element === rectB[elementIndex];
23770 }) || boundingStack.includes(elm);
23771 });
23772 if (!isSame) {
23773 incomplete_data_default.set('bgColor', 'elmPartiallyObscuring');
23774 return null;
23775 }
23776 return rectStack[0];
23777 }
23778 incomplete_data_default.set('bgColor', 'outsideViewport');
23779 return null;
23780 }
23781 var filtered_rect_stack_default = filteredRectStack;
23782 var nonSeparableBlendModes = [ 'hue', 'saturation', 'color', 'luminosity' ];
23783 var blendFunctions = {
23784 normal: function normal(Cb, Cs) {
23785 return Cs;
23786 },
23787 multiply: function multiply(Cb, Cs) {
23788 return Cs * Cb;
23789 },
23790 screen: function screen(Cb, Cs) {
23791 return Cb + Cs - Cb * Cs;
23792 },
23793 overlay: function overlay(Cb, Cs) {
23794 return this['hard-light'](Cs, Cb);
23795 },
23796 darken: function darken(Cb, Cs) {
23797 return Math.min(Cb, Cs);
23798 },
23799 lighten: function lighten(Cb, Cs) {
23800 return Math.max(Cb, Cs);
23801 },
23802 'color-dodge': function colorDodge(Cb, Cs) {
23803 return Cb === 0 ? 0 : Cs === 1 ? 1 : Math.min(1, Cb / (1 - Cs));
23804 },
23805 'color-burn': function colorBurn(Cb, Cs) {
23806 return Cb === 1 ? 1 : Cs === 0 ? 0 : 1 - Math.min(1, (1 - Cb) / Cs);
23807 },
23808 'hard-light': function hardLight(Cb, Cs) {
23809 return Cs <= .5 ? this.multiply(Cb, 2 * Cs) : this.screen(Cb, 2 * Cs - 1);
23810 },
23811 'soft-light': function softLight(Cb, Cs) {
23812 if (Cs <= .5) {
23813 return Cb - (1 - 2 * Cs) * Cb * (1 - Cb);
23814 } else {
23815 var D = Cb <= .25 ? ((16 * Cb - 12) * Cb + 4) * Cb : Math.sqrt(Cb);
23816 return Cb + (2 * Cs - 1) * (D - Cb);
23817 }
23818 },
23819 difference: function difference(Cb, Cs) {
23820 return Math.abs(Cb - Cs);
23821 },
23822 exclusion: function exclusion(Cb, Cs) {
23823 return Cb + Cs - 2 * Cb * Cs;
23824 },
23825 hue: function hue(Cb, Cs) {
23826 return Cs.setSaturation(Cb.getSaturation()).setLuminosity(Cb.getLuminosity());
23827 },
23828 saturation: function saturation(Cb, Cs) {
23829 return Cb.setSaturation(Cs.getSaturation()).setLuminosity(Cb.getLuminosity());
23830 },
23831 color: function color(Cb, Cs) {
23832 return Cs.setLuminosity(Cb.getLuminosity());
23833 },
23834 luminosity: function luminosity(Cb, Cs) {
23835 return Cb.setLuminosity(Cs.getLuminosity());
23836 }
23837 };
23838 function _flattenColors(sourceColor, backdrop) {
23839 var blendMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'normal';
23840 var blendingResult = blend(backdrop, sourceColor, blendMode);
23841 var r = simpleAlphaCompositing(sourceColor.red, sourceColor.alpha, backdrop.red, backdrop.alpha, blendingResult.r * 255);
23842 var g2 = simpleAlphaCompositing(sourceColor.green, sourceColor.alpha, backdrop.green, backdrop.alpha, blendingResult.g * 255);
23843 var b2 = simpleAlphaCompositing(sourceColor.blue, sourceColor.alpha, backdrop.blue, backdrop.alpha, blendingResult.b * 255);
23844 var \u03b1o = clamp2(sourceColor.alpha + backdrop.alpha * (1 - sourceColor.alpha), 0, 1);
23845 if (\u03b1o === 0) {
23846 return new color_default(r, g2, b2, \u03b1o);
23847 }
23848 var Cr = Math.round(r / \u03b1o);
23849 var Cg = Math.round(g2 / \u03b1o);
23850 var Cb = Math.round(b2 / \u03b1o);
23851 return new color_default(Cr, Cg, Cb, \u03b1o);
23852 }
23853 function simpleAlphaCompositing(Cs, \u03b1s, Cb, \u03b1b, blendingResult) {
23854 return \u03b1s * (1 - \u03b1b) * Cs + \u03b1s * \u03b1b * blendingResult + (1 - \u03b1s) * \u03b1b * Cb;
23855 }
23856 function clamp2(value, min, max2) {
23857 return Math.min(Math.max(min, value), max2);
23858 }
23859 function blend(Cb, Cs, blendMode) {
23860 if (nonSeparableBlendModes.includes(blendMode)) {
23861 return blendFunctions[blendMode](Cb, Cs);
23862 }
23863 var C = new color_default();
23864 [ 'r', 'g', 'b' ].forEach(function(channel) {
23865 C[channel] = blendFunctions[blendMode](Cb[channel], Cs[channel]);
23866 });
23867 return C;
23868 }
23869 function _flattenShadowColors(fgColor, bgColor) {
23870 var alpha = fgColor.alpha;
23871 var r = (1 - alpha) * bgColor.red + alpha * fgColor.red;
23872 var g2 = (1 - alpha) * bgColor.green + alpha * fgColor.green;
23873 var b2 = (1 - alpha) * bgColor.blue + alpha * fgColor.blue;
23874 var a2 = fgColor.alpha + bgColor.alpha * (1 - fgColor.alpha);
23875 return new color_default(r, g2, b2, a2);
23876 }
23877 function _getBackgroundStack(node) {
23878 var stacks = get_text_element_stack_default(node).map(function(stack) {
23879 stack = reduce_to_elements_below_floating_default(stack, node);
23880 stack = sortPageBackground(stack);
23881 return stack;
23882 });
23883 for (var index = 0; index < stacks.length; index++) {
23884 var stack = stacks[index];
23885 if (stack[0] !== node) {
23886 incomplete_data_default.set('bgColor', 'bgOverlap');
23887 return null;
23888 }
23889 if (index !== 0 && !shallowArraysEqual(stack, stacks[0])) {
23890 incomplete_data_default.set('bgColor', 'elmPartiallyObscuring');
23891 return null;
23892 }
23893 }
23894 return stacks[0] || null;
23895 }
23896 function sortPageBackground(elmStack) {
23897 var bodyIndex = elmStack.indexOf(document.body);
23898 var bgNodes = elmStack;
23899 var htmlBgColor = get_own_background_color_default(window.getComputedStyle(document.documentElement));
23900 if (bodyIndex > 1 && htmlBgColor.alpha === 0 && !element_has_image_default(document.documentElement)) {
23901 if (bodyIndex > 1) {
23902 bgNodes.splice(bodyIndex, 1);
23903 bgNodes.push(document.body);
23904 }
23905 var htmlIndex = bgNodes.indexOf(document.documentElement);
23906 if (htmlIndex > 0) {
23907 bgNodes.splice(htmlIndex, 1);
23908 bgNodes.push(document.documentElement);
23909 }
23910 }
23911 return bgNodes;
23912 }
23913 function shallowArraysEqual(a2, b2) {
23914 if (a2 === b2) {
23915 return true;
23916 }
23917 if (a2 === null || b2 === null) {
23918 return false;
23919 }
23920 if (a2.length !== b2.length) {
23921 return false;
23922 }
23923 for (var _i28 = 0; _i28 < a2.length; ++_i28) {
23924 if (a2[_i28] !== b2[_i28]) {
23925 return false;
23926 }
23927 }
23928 return true;
23929 }
23930 var SHADOW_STROKE_ALPHA = .54;
23931 var VISIBLE_SHADOW_MIN_PX = .5;
23932 var OPAQUE_STROKE_OFFSET_MIN_PX = 1.5;
23933 var edges = [ 'top', 'right', 'bottom', 'left' ];
23934 function _getStrokeColorsFromShadows(parsedShadows) {
23935 var _ref102 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref102$ignoreEdgeCou = _ref102.ignoreEdgeCount, ignoreEdgeCount = _ref102$ignoreEdgeCou === void 0 ? false : _ref102$ignoreEdgeCou;
23936 var shadowMap = getShadowColorsMap(parsedShadows);
23937 var shadowsByColor = Object.entries(shadowMap).map(function(_ref103) {
23938 var _ref104 = _slicedToArray(_ref103, 2), colorStr = _ref104[0], sides = _ref104[1];
23939 var edgeCount = edges.filter(function(side) {
23940 return sides[side].length !== 0;
23941 }).length;
23942 return {
23943 colorStr: colorStr,
23944 sides: sides,
23945 edgeCount: edgeCount
23946 };
23947 });
23948 if (!ignoreEdgeCount && shadowsByColor.some(function(_ref105) {
23949 var edgeCount = _ref105.edgeCount;
23950 return edgeCount > 1 && edgeCount < 4;
23951 })) {
23952 return null;
23953 }
23954 return shadowsByColor.map(shadowGroupToColor).filter(function(shadow) {
23955 return shadow !== null;
23956 });
23957 }
23958 function getShadowColorsMap(parsedShadows) {
23959 var colorMap = {};
23960 var _iterator17 = _createForOfIteratorHelper(parsedShadows), _step17;
23961 try {
23962 for (_iterator17.s(); !(_step17 = _iterator17.n()).done; ) {
23963 var _colorMap$colorStr;
23964 var _step17$value = _step17.value, colorStr = _step17$value.colorStr, pixels = _step17$value.pixels;
23965 (_colorMap$colorStr = colorMap[colorStr]) !== null && _colorMap$colorStr !== void 0 ? _colorMap$colorStr : colorMap[colorStr] = {
23966 top: [],
23967 right: [],
23968 bottom: [],
23969 left: []
23970 };
23971 var borders = colorMap[colorStr];
23972 var _pixels = _slicedToArray(pixels, 2), offsetX = _pixels[0], offsetY = _pixels[1];
23973 if (offsetX > VISIBLE_SHADOW_MIN_PX) {
23974 borders.right.push(offsetX);
23975 } else if (-offsetX > VISIBLE_SHADOW_MIN_PX) {
23976 borders.left.push(-offsetX);
23977 }
23978 if (offsetY > VISIBLE_SHADOW_MIN_PX) {
23979 borders.bottom.push(offsetY);
23980 } else if (-offsetY > VISIBLE_SHADOW_MIN_PX) {
23981 borders.top.push(-offsetY);
23982 }
23983 }
23984 } catch (err) {
23985 _iterator17.e(err);
23986 } finally {
23987 _iterator17.f();
23988 }
23989 return colorMap;
23990 }
23991 function shadowGroupToColor(_ref106) {
23992 var colorStr = _ref106.colorStr, sides = _ref106.sides, edgeCount = _ref106.edgeCount;
23993 if (edgeCount !== 4) {
23994 return null;
23995 }
23996 var strokeColor = new color_default();
23997 strokeColor.parseString(colorStr);
23998 var density = 0;
23999 var isSolid = true;
24000 edges.forEach(function(edge) {
24001 density += sides[edge].length / 4;
24002 isSolid && (isSolid = sides[edge].every(function(offset) {
24003 return offset > OPAQUE_STROKE_OFFSET_MIN_PX;
24004 }));
24005 });
24006 if (!isSolid) {
24007 strokeColor.alpha = 1 - Math.pow(SHADOW_STROKE_ALPHA, density);
24008 }
24009 return strokeColor;
24010 }
24011 function _parseTextShadows(textShadow) {
24012 var current = {
24013 pixels: []
24014 };
24015 var str = textShadow.trim();
24016 var shadows = [ current ];
24017 if (!str) {
24018 return [];
24019 }
24020 while (str) {
24021 var colorMatch = str.match(/^[a-z]+(\([^)]+\))?/i) || str.match(/^#[0-9a-f]+/i);
24022 var pixelMatch = str.match(/^([0-9.-]+)px/i) || str.match(/^(0)/);
24023 if (colorMatch) {
24024 assert_default(!current.colorStr, 'Multiple colors identified in text-shadow: '.concat(textShadow));
24025 str = str.replace(colorMatch[0], '').trim();
24026 current.colorStr = colorMatch[0];
24027 } else if (pixelMatch) {
24028 assert_default(current.pixels.length < 3, 'Too many pixel units in text-shadow: '.concat(textShadow));
24029 str = str.replace(pixelMatch[0], '').trim();
24030 var pixelUnit = parseFloat((pixelMatch[1][0] === '.' ? '0' : '') + pixelMatch[1]);
24031 current.pixels.push(pixelUnit);
24032 } else if (str[0] === ',') {
24033 assert_default(current.pixels.length >= 2, 'Missing pixel value in text-shadow: '.concat(textShadow));
24034 current = {
24035 pixels: []
24036 };
24037 shadows.push(current);
24038 str = str.substr(1).trim();
24039 } else {
24040 throw new Error('Unable to process text-shadows: '.concat(str));
24041 }
24042 }
24043 shadows.forEach(function(_ref107) {
24044 var pixels = _ref107.pixels;
24045 if (pixels.length === 2) {
24046 pixels.push(0);
24047 }
24048 });
24049 return shadows;
24050 }
24051 function _getTextShadowColors(node) {
24052 var _ref108 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref108.minRatio, maxRatio = _ref108.maxRatio, ignoreEdgeCount = _ref108.ignoreEdgeCount;
24053 var shadowColors = [];
24054 var style = window.getComputedStyle(node);
24055 var textShadow = style.getPropertyValue('text-shadow');
24056 if (textShadow === 'none') {
24057 return shadowColors;
24058 }
24059 var fontSizeStr = style.getPropertyValue('font-size');
24060 var fontSize = parseInt(fontSizeStr);
24061 assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
24062 var thinShadows = [];
24063 var shadows = _parseTextShadows(textShadow);
24064 var _iterator18 = _createForOfIteratorHelper(shadows), _step18;
24065 try {
24066 for (_iterator18.s(); !(_step18 = _iterator18.n()).done; ) {
24067 var shadow = _step18.value;
24068 var colorStr = shadow.colorStr || style.getPropertyValue('color');
24069 var _shadow$pixels = _slicedToArray(shadow.pixels, 3), offsetX = _shadow$pixels[0], offsetY = _shadow$pixels[1], _shadow$pixels$ = _shadow$pixels[2], blurRadius = _shadow$pixels$ === void 0 ? 0 : _shadow$pixels$;
24070 if (maxRatio && blurRadius >= fontSize * maxRatio) {
24071 continue;
24072 }
24073 if (minRatio && blurRadius < fontSize * minRatio) {
24074 thinShadows.push({
24075 colorStr: colorStr,
24076 pixels: shadow.pixels
24077 });
24078 continue;
24079 }
24080 if (thinShadows.length > 0) {
24081 var _strokeColors = _getStrokeColorsFromShadows(thinShadows, {
24082 ignoreEdgeCount: ignoreEdgeCount
24083 });
24084 if (_strokeColors === null) {
24085 return null;
24086 }
24087 shadowColors.push.apply(shadowColors, _toConsumableArray(_strokeColors));
24088 thinShadows.splice(0, thinShadows.length);
24089 }
24090 var _color3 = textShadowColor({
24091 colorStr: colorStr,
24092 offsetX: offsetX,
24093 offsetY: offsetY,
24094 blurRadius: blurRadius,
24095 fontSize: fontSize
24096 });
24097 shadowColors.push(_color3);
24098 }
24099 } catch (err) {
24100 _iterator18.e(err);
24101 } finally {
24102 _iterator18.f();
24103 }
24104 if (thinShadows.length > 0) {
24105 var strokeColors = _getStrokeColorsFromShadows(thinShadows, {
24106 ignoreEdgeCount: ignoreEdgeCount
24107 });
24108 if (strokeColors === null) {
24109 return null;
24110 }
24111 shadowColors.push.apply(shadowColors, _toConsumableArray(strokeColors));
24112 }
24113 return shadowColors;
24114 }
24115 function textShadowColor(_ref109) {
24116 var colorStr = _ref109.colorStr, offsetX = _ref109.offsetX, offsetY = _ref109.offsetY, blurRadius = _ref109.blurRadius, fontSize = _ref109.fontSize;
24117 if (offsetX > blurRadius || offsetY > blurRadius) {
24118 return new color_default(0, 0, 0, 0);
24119 }
24120 var shadowColor = new color_default();
24121 shadowColor.parseString(colorStr);
24122 shadowColor.alpha *= blurRadiusToAlpha(blurRadius, fontSize);
24123 return shadowColor;
24124 }
24125 function blurRadiusToAlpha(blurRadius, fontSize) {
24126 if (blurRadius === 0) {
24127 return 1;
24128 }
24129 var relativeBlur = blurRadius / fontSize;
24130 return .185 / (relativeBlur + .4);
24131 }
24132 function _getStackingContext(elm, elmStack) {
24133 var virtualNode = get_node_from_tree_default(elm);
24134 if (virtualNode._stackingContext) {
24135 return virtualNode._stackingContext;
24136 }
24137 var stackingContext = [];
24138 var contextMap = new Map();
24139 elmStack = elmStack !== null && elmStack !== void 0 ? elmStack : _getBackgroundStack(elm);
24140 elmStack.forEach(function(bgElm) {
24141 var _stackingOrder2;
24142 var bgVNode = get_node_from_tree_default(bgElm);
24143 var bgColor = getOwnBackgroundColor2(bgVNode);
24144 var stackingOrder = bgVNode._stackingOrder.filter(function(_ref110) {
24145 var vNode = _ref110.vNode;
24146 return !!vNode;
24147 });
24148 stackingOrder.forEach(function(_ref111, index) {
24149 var _stackingOrder;
24150 var vNode = _ref111.vNode;
24151 var ancestorVNode2 = (_stackingOrder = stackingOrder[index - 1]) === null || _stackingOrder === void 0 ? void 0 : _stackingOrder.vNode;
24152 var context2 = addToStackingContext(contextMap, vNode, ancestorVNode2);
24153 if (index === 0 && !contextMap.get(vNode)) {
24154 stackingContext.unshift(context2);
24155 }
24156 contextMap.set(vNode, context2);
24157 });
24158 var ancestorVNode = (_stackingOrder2 = stackingOrder[stackingOrder.length - 1]) === null || _stackingOrder2 === void 0 ? void 0 : _stackingOrder2.vNode;
24159 var context = addToStackingContext(contextMap, bgVNode, ancestorVNode);
24160 if (!stackingOrder.length) {
24161 stackingContext.unshift(context);
24162 }
24163 context.bgColor = bgColor;
24164 });
24165 virtualNode._stackingContext = stackingContext;
24166 return stackingContext;
24167 }
24168 function _stackingContextToColor(context) {
24169 var _context$descendants;
24170 if (!((_context$descendants = context.descendants) !== null && _context$descendants !== void 0 && _context$descendants.length)) {
24171 var color2 = context.bgColor;
24172 color2.alpha *= context.opacity;
24173 return {
24174 color: color2,
24175 blendMode: context.blendMode
24176 };
24177 }
24178 var sourceColor = context.descendants.reduce(reduceToColor, createStackingContext2());
24179 var color = _flattenColors(sourceColor, context.bgColor, context.descendants[0].blendMode);
24180 color.alpha *= context.opacity;
24181 return {
24182 color: color,
24183 blendMode: context.blendMode
24184 };
24185 }
24186 function reduceToColor(backdropContext, sourceContext) {
24187 var backdrop;
24188 if (backdropContext instanceof color_default) {
24189 backdrop = backdropContext;
24190 } else {
24191 backdrop = _stackingContextToColor(backdropContext).color;
24192 }
24193 var sourceColor = _stackingContextToColor(sourceContext).color;
24194 return _flattenColors(sourceColor, backdrop, sourceContext.blendMode);
24195 }
24196 function createStackingContext2(vNode, ancestorContext) {
24197 var _vNode$getComputedSty;
24198 return {
24199 vNode: vNode,
24200 ancestor: ancestorContext,
24201 opacity: parseFloat((_vNode$getComputedSty = vNode === null || vNode === void 0 ? void 0 : vNode.getComputedStylePropertyValue('opacity')) !== null && _vNode$getComputedSty !== void 0 ? _vNode$getComputedSty : 1),
24202 bgColor: new color_default(0, 0, 0, 0),
24203 blendMode: normalizeBlendMode(vNode === null || vNode === void 0 ? void 0 : vNode.getComputedStylePropertyValue('mix-blend-mode')),
24204 descendants: []
24205 };
24206 }
24207 function normalizeBlendMode(blendmode) {
24208 return !!blendmode ? blendmode : void 0;
24209 }
24210 function addToStackingContext(contextMap, vNode, ancestorVNode) {
24211 var _contextMap$get;
24212 var ancestorContext = contextMap.get(ancestorVNode);
24213 var context = (_contextMap$get = contextMap.get(vNode)) !== null && _contextMap$get !== void 0 ? _contextMap$get : createStackingContext2(vNode, ancestorContext);
24214 if (ancestorContext && ancestorVNode !== vNode && !ancestorContext.descendants.includes(context)) {
24215 ancestorContext.descendants.unshift(context);
24216 }
24217 return context;
24218 }
24219 function getOwnBackgroundColor2(vNode) {
24220 var bgColor = new color_default();
24221 bgColor.parseString(vNode.getComputedStylePropertyValue('background-color'));
24222 return bgColor;
24223 }
24224 function _getBackgroundColor2(elm) {
24225 var bgElms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
24226 var shadowOutlineEmMax = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : .1;
24227 var vNode = get_node_from_tree_default(elm);
24228 var bgColorCache = vNode._cache.getBackgroundColor;
24229 if (bgColorCache) {
24230 bgElms.push.apply(bgElms, _toConsumableArray(bgColorCache.bgElms));
24231 incomplete_data_default.set('bgColor', bgColorCache.incompleteData);
24232 return bgColorCache.bgColor;
24233 }
24234 var bgColor = _getBackgroundColor(elm, bgElms, shadowOutlineEmMax);
24235 vNode._cache.getBackgroundColor = {
24236 bgColor: bgColor,
24237 bgElms: bgElms,
24238 incompleteData: incomplete_data_default.get('bgColor')
24239 };
24240 return bgColor;
24241 }
24242 function _getBackgroundColor(elm, bgElms, shadowOutlineEmMax) {
24243 var _getTextShadowColors2, _bgColors;
24244 var elmStack = _getBackgroundStack(elm);
24245 if (!elmStack) {
24246 return null;
24247 }
24248 var textRects = get_visible_child_text_rects_default(elm);
24249 var bgColors = (_getTextShadowColors2 = _getTextShadowColors(elm, {
24250 minRatio: shadowOutlineEmMax,
24251 ignoreEdgeCount: true
24252 })) !== null && _getTextShadowColors2 !== void 0 ? _getTextShadowColors2 : [];
24253 if (bgColors.length) {
24254 bgColors = [ {
24255 color: bgColors.reduce(_flattenShadowColors)
24256 } ];
24257 }
24258 for (var _i29 = 0; _i29 < elmStack.length; _i29++) {
24259 var bgElm = elmStack[_i29];
24260 var bgElmStyle = window.getComputedStyle(bgElm);
24261 if (element_has_image_default(bgElm, bgElmStyle)) {
24262 bgElms.push(bgElm);
24263 return null;
24264 }
24265 var bgColor = void 0;
24266 try {
24267 bgColor = get_own_background_color_default(bgElmStyle);
24268 if (bgColor.alpha === 0) {
24269 continue;
24270 }
24271 } catch (error) {
24272 if (error && incomplete_data_default.get('colorParse')) {
24273 return null;
24274 }
24275 throw error;
24276 }
24277 if (bgElmStyle.getPropertyValue('display') !== 'inline' && !fullyEncompasses(bgElm, textRects)) {
24278 bgElms.push(bgElm);
24279 incomplete_data_default.set('bgColor', 'elmPartiallyObscured');
24280 return null;
24281 }
24282 bgElms.push(bgElm);
24283 if (bgColor.alpha === 1) {
24284 break;
24285 }
24286 }
24287 var stackingContext = _getStackingContext(elm, elmStack);
24288 bgColors = stackingContext.map(_stackingContextToColor).concat(bgColors);
24289 var pageBgs = getPageBackgroundColors(elm, elmStack.includes(document.body));
24290 (_bgColors = bgColors).unshift.apply(_bgColors, _toConsumableArray(pageBgs));
24291 if (bgColors.length === 0) {
24292 return new color_default(255, 255, 255, 1);
24293 }
24294 var blendedColor = bgColors.reduce(function(bgColor, fgColor) {
24295 return _flattenColors(fgColor.color, bgColor.color instanceof color_default ? bgColor.color : bgColor, fgColor.blendMode);
24296 });
24297 return _flattenColors(blendedColor.color instanceof color_default ? blendedColor.color : blendedColor, new color_default(255, 255, 255, 1));
24298 }
24299 function fullyEncompasses(node, rects) {
24300 rects = Array.isArray(rects) ? rects : [ rects ];
24301 var nodeRect = node.getBoundingClientRect();
24302 var right = nodeRect.right, bottom = nodeRect.bottom;
24303 var style = window.getComputedStyle(node);
24304 var overflow = style.getPropertyValue('overflow');
24305 var paddingLeft = parseInt(style.getPropertyValue('padding-left'), 10);
24306 var paddingRight = parseInt(style.getPropertyValue('padding-right'), 10);
24307 var paddingTop = parseInt(style.getPropertyValue('padding-top'), 10);
24308 var paddingBottom = parseInt(style.getPropertyValue('padding-bottom'), 10);
24309 if ([ 'scroll', 'auto' ].includes(overflow) || node instanceof window.HTMLHtmlElement) {
24310 right = nodeRect.left + node.scrollWidth + paddingLeft + paddingRight;
24311 bottom = nodeRect.top + node.scrollHeight + paddingTop + paddingBottom;
24312 }
24313 return rects.every(function(rect) {
24314 return rect.top >= nodeRect.top && rect.bottom <= bottom && rect.left >= nodeRect.left && rect.right <= right;
24315 });
24316 }
24317 function normalizeBlendMode2(blendmode) {
24318 return !!blendmode ? blendmode : void 0;
24319 }
24320 function getPageBackgroundColors(elm, stackContainsBody) {
24321 var pageColors = [];
24322 if (!stackContainsBody) {
24323 var html = document.documentElement;
24324 var body = document.body;
24325 var htmlStyle = window.getComputedStyle(html);
24326 var bodyStyle = window.getComputedStyle(body);
24327 var htmlBgColor = get_own_background_color_default(htmlStyle);
24328 var bodyBgColor = get_own_background_color_default(bodyStyle);
24329 var bodyBgColorApplies = bodyBgColor.alpha !== 0 && fullyEncompasses(body, elm.getBoundingClientRect());
24330 if (bodyBgColor.alpha !== 0 && htmlBgColor.alpha === 0 || bodyBgColorApplies && bodyBgColor.alpha !== 1) {
24331 pageColors.unshift({
24332 color: bodyBgColor,
24333 blendMode: normalizeBlendMode2(bodyStyle.getPropertyValue('mix-blend-mode'))
24334 });
24335 }
24336 if (htmlBgColor.alpha !== 0 && (!bodyBgColorApplies || bodyBgColorApplies && bodyBgColor.alpha !== 1)) {
24337 pageColors.unshift({
24338 color: htmlBgColor,
24339 blendMode: normalizeBlendMode2(htmlStyle.getPropertyValue('mix-blend-mode'))
24340 });
24341 }
24342 }
24343 return pageColors;
24344 }
24345 function getContrast(bgColor, fgColor) {
24346 if (!fgColor || !bgColor) {
24347 return null;
24348 }
24349 if (fgColor.alpha < 1) {
24350 fgColor = _flattenColors(fgColor, bgColor);
24351 }
24352 var bL = bgColor.getRelativeLuminance();
24353 var fL = fgColor.getRelativeLuminance();
24354 return (Math.max(fL, bL) + .05) / (Math.min(fL, bL) + .05);
24355 }
24356 var get_contrast_default = getContrast;
24357 function _getForegroundColor(node, _, bgColor) {
24358 var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
24359 var nodeStyle = window.getComputedStyle(node);
24360 var colorStack = [ function() {
24361 return getStrokeColor(nodeStyle, options);
24362 }, function() {
24363 return getTextColor(nodeStyle);
24364 }, function() {
24365 return _getTextShadowColors(node, {
24366 minRatio: 0
24367 });
24368 } ];
24369 var fgColors = [];
24370 try {
24371 for (var _i30 = 0, _colorStack = colorStack; _i30 < _colorStack.length; _i30++) {
24372 var colorFn = _colorStack[_i30];
24373 var _color4 = colorFn();
24374 if (!_color4) {
24375 continue;
24376 }
24377 fgColors = fgColors.concat(_color4);
24378 if (_color4.alpha === 1) {
24379 break;
24380 }
24381 }
24382 } catch (error) {
24383 if (error && incomplete_data_default.get('colorParse')) {
24384 return null;
24385 }
24386 throw error;
24387 }
24388 var fgColor = fgColors.reduce(function(source, backdrop) {
24389 return _flattenColors(source, backdrop);
24390 });
24391 bgColor !== null && bgColor !== void 0 ? bgColor : bgColor = _getBackgroundColor2(node, []);
24392 if (bgColor === null) {
24393 var reason = incomplete_data_default.get('bgColor');
24394 incomplete_data_default.set('fgColor', reason);
24395 return null;
24396 }
24397 var stackingContexts = _getStackingContext(node);
24398 var context = findNodeInContexts(stackingContexts, node);
24399 return _flattenColors(calculateBlendedForegroundColor(fgColor, context, stackingContexts), new color_default(255, 255, 255, 1));
24400 }
24401 function getTextColor(nodeStyle) {
24402 return new color_default().parseString(nodeStyle.getPropertyValue('-webkit-text-fill-color') || nodeStyle.getPropertyValue('color'));
24403 }
24404 function getStrokeColor(nodeStyle, _ref112) {
24405 var _ref112$textStrokeEmM = _ref112.textStrokeEmMin, textStrokeEmMin = _ref112$textStrokeEmM === void 0 ? 0 : _ref112$textStrokeEmM;
24406 var strokeWidth = parseFloat(nodeStyle.getPropertyValue('-webkit-text-stroke-width'));
24407 if (strokeWidth === 0) {
24408 return null;
24409 }
24410 var fontSize = nodeStyle.getPropertyValue('font-size');
24411 var relativeStrokeWidth = strokeWidth / parseFloat(fontSize);
24412 if (isNaN(relativeStrokeWidth) || relativeStrokeWidth < textStrokeEmMin) {
24413 return null;
24414 }
24415 var strokeColor = nodeStyle.getPropertyValue('-webkit-text-stroke-color');
24416 return new color_default().parseString(strokeColor);
24417 }
24418 function calculateBlendedForegroundColor(fgColor, context, stackingContexts) {
24419 while (context) {
24420 var _context$ancestor;
24421 if (context.opacity === 1 && context.ancestor) {
24422 context = context.ancestor;
24423 continue;
24424 }
24425 fgColor.alpha *= context.opacity;
24426 var stack = ((_context$ancestor = context.ancestor) === null || _context$ancestor === void 0 ? void 0 : _context$ancestor.descendants) || stackingContexts;
24427 if (context.opacity !== 1) {
24428 stack = stack.slice(0, stack.indexOf(context));
24429 }
24430 var bgColors = stack.map(_stackingContextToColor);
24431 if (!bgColors.length) {
24432 context = context.ancestor;
24433 continue;
24434 }
24435 var bgColor = bgColors.reduce(function(backdrop, source) {
24436 return _flattenColors(source.color, backdrop.color instanceof color_default ? backdrop.color : backdrop);
24437 }, {
24438 color: new color_default(0, 0, 0, 0),
24439 blendMode: 'normal'
24440 });
24441 fgColor = _flattenColors(fgColor, bgColor);
24442 context = context.ancestor;
24443 }
24444 return fgColor;
24445 }
24446 function findNodeInContexts(contexts, node) {
24447 var _iterator19 = _createForOfIteratorHelper(contexts), _step19;
24448 try {
24449 for (_iterator19.s(); !(_step19 = _iterator19.n()).done; ) {
24450 var _context$vNode;
24451 var context = _step19.value;
24452 if (((_context$vNode = context.vNode) === null || _context$vNode === void 0 ? void 0 : _context$vNode.actualNode) === node) {
24453 return context;
24454 }
24455 var found = findNodeInContexts(context.descendants, node);
24456 if (found) {
24457 return found;
24458 }
24459 }
24460 } catch (err) {
24461 _iterator19.e(err);
24462 } finally {
24463 _iterator19.f();
24464 }
24465 }
24466 function hasValidContrastRatio(bg, fg, fontSize, isBold) {
24467 var contrast2 = get_contrast_default(bg, fg);
24468 var isSmallFont = isBold && Math.ceil(fontSize * 72) / 96 < 14 || !isBold && Math.ceil(fontSize * 72) / 96 < 18;
24469 var expectedContrastRatio = isSmallFont ? 4.5 : 3;
24470 return {
24471 isValid: contrast2 > expectedContrastRatio,
24472 contrastRatio: contrast2,
24473 expectedContrastRatio: expectedContrastRatio
24474 };
24475 }
24476 var has_valid_contrast_ratio_default = hasValidContrastRatio;
24477 var forms_exports = {};
24478 __export(forms_exports, {
24479 isAriaCombobox: function isAriaCombobox() {
24480 return is_aria_combobox_default;
24481 },
24482 isAriaListbox: function isAriaListbox() {
24483 return is_aria_listbox_default;
24484 },
24485 isAriaRange: function isAriaRange() {
24486 return is_aria_range_default;
24487 },
24488 isAriaTextbox: function isAriaTextbox() {
24489 return is_aria_textbox_default;
24490 },
24491 isDisabled: function isDisabled() {
24492 return is_disabled_default;
24493 },
24494 isNativeSelect: function isNativeSelect() {
24495 return is_native_select_default;
24496 },
24497 isNativeTextbox: function isNativeTextbox() {
24498 return is_native_textbox_default;
24499 }
24500 });
24501 var disabledNodeNames = [ 'fieldset', 'button', 'select', 'input', 'textarea' ];
24502 function isDisabled(virtualNode) {
24503 var disabledState = virtualNode._isDisabled;
24504 if (typeof disabledState === 'boolean') {
24505 return disabledState;
24506 }
24507 var nodeName2 = virtualNode.props.nodeName;
24508 var ariaDisabled = virtualNode.attr('aria-disabled');
24509 if (disabledNodeNames.includes(nodeName2) && virtualNode.hasAttr('disabled')) {
24510 disabledState = true;
24511 } else if (ariaDisabled) {
24512 disabledState = ariaDisabled.toLowerCase() === 'true';
24513 } else if (virtualNode.parent) {
24514 disabledState = isDisabled(virtualNode.parent);
24515 } else {
24516 disabledState = false;
24517 }
24518 virtualNode._isDisabled = disabledState;
24519 return disabledState;
24520 }
24521 var is_disabled_default = isDisabled;
24522 function identicalLinksSamePurposeEvaluate(node, options, virtualNode) {
24523 var accText = text_exports.accessibleTextVirtual(virtualNode);
24524 var name = text_exports.sanitize(text_exports.removeUnicode(accText, {
24525 emoji: true,
24526 nonBmp: true,
24527 punctuations: true
24528 })).toLowerCase();
24529 if (!name) {
24530 return void 0;
24531 }
24532 var afterData = {
24533 name: name,
24534 urlProps: dom_exports.urlPropsFromAttribute(node, 'href')
24535 };
24536 this.data(afterData);
24537 this.relatedNodes([ node ]);
24538 return true;
24539 }
24540 var identical_links_same_purpose_evaluate_default = identicalLinksSamePurposeEvaluate;
24541 function isIdenticalObject(a2, b2) {
24542 if (!a2 || !b2) {
24543 return false;
24544 }
24545 var aProps = Object.getOwnPropertyNames(a2);
24546 var bProps = Object.getOwnPropertyNames(b2);
24547 if (aProps.length !== bProps.length) {
24548 return false;
24549 }
24550 var result = aProps.every(function(propName) {
24551 var aValue = a2[propName];
24552 var bValue = b2[propName];
24553 if (_typeof(aValue) !== _typeof(bValue)) {
24554 return false;
24555 }
24556 if (_typeof(aValue) === 'object' || _typeof(bValue) === 'object') {
24557 return isIdenticalObject(aValue, bValue);
24558 }
24559 return aValue === bValue;
24560 });
24561 return result;
24562 }
24563 function identicalLinksSamePurposeAfter(results) {
24564 if (results.length < 2) {
24565 return results;
24566 }
24567 var incompleteResults = results.filter(function(_ref113) {
24568 var result = _ref113.result;
24569 return result !== void 0;
24570 });
24571 var uniqueResults = [];
24572 var nameMap = {};
24573 var _loop8 = function _loop8(index) {
24574 var _currentResult$relate;
24575 var currentResult = incompleteResults[index];
24576 var _currentResult$data = currentResult.data, name = _currentResult$data.name, urlProps = _currentResult$data.urlProps;
24577 if (nameMap[name]) {
24578 return 1;
24579 }
24580 var sameNameResults = incompleteResults.filter(function(_ref114, resultNum) {
24581 var data = _ref114.data;
24582 return data.name === name && resultNum !== index;
24583 });
24584 var isSameUrl = sameNameResults.every(function(_ref115) {
24585 var data = _ref115.data;
24586 return isIdenticalObject(data.urlProps, urlProps);
24587 });
24588 if (sameNameResults.length && !isSameUrl) {
24589 currentResult.result = void 0;
24590 }
24591 currentResult.relatedNodes = [];
24592 (_currentResult$relate = currentResult.relatedNodes).push.apply(_currentResult$relate, _toConsumableArray(sameNameResults.map(function(node) {
24593 return node.relatedNodes[0];
24594 })));
24595 nameMap[name] = sameNameResults;
24596 uniqueResults.push(currentResult);
24597 };
24598 for (var index = 0; index < incompleteResults.length; index++) {
24599 if (_loop8(index)) {
24600 continue;
24601 }
24602 }
24603 return uniqueResults;
24604 }
24605 var identical_links_same_purpose_after_default = identicalLinksSamePurposeAfter;
24606 function getLevel(vNode) {
24607 var role = get_role_default(vNode);
24608 var headingRole = role && role.includes('heading');
24609 var ariaHeadingLevel = vNode.attr('aria-level');
24610 var ariaLevel = parseInt(ariaHeadingLevel, 10);
24611 var _ref116 = vNode.props.nodeName.match(/h(\d)/) || [], _ref117 = _slicedToArray(_ref116, 2), headingLevel = _ref117[1];
24612 if (!headingRole) {
24613 return -1;
24614 }
24615 if (headingLevel && !ariaHeadingLevel) {
24616 return parseInt(headingLevel, 10);
24617 }
24618 if (isNaN(ariaLevel) || ariaLevel < 1) {
24619 if (headingLevel) {
24620 return parseInt(headingLevel, 10);
24621 }
24622 return 2;
24623 }
24624 if (ariaLevel) {
24625 return ariaLevel;
24626 }
24627 return -1;
24628 }
24629 function headingOrderEvaluate() {
24630 var headingOrder = cache_default.get('headingOrder');
24631 if (headingOrder) {
24632 return true;
24633 }
24634 var selector = 'h1, h2, h3, h4, h5, h6, [role=heading], iframe, frame';
24635 var vNodes = query_selector_all_filter_default(axe._tree[0], selector, _isVisibleToScreenReaders);
24636 headingOrder = vNodes.map(function(vNode) {
24637 return {
24638 ancestry: [ _getAncestry(vNode.actualNode) ],
24639 level: getLevel(vNode)
24640 };
24641 });
24642 this.data({
24643 headingOrder: headingOrder
24644 });
24645 cache_default.set('headingOrder', vNodes);
24646 return true;
24647 }
24648 var heading_order_evaluate_default = headingOrderEvaluate;
24649 function headingOrderAfter(results) {
24650 var headingOrder = getHeadingOrder(results);
24651 results.forEach(function(result) {
24652 result.result = getHeadingOrderOutcome(result, headingOrder);
24653 });
24654 return results;
24655 }
24656 function getHeadingOrderOutcome(result, headingOrder) {
24657 var _headingOrder$index$l, _headingOrder$index, _headingOrder$level, _headingOrder;
24658 var index = findHeadingOrderIndex(headingOrder, result.node.ancestry);
24659 var currLevel = (_headingOrder$index$l = (_headingOrder$index = headingOrder[index]) === null || _headingOrder$index === void 0 ? void 0 : _headingOrder$index.level) !== null && _headingOrder$index$l !== void 0 ? _headingOrder$index$l : -1;
24660 var prevLevel = (_headingOrder$level = (_headingOrder = headingOrder[index - 1]) === null || _headingOrder === void 0 ? void 0 : _headingOrder.level) !== null && _headingOrder$level !== void 0 ? _headingOrder$level : -1;
24661 if (index === 0) {
24662 return true;
24663 }
24664 if (currLevel === -1) {
24665 return void 0;
24666 }
24667 return currLevel - prevLevel <= 1;
24668 }
24669 function getHeadingOrder(results) {
24670 results = _toConsumableArray(results);
24671 results.sort(function(_ref118, _ref119) {
24672 var nodeA = _ref118.node;
24673 var nodeB = _ref119.node;
24674 return nodeA.ancestry.length - nodeB.ancestry.length;
24675 });
24676 var headingOrder = results.reduce(mergeHeadingOrder, []);
24677 return headingOrder.filter(function(_ref120) {
24678 var level = _ref120.level;
24679 return level !== -1;
24680 });
24681 }
24682 function mergeHeadingOrder(mergedHeadingOrder, result) {
24683 var _result$data;
24684 var frameHeadingOrder = (_result$data = result.data) === null || _result$data === void 0 ? void 0 : _result$data.headingOrder;
24685 var frameAncestry = shortenArray(result.node.ancestry, 1);
24686 if (!frameHeadingOrder) {
24687 return mergedHeadingOrder;
24688 }
24689 var normalizedHeadingOrder = frameHeadingOrder.map(function(heading) {
24690 return addFrameToHeadingAncestry(heading, frameAncestry);
24691 });
24692 var index = getFrameIndex(mergedHeadingOrder, frameAncestry);
24693 if (index === -1) {
24694 mergedHeadingOrder.push.apply(mergedHeadingOrder, _toConsumableArray(normalizedHeadingOrder));
24695 } else {
24696 mergedHeadingOrder.splice.apply(mergedHeadingOrder, [ index, 0 ].concat(_toConsumableArray(normalizedHeadingOrder)));
24697 }
24698 return mergedHeadingOrder;
24699 }
24700 function getFrameIndex(headingOrder, frameAncestry) {
24701 while (frameAncestry.length) {
24702 var index = findHeadingOrderIndex(headingOrder, frameAncestry);
24703 if (index !== -1) {
24704 return index;
24705 }
24706 frameAncestry = shortenArray(frameAncestry, 1);
24707 }
24708 return -1;
24709 }
24710 function findHeadingOrderIndex(headingOrder, ancestry) {
24711 return headingOrder.findIndex(function(heading) {
24712 return _matchAncestry(heading.ancestry, ancestry);
24713 });
24714 }
24715 function addFrameToHeadingAncestry(heading, frameAncestry) {
24716 var ancestry = frameAncestry.concat(heading.ancestry);
24717 return _extends({}, heading, {
24718 ancestry: ancestry
24719 });
24720 }
24721 function shortenArray(arr, spliceLength) {
24722 return arr.slice(0, arr.length - spliceLength);
24723 }
24724 function targetSizeEvaluate(node, options, vNode) {
24725 var minSize = (options === null || options === void 0 ? void 0 : options.minSize) || 24;
24726 var nodeRect = vNode.boundingClientRect;
24727 if (_rectHasMinimumSize(minSize * 10, nodeRect)) {
24728 this.data({
24729 messageKey: 'large',
24730 minSize: minSize
24731 });
24732 return true;
24733 }
24734 var hasMinimumSize = _rectHasMinimumSize.bind(null, minSize);
24735 var nearbyElms = _findNearbyElms(vNode);
24736 var overflowingContent = filterOverflowingContent(vNode, nearbyElms);
24737 var _filterByElmsOverlap = filterByElmsOverlap(vNode, nearbyElms), fullyObscuringElms = _filterByElmsOverlap.fullyObscuringElms, partialObscuringElms = _filterByElmsOverlap.partialObscuringElms;
24738 if (overflowingContent.length && (fullyObscuringElms.length || !hasMinimumSize(nodeRect))) {
24739 this.data({
24740 minSize: minSize,
24741 messageKey: 'contentOverflow'
24742 });
24743 this.relatedNodes(mapActualNodes(overflowingContent));
24744 return void 0;
24745 }
24746 if (fullyObscuringElms.length) {
24747 this.relatedNodes(mapActualNodes(fullyObscuringElms));
24748 this.data({
24749 messageKey: 'obscured'
24750 });
24751 return true;
24752 }
24753 var negativeOutcome = _isInTabOrder(vNode) ? false : void 0;
24754 if (!hasMinimumSize(nodeRect)) {
24755 this.data(_extends({
24756 minSize: minSize
24757 }, toDecimalSize(nodeRect)));
24758 return negativeOutcome;
24759 }
24760 var obscuredWidgets = filterFocusableWidgets(partialObscuringElms);
24761 if (!obscuredWidgets.length) {
24762 this.data(_extends({
24763 minSize: minSize
24764 }, toDecimalSize(nodeRect)));
24765 return true;
24766 }
24767 var largestInnerRect = getLargestUnobscuredArea(vNode, obscuredWidgets, minSize);
24768 if (!largestInnerRect) {
24769 this.data({
24770 minSize: minSize,
24771 messageKey: 'tooManyRects'
24772 });
24773 return void 0;
24774 }
24775 if (!hasMinimumSize(largestInnerRect)) {
24776 if (overflowingContent.length) {
24777 this.data({
24778 minSize: minSize,
24779 messageKey: 'contentOverflow'
24780 });
24781 this.relatedNodes(mapActualNodes(overflowingContent));
24782 return void 0;
24783 }
24784 var allTabbable = obscuredWidgets.every(_isInTabOrder);
24785 var messageKey = 'partiallyObscured'.concat(allTabbable ? '' : 'NonTabbable');
24786 this.data(_extends({
24787 messageKey: messageKey,
24788 minSize: minSize
24789 }, toDecimalSize(largestInnerRect)));
24790 this.relatedNodes(mapActualNodes(obscuredWidgets));
24791 return allTabbable ? negativeOutcome : void 0;
24792 }
24793 this.data(_extends({
24794 minSize: minSize
24795 }, toDecimalSize(largestInnerRect || nodeRect)));
24796 this.relatedNodes(mapActualNodes(obscuredWidgets));
24797 return true;
24798 }
24799 function filterOverflowingContent(vNode, nearbyElms) {
24800 return nearbyElms.filter(function(nearbyElm) {
24801 return !isEnclosedRect2(nearbyElm, vNode) && isDescendantNotInTabOrder2(vNode, nearbyElm);
24802 });
24803 }
24804 function filterByElmsOverlap(vNode, nearbyElms) {
24805 var fullyObscuringElms = [];
24806 var partialObscuringElms = [];
24807 var _iterator20 = _createForOfIteratorHelper(nearbyElms), _step20;
24808 try {
24809 for (_iterator20.s(); !(_step20 = _iterator20.n()).done; ) {
24810 var vNeighbor = _step20.value;
24811 if (!isDescendantNotInTabOrder2(vNode, vNeighbor) && _hasVisualOverlap(vNode, vNeighbor) && getCssPointerEvents(vNeighbor) !== 'none') {
24812 if (isEnclosedRect2(vNode, vNeighbor)) {
24813 fullyObscuringElms.push(vNeighbor);
24814 } else {
24815 partialObscuringElms.push(vNeighbor);
24816 }
24817 }
24818 }
24819 } catch (err) {
24820 _iterator20.e(err);
24821 } finally {
24822 _iterator20.f();
24823 }
24824 return {
24825 fullyObscuringElms: fullyObscuringElms,
24826 partialObscuringElms: partialObscuringElms
24827 };
24828 }
24829 function getLargestUnobscuredArea(vNode, obscuredNodes, minSize) {
24830 var nodeRect = vNode.boundingClientRect;
24831 var obscuringRects = obscuredNodes.map(function(obscuredNode) {
24832 var display2 = obscuredNode.getComputedStylePropertyValue('display');
24833 return display2 === 'inline' ? obscuredNode.clientRects : obscuredNode.boundingClientRect;
24834 }).flat(Infinity);
24835 var unobscuredRects;
24836 try {
24837 unobscuredRects = _splitRects(nodeRect, obscuringRects);
24838 } catch (_unused9) {
24839 return null;
24840 }
24841 return getLargestRect2(unobscuredRects, minSize);
24842 }
24843 function getLargestRect2(rects, minSize) {
24844 return rects.reduce(function(rectA, rectB) {
24845 var rectAisMinimum = _rectHasMinimumSize(minSize, rectA);
24846 var rectBisMinimum = _rectHasMinimumSize(minSize, rectB);
24847 if (rectAisMinimum !== rectBisMinimum) {
24848 return rectAisMinimum ? rectA : rectB;
24849 }
24850 var areaA = rectA.width * rectA.height;
24851 var areaB = rectB.width * rectB.height;
24852 return areaA > areaB ? rectA : rectB;
24853 });
24854 }
24855 function filterFocusableWidgets(vNodes) {
24856 return vNodes.filter(function(vNode) {
24857 return get_role_type_default(vNode) === 'widget' && _isFocusable(vNode);
24858 });
24859 }
24860 function isEnclosedRect2(vNodeA, vNodeB) {
24861 var rectA = vNodeA.boundingClientRect;
24862 var rectB = vNodeB.boundingClientRect;
24863 return rectA.top >= rectB.top && rectA.left >= rectB.left && rectA.bottom <= rectB.bottom && rectA.right <= rectB.right;
24864 }
24865 function getCssPointerEvents(vNode) {
24866 return vNode.getComputedStylePropertyValue('pointer-events');
24867 }
24868 function toDecimalSize(rect) {
24869 return {
24870 width: Math.round(rect.width * 10) / 10,
24871 height: Math.round(rect.height * 10) / 10
24872 };
24873 }
24874 function isDescendantNotInTabOrder2(vAncestor, vNode) {
24875 return _contains(vAncestor, vNode) && !_isInTabOrder(vNode);
24876 }
24877 function mapActualNodes(vNodes) {
24878 return vNodes.map(function(_ref121) {
24879 var actualNode = _ref121.actualNode;
24880 return actualNode;
24881 });
24882 }
24883 var roundingMargin2 = .05;
24884 function targetOffsetEvaluate(node, options, vNode) {
24885 var minOffset = (options === null || options === void 0 ? void 0 : options.minOffset) || 24;
24886 if (_rectHasMinimumSize(minOffset * 10, vNode.boundingClientRect)) {
24887 this.data({
24888 messageKey: 'large',
24889 minOffset: minOffset
24890 });
24891 return true;
24892 }
24893 var closeNeighbors = [];
24894 var closestOffset = minOffset;
24895 var _iterator21 = _createForOfIteratorHelper(_findNearbyElms(vNode, minOffset)), _step21;
24896 try {
24897 for (_iterator21.s(); !(_step21 = _iterator21.n()).done; ) {
24898 var vNeighbor = _step21.value;
24899 if (get_role_type_default(vNeighbor) !== 'widget' || !_isFocusable(vNeighbor)) {
24900 continue;
24901 }
24902 var offset = null;
24903 try {
24904 offset = _getOffset(vNode, vNeighbor, minOffset / 2);
24905 } catch (err2) {
24906 if (err2.message.startsWith('splitRects')) {
24907 this.data({
24908 messageKey: 'tooManyRects',
24909 closestOffset: 0,
24910 minOffset: minOffset
24911 });
24912 return void 0;
24913 }
24914 throw err2;
24915 }
24916 if (offset === null) {
24917 continue;
24918 }
24919 offset = roundToSingleDecimal(offset) * 2;
24920 if (offset + roundingMargin2 >= minOffset) {
24921 continue;
24922 }
24923 closestOffset = Math.min(closestOffset, offset);
24924 closeNeighbors.push(vNeighbor);
24925 }
24926 } catch (err) {
24927 _iterator21.e(err);
24928 } finally {
24929 _iterator21.f();
24930 }
24931 if (closeNeighbors.length === 0) {
24932 this.data({
24933 closestOffset: closestOffset,
24934 minOffset: minOffset
24935 });
24936 return true;
24937 }
24938 this.relatedNodes(closeNeighbors.map(function(_ref122) {
24939 var actualNode = _ref122.actualNode;
24940 return actualNode;
24941 }));
24942 if (!closeNeighbors.some(_isInTabOrder)) {
24943 this.data({
24944 messageKey: 'nonTabbableNeighbor',
24945 closestOffset: closestOffset,
24946 minOffset: minOffset
24947 });
24948 return void 0;
24949 }
24950 this.data({
24951 closestOffset: closestOffset,
24952 minOffset: minOffset
24953 });
24954 return _isInTabOrder(vNode) ? false : void 0;
24955 }
24956 function roundToSingleDecimal(num) {
24957 return Math.round(num * 10) / 10;
24958 }
24959 function metaViewportScaleEvaluate(node, options, virtualNode) {
24960 var _ref123 = options || {}, _ref123$scaleMinimum = _ref123.scaleMinimum, scaleMinimum = _ref123$scaleMinimum === void 0 ? 2 : _ref123$scaleMinimum, _ref123$lowerBound = _ref123.lowerBound, lowerBound = _ref123$lowerBound === void 0 ? false : _ref123$lowerBound;
24961 var content = virtualNode.attr('content') || '';
24962 if (!content) {
24963 return true;
24964 }
24965 var result = content.split(/[;,]/).reduce(function(out, item) {
24966 var contentValue = item.trim();
24967 if (!contentValue) {
24968 return out;
24969 }
24970 var _contentValue$split = contentValue.split('='), _contentValue$split2 = _slicedToArray(_contentValue$split, 2), key = _contentValue$split2[0], value = _contentValue$split2[1];
24971 if (!key || !value) {
24972 return out;
24973 }
24974 var curatedKey = key.toLowerCase().trim();
24975 var curatedValue = value.toLowerCase().trim();
24976 if (curatedKey === 'maximum-scale' && curatedValue === 'yes') {
24977 curatedValue = 1;
24978 }
24979 if (curatedKey === 'maximum-scale' && parseFloat(curatedValue) < 0) {
24980 return out;
24981 }
24982 out[curatedKey] = curatedValue;
24983 return out;
24984 }, {});
24985 if (lowerBound && result['maximum-scale'] && parseFloat(result['maximum-scale']) < lowerBound) {
24986 return true;
24987 }
24988 if (!lowerBound && result['user-scalable'] === 'no') {
24989 this.data('user-scalable=no');
24990 return false;
24991 }
24992 var userScalableAsFloat = parseFloat(result['user-scalable']);
24993 if (!lowerBound && result['user-scalable'] && (userScalableAsFloat || userScalableAsFloat === 0) && userScalableAsFloat > -1 && userScalableAsFloat < 1) {
24994 this.data('user-scalable');
24995 return false;
24996 }
24997 if (result['maximum-scale'] && parseFloat(result['maximum-scale']) < scaleMinimum) {
24998 this.data('maximum-scale');
24999 return false;
25000 }
25001 return true;
25002 }
25003 var meta_viewport_scale_evaluate_default = metaViewportScaleEvaluate;
25004 function cssOrientationLockEvaluate(node, options, virtualNode, context) {
25005 var _ref124 = context || {}, _ref124$cssom = _ref124.cssom, cssom = _ref124$cssom === void 0 ? void 0 : _ref124$cssom;
25006 var _ref125 = options || {}, _ref125$degreeThresho = _ref125.degreeThreshold, degreeThreshold = _ref125$degreeThresho === void 0 ? 0 : _ref125$degreeThresho;
25007 if (!cssom || !cssom.length) {
25008 return void 0;
25009 }
25010 var isLocked = false;
25011 var relatedElements = [];
25012 var rulesGroupByDocumentFragment = groupCssomByDocument(cssom);
25013 var _loop9 = function _loop9() {
25014 var key = _Object$keys3[_i31];
25015 var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules;
25016 var orientationRules = rules.filter(isMediaRuleWithOrientation);
25017 if (!orientationRules.length) {
25018 return 1;
25019 }
25020 orientationRules.forEach(function(_ref126) {
25021 var cssRules = _ref126.cssRules;
25022 Array.from(cssRules).forEach(function(cssRule) {
25023 var locked = getIsOrientationLocked(cssRule);
25024 if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
25025 var elms = Array.from(root.querySelectorAll(cssRule.selectorText)) || [];
25026 relatedElements = relatedElements.concat(elms);
25027 }
25028 isLocked = isLocked || locked;
25029 });
25030 });
25031 };
25032 for (var _i31 = 0, _Object$keys3 = Object.keys(rulesGroupByDocumentFragment); _i31 < _Object$keys3.length; _i31++) {
25033 if (_loop9()) {
25034 continue;
25035 }
25036 }
25037 if (!isLocked) {
25038 return true;
25039 }
25040 if (relatedElements.length) {
25041 this.relatedNodes(relatedElements);
25042 }
25043 return false;
25044 function groupCssomByDocument(cssObjectModel) {
25045 return cssObjectModel.reduce(function(out, _ref127) {
25046 var sheet = _ref127.sheet, root = _ref127.root, shadowId = _ref127.shadowId;
25047 var key = shadowId ? shadowId : 'topDocument';
25048 if (!out[key]) {
25049 out[key] = {
25050 root: root,
25051 rules: []
25052 };
25053 }
25054 if (!sheet || !sheet.cssRules) {
25055 return out;
25056 }
25057 var rules = Array.from(sheet.cssRules);
25058 out[key].rules = out[key].rules.concat(rules);
25059 return out;
25060 }, {});
25061 }
25062 function isMediaRuleWithOrientation(_ref128) {
25063 var type2 = _ref128.type, cssText = _ref128.cssText;
25064 if (type2 !== 4) {
25065 return false;
25066 }
25067 return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
25068 }
25069 function getIsOrientationLocked(_ref129) {
25070 var selectorText = _ref129.selectorText, style = _ref129.style;
25071 if (!selectorText || style.length <= 0) {
25072 return false;
25073 }
25074 var transformStyle = style.transform || style.webkitTransform || style.msTransform || false;
25075 if (!transformStyle && !style.rotate) {
25076 return false;
25077 }
25078 var transformDegrees = getTransformDegrees(transformStyle);
25079 var rotateDegrees = getRotationInDegrees('rotate', style.rotate);
25080 var degrees = transformDegrees + rotateDegrees;
25081 if (!degrees) {
25082 return false;
25083 }
25084 degrees = Math.abs(degrees);
25085 if (Math.abs(degrees - 180) % 180 <= degreeThreshold) {
25086 return false;
25087 }
25088 return Math.abs(degrees - 90) % 90 <= degreeThreshold;
25089 }
25090 function getTransformDegrees(transformStyle) {
25091 if (!transformStyle) {
25092 return 0;
25093 }
25094 var matches4 = transformStyle.match(/(rotate|rotateZ|rotate3d|matrix|matrix3d)\(([^)]+)\)(?!.*(rotate|rotateZ|rotate3d|matrix|matrix3d))/);
25095 if (!matches4) {
25096 return 0;
25097 }
25098 var _matches2 = _slicedToArray(matches4, 3), transformFn = _matches2[1], transformFnValue = _matches2[2];
25099 return getRotationInDegrees(transformFn, transformFnValue);
25100 }
25101 function getRotationInDegrees(transformFunction, transformFnValue) {
25102 switch (transformFunction) {
25103 case 'rotate':
25104 case 'rotateZ':
25105 return getAngleInDegrees(transformFnValue);
25106
25107 case 'rotate3d':
25108 var _transformFnValue$spl = transformFnValue.split(',').map(function(value) {
25109 return value.trim();
25110 }), _transformFnValue$spl2 = _slicedToArray(_transformFnValue$spl, 4), z = _transformFnValue$spl2[2], angleWithUnit = _transformFnValue$spl2[3];
25111 if (parseInt(z) === 0) {
25112 return;
25113 }
25114 return getAngleInDegrees(angleWithUnit);
25115
25116 case 'matrix':
25117 case 'matrix3d':
25118 return getAngleInDegreesFromMatrixTransform(transformFnValue);
25119
25120 default:
25121 return 0;
25122 }
25123 }
25124 function getAngleInDegrees(angleWithUnit) {
25125 var _ref130 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref131 = _slicedToArray(_ref130, 1), unit = _ref131[0];
25126 if (!unit) {
25127 return 0;
25128 }
25129 var angle = parseFloat(angleWithUnit.replace(unit, ''));
25130 switch (unit) {
25131 case 'rad':
25132 return convertRadToDeg(angle);
25133
25134 case 'grad':
25135 return convertGradToDeg(angle);
25136
25137 case 'turn':
25138 return convertTurnToDeg(angle);
25139
25140 case 'deg':
25141 default:
25142 return parseInt(angle);
25143 }
25144 }
25145 function getAngleInDegreesFromMatrixTransform(transformFnValue) {
25146 var values2 = transformFnValue.split(',');
25147 if (values2.length <= 6) {
25148 var _values = _slicedToArray(values2, 2), a2 = _values[0], b3 = _values[1];
25149 var radians = Math.atan2(parseFloat(b3), parseFloat(a2));
25150 return convertRadToDeg(radians);
25151 }
25152 var sinB = parseFloat(values2[8]);
25153 var b2 = Math.asin(sinB);
25154 var cosB = Math.cos(b2);
25155 var rotateZRadians = Math.acos(parseFloat(values2[0]) / cosB);
25156 return convertRadToDeg(rotateZRadians);
25157 }
25158 function convertRadToDeg(radians) {
25159 return Math.round(radians * (180 / Math.PI));
25160 }
25161 function convertGradToDeg(grad) {
25162 grad = grad % 400;
25163 if (grad < 0) {
25164 grad += 400;
25165 }
25166 return Math.round(grad / 400 * 360);
25167 }
25168 function convertTurnToDeg(turn) {
25169 return Math.round(360 / (1 / turn));
25170 }
25171 }
25172 var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
25173 function noAutoplayAudioEvaluate(node, options) {
25174 var hasControls = node.hasAttribute('controls');
25175 if (node.hasAttribute('loop')) {
25176 return hasControls;
25177 }
25178 if (!node.duration) {
25179 console.warn('axe.utils.preloadMedia did not load metadata');
25180 return void 0;
25181 }
25182 var _options$allowedDurat = options.allowedDuration, allowedDuration = _options$allowedDurat === void 0 ? 3 : _options$allowedDurat;
25183 var playableDuration = getPlayableDuration(node);
25184 if (playableDuration <= allowedDuration) {
25185 return true;
25186 }
25187 if (!hasControls) {
25188 return false;
25189 }
25190 return true;
25191 function getPlayableDuration(elm) {
25192 if (!elm.currentSrc) {
25193 return 0;
25194 }
25195 var playbackRange = getPlaybackRange(elm.currentSrc);
25196 if (!playbackRange) {
25197 return Math.abs(elm.duration - (elm.currentTime || 0));
25198 }
25199 if (playbackRange.length === 1) {
25200 return Math.abs(elm.duration - playbackRange[0]);
25201 }
25202 return Math.abs(playbackRange[1] - playbackRange[0]);
25203 }
25204 function getPlaybackRange(src) {
25205 var match = src.match(/#t=(.*)/);
25206 if (!match) {
25207 return;
25208 }
25209 var _match = _slicedToArray(match, 2), value = _match[1];
25210 var ranges = value.split(',');
25211 return ranges.map(function(range2) {
25212 if (/:/.test(range2)) {
25213 return convertHourMinSecToSeconds(range2);
25214 }
25215 return parseFloat(range2);
25216 });
25217 }
25218 function convertHourMinSecToSeconds(hhMmSs) {
25219 var parts = hhMmSs.split(':');
25220 var secs = 0;
25221 var mins = 1;
25222 while (parts.length > 0) {
25223 secs += mins * parseInt(parts.pop(), 10);
25224 mins *= 60;
25225 }
25226 return parseFloat(secs);
25227 }
25228 }
25229 var no_autoplay_audio_evaluate_default = noAutoplayAudioEvaluate;
25230 function frameTestedEvaluate(node, options) {
25231 return options.isViolation ? false : void 0;
25232 }
25233 var frame_tested_evaluate_default = frameTestedEvaluate;
25234 var joinStr = ' > ';
25235 function frameTestedAfter(results) {
25236 var iframes = {};
25237 return results.filter(function(result) {
25238 var frameResult = result.node.ancestry[result.node.ancestry.length - 1] !== 'html';
25239 if (frameResult) {
25240 var ancestry2 = result.node.ancestry.flat(Infinity).join(joinStr);
25241 iframes[ancestry2] = result;
25242 return true;
25243 }
25244 var ancestry = result.node.ancestry.slice(0, result.node.ancestry.length - 1).flat(Infinity).join(joinStr);
25245 if (iframes[ancestry]) {
25246 iframes[ancestry].result = true;
25247 }
25248 return false;
25249 });
25250 }
25251 var frame_tested_after_default = frameTestedAfter;
25252 function captionEvaluate(node, options, virtualNode) {
25253 var tracks = query_selector_all_default(virtualNode, 'track');
25254 var hasCaptions = tracks.some(function(vNode) {
25255 return (vNode.attr('kind') || '').toLowerCase() === 'captions';
25256 });
25257 return hasCaptions ? false : void 0;
25258 }
25259 var caption_evaluate_default = captionEvaluate;
25260 function structuredDlitemsEvaluate(node, options, virtualNode) {
25261 var children = virtualNode.children;
25262 if (!children || !children.length) {
25263 return false;
25264 }
25265 var hasDt = false, hasDd = false, nodeName2;
25266 for (var _i32 = 0; _i32 < children.length; _i32++) {
25267 nodeName2 = children[_i32].props.nodeName.toUpperCase();
25268 if (nodeName2 === 'DT') {
25269 hasDt = true;
25270 }
25271 if (hasDt && nodeName2 === 'DD') {
25272 return false;
25273 }
25274 if (nodeName2 === 'DD') {
25275 hasDd = true;
25276 }
25277 }
25278 return hasDt || hasDd;
25279 }
25280 var structured_dlitems_evaluate_default = structuredDlitemsEvaluate;
25281 function onlyListitemsEvaluate(node, options, virtualNode) {
25282 var hasNonEmptyTextNode = false;
25283 var atLeastOneListitem = false;
25284 var isEmpty2 = true;
25285 var badNodes = [];
25286 var badRoleNodes = [];
25287 var badRoles = [];
25288 virtualNode.children.forEach(function(vNode) {
25289 var actualNode = vNode.actualNode;
25290 if (actualNode.nodeType === 3 && actualNode.nodeValue.trim() !== '') {
25291 hasNonEmptyTextNode = true;
25292 return;
25293 }
25294 if (actualNode.nodeType !== 1 || !_isVisibleToScreenReaders(actualNode)) {
25295 return;
25296 }
25297 isEmpty2 = false;
25298 var isLi = actualNode.nodeName.toUpperCase() === 'LI';
25299 var role = get_role_default(vNode);
25300 var isListItemRole = role === 'listitem';
25301 if (!isLi && !isListItemRole) {
25302 badNodes.push(actualNode);
25303 }
25304 if (isLi && !isListItemRole) {
25305 badRoleNodes.push(actualNode);
25306 if (!badRoles.includes(role)) {
25307 badRoles.push(role);
25308 }
25309 }
25310 if (isListItemRole) {
25311 atLeastOneListitem = true;
25312 }
25313 });
25314 if (hasNonEmptyTextNode || badNodes.length) {
25315 this.relatedNodes(badNodes);
25316 return true;
25317 }
25318 if (isEmpty2 || atLeastOneListitem) {
25319 return false;
25320 }
25321 this.relatedNodes(badRoleNodes);
25322 this.data({
25323 messageKey: 'roleNotValid',
25324 roles: badRoles.join(', ')
25325 });
25326 return true;
25327 }
25328 var only_listitems_evaluate_default = onlyListitemsEvaluate;
25329 function onlyDlitemsEvaluate(node, options, virtualNode) {
25330 var ALLOWED_ROLES = [ 'definition', 'term', 'list' ];
25331 var base = {
25332 badNodes: [],
25333 hasNonEmptyTextNode: false
25334 };
25335 var content = virtualNode.children.reduce(function(vNodes, child) {
25336 var actualNode = child.actualNode;
25337 if (actualNode.nodeName.toUpperCase() === 'DIV' && get_role_default(actualNode) === null) {
25338 return vNodes.concat(child.children);
25339 }
25340 return vNodes.concat(child);
25341 }, []);
25342 var result = content.reduce(function(out, childNode) {
25343 var actualNode = childNode.actualNode;
25344 var tagName = actualNode.nodeName.toUpperCase();
25345 if (actualNode.nodeType === 1 && _isVisibleToScreenReaders(actualNode)) {
25346 var explicitRole2 = get_explicit_role_default(actualNode);
25347 if (tagName !== 'DT' && tagName !== 'DD' || explicitRole2) {
25348 if (!ALLOWED_ROLES.includes(explicitRole2)) {
25349 out.badNodes.push(actualNode);
25350 }
25351 }
25352 } else if (actualNode.nodeType === 3 && actualNode.nodeValue.trim() !== '') {
25353 out.hasNonEmptyTextNode = true;
25354 }
25355 return out;
25356 }, base);
25357 if (result.badNodes.length) {
25358 this.relatedNodes(result.badNodes);
25359 }
25360 return !!result.badNodes.length || result.hasNonEmptyTextNode;
25361 }
25362 function listitemEvaluate(node, options, virtualNode) {
25363 var parent = virtualNode.parent;
25364 if (!parent) {
25365 return void 0;
25366 }
25367 var parentNodeName = parent.props.nodeName;
25368 var parentRole = get_explicit_role_default(parent);
25369 if ([ 'presentation', 'none', 'list' ].includes(parentRole)) {
25370 return true;
25371 }
25372 if (parentRole && is_valid_role_default(parentRole)) {
25373 this.data({
25374 messageKey: 'roleNotValid'
25375 });
25376 return false;
25377 }
25378 return [ 'ul', 'ol', 'menu' ].includes(parentNodeName);
25379 }
25380 function invalidChildrenEvaluate(node) {
25381 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
25382 var virtualNode = arguments.length > 2 ? arguments[2] : undefined;
25383 var relatedNodes = [];
25384 var issues = [];
25385 if (!virtualNode.children) {
25386 return void 0;
25387 }
25388 var vChildren = mapWithNested(virtualNode.children);
25389 while (vChildren.length) {
25390 var _vChild$actualNode;
25391 var _vChildren$shift = vChildren.shift(), vChild = _vChildren$shift.vChild, nested = _vChildren$shift.nested;
25392 if (options.divGroups && !nested && isDivGroup(vChild)) {
25393 if (!vChild.children) {
25394 return void 0;
25395 }
25396 var vGrandChildren = mapWithNested(vChild.children, true);
25397 vChildren.push.apply(vChildren, _toConsumableArray(vGrandChildren));
25398 continue;
25399 }
25400 var issue = getInvalidSelector(vChild, nested, options);
25401 if (!issue) {
25402 continue;
25403 }
25404 if (!issues.includes(issue)) {
25405 issues.push(issue);
25406 }
25407 if ((vChild === null || vChild === void 0 || (_vChild$actualNode = vChild.actualNode) === null || _vChild$actualNode === void 0 ? void 0 : _vChild$actualNode.nodeType) === 1) {
25408 relatedNodes.push(vChild.actualNode);
25409 }
25410 }
25411 if (issues.length === 0) {
25412 return false;
25413 }
25414 this.data({
25415 values: issues.join(', ')
25416 });
25417 this.relatedNodes(relatedNodes);
25418 return true;
25419 }
25420 function getInvalidSelector(vChild, nested, _ref132) {
25421 var _ref132$validRoles = _ref132.validRoles, validRoles = _ref132$validRoles === void 0 ? [] : _ref132$validRoles, _ref132$validNodeName = _ref132.validNodeNames, validNodeNames = _ref132$validNodeName === void 0 ? [] : _ref132$validNodeName;
25422 var _vChild$props = vChild.props, nodeName2 = _vChild$props.nodeName, nodeType = _vChild$props.nodeType, nodeValue = _vChild$props.nodeValue;
25423 var selector = nested ? 'div > ' : '';
25424 if (nodeType === 3 && nodeValue.trim() !== '') {
25425 return selector + '#text';
25426 }
25427 if (nodeType !== 1 || !_isVisibleToScreenReaders(vChild)) {
25428 return false;
25429 }
25430 var role = get_explicit_role_default(vChild);
25431 if (role) {
25432 return validRoles.includes(role) ? false : selector + '[role='.concat(role, ']');
25433 } else {
25434 return validNodeNames.includes(nodeName2) ? false : selector + nodeName2;
25435 }
25436 }
25437 function isDivGroup(vNode) {
25438 return vNode.props.nodeName === 'div' && get_explicit_role_default(vNode) === null;
25439 }
25440 function mapWithNested(vNodes) {
25441 var nested = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
25442 return vNodes.map(function(vChild) {
25443 return {
25444 vChild: vChild,
25445 nested: nested
25446 };
25447 });
25448 }
25449 function dlitemEvaluate(node) {
25450 var parent = get_composed_parent_default(node);
25451 var parentTagName = parent.nodeName.toUpperCase();
25452 var parentRole = get_explicit_role_default(parent);
25453 if (parentTagName === 'DIV' && [ 'presentation', 'none', null ].includes(parentRole)) {
25454 parent = get_composed_parent_default(parent);
25455 parentTagName = parent.nodeName.toUpperCase();
25456 parentRole = get_explicit_role_default(parent);
25457 }
25458 if (parentTagName !== 'DL') {
25459 return false;
25460 }
25461 if (!parentRole || [ 'presentation', 'none', 'list' ].includes(parentRole)) {
25462 return true;
25463 }
25464 return false;
25465 }
25466 var dlitem_evaluate_default = dlitemEvaluate;
25467 function xmlLangMismatchEvaluate(node, options, vNode) {
25468 var primaryLangValue = get_base_lang_default(vNode.attr('lang'));
25469 var primaryXmlLangValue = get_base_lang_default(vNode.attr('xml:lang'));
25470 return primaryLangValue === primaryXmlLangValue;
25471 }
25472 var xml_lang_mismatch_evaluate_default = xmlLangMismatchEvaluate;
25473 function validLangEvaluate(node, options, virtualNode) {
25474 var invalid = [];
25475 options.attributes.forEach(function(langAttr) {
25476 var langVal = virtualNode.attr(langAttr);
25477 if (typeof langVal !== 'string') {
25478 return;
25479 }
25480 var baselangVal = get_base_lang_default(langVal);
25481 var invalidLang = options.value ? !options.value.map(get_base_lang_default).includes(baselangVal) : !valid_langs_default(baselangVal);
25482 if (baselangVal !== '' && invalidLang || langVal !== '' && !sanitize_default(langVal)) {
25483 invalid.push(langAttr + '="' + virtualNode.attr(langAttr) + '"');
25484 }
25485 });
25486 if (!invalid.length) {
25487 return false;
25488 }
25489 if (virtualNode.props.nodeName !== 'html' && !_hasLangText(virtualNode)) {
25490 return false;
25491 }
25492 this.data(invalid);
25493 return true;
25494 }
25495 var valid_lang_evaluate_default = validLangEvaluate;
25496 function hasValue(value) {
25497 return (value || '').trim() !== '';
25498 }
25499 function hasLangEvaluate(node, options, virtualNode) {
25500 var xhtml = typeof document !== 'undefined' ? is_xhtml_default(document) : false;
25501 if (options.attributes.includes('xml:lang') && options.attributes.includes('lang') && hasValue(virtualNode.attr('xml:lang')) && !hasValue(virtualNode.attr('lang')) && !xhtml) {
25502 this.data({
25503 messageKey: 'noXHTML'
25504 });
25505 return false;
25506 }
25507 var hasLang = options.attributes.some(function(name) {
25508 return hasValue(virtualNode.attr(name));
25509 });
25510 if (!hasLang) {
25511 this.data({
25512 messageKey: 'noLang'
25513 });
25514 return false;
25515 }
25516 return true;
25517 }
25518 var has_lang_evaluate_default = hasLangEvaluate;
25519 function landmarkIsUniqueEvaluate(node, options, virtualNode) {
25520 var role = get_role_default(node);
25521 var accessibleText2 = _accessibleTextVirtual(virtualNode);
25522 accessibleText2 = accessibleText2 ? accessibleText2.toLowerCase() : null;
25523 this.data({
25524 role: role,
25525 accessibleText: accessibleText2
25526 });
25527 this.relatedNodes([ node ]);
25528 return true;
25529 }
25530 var landmark_is_unique_evaluate_default = landmarkIsUniqueEvaluate;
25531 function landmarkIsUniqueAfter(results) {
25532 var uniqueLandmarks = [];
25533 return results.filter(function(currentResult) {
25534 var findMatch = function findMatch(someResult) {
25535 return currentResult.data.role === someResult.data.role && currentResult.data.accessibleText === someResult.data.accessibleText;
25536 };
25537 var matchedResult = uniqueLandmarks.find(findMatch);
25538 if (matchedResult) {
25539 matchedResult.result = false;
25540 matchedResult.relatedNodes.push(currentResult.relatedNodes[0]);
25541 return false;
25542 }
25543 uniqueLandmarks.push(currentResult);
25544 currentResult.relatedNodes = [];
25545 return true;
25546 });
25547 }
25548 var landmark_is_unique_after_default = landmarkIsUniqueAfter;
25549 function titleOnlyEvaluate(node, options, virtualNode) {
25550 var labelText2 = label_virtual_default2(virtualNode);
25551 var title = title_text_default(virtualNode);
25552 var ariaDescribedBy = virtualNode.attr('aria-describedby');
25553 return !labelText2 && !!(title || ariaDescribedBy);
25554 }
25555 var title_only_evaluate_default = titleOnlyEvaluate;
25556 function multipleLabelEvaluate(node) {
25557 var id = escape_selector_default(node.getAttribute('id'));
25558 var parent = node.parentNode;
25559 var root = get_root_node_default2(node);
25560 root = root.documentElement || root;
25561 var labels = Array.from(root.querySelectorAll('label[for="'.concat(id, '"]')));
25562 if (labels.length) {
25563 labels = labels.filter(function(label3) {
25564 return !_isHiddenForEveryone(label3);
25565 });
25566 }
25567 while (parent) {
25568 if (parent.nodeName.toUpperCase() === 'LABEL' && labels.indexOf(parent) === -1) {
25569 labels.push(parent);
25570 }
25571 parent = parent.parentNode;
25572 }
25573 this.relatedNodes(labels);
25574 if (labels.length > 1) {
25575 var ATVisibleLabels = labels.filter(function(label3) {
25576 return _isVisibleToScreenReaders(label3);
25577 });
25578 if (ATVisibleLabels.length > 1) {
25579 return void 0;
25580 }
25581 var labelledby = idrefs_default(node, 'aria-labelledby');
25582 return !labelledby.includes(ATVisibleLabels[0]) ? void 0 : false;
25583 }
25584 return false;
25585 }
25586 var multiple_label_evaluate_default = multipleLabelEvaluate;
25587 function isStringContained(compare, compareWith) {
25588 var curatedCompareWith = curateString(compareWith);
25589 var curatedCompare = curateString(compare);
25590 if (!curatedCompareWith || !curatedCompare) {
25591 return false;
25592 }
25593 return curatedCompareWith.includes(curatedCompare);
25594 }
25595 function curateString(str) {
25596 var noUnicodeStr = remove_unicode_default(str, {
25597 emoji: true,
25598 nonBmp: true,
25599 punctuations: true
25600 });
25601 return sanitize_default(noUnicodeStr);
25602 }
25603 function labelContentNameMismatchEvaluate(node, options, virtualNode) {
25604 var _options$occurrenceTh;
25605 var pixelThreshold = options === null || options === void 0 ? void 0 : options.pixelThreshold;
25606 var occurrenceThreshold = (_options$occurrenceTh = options === null || options === void 0 ? void 0 : options.occurrenceThreshold) !== null && _options$occurrenceTh !== void 0 ? _options$occurrenceTh : options === null || options === void 0 ? void 0 : options.occuranceThreshold;
25607 var accText = accessible_text_default(node).toLowerCase();
25608 var visibleText = sanitize_default(subtree_text_default(virtualNode, {
25609 subtreeDescendant: true,
25610 ignoreIconLigature: true,
25611 pixelThreshold: pixelThreshold,
25612 occurrenceThreshold: occurrenceThreshold
25613 })).toLowerCase();
25614 if (!visibleText) {
25615 return true;
25616 }
25617 if (is_human_interpretable_default(accText) < 1 || is_human_interpretable_default(visibleText) < 1) {
25618 return void 0;
25619 }
25620 return isStringContained(visibleText, accText);
25621 }
25622 var label_content_name_mismatch_evaluate_default = labelContentNameMismatchEvaluate;
25623 function implicitEvaluate(node, options, virtualNode) {
25624 try {
25625 var label3 = closest_default(virtualNode, 'label');
25626 if (label3) {
25627 var implicitLabel = sanitize_default(_accessibleTextVirtual(label3, {
25628 inControlContext: true,
25629 startNode: virtualNode
25630 }));
25631 if (label3.actualNode) {
25632 this.relatedNodes([ label3.actualNode ]);
25633 }
25634 this.data({
25635 implicitLabel: implicitLabel
25636 });
25637 return !!implicitLabel;
25638 }
25639 return false;
25640 } catch (_unused0) {
25641 return void 0;
25642 }
25643 }
25644 var implicit_evaluate_default = implicitEvaluate;
25645 function hiddenExplicitLabelEvaluate(node, options, virtualNode) {
25646 if (virtualNode.hasAttr('id')) {
25647 if (!virtualNode.actualNode) {
25648 return void 0;
25649 }
25650 var root = get_root_node_default2(node);
25651 var _id6 = escape_selector_default(node.getAttribute('id'));
25652 var label3 = root.querySelector('label[for="'.concat(_id6, '"]'));
25653 if (label3 && !_isVisibleToScreenReaders(label3)) {
25654 var name;
25655 try {
25656 name = _accessibleTextVirtual(virtualNode).trim();
25657 } catch (_unused1) {
25658 return void 0;
25659 }
25660 var isNameEmpty = name === '';
25661 return isNameEmpty;
25662 }
25663 }
25664 return false;
25665 }
25666 var hidden_explicit_label_evaluate_default = hiddenExplicitLabelEvaluate;
25667 function helpSameAsLabelEvaluate(node, options, virtualNode) {
25668 var labelText2 = label_virtual_default2(virtualNode);
25669 var check = node.getAttribute('title');
25670 if (!labelText2) {
25671 return false;
25672 }
25673 if (!check) {
25674 check = '';
25675 if (node.getAttribute('aria-describedby')) {
25676 var ref = idrefs_default(node, 'aria-describedby');
25677 check = ref.map(function(thing) {
25678 return thing ? accessible_text_default(thing) : '';
25679 }).join('');
25680 }
25681 }
25682 return sanitize_default(check) === sanitize_default(labelText2);
25683 }
25684 var help_same_as_label_evaluate_default = helpSameAsLabelEvaluate;
25685 function explicitEvaluate(node, options, virtualNode) {
25686 var _this9 = this;
25687 if (!virtualNode.attr('id')) {
25688 return false;
25689 }
25690 if (!virtualNode.actualNode) {
25691 return void 0;
25692 }
25693 var root = get_root_node_default2(virtualNode.actualNode);
25694 var id = escape_selector_default(virtualNode.attr('id'));
25695 var labels = Array.from(root.querySelectorAll('label[for="'.concat(id, '"]')));
25696 this.relatedNodes(labels);
25697 if (!labels.length) {
25698 return false;
25699 }
25700 try {
25701 return labels.some(function(label3) {
25702 if (!_isVisibleOnScreen(label3)) {
25703 return true;
25704 } else {
25705 var explicitLabel = sanitize_default(accessible_text_default(label3, {
25706 inControlContext: true,
25707 startNode: virtualNode
25708 }));
25709 _this9.data({
25710 explicitLabel: explicitLabel
25711 });
25712 return !!explicitLabel;
25713 }
25714 });
25715 } catch (_unused10) {
25716 return void 0;
25717 }
25718 }
25719 var explicit_evaluate_default = explicitEvaluate;
25720 function duplicateImgLabelEvaluate(node, options, virtualNode) {
25721 if ([ 'none', 'presentation' ].includes(get_role_default(virtualNode))) {
25722 return false;
25723 }
25724 var parentVNode = closest_default(virtualNode, options.parentSelector);
25725 if (!parentVNode) {
25726 return false;
25727 }
25728 var visibleText = visible_virtual_default(parentVNode, true).toLowerCase();
25729 if (visibleText === '') {
25730 return false;
25731 }
25732 return visibleText === _accessibleTextVirtual(virtualNode).toLowerCase();
25733 }
25734 var duplicate_img_label_evaluate_default = duplicateImgLabelEvaluate;
25735 function altSpaceValueEvaluate(node, options, virtualNode) {
25736 var alt = virtualNode.attr('alt');
25737 var isOnlySpace = /^\s+$/;
25738 return typeof alt === 'string' && isOnlySpace.test(alt);
25739 }
25740 var alt_space_value_evaluate_default = altSpaceValueEvaluate;
25741 function tabindexEvaluate(node, options, virtualNode) {
25742 var tabIndex = parse_tabindex_default(virtualNode.attr('tabindex'));
25743 return tabIndex === null || tabIndex <= 0;
25744 }
25745 var tabindex_evaluate_default = tabindexEvaluate;
25746 function noFocusableContentEvaluate(node, options, virtualNode) {
25747 if (!virtualNode.children) {
25748 return void 0;
25749 }
25750 try {
25751 var focusableDescendants2 = getFocusableDescendants(virtualNode);
25752 if (!focusableDescendants2.length) {
25753 return true;
25754 }
25755 var notHiddenElements = focusableDescendants2.filter(usesUnreliableHidingStrategy);
25756 if (notHiddenElements.length > 0) {
25757 this.data({
25758 messageKey: 'notHidden'
25759 });
25760 this.relatedNodes(notHiddenElements);
25761 } else {
25762 this.relatedNodes(focusableDescendants2);
25763 }
25764 return false;
25765 } catch (_unused11) {
25766 return void 0;
25767 }
25768 }
25769 function getFocusableDescendants(vNode) {
25770 if (!vNode.children) {
25771 if (vNode.props.nodeType === 1) {
25772 throw new Error('Cannot determine children');
25773 }
25774 return [];
25775 }
25776 var retVal = [];
25777 vNode.children.forEach(function(child) {
25778 if (get_role_type_default(child) === 'widget' && _isFocusable(child)) {
25779 retVal.push(child);
25780 } else {
25781 retVal.push.apply(retVal, _toConsumableArray(getFocusableDescendants(child)));
25782 }
25783 });
25784 return retVal;
25785 }
25786 function usesUnreliableHidingStrategy(vNode) {
25787 var tabIndex = parse_tabindex_default(vNode.attr('tabindex'));
25788 return tabIndex !== null && tabIndex < 0;
25789 }
25790 function landmarkIsTopLevelEvaluate(node) {
25791 var landmarks = get_aria_roles_by_type_default('landmark');
25792 var parent = get_composed_parent_default(node);
25793 var nodeRole = get_role_default(node);
25794 this.data({
25795 role: nodeRole
25796 });
25797 while (parent) {
25798 var role = get_explicit_role_default(parent);
25799 if (!role && parent.nodeName.toUpperCase() !== 'FORM') {
25800 role = implicit_role_default(parent);
25801 }
25802 if (role && landmarks.includes(role) && !(role === 'main' && nodeRole === 'complementary')) {
25803 return false;
25804 }
25805 parent = get_composed_parent_default(parent);
25806 }
25807 return true;
25808 }
25809 var landmark_is_top_level_evaluate_default = landmarkIsTopLevelEvaluate;
25810 function frameFocusableContentEvaluate(node, options, virtualNode) {
25811 if (!virtualNode.children) {
25812 return void 0;
25813 }
25814 try {
25815 return !virtualNode.children.some(function(child) {
25816 return focusableDescendants(child);
25817 });
25818 } catch (_unused12) {
25819 return void 0;
25820 }
25821 }
25822 function focusableDescendants(vNode) {
25823 if (_isInTabOrder(vNode)) {
25824 return true;
25825 }
25826 if (!vNode.children) {
25827 if (vNode.props.nodeType === 1) {
25828 throw new Error('Cannot determine children');
25829 }
25830 return false;
25831 }
25832 return vNode.children.some(function(child) {
25833 return focusableDescendants(child);
25834 });
25835 }
25836 function focusableNotTabbableEvaluate(node, options, virtualNode) {
25837 var elementsThatCanBeDisabled = [ 'button', 'fieldset', 'input', 'select', 'textarea' ];
25838 var tabbableElements = virtualNode.tabbableElements;
25839 if (!tabbableElements || !tabbableElements.length) {
25840 return true;
25841 }
25842 var relatedNodes = tabbableElements.filter(function(vNode) {
25843 return !elementsThatCanBeDisabled.includes(vNode.props.nodeName);
25844 });
25845 this.relatedNodes(relatedNodes.map(function(vNode) {
25846 return vNode.actualNode;
25847 }));
25848 if (relatedNodes.length === 0 || is_modal_open_default()) {
25849 return true;
25850 }
25851 return relatedNodes.every(function(vNode) {
25852 var pointerEvents = vNode.getComputedStylePropertyValue('pointer-events');
25853 var width = parseInt(vNode.getComputedStylePropertyValue('width'));
25854 var height = parseInt(vNode.getComputedStylePropertyValue('height'));
25855 return vNode.actualNode.onfocus || (width === 0 || height === 0) && pointerEvents === 'none';
25856 }) ? void 0 : false;
25857 }
25858 var focusable_not_tabbable_evaluate_default = focusableNotTabbableEvaluate;
25859 function focusableNoNameEvaluate(node, options, virtualNode) {
25860 if (!_isInTabOrder(virtualNode)) {
25861 return false;
25862 }
25863 try {
25864 return !_accessibleTextVirtual(virtualNode);
25865 } catch (_unused13) {
25866 return void 0;
25867 }
25868 }
25869 var focusable_no_name_evaluate_default = focusableNoNameEvaluate;
25870 function focusableModalOpenEvaluate(node, options, virtualNode) {
25871 var tabbableElements = virtualNode.tabbableElements.map(function(_ref133) {
25872 var actualNode = _ref133.actualNode;
25873 return actualNode;
25874 });
25875 if (!tabbableElements || !tabbableElements.length) {
25876 return true;
25877 }
25878 if (is_modal_open_default()) {
25879 this.relatedNodes(tabbableElements);
25880 return void 0;
25881 }
25882 return true;
25883 }
25884 var focusable_modal_open_evaluate_default = focusableModalOpenEvaluate;
25885 function focusableElementEvaluate(node, options, virtualNode) {
25886 if (virtualNode.hasAttr('contenteditable') && isContenteditable(virtualNode)) {
25887 return true;
25888 }
25889 return _isInTabOrder(virtualNode);
25890 function isContenteditable(vNode) {
25891 var contenteditable = vNode.attr('contenteditable');
25892 if (contenteditable === 'true' || contenteditable === '') {
25893 return true;
25894 }
25895 if (contenteditable === 'false') {
25896 return false;
25897 }
25898 var ancestor = closest_default(virtualNode.parent, '[contenteditable]');
25899 if (!ancestor) {
25900 return false;
25901 }
25902 return isContenteditable(ancestor);
25903 }
25904 }
25905 var focusable_element_evaluate_default = focusableElementEvaluate;
25906 function focusableDisabledEvaluate(node, options, virtualNode) {
25907 var elementsThatCanBeDisabled = [ 'button', 'fieldset', 'input', 'select', 'textarea' ];
25908 var tabbableElements = virtualNode.tabbableElements;
25909 if (!tabbableElements || !tabbableElements.length) {
25910 return true;
25911 }
25912 var relatedNodes = tabbableElements.filter(function(vNode) {
25913 return elementsThatCanBeDisabled.includes(vNode.props.nodeName);
25914 });
25915 this.relatedNodes(relatedNodes.map(function(vNode) {
25916 return vNode.actualNode;
25917 }));
25918 if (relatedNodes.length === 0 || is_modal_open_default()) {
25919 return true;
25920 }
25921 return relatedNodes.every(function(vNode) {
25922 var pointerEvents = vNode.getComputedStylePropertyValue('pointer-events');
25923 var width = parseInt(vNode.getComputedStylePropertyValue('width'));
25924 var height = parseInt(vNode.getComputedStylePropertyValue('height'));
25925 return vNode.actualNode.onfocus || (width === 0 || height === 0) && pointerEvents === 'none';
25926 }) ? void 0 : false;
25927 }
25928 var focusable_disabled_evaluate_default = focusableDisabledEvaluate;
25929 function focusableContentEvaluate(node, options, virtualNode) {
25930 var tabbableElements = virtualNode.tabbableElements;
25931 if (!tabbableElements) {
25932 return false;
25933 }
25934 var tabbableContentElements = tabbableElements.filter(function(el) {
25935 return el !== virtualNode;
25936 });
25937 return tabbableContentElements.length > 0;
25938 }
25939 var focusable_content_evaluate_default = focusableContentEvaluate;
25940 function accesskeysEvaluate(node, options, vNode) {
25941 if (!_isHiddenForEveryone(vNode)) {
25942 this.data(vNode.attr('accesskey'));
25943 this.relatedNodes([ node ]);
25944 }
25945 return true;
25946 }
25947 var accesskeys_evaluate_default = accesskeysEvaluate;
25948 function accesskeysAfter(results) {
25949 var seen = {};
25950 return results.filter(function(r) {
25951 if (!r.data) {
25952 return false;
25953 }
25954 var key = r.data.toUpperCase();
25955 if (!seen[key]) {
25956 seen[key] = r;
25957 r.relatedNodes = [];
25958 return true;
25959 }
25960 seen[key].relatedNodes.push(r.relatedNodes[0]);
25961 return false;
25962 }).map(function(r) {
25963 r.result = !!r.relatedNodes.length;
25964 return r;
25965 });
25966 }
25967 var accesskeys_after_default = accesskeysAfter;
25968 function pageNoDuplicateEvaluate(node, options, virtualNode) {
25969 if (!options || !options.selector || typeof options.selector !== 'string') {
25970 throw new TypeError('page-no-duplicate requires options.selector to be a string');
25971 }
25972 var key = 'page-no-duplicate;' + options.selector;
25973 if (cache_default.get(key)) {
25974 this.data('ignored');
25975 return;
25976 }
25977 cache_default.set(key, true);
25978 var elms = query_selector_all_filter_default(axe._tree[0], options.selector, function(elm) {
25979 return _isVisibleToScreenReaders(elm);
25980 });
25981 if (typeof options.nativeScopeFilter === 'string') {
25982 elms = elms.filter(function(elm) {
25983 return elm.actualNode.hasAttribute('role') || !find_up_virtual_default(elm, options.nativeScopeFilter);
25984 });
25985 }
25986 if (typeof options.role === 'string') {
25987 elms = elms.filter(function(elm) {
25988 return get_role_default(elm) === options.role;
25989 });
25990 }
25991 this.relatedNodes(elms.filter(function(elm) {
25992 return elm !== virtualNode;
25993 }).map(function(elm) {
25994 return elm.actualNode;
25995 }));
25996 return elms.length <= 1;
25997 }
25998 var page_no_duplicate_evaluate_default = pageNoDuplicateEvaluate;
25999 function pageNoDuplicateAfter(results) {
26000 return results.filter(function(checkResult) {
26001 return checkResult.data !== 'ignored';
26002 });
26003 }
26004 var page_no_duplicate_after_default = pageNoDuplicateAfter;
26005 function matchesDefinitionEvaluate(_, options, virtualNode) {
26006 return matches_default2(virtualNode, options.matcher);
26007 }
26008 var matches_definition_evaluate_default = matchesDefinitionEvaluate;
26009 function hasTextContentEvaluate(node, options, virtualNode) {
26010 try {
26011 return sanitize_default(subtree_text_default(virtualNode)) !== '';
26012 } catch (_unused14) {
26013 return void 0;
26014 }
26015 }
26016 function hasDescendant(node, options, virtualNode) {
26017 if (!options || !options.selector || typeof options.selector !== 'string') {
26018 throw new TypeError('has-descendant requires options.selector to be a string');
26019 }
26020 if (options.passForModal && is_modal_open_default()) {
26021 return true;
26022 }
26023 var matchingElms = query_selector_all_filter_default(virtualNode, options.selector, function(vNode) {
26024 return _isVisibleToScreenReaders(vNode);
26025 });
26026 this.relatedNodes(matchingElms.map(function(vNode) {
26027 return vNode.actualNode;
26028 }));
26029 return matchingElms.length > 0;
26030 }
26031 var has_descendant_evaluate_default = hasDescendant;
26032 function pageHasElmAfter(results) {
26033 var elmUsedAnywhere = results.some(function(frameResult) {
26034 return frameResult.result === true;
26035 });
26036 if (elmUsedAnywhere) {
26037 results.forEach(function(result) {
26038 result.result = true;
26039 });
26040 }
26041 return results;
26042 }
26043 var has_descendant_after_default = pageHasElmAfter;
26044 function attrNonSpaceContentEvaluate(node) {
26045 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
26046 var vNode = arguments.length > 2 ? arguments[2] : undefined;
26047 if (!options.attribute || typeof options.attribute !== 'string') {
26048 throw new TypeError('attr-non-space-content requires options.attribute to be a string');
26049 }
26050 if (!vNode.hasAttr(options.attribute)) {
26051 this.data({
26052 messageKey: 'noAttr'
26053 });
26054 return false;
26055 }
26056 var attribute = vNode.attr(options.attribute);
26057 var attributeIsEmpty = !sanitize_default(attribute);
26058 if (attributeIsEmpty) {
26059 this.data({
26060 messageKey: 'emptyAttr'
26061 });
26062 return false;
26063 }
26064 return true;
26065 }
26066 var attr_non_space_content_evaluate_default = attrNonSpaceContentEvaluate;
26067 function autocompleteValidEvaluate(_node, options, virtualNode) {
26068 var autocomplete2 = virtualNode.attr('autocomplete') || '';
26069 return is_valid_autocomplete_default(autocomplete2, options);
26070 }
26071 var autocomplete_valid_evaluate_default = autocompleteValidEvaluate;
26072 function autocompleteAppropriateEvaluate(node, options, virtualNode) {
26073 if (virtualNode.props.nodeName !== 'input') {
26074 return true;
26075 }
26076 var number = [ 'text', 'search', 'number', 'tel' ];
26077 var url = [ 'text', 'search', 'url' ];
26078 var allowedTypesMap = {
26079 bday: [ 'text', 'search', 'date' ],
26080 email: [ 'text', 'search', 'email' ],
26081 username: [ 'text', 'search', 'email' ],
26082 'street-address': [ 'text' ],
26083 tel: [ 'text', 'search', 'tel' ],
26084 'tel-country-code': [ 'text', 'search', 'tel' ],
26085 'tel-national': [ 'text', 'search', 'tel' ],
26086 'tel-area-code': [ 'text', 'search', 'tel' ],
26087 'tel-local': [ 'text', 'search', 'tel' ],
26088 'tel-local-prefix': [ 'text', 'search', 'tel' ],
26089 'tel-local-suffix': [ 'text', 'search', 'tel' ],
26090 'tel-extension': [ 'text', 'search', 'tel' ],
26091 'cc-number': number,
26092 'cc-exp': [ 'text', 'search', 'month', 'tel' ],
26093 'cc-exp-month': number,
26094 'cc-exp-year': number,
26095 'cc-csc': number,
26096 'transaction-amount': number,
26097 'bday-day': number,
26098 'bday-month': number,
26099 'bday-year': number,
26100 'new-password': [ 'text', 'search', 'password' ],
26101 'current-password': [ 'text', 'search', 'password' ],
26102 url: url,
26103 photo: url,
26104 impp: url
26105 };
26106 if (_typeof(options) === 'object') {
26107 Object.keys(options).forEach(function(key) {
26108 if (!allowedTypesMap[key]) {
26109 allowedTypesMap[key] = [];
26110 }
26111 allowedTypesMap[key] = allowedTypesMap[key].concat(options[key]);
26112 });
26113 }
26114 var autocompleteAttr = virtualNode.attr('autocomplete');
26115 var autocompleteTerms = autocompleteAttr.split(/\s+/g).map(function(term) {
26116 return term.toLowerCase();
26117 });
26118 var purposeTerm = autocompleteTerms[autocompleteTerms.length - 1];
26119 if (_autocomplete.stateTerms.includes(purposeTerm)) {
26120 return true;
26121 }
26122 var allowedTypes = allowedTypesMap[purposeTerm];
26123 var type2 = virtualNode.hasAttr('type') ? sanitize_default(virtualNode.attr('type')).toLowerCase() : 'text';
26124 type2 = valid_input_type_default().includes(type2) ? type2 : 'text';
26125 if (typeof allowedTypes === 'undefined') {
26126 return type2 === 'text';
26127 }
26128 return allowedTypes.includes(type2);
26129 }
26130 var autocomplete_appropriate_evaluate_default = autocompleteAppropriateEvaluate;
26131 var blockLike2 = [ 'block', 'list-item', 'table', 'flex', 'grid', 'inline-block' ];
26132 function linkInTextBlockStyleEvaluate(node) {
26133 if (isBlock2(node)) {
26134 return false;
26135 }
26136 var parentBlock = get_composed_parent_default(node);
26137 while (parentBlock && parentBlock.nodeType === 1 && !isBlock2(parentBlock)) {
26138 parentBlock = get_composed_parent_default(parentBlock);
26139 }
26140 if (!parentBlock) {
26141 return void 0;
26142 }
26143 this.relatedNodes([ parentBlock ]);
26144 if (element_is_distinct_default(node, parentBlock)) {
26145 return true;
26146 }
26147 if (hasPseudoContent(node)) {
26148 this.data({
26149 messageKey: 'pseudoContent'
26150 });
26151 return void 0;
26152 }
26153 return false;
26154 }
26155 function isBlock2(elm) {
26156 var display2 = window.getComputedStyle(elm).getPropertyValue('display');
26157 return blockLike2.indexOf(display2) !== -1 || display2.substr(0, 6) === 'table-';
26158 }
26159 function hasPseudoContent(node) {
26160 for (var _i33 = 0, _arr3 = [ 'before', 'after' ]; _i33 < _arr3.length; _i33++) {
26161 var pseudo = _arr3[_i33];
26162 var style = window.getComputedStyle(node, ':'.concat(pseudo));
26163 var content = style.getPropertyValue('content');
26164 if (content !== 'none') {
26165 return true;
26166 }
26167 }
26168 return false;
26169 }
26170 function getContrast2(color1, color2) {
26171 var c1lum = color1.getRelativeLuminance();
26172 var c2lum = color2.getRelativeLuminance();
26173 return (Math.max(c1lum, c2lum) + .05) / (Math.min(c1lum, c2lum) + .05);
26174 }
26175 var blockLike3 = [ 'block', 'list-item', 'table', 'flex', 'grid', 'inline-block' ];
26176 function isBlock3(elm) {
26177 var display2 = window.getComputedStyle(elm).getPropertyValue('display');
26178 return blockLike3.indexOf(display2) !== -1 || display2.substr(0, 6) === 'table-';
26179 }
26180 function linkInTextBlockEvaluate(node, options) {
26181 var requiredContrastRatio = options.requiredContrastRatio, allowSameColor = options.allowSameColor;
26182 if (isBlock3(node)) {
26183 return false;
26184 }
26185 var parentBlock = get_composed_parent_default(node);
26186 while (parentBlock && parentBlock.nodeType === 1 && !isBlock3(parentBlock)) {
26187 parentBlock = get_composed_parent_default(parentBlock);
26188 }
26189 if (!parentBlock) {
26190 return void 0;
26191 }
26192 this.relatedNodes([ parentBlock ]);
26193 var nodeColor = _getForegroundColor(node);
26194 var parentColor = _getForegroundColor(parentBlock);
26195 var nodeBackgroundColor = _getBackgroundColor2(node);
26196 var parentBackgroundColor = _getBackgroundColor2(parentBlock);
26197 var textContrast = nodeColor && parentColor ? getContrast2(nodeColor, parentColor) : void 0;
26198 if (textContrast) {
26199 textContrast = Math.floor(textContrast * 100) / 100;
26200 }
26201 if (textContrast && textContrast >= requiredContrastRatio) {
26202 return true;
26203 }
26204 var backgroundContrast = nodeBackgroundColor && parentBackgroundColor ? getContrast2(nodeBackgroundColor, parentBackgroundColor) : void 0;
26205 if (backgroundContrast) {
26206 backgroundContrast = Math.floor(backgroundContrast * 100) / 100;
26207 }
26208 if (backgroundContrast && backgroundContrast >= requiredContrastRatio) {
26209 return true;
26210 }
26211 if (!backgroundContrast) {
26212 var _incomplete_data_defa;
26213 var reason = (_incomplete_data_defa = incomplete_data_default.get('bgColor')) !== null && _incomplete_data_defa !== void 0 ? _incomplete_data_defa : 'bgContrast';
26214 this.data({
26215 messageKey: reason
26216 });
26217 incomplete_data_default.clear();
26218 return void 0;
26219 }
26220 if (!textContrast) {
26221 return void 0;
26222 }
26223 if (allowSameColor && textContrast === 1 && backgroundContrast === 1) {
26224 return true;
26225 }
26226 if (textContrast === 1 && backgroundContrast > 1) {
26227 this.data({
26228 messageKey: 'bgContrast',
26229 contrastRatio: backgroundContrast,
26230 requiredContrastRatio: requiredContrastRatio,
26231 nodeBackgroundColor: nodeBackgroundColor ? nodeBackgroundColor.toHexString() : void 0,
26232 parentBackgroundColor: parentBackgroundColor ? parentBackgroundColor.toHexString() : void 0
26233 });
26234 return false;
26235 }
26236 this.data({
26237 messageKey: 'fgContrast',
26238 contrastRatio: textContrast,
26239 requiredContrastRatio: requiredContrastRatio,
26240 nodeColor: nodeColor ? nodeColor.toHexString() : void 0,
26241 parentColor: parentColor ? parentColor.toHexString() : void 0
26242 });
26243 return false;
26244 }
26245 var link_in_text_block_evaluate_default = linkInTextBlockEvaluate;
26246 function colorContrastEvaluate(node, options, virtualNode) {
26247 var ignoreUnicode = options.ignoreUnicode, ignoreLength = options.ignoreLength, ignorePseudo = options.ignorePseudo, boldValue = options.boldValue, boldTextPt = options.boldTextPt, largeTextPt = options.largeTextPt, contrastRatio = options.contrastRatio, shadowOutlineEmMax = options.shadowOutlineEmMax, pseudoSizeThreshold = options.pseudoSizeThreshold;
26248 if (!_isVisibleOnScreen(node)) {
26249 this.data({
26250 messageKey: 'hidden'
26251 });
26252 return true;
26253 }
26254 var visibleText = visible_virtual_default(virtualNode, false, true);
26255 if (ignoreUnicode && textIsEmojis(visibleText)) {
26256 this.data({
26257 messageKey: 'nonBmp'
26258 });
26259 return void 0;
26260 }
26261 var nodeStyle = window.getComputedStyle(node);
26262 var fontSize = parseFloat(nodeStyle.getPropertyValue('font-size'));
26263 var fontWeight = nodeStyle.getPropertyValue('font-weight');
26264 var bold = parseFloat(fontWeight) >= boldValue || fontWeight === 'bold';
26265 var ptSize = Math.ceil(fontSize * 72) / 96;
26266 var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
26267 var _ref134 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref134.expected, minThreshold = _ref134.minThreshold, maxThreshold = _ref134.maxThreshold;
26268 var pseudoElm = findPseudoElement(virtualNode, {
26269 ignorePseudo: ignorePseudo,
26270 pseudoSizeThreshold: pseudoSizeThreshold
26271 });
26272 if (pseudoElm) {
26273 this.data({
26274 fontSize: ''.concat((fontSize * 72 / 96).toFixed(1), 'pt (').concat(fontSize, 'px)'),
26275 fontWeight: bold ? 'bold' : 'normal',
26276 messageKey: 'pseudoContent',
26277 expectedContrastRatio: expected + ':1'
26278 });
26279 this.relatedNodes(pseudoElm.actualNode);
26280 return void 0;
26281 }
26282 var shadowColors = _getTextShadowColors(node, {
26283 minRatio: .001,
26284 maxRatio: shadowOutlineEmMax
26285 });
26286 if (shadowColors === null) {
26287 this.data({
26288 messageKey: 'complexTextShadows'
26289 });
26290 return void 0;
26291 }
26292 var bgNodes = [];
26293 var bgColor = _getBackgroundColor2(node, bgNodes, shadowOutlineEmMax);
26294 var fgColor = _getForegroundColor(node, false, bgColor, options);
26295 var contrast2 = null;
26296 var contrastContributor = null;
26297 var shadowColor = null;
26298 if (shadowColors.length === 0) {
26299 contrast2 = get_contrast_default(bgColor, fgColor);
26300 } else if (fgColor && bgColor) {
26301 shadowColor = [].concat(_toConsumableArray(shadowColors), [ bgColor ]).reduce(_flattenShadowColors);
26302 var fgBgContrast = get_contrast_default(bgColor, fgColor);
26303 var bgShContrast = get_contrast_default(bgColor, shadowColor);
26304 var fgShContrast = get_contrast_default(shadowColor, fgColor);
26305 contrast2 = Math.max(fgBgContrast, bgShContrast, fgShContrast);
26306 if (contrast2 !== fgBgContrast) {
26307 contrastContributor = bgShContrast > fgShContrast ? 'shadowOnBgColor' : 'fgOnShadowColor';
26308 }
26309 }
26310 var isValid = contrast2 > expected;
26311 if (typeof minThreshold === 'number' && (typeof contrast2 !== 'number' || contrast2 < minThreshold) || typeof maxThreshold === 'number' && (typeof contrast2 !== 'number' || contrast2 > maxThreshold)) {
26312 this.data({
26313 contrastRatio: contrast2
26314 });
26315 return true;
26316 }
26317 var truncatedResult = Math.floor(contrast2 * 100) / 100;
26318 var missing;
26319 var colorParse;
26320 if (bgColor === null) {
26321 if (incomplete_data_default.get('colorParse')) {
26322 missing = 'colorParse';
26323 colorParse = incomplete_data_default.get('colorParse');
26324 } else {
26325 missing = incomplete_data_default.get('bgColor');
26326 }
26327 } else if (!isValid) {
26328 missing = contrastContributor;
26329 }
26330 if (fgColor === null && incomplete_data_default.get('colorParse')) {
26331 missing = 'colorParse';
26332 colorParse = incomplete_data_default.get('colorParse');
26333 }
26334 var equalRatio = truncatedResult === 1;
26335 var shortTextContent = visibleText.length === 1;
26336 if (equalRatio) {
26337 missing = incomplete_data_default.set('bgColor', 'equalRatio');
26338 } else if (!isValid && shortTextContent && !ignoreLength) {
26339 missing = 'shortTextContent';
26340 }
26341 this.data({
26342 fgColor: fgColor ? fgColor.toHexString() : void 0,
26343 bgColor: bgColor ? bgColor.toHexString() : void 0,
26344 contrastRatio: truncatedResult,
26345 fontSize: ''.concat((fontSize * 72 / 96).toFixed(1), 'pt (').concat(fontSize, 'px)'),
26346 fontWeight: bold ? 'bold' : 'normal',
26347 messageKey: missing,
26348 expectedContrastRatio: expected + ':1',
26349 shadowColor: shadowColor ? shadowColor.toHexString() : void 0,
26350 colorParse: colorParse
26351 });
26352 if (fgColor === null || bgColor === null || equalRatio || shortTextContent && !ignoreLength && !isValid) {
26353 missing = null;
26354 incomplete_data_default.clear();
26355 this.relatedNodes(bgNodes);
26356 return void 0;
26357 }
26358 if (!isValid) {
26359 this.relatedNodes(bgNodes);
26360 }
26361 return isValid;
26362 }
26363 function findPseudoElement(vNode, _ref135) {
26364 var _ref135$pseudoSizeThr = _ref135.pseudoSizeThreshold, pseudoSizeThreshold = _ref135$pseudoSizeThr === void 0 ? .25 : _ref135$pseudoSizeThr, _ref135$ignorePseudo = _ref135.ignorePseudo, ignorePseudo = _ref135$ignorePseudo === void 0 ? false : _ref135$ignorePseudo;
26365 if (ignorePseudo) {
26366 return;
26367 }
26368 var rect = vNode.boundingClientRect;
26369 var minimumSize = rect.width * rect.height * pseudoSizeThreshold;
26370 do {
26371 var beforeSize = getPseudoElementArea(vNode.actualNode, ':before');
26372 var afterSize = getPseudoElementArea(vNode.actualNode, ':after');
26373 if (beforeSize + afterSize > minimumSize) {
26374 return vNode;
26375 }
26376 } while (vNode = vNode.parent);
26377 }
26378 var getPseudoElementArea = memoize_default(function getPseudoElementArea2(node, pseudo) {
26379 var style = window.getComputedStyle(node, pseudo);
26380 var matchPseudoStyle = function matchPseudoStyle(prop, value) {
26381 return style.getPropertyValue(prop) === value;
26382 };
26383 if (matchPseudoStyle('content', 'none') || matchPseudoStyle('display', 'none') || matchPseudoStyle('visibility', 'hidden') || matchPseudoStyle('position', 'absolute') === false) {
26384 return 0;
26385 }
26386 if (get_own_background_color_default(style).alpha === 0 && matchPseudoStyle('background-image', 'none')) {
26387 return 0;
26388 }
26389 var pseudoWidth = parseUnit(style.getPropertyValue('width'));
26390 var pseudoHeight = parseUnit(style.getPropertyValue('height'));
26391 if (pseudoWidth.unit !== 'px' || pseudoHeight.unit !== 'px') {
26392 return pseudoWidth.value === 0 || pseudoHeight.value === 0 ? 0 : Infinity;
26393 }
26394 return pseudoWidth.value * pseudoHeight.value;
26395 });
26396 function textIsEmojis(visibleText) {
26397 var options = {
26398 nonBmp: true
26399 };
26400 var hasUnicodeChars = has_unicode_default(visibleText, options);
26401 var hasNonUnicodeChars = sanitize_default(remove_unicode_default(visibleText, options)) === '';
26402 return hasUnicodeChars && hasNonUnicodeChars;
26403 }
26404 function parseUnit(str) {
26405 var unitRegex = /^([0-9.]+)([a-z]+)$/i;
26406 var _ref136 = str.match(unitRegex) || [], _ref137 = _slicedToArray(_ref136, 3), _ref137$ = _ref137[1], value = _ref137$ === void 0 ? '' : _ref137$, _ref137$2 = _ref137[2], unit = _ref137$2 === void 0 ? '' : _ref137$2;
26407 return {
26408 value: parseFloat(value),
26409 unit: unit.toLowerCase()
26410 };
26411 }
26412 var VALID_TAG_NAMES_FOR_SCROLLABLE_REGIONS = {
26413 ARTICLE: true,
26414 ASIDE: true,
26415 NAV: true,
26416 SECTION: true
26417 };
26418 var VALID_ROLES_FOR_SCROLLABLE_REGIONS = {
26419 alert: true,
26420 alertdialog: true,
26421 application: true,
26422 article: true,
26423 banner: false,
26424 complementary: true,
26425 contentinfo: true,
26426 dialog: true,
26427 form: true,
26428 log: true,
26429 main: true,
26430 navigation: true,
26431 region: true,
26432 search: false,
26433 status: true,
26434 tabpanel: true
26435 };
26436 function validScrollableTagName(node) {
26437 var nodeName2 = node.nodeName.toUpperCase();
26438 return VALID_TAG_NAMES_FOR_SCROLLABLE_REGIONS[nodeName2] || false;
26439 }
26440 function validScrollableRole(node, options) {
26441 var role = get_explicit_role_default(node);
26442 if (!role) {
26443 return false;
26444 }
26445 return VALID_ROLES_FOR_SCROLLABLE_REGIONS[role] || options.roles.includes(role) || false;
26446 }
26447 function validScrollableSemanticsEvaluate(node, options) {
26448 return validScrollableRole(node, options) || validScrollableTagName(node);
26449 }
26450 var valid_scrollable_semantics_evaluate_default = validScrollableSemanticsEvaluate;
26451 function unsupportedroleEvaluate(node, options, virtualNode) {
26452 var role = get_role_default(virtualNode, {
26453 dpub: true,
26454 fallback: true
26455 });
26456 var isUnsupported = is_unsupported_role_default(role);
26457 if (isUnsupported) {
26458 this.data(role);
26459 }
26460 return isUnsupported;
26461 }
26462 var unsupportedrole_evaluate_default = unsupportedroleEvaluate;
26463 function noImplicitExplicitLabelEvaluate(node, options, virtualNode) {
26464 var role = get_role_default(virtualNode, {
26465 noImplicit: true
26466 });
26467 this.data(role);
26468 var label3;
26469 var accText;
26470 try {
26471 label3 = sanitize_default(label_text_default(virtualNode)).toLowerCase();
26472 accText = sanitize_default(_accessibleTextVirtual(virtualNode)).toLowerCase();
26473 } catch (_unused15) {
26474 return void 0;
26475 }
26476 if (!accText && !label3) {
26477 return false;
26478 }
26479 if (!accText && label3) {
26480 return void 0;
26481 }
26482 if (!accText.includes(label3)) {
26483 return void 0;
26484 }
26485 return false;
26486 }
26487 var no_implicit_explicit_label_evaluate_default = noImplicitExplicitLabelEvaluate;
26488 function isElementFocusableEvaluate(node, options, virtualNode) {
26489 return _isFocusable(virtualNode);
26490 }
26491 var is_element_focusable_evaluate_default = isElementFocusableEvaluate;
26492 function invalidroleEvaluate(node, options, virtualNode) {
26493 var allRoles = token_list_default(virtualNode.attr('role'));
26494 var allInvalid = allRoles.every(function(role) {
26495 return !is_valid_role_default(role.toLowerCase(), {
26496 allowAbstract: true
26497 });
26498 });
26499 if (allInvalid) {
26500 this.data(allRoles);
26501 return true;
26502 }
26503 return false;
26504 }
26505 var invalidrole_evaluate_default = invalidroleEvaluate;
26506 function hasWidgetRoleEvaluate(node, options, virtualNode) {
26507 var role = get_explicit_role_default(virtualNode);
26508 if (role === null) {
26509 return false;
26510 }
26511 var roleType = get_role_type_default(role);
26512 return roleType === 'widget' || roleType === 'composite';
26513 }
26514 var has_widget_role_evaluate_default = hasWidgetRoleEvaluate;
26515 function hasGlobalAriaAttributeEvaluate(node, options, virtualNode) {
26516 var globalAttrs = get_global_aria_attrs_default().filter(function(attr) {
26517 return virtualNode.hasAttr(attr);
26518 });
26519 this.data(globalAttrs);
26520 return globalAttrs.length > 0;
26521 }
26522 var has_global_aria_attribute_evaluate_default = hasGlobalAriaAttributeEvaluate;
26523 function nonePresentationOnElementWithNoImplicitRole(virtualNode, explicitRoles) {
26524 var hasImplicitRole = implicit_role_default(virtualNode);
26525 return !hasImplicitRole && explicitRoles.length === 2 && explicitRoles.includes('none') && explicitRoles.includes('presentation');
26526 }
26527 function fallbackroleEvaluate(node, options, virtualNode) {
26528 var explicitRoles = token_list_default(virtualNode.attr('role'));
26529 if (explicitRoles.length <= 1) {
26530 return false;
26531 }
26532 return nonePresentationOnElementWithNoImplicitRole(virtualNode, explicitRoles) ? void 0 : true;
26533 }
26534 var fallbackrole_evaluate_default = fallbackroleEvaluate;
26535 function deprecatedroleEvaluate(node, options, virtualNode) {
26536 var role = get_role_default(virtualNode, {
26537 dpub: true,
26538 fallback: true
26539 });
26540 var roleDefinition = standards_default.ariaRoles[role];
26541 if (!(roleDefinition !== null && roleDefinition !== void 0 && roleDefinition.deprecated)) {
26542 return false;
26543 }
26544 this.data(role);
26545 return true;
26546 }
26547 function brailleRoleDescriptionEquivalentEvaluate(node, options, virtualNode) {
26548 var _virtualNode$attr;
26549 var brailleRoleDesc = (_virtualNode$attr = virtualNode.attr('aria-brailleroledescription')) !== null && _virtualNode$attr !== void 0 ? _virtualNode$attr : '';
26550 if (sanitize_default(brailleRoleDesc) === '') {
26551 return true;
26552 }
26553 var roleDesc = virtualNode.attr('aria-roledescription');
26554 if (typeof roleDesc !== 'string') {
26555 this.data({
26556 messageKey: 'noRoleDescription'
26557 });
26558 return false;
26559 }
26560 if (sanitize_default(roleDesc) === '') {
26561 this.data({
26562 messageKey: 'emptyRoleDescription'
26563 });
26564 return false;
26565 }
26566 return true;
26567 }
26568 function brailleLabelEquivalentEvaluate(node, options, virtualNode) {
26569 var _virtualNode$attr2;
26570 var brailleLabel = (_virtualNode$attr2 = virtualNode.attr('aria-braillelabel')) !== null && _virtualNode$attr2 !== void 0 ? _virtualNode$attr2 : '';
26571 if (!brailleLabel.trim()) {
26572 return true;
26573 }
26574 try {
26575 return sanitize_default(_accessibleTextVirtual(virtualNode)) !== '';
26576 } catch (_unused16) {
26577 return void 0;
26578 }
26579 }
26580 function ariaValidAttrValueEvaluate(node, options, virtualNode) {
26581 options = Array.isArray(options.value) ? options.value : [];
26582 var needsReview = '';
26583 var messageKey = '';
26584 var invalid = [];
26585 var aria = /^aria-/;
26586 var skipAttrs = [ 'aria-errormessage' ];
26587 var preChecks = {
26588 'aria-controls': function ariaControls() {
26589 var hasPopup = [ 'false', null ].includes(virtualNode.attr('aria-haspopup')) === false;
26590 if (hasPopup) {
26591 needsReview = 'aria-controls="'.concat(virtualNode.attr('aria-controls'), '"');
26592 messageKey = 'controlsWithinPopup';
26593 }
26594 return virtualNode.attr('aria-expanded') !== 'false' && virtualNode.attr('aria-selected') !== 'false' && hasPopup === false;
26595 },
26596 'aria-current': function ariaCurrent(validValue) {
26597 if (!validValue) {
26598 needsReview = 'aria-current="'.concat(virtualNode.attr('aria-current'), '"');
26599 messageKey = 'ariaCurrent';
26600 }
26601 return;
26602 },
26603 'aria-owns': function ariaOwns() {
26604 return virtualNode.attr('aria-expanded') !== 'false';
26605 },
26606 'aria-describedby': function ariaDescribedby(validValue) {
26607 if (!validValue) {
26608 needsReview = 'aria-describedby="'.concat(virtualNode.attr('aria-describedby'), '"');
26609 messageKey = axe._tree && axe._tree[0]._hasShadowRoot ? 'noIdShadow' : 'noId';
26610 }
26611 return;
26612 },
26613 'aria-labelledby': function ariaLabelledby(validValue) {
26614 if (!validValue) {
26615 needsReview = 'aria-labelledby="'.concat(virtualNode.attr('aria-labelledby'), '"');
26616 messageKey = axe._tree && axe._tree[0]._hasShadowRoot ? 'noIdShadow' : 'noId';
26617 }
26618 }
26619 };
26620 virtualNode.attrNames.forEach(function(attrName) {
26621 if (skipAttrs.includes(attrName) || options.includes(attrName) || !aria.test(attrName)) {
26622 return;
26623 }
26624 var validValue;
26625 var attrValue = virtualNode.attr(attrName);
26626 try {
26627 validValue = validate_attr_value_default(virtualNode, attrName);
26628 } catch (_unused17) {
26629 needsReview = ''.concat(attrName, '="').concat(attrValue, '"');
26630 messageKey = 'idrefs';
26631 return;
26632 }
26633 if ((preChecks[attrName] ? preChecks[attrName](validValue) : true) && !validValue) {
26634 if (attrValue === '' && !isStringType(attrName)) {
26635 needsReview = attrName;
26636 messageKey = 'empty';
26637 } else {
26638 invalid.push(''.concat(attrName, '="').concat(attrValue, '"'));
26639 }
26640 }
26641 });
26642 if (invalid.length) {
26643 this.data(invalid);
26644 return false;
26645 }
26646 if (needsReview) {
26647 this.data({
26648 messageKey: messageKey,
26649 needsReview: needsReview
26650 });
26651 return void 0;
26652 }
26653 return true;
26654 }
26655 function isStringType(attrName) {
26656 var _standards_default$ar;
26657 return ((_standards_default$ar = standards_default.ariaAttrs[attrName]) === null || _standards_default$ar === void 0 ? void 0 : _standards_default$ar.type) === 'string';
26658 }
26659 function ariaValidAttrEvaluate(node, options, virtualNode) {
26660 options = Array.isArray(options.value) ? options.value : [];
26661 var invalid = [];
26662 var aria = /^aria-/;
26663 virtualNode.attrNames.forEach(function(attr) {
26664 if (options.indexOf(attr) === -1 && aria.test(attr) && !validate_attr_default(attr)) {
26665 invalid.push(attr);
26666 }
26667 });
26668 if (invalid.length) {
26669 this.data(invalid);
26670 return false;
26671 }
26672 return true;
26673 }
26674 var aria_valid_attr_evaluate_default = ariaValidAttrEvaluate;
26675 function ariaUnsupportedAttrEvaluate(node, options, virtualNode) {
26676 var unsupportedAttrs = virtualNode.attrNames.filter(function(name) {
26677 var attribute = standards_default.ariaAttrs[name];
26678 if (!validate_attr_default(name)) {
26679 return false;
26680 }
26681 var unsupported = attribute.unsupported;
26682 if (_typeof(unsupported) !== 'object') {
26683 return !!unsupported;
26684 }
26685 return !matches_default2(node, unsupported.exceptions);
26686 });
26687 if (unsupportedAttrs.length) {
26688 this.data(unsupportedAttrs);
26689 return true;
26690 }
26691 return false;
26692 }
26693 var aria_unsupported_attr_evaluate_default = ariaUnsupportedAttrEvaluate;
26694 function ariaRoledescriptionEvaluate(node) {
26695 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
26696 var virtualNode = arguments.length > 2 ? arguments[2] : undefined;
26697 var role = get_role_default(virtualNode);
26698 var supportedRoles = options.supportedRoles || [];
26699 if (supportedRoles.includes(role)) {
26700 return true;
26701 }
26702 if (role && role !== 'presentation' && role !== 'none') {
26703 return void 0;
26704 }
26705 return false;
26706 }
26707 var aria_roledescription_evaluate_default = ariaRoledescriptionEvaluate;
26708 function getMissingContext(virtualNode, ownGroupRoles, reqContext, includeElement) {
26709 var explicitRole2 = get_explicit_role_default(virtualNode);
26710 if (!reqContext) {
26711 reqContext = required_context_default(explicitRole2);
26712 }
26713 if (!reqContext) {
26714 return null;
26715 }
26716 var allowsGroup = reqContext.includes('group');
26717 var vNode = includeElement ? virtualNode : virtualNode.parent;
26718 while (vNode) {
26719 var role = get_role_default(vNode, {
26720 noPresentational: true
26721 });
26722 if (!role) {
26723 vNode = vNode.parent;
26724 } else if (role === 'group' && allowsGroup) {
26725 if (ownGroupRoles.includes(explicitRole2)) {
26726 reqContext.push(explicitRole2);
26727 }
26728 reqContext = reqContext.filter(function(r) {
26729 return r !== 'group';
26730 });
26731 vNode = vNode.parent;
26732 } else if (reqContext.includes(role)) {
26733 return null;
26734 } else {
26735 return reqContext;
26736 }
26737 }
26738 return reqContext;
26739 }
26740 function getAriaOwners(element) {
26741 var owners = [];
26742 var o = null;
26743 while (element) {
26744 if (element.getAttribute('id')) {
26745 var _id7 = escape_selector_default(element.getAttribute('id'));
26746 var doc = get_root_node_default2(element);
26747 o = doc.querySelector('[aria-owns~='.concat(_id7, ']'));
26748 if (o) {
26749 owners.push(o);
26750 }
26751 }
26752 element = element.parentElement;
26753 }
26754 return owners.length ? owners : null;
26755 }
26756 function ariaRequiredParentEvaluate(node, options, virtualNode) {
26757 var ownGroupRoles = options && Array.isArray(options.ownGroupRoles) ? options.ownGroupRoles : [];
26758 var missingParents = getMissingContext(virtualNode, ownGroupRoles);
26759 if (!missingParents) {
26760 return true;
26761 }
26762 var owners = getAriaOwners(node);
26763 if (owners) {
26764 for (var _i34 = 0, l = owners.length; _i34 < l; _i34++) {
26765 missingParents = getMissingContext(get_node_from_tree_default(owners[_i34]), ownGroupRoles, missingParents, true);
26766 if (!missingParents) {
26767 return true;
26768 }
26769 }
26770 }
26771 this.data(missingParents);
26772 return false;
26773 }
26774 var aria_required_parent_evaluate_default = ariaRequiredParentEvaluate;
26775 function ariaRequiredChildrenEvaluate(node, options, virtualNode) {
26776 var reviewEmpty = options && Array.isArray(options.reviewEmpty) ? options.reviewEmpty : [];
26777 var explicitRole2 = get_explicit_role_default(virtualNode, {
26778 dpub: true
26779 });
26780 var required = required_owned_default(explicitRole2);
26781 if (required === null) {
26782 return true;
26783 }
26784 var ownedRoles = getOwnedRoles(virtualNode, required);
26785 var unallowed = ownedRoles.filter(function(_ref138) {
26786 var role = _ref138.role, vNode = _ref138.vNode;
26787 return vNode.props.nodeType === 1 && !required.includes(role);
26788 });
26789 if (unallowed.length) {
26790 this.relatedNodes(unallowed.map(function(_ref139) {
26791 var vNode = _ref139.vNode;
26792 return vNode;
26793 }));
26794 var messageKey = virtualNode.attr('aria-busy') === 'true' ? 'aria-busy-fail' : 'unallowed';
26795 this.data({
26796 messageKey: messageKey,
26797 values: unallowed.map(function(_ref140) {
26798 var vNode = _ref140.vNode, attr = _ref140.attr;
26799 return getUnallowedSelector(vNode, attr);
26800 }).filter(function(selector, index, array) {
26801 return array.indexOf(selector) === index;
26802 }).join(', ')
26803 });
26804 return false;
26805 }
26806 if (hasRequiredChildren(required, ownedRoles)) {
26807 return true;
26808 }
26809 if (virtualNode.attr('aria-busy') === 'true') {
26810 this.data({
26811 messageKey: 'aria-busy'
26812 });
26813 return true;
26814 }
26815 this.data(required);
26816 if (reviewEmpty.includes(explicitRole2) && !ownedRoles.some(isContent)) {
26817 return void 0;
26818 }
26819 return false;
26820 }
26821 function getOwnedRoles(virtualNode, required) {
26822 var vNode;
26823 var ownedRoles = [];
26824 var ownedVirtual = get_owned_virtual_default(virtualNode);
26825 var _loop0 = function _loop0() {
26826 if (vNode.props.nodeType === 3) {
26827 ownedRoles.push({
26828 vNode: vNode,
26829 role: null
26830 });
26831 }
26832 if (vNode.props.nodeType !== 1 || !_isVisibleToScreenReaders(vNode)) {
26833 return 1;
26834 }
26835 var role = get_role_default(vNode, {
26836 noPresentational: true
26837 });
26838 var globalAriaAttr = getGlobalAriaAttr(vNode);
26839 var hasGlobalAriaOrFocusable = !!globalAriaAttr || _isFocusable(vNode);
26840 if (!role && !hasGlobalAriaOrFocusable || [ 'group', 'rowgroup' ].includes(role) && required.some(function(requiredRole) {
26841 return requiredRole === role;
26842 })) {
26843 ownedVirtual.push.apply(ownedVirtual, _toConsumableArray(vNode.children));
26844 } else if (role || hasGlobalAriaOrFocusable) {
26845 var attr = globalAriaAttr || 'tabindex';
26846 ownedRoles.push({
26847 role: role,
26848 attr: attr,
26849 vNode: vNode
26850 });
26851 }
26852 };
26853 while (vNode = ownedVirtual.shift()) {
26854 if (_loop0()) {
26855 continue;
26856 }
26857 }
26858 return ownedRoles;
26859 }
26860 function hasRequiredChildren(required, ownedRoles) {
26861 return ownedRoles.some(function(_ref141) {
26862 var role = _ref141.role;
26863 return role && required.includes(role);
26864 });
26865 }
26866 function getGlobalAriaAttr(vNode) {
26867 return get_global_aria_attrs_default().find(function(attr) {
26868 return vNode.hasAttr(attr);
26869 });
26870 }
26871 function getUnallowedSelector(vNode, attr) {
26872 var _vNode$props = vNode.props, nodeName2 = _vNode$props.nodeName, nodeType = _vNode$props.nodeType;
26873 if (nodeType === 3) {
26874 return '#text';
26875 }
26876 var role = get_explicit_role_default(vNode, {
26877 dpub: true
26878 });
26879 if (role) {
26880 return '[role='.concat(role, ']');
26881 }
26882 if (attr) {
26883 return nodeName2 + '['.concat(attr, ']');
26884 }
26885 return nodeName2;
26886 }
26887 function isContent(_ref142) {
26888 var vNode = _ref142.vNode;
26889 if (vNode.props.nodeType === 3) {
26890 return vNode.props.nodeValue.trim().length > 0;
26891 }
26892 return has_content_virtual_default(vNode, false, true);
26893 }
26894 function ariaRequiredAttrEvaluate(node) {
26895 var _virtualNode$attr3;
26896 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
26897 var virtualNode = arguments.length > 2 ? arguments[2] : undefined;
26898 var role = get_explicit_role_default(virtualNode);
26899 var attrs = virtualNode.attrNames;
26900 var requiredAttrs = required_attr_default(role);
26901 if (Array.isArray(options[role])) {
26902 requiredAttrs = unique_array_default(options[role], requiredAttrs);
26903 }
26904 if (!role || !attrs.length || !requiredAttrs.length) {
26905 return true;
26906 }
26907 if (isStaticSeparator(virtualNode, role) || isClosedCombobox(virtualNode, role)) {
26908 return true;
26909 }
26910 if (role === 'slider' && (_virtualNode$attr3 = virtualNode.attr('aria-valuetext')) !== null && _virtualNode$attr3 !== void 0 && _virtualNode$attr3.trim()) {
26911 return true;
26912 }
26913 var elmSpec = get_element_spec_default(virtualNode);
26914 var missingAttrs = requiredAttrs.filter(function(requiredAttr2) {
26915 return !virtualNode.attr(requiredAttr2) && !hasImplicitAttr(elmSpec, requiredAttr2);
26916 });
26917 if (missingAttrs.length) {
26918 this.data(missingAttrs);
26919 return false;
26920 }
26921 return true;
26922 }
26923 function isStaticSeparator(vNode, role) {
26924 return role === 'separator' && !_isFocusable(vNode);
26925 }
26926 function hasImplicitAttr(elmSpec, attr) {
26927 var _elmSpec$implicitAttr;
26928 return ((_elmSpec$implicitAttr = elmSpec.implicitAttrs) === null || _elmSpec$implicitAttr === void 0 ? void 0 : _elmSpec$implicitAttr[attr]) !== void 0;
26929 }
26930 function isClosedCombobox(vNode, role) {
26931 return role === 'combobox' && vNode.attr('aria-expanded') === 'false';
26932 }
26933 function ariaProhibitedAttrEvaluate(node) {
26934 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
26935 var virtualNode = arguments.length > 2 ? arguments[2] : undefined;
26936 var elementsAllowedAriaLabel = (options === null || options === void 0 ? void 0 : options.elementsAllowedAriaLabel) || [];
26937 var nodeName2 = virtualNode.props.nodeName;
26938 var role = get_role_default(virtualNode, {
26939 chromium: true,
26940 fallback: true
26941 });
26942 var prohibitedList = listProhibitedAttrs(virtualNode, role, nodeName2, elementsAllowedAriaLabel);
26943 var prohibited = prohibitedList.filter(function(attrName) {
26944 if (!virtualNode.attrNames.includes(attrName)) {
26945 return false;
26946 }
26947 return sanitize_default(virtualNode.attr(attrName)) !== '';
26948 });
26949 if (prohibited.length === 0) {
26950 return false;
26951 }
26952 var messageKey = role !== null ? 'hasRole' : 'noRole';
26953 messageKey += prohibited.length > 1 ? 'Plural' : 'Singular';
26954 this.data({
26955 role: role,
26956 nodeName: nodeName2,
26957 messageKey: messageKey,
26958 prohibited: prohibited
26959 });
26960 var textContent = subtree_text_default(virtualNode, {
26961 subtreeDescendant: true
26962 });
26963 if (sanitize_default(textContent) !== '') {
26964 return void 0;
26965 }
26966 return true;
26967 }
26968 function listProhibitedAttrs(vNode, role, nodeName2, elementsAllowedAriaLabel) {
26969 var roleSpec = standards_default.ariaRoles[role];
26970 if (roleSpec) {
26971 return roleSpec.prohibitedAttrs || [];
26972 }
26973 if (!!role || elementsAllowedAriaLabel.includes(nodeName2) || getClosestAncestorRoleType(vNode) === 'widget') {
26974 return [];
26975 }
26976 return [ 'aria-label', 'aria-labelledby' ];
26977 }
26978 var getClosestAncestorRoleType = memoize_default(function getClosestAncestorRoleTypeMemoized(vNode) {
26979 if (!vNode) {
26980 return;
26981 }
26982 var role = get_role_default(vNode, {
26983 noPresentational: true,
26984 chromium: true
26985 });
26986 if (role) {
26987 return get_role_type_default(role);
26988 }
26989 return getClosestAncestorRoleType(vNode.parent);
26990 });
26991 function ariaLevelEvaluate(node, options, virtualNode) {
26992 var ariaHeadingLevel = virtualNode.attr('aria-level');
26993 var ariaLevel = parseInt(ariaHeadingLevel, 10);
26994 if (ariaLevel > 6) {
26995 return void 0;
26996 }
26997 return true;
26998 }
26999 var aria_level_evaluate_default = ariaLevelEvaluate;
27000 function ariaHiddenBodyEvaluate(node, options, virtualNode) {
27001 return virtualNode.attr('aria-hidden') !== 'true';
27002 }
27003 var aria_hidden_body_evaluate_default = ariaHiddenBodyEvaluate;
27004 function ariaErrormessageEvaluate(node, options, virtualNode) {
27005 options = Array.isArray(options) ? options : [];
27006 var errorMessageAttr = virtualNode.attr('aria-errormessage');
27007 var hasAttr = virtualNode.hasAttr('aria-errormessage');
27008 var invaid = virtualNode.attr('aria-invalid');
27009 var hasInvallid = virtualNode.hasAttr('aria-invalid');
27010 if (!hasInvallid || invaid === 'false') {
27011 return true;
27012 }
27013 function validateAttrValue2(attr) {
27014 if (attr.trim() === '') {
27015 return standards_default.ariaAttrs['aria-errormessage'].allowEmpty;
27016 }
27017 var errormessageTokens = token_list_default(attr);
27018 if (errormessageTokens.length > 1) {
27019 this.data({
27020 messageKey: 'unsupported',
27021 values: errormessageTokens
27022 });
27023 return false;
27024 }
27025 var idref;
27026 try {
27027 idref = attr && idrefs_default(virtualNode, 'aria-errormessage')[0];
27028 } catch (_unused18) {
27029 this.data({
27030 messageKey: 'idrefs',
27031 values: errormessageTokens
27032 });
27033 return void 0;
27034 }
27035 if (idref) {
27036 if (!_isVisibleToScreenReaders(idref)) {
27037 this.data({
27038 messageKey: 'hidden',
27039 values: errormessageTokens
27040 });
27041 return false;
27042 }
27043 var describedbyTokens = token_list_default(virtualNode.attr('aria-describedby'));
27044 return get_explicit_role_default(idref) === 'alert' || idref.getAttribute('aria-live') === 'assertive' || idref.getAttribute('aria-live') === 'polite' || errormessageTokens.some(function(token) {
27045 return describedbyTokens.includes(token);
27046 });
27047 }
27048 return;
27049 }
27050 if (options.indexOf(errorMessageAttr) === -1 && hasAttr) {
27051 this.data(token_list_default(errorMessageAttr));
27052 return validateAttrValue2.call(this, errorMessageAttr);
27053 }
27054 return true;
27055 }
27056 function ariaConditionalRowAttr(node) {
27057 var _invalidTableRowAttrs, _invalidTableRowAttrs2;
27058 var _ref143 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, invalidTableRowAttrs = _ref143.invalidTableRowAttrs;
27059 var virtualNode = arguments.length > 2 ? arguments[2] : undefined;
27060 var invalidAttrs = (_invalidTableRowAttrs = invalidTableRowAttrs === null || invalidTableRowAttrs === void 0 || (_invalidTableRowAttrs2 = invalidTableRowAttrs.filter) === null || _invalidTableRowAttrs2 === void 0 ? void 0 : _invalidTableRowAttrs2.call(invalidTableRowAttrs, function(invalidAttr) {
27061 return virtualNode.hasAttr(invalidAttr);
27062 })) !== null && _invalidTableRowAttrs !== void 0 ? _invalidTableRowAttrs : [];
27063 if (invalidAttrs.length === 0) {
27064 return true;
27065 }
27066 var owner = getRowOwner(virtualNode);
27067 var ownerRole = owner && get_role_default(owner);
27068 if (!ownerRole || ownerRole === 'treegrid') {
27069 return true;
27070 }
27071 var messageKey = 'row'.concat(invalidAttrs.length > 1 ? 'Plural' : 'Singular');
27072 this.data({
27073 messageKey: messageKey,
27074 invalidAttrs: invalidAttrs,
27075 ownerRole: ownerRole
27076 });
27077 return false;
27078 }
27079 function getRowOwner(virtualNode) {
27080 if (!virtualNode.parent) {
27081 return;
27082 }
27083 var rowOwnerQuery = 'table:not([role]), [role~="treegrid"], [role~="table"], [role~="grid"]';
27084 return closest_default(virtualNode, rowOwnerQuery);
27085 }
27086 function ariaConditionalCheckboxAttr(node, options, virtualNode) {
27087 var _virtualNode$props = virtualNode.props, nodeName2 = _virtualNode$props.nodeName, type2 = _virtualNode$props.type;
27088 var ariaChecked = normalizeAriaChecked(virtualNode.attr('aria-checked'));
27089 if (nodeName2 !== 'input' || type2 !== 'checkbox' || !ariaChecked) {
27090 return true;
27091 }
27092 var checkState = getCheckState(virtualNode);
27093 if (ariaChecked === checkState) {
27094 return true;
27095 }
27096 this.data({
27097 messageKey: 'checkbox',
27098 checkState: checkState
27099 });
27100 return false;
27101 }
27102 function getCheckState(vNode) {
27103 if (vNode.props.indeterminate) {
27104 return 'mixed';
27105 }
27106 return vNode.props.checked ? 'true' : 'false';
27107 }
27108 function normalizeAriaChecked(ariaCheckedVal) {
27109 if (!ariaCheckedVal) {
27110 return '';
27111 }
27112 ariaCheckedVal = ariaCheckedVal.toLowerCase();
27113 if ([ 'mixed', 'true' ].includes(ariaCheckedVal)) {
27114 return ariaCheckedVal;
27115 }
27116 return 'false';
27117 }
27118 var conditionalRoleMap = {
27119 row: ariaConditionalRowAttr,
27120 checkbox: ariaConditionalCheckboxAttr
27121 };
27122 function ariaConditionalAttrEvaluate(node, options, virtualNode) {
27123 var role = get_role_default(virtualNode);
27124 if (!conditionalRoleMap[role]) {
27125 return true;
27126 }
27127 return conditionalRoleMap[role].call(this, node, options, virtualNode);
27128 }
27129 function ariaBusyEvaluate(node, options, virtualNode) {
27130 return virtualNode.attr('aria-busy') === 'true';
27131 }
27132 function ariaAllowedRoleEvaluate(node) {
27133 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
27134 var virtualNode = arguments.length > 2 ? arguments[2] : undefined;
27135 var _options$allowImplici = options.allowImplicit, allowImplicit = _options$allowImplici === void 0 ? true : _options$allowImplici, _options$ignoredTags = options.ignoredTags, ignoredTags = _options$ignoredTags === void 0 ? [] : _options$ignoredTags;
27136 var nodeName2 = virtualNode.props.nodeName;
27137 if (ignoredTags.map(function(tag) {
27138 return tag.toLowerCase();
27139 }).includes(nodeName2)) {
27140 return true;
27141 }
27142 var unallowedRoles = get_element_unallowed_roles_default(virtualNode, allowImplicit);
27143 if (unallowedRoles.length) {
27144 this.data(unallowedRoles);
27145 if (!_isVisibleToScreenReaders(virtualNode)) {
27146 return void 0;
27147 }
27148 return false;
27149 }
27150 return true;
27151 }
27152 var aria_allowed_role_evaluate_default = ariaAllowedRoleEvaluate;
27153 function ariaAllowedAttrEvaluate(node, options, virtualNode) {
27154 var invalid = [];
27155 var role = get_role_default(virtualNode);
27156 var allowed = allowed_attr_default(role);
27157 if (Array.isArray(options[role])) {
27158 allowed = unique_array_default(options[role].concat(allowed));
27159 }
27160 var _iterator22 = _createForOfIteratorHelper(virtualNode.attrNames), _step22;
27161 try {
27162 for (_iterator22.s(); !(_step22 = _iterator22.n()).done; ) {
27163 var attrName = _step22.value;
27164 if (validate_attr_default(attrName) && !allowed.includes(attrName) && !ignoredAttrs(attrName, virtualNode.attr(attrName), virtualNode)) {
27165 invalid.push(attrName);
27166 }
27167 }
27168 } catch (err) {
27169 _iterator22.e(err);
27170 } finally {
27171 _iterator22.f();
27172 }
27173 if (!invalid.length) {
27174 return true;
27175 }
27176 this.data(invalid.map(function(attrName) {
27177 return attrName + '="' + virtualNode.attr(attrName) + '"';
27178 }));
27179 if (!role && !is_html_element_default(virtualNode) && !_isFocusable(virtualNode)) {
27180 return void 0;
27181 }
27182 return false;
27183 }
27184 function ignoredAttrs(attrName, attrValue, vNode) {
27185 if (attrName === 'aria-required' && attrValue === 'false') {
27186 return true;
27187 }
27188 if (attrName === 'aria-multiline' && attrValue === 'false' && vNode.hasAttr('contenteditable')) {
27189 return true;
27190 }
27191 return false;
27192 }
27193 function ariaAllowedAttrElmEvaluate(node, options, virtualNode) {
27194 var elmSpec = get_element_spec_default(virtualNode);
27195 if (!elmSpec.allowedAriaAttrs) {
27196 return true;
27197 }
27198 var explicitRole2 = get_explicit_role_default(virtualNode);
27199 if (explicitRole2) {
27200 return true;
27201 }
27202 var allowedAriaAttrs = elmSpec.allowedAriaAttrs;
27203 var globalAriaAttrs = get_global_aria_attrs_default();
27204 var invalid = [];
27205 var _iterator23 = _createForOfIteratorHelper(virtualNode.attrNames), _step23;
27206 try {
27207 for (_iterator23.s(); !(_step23 = _iterator23.n()).done; ) {
27208 var attrName = _step23.value;
27209 if (globalAriaAttrs.includes(attrName) && !allowedAriaAttrs.includes(attrName)) {
27210 invalid.push(attrName);
27211 }
27212 }
27213 } catch (err) {
27214 _iterator23.e(err);
27215 } finally {
27216 _iterator23.f();
27217 }
27218 if (!invalid.length) {
27219 return true;
27220 }
27221 var messageKey = invalid.length > 1 ? 'plural' : 'singular';
27222 this.data({
27223 messageKey: messageKey,
27224 nodeName: virtualNode.props.nodeName,
27225 values: invalid.map(function(attrName) {
27226 return attrName + '="' + virtualNode.attr(attrName) + '"';
27227 }).join(', ')
27228 });
27229 return false;
27230 }
27231 function abstractroleEvaluate(node, options, virtualNode) {
27232 var abstractRoles = token_list_default(virtualNode.attr('role')).filter(function(role) {
27233 return get_role_type_default(role) === 'abstract';
27234 });
27235 if (abstractRoles.length > 0) {
27236 this.data(abstractRoles);
27237 return true;
27238 }
27239 return false;
27240 }
27241 var abstractrole_evaluate_default = abstractroleEvaluate;
27242 function xmlLangMismatchMatches(node) {
27243 var primaryLangValue = get_base_lang_default(node.getAttribute('lang'));
27244 var primaryXmlLangValue = get_base_lang_default(node.getAttribute('xml:lang'));
27245 return valid_langs_default(primaryLangValue) && valid_langs_default(primaryXmlLangValue);
27246 }
27247 var xml_lang_mismatch_matches_default = xmlLangMismatchMatches;
27248 function windowIsTopMatches(node) {
27249 return node.ownerDocument.defaultView.self === node.ownerDocument.defaultView.top;
27250 }
27251 var window_is_top_matches_default = windowIsTopMatches;
27252 function svgNamespaceMatches(node, virtualNode) {
27253 try {
27254 var nodeName2 = virtualNode.props.nodeName;
27255 if (nodeName2 === 'svg') {
27256 return true;
27257 }
27258 return !!closest_default(virtualNode, 'svg');
27259 } catch (_unused19) {
27260 return false;
27261 }
27262 }
27263 var svg_namespace_matches_default = svgNamespaceMatches;
27264 function widgetNotInline(node, vNode) {
27265 return matchesFns.every(function(fn) {
27266 return fn(node, vNode);
27267 });
27268 }
27269 var matchesFns = [ function(node, vNode) {
27270 return isWidgetType(vNode);
27271 }, function(node, vNode) {
27272 return isNotAreaElement(vNode);
27273 }, function(node, vNode) {
27274 return !svg_namespace_matches_default(node, vNode);
27275 }, function(node, vNode) {
27276 return _isFocusable(vNode);
27277 }, function(node, vNode) {
27278 return _isInTabOrder(vNode) || !hasWidgetAncestorInTabOrder(vNode);
27279 }, function(node) {
27280 return !is_in_text_block_default(node, {
27281 noLengthCompare: true,
27282 includeInlineBlock: true
27283 });
27284 } ];
27285 function isWidgetType(vNode) {
27286 return get_role_type_default(vNode) === 'widget';
27287 }
27288 function isNotAreaElement(vNode) {
27289 return vNode.props.nodeName !== 'area';
27290 }
27291 var hasWidgetAncestorInTabOrder = memoize_default(function hasWidgetAncestorInTabOrderMemoized(vNode) {
27292 if (!(vNode !== null && vNode !== void 0 && vNode.parent)) {
27293 return false;
27294 }
27295 if (isWidgetType(vNode.parent) && _isInTabOrder(vNode.parent)) {
27296 return true;
27297 }
27298 return hasWidgetAncestorInTabOrderMemoized(vNode.parent);
27299 });
27300 function tableOrGridRoleMatches(_, vNode) {
27301 var role = get_role_default(vNode);
27302 return [ 'treegrid', 'grid', 'table' ].includes(role);
27303 }
27304 function summaryIsInteractiveMatches(_, virtualNode) {
27305 var parent = virtualNode.parent;
27306 if (parent.props.nodeName !== 'details' || isSlottedElm(virtualNode)) {
27307 return false;
27308 }
27309 var firstSummary = parent.children.find(function(child) {
27310 return child.props.nodeName === 'summary';
27311 });
27312 if (firstSummary !== virtualNode) {
27313 return false;
27314 }
27315 return true;
27316 }
27317 function isSlottedElm(vNode) {
27318 var _vNode$actualNode;
27319 var domParent = (_vNode$actualNode = vNode.actualNode) === null || _vNode$actualNode === void 0 ? void 0 : _vNode$actualNode.parentElement;
27320 return domParent && domParent !== vNode.parent.actualNode;
27321 }
27322 function skipLinkMatches(node) {
27323 return _isSkipLink(node) && is_offscreen_default(node);
27324 }
27325 var skip_link_matches_default = skipLinkMatches;
27326 function scrollableRegionFocusableMatches(node, virtualNode) {
27327 return get_scroll_default(node, 13) !== void 0 && _isComboboxPopup(virtualNode) === false && isNonEmptyElementOutsideViewableRect(virtualNode);
27328 }
27329 function isNonEmptyElementOutsideViewableRect(vNode) {
27330 var boundingRect = vNode.boundingClientRect;
27331 return query_selector_all_default(vNode, '*').some(function(elm) {
27332 if (!has_content_virtual_default(elm, true, true)) {
27333 return false;
27334 }
27335 var rects = [];
27336 if (hasChildTextNodes(elm)) {
27337 var _rects;
27338 (_rects = rects).push.apply(_rects, _toConsumableArray(getContentRects2(elm)));
27339 } else {
27340 rects = [ elm.boundingClientRect ];
27341 }
27342 return rects.some(function(rect) {
27343 return rect.left < boundingRect.left || rect.right > boundingRect.right || rect.top < boundingRect.top || rect.bottom > boundingRect.bottom;
27344 });
27345 });
27346 }
27347 function getContentRects2(vNode) {
27348 var range2 = document.createRange();
27349 range2.selectNodeContents(vNode.actualNode);
27350 return Array.from(range2.getClientRects());
27351 }
27352 function presentationRoleConflictMatches(node, virtualNode) {
27353 return implicit_role_default(virtualNode, {
27354 chromiumRoles: true
27355 }) !== null;
27356 }
27357 var presentation_role_conflict_matches_default = presentationRoleConflictMatches;
27358 function pAsHeadingMatches(node) {
27359 var children = Array.from(node.parentNode.childNodes);
27360 var nodeText = node.textContent.trim();
27361 var isSentence = /[.!?:;](?![.!?:;])/g;
27362 if (nodeText.length === 0 || (nodeText.match(isSentence) || []).length >= 2) {
27363 return false;
27364 }
27365 var siblingsAfter = children.slice(children.indexOf(node) + 1).filter(function(elm) {
27366 return elm.nodeName.toUpperCase() === 'P' && elm.textContent.trim() !== '';
27367 });
27368 return siblingsAfter.length !== 0;
27369 }
27370 var p_as_heading_matches_default = pAsHeadingMatches;
27371 function noExplicitNameRequired(node, virtualNode) {
27372 var role = get_explicit_role_default(virtualNode);
27373 if (!role || [ 'none', 'presentation' ].includes(role)) {
27374 return true;
27375 }
27376 var _ref144 = aria_roles_default[role] || {}, accessibleNameRequired = _ref144.accessibleNameRequired;
27377 if (accessibleNameRequired || _isFocusable(virtualNode)) {
27378 return true;
27379 }
27380 return false;
27381 }
27382 var no_explicit_name_required_matches_default = noExplicitNameRequired;
27383 var object_is_loaded_matches_default = function object_is_loaded_matches_default(node, vNode) {
27384 return [ no_explicit_name_required_matches_default, objectHasLoaded ].every(function(fn) {
27385 return fn(node, vNode);
27386 });
27387 };
27388 function objectHasLoaded(node) {
27389 var _node$ownerDocument;
27390 if (!(node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.createRange)) {
27391 return true;
27392 }
27393 var range2 = node.ownerDocument.createRange();
27394 range2.setStart(node, 0);
27395 range2.setEnd(node, node.childNodes.length);
27396 return range2.getClientRects().length === 0;
27397 }
27398 function notHtmlMatches(node, virtualNode) {
27399 return virtualNode.props.nodeName !== 'html';
27400 }
27401 var not_html_matches_default = notHtmlMatches;
27402 function noRoleMatches(node, vNode) {
27403 return !vNode.attr('role');
27404 }
27405 var no_role_matches_default = noRoleMatches;
27406 function noNegativeTabindexMatches(node, virtualNode) {
27407 var tabindex = parse_tabindex_default(virtualNode.attr('tabindex'));
27408 return tabindex === null || tabindex >= 0;
27409 }
27410 var no_negative_tabindex_matches_default = noNegativeTabindexMatches;
27411 function noNamingMethodMatches(node, virtualNode) {
27412 var _get_element_spec_def3 = get_element_spec_default(virtualNode), namingMethods = _get_element_spec_def3.namingMethods;
27413 if (namingMethods && namingMethods.length !== 0) {
27414 return false;
27415 }
27416 if (get_explicit_role_default(virtualNode) === 'combobox' && query_selector_all_default(virtualNode, 'input:not([type="hidden"])').length) {
27417 return false;
27418 }
27419 if (_isComboboxPopup(virtualNode, {
27420 popupRoles: [ 'listbox' ]
27421 })) {
27422 return false;
27423 }
27424 return true;
27425 }
27426 var no_naming_method_matches_default = noNamingMethodMatches;
27427 function noEmptyRoleMatches(node, virtualNode) {
27428 if (!virtualNode.hasAttr('role')) {
27429 return false;
27430 }
27431 if (!virtualNode.attr('role').trim()) {
27432 return false;
27433 }
27434 return true;
27435 }
27436 var no_empty_role_matches_default = noEmptyRoleMatches;
27437 function noAutoplayAudioMatches(node) {
27438 if (!node.currentSrc) {
27439 return false;
27440 }
27441 if (node.hasAttribute('paused') || node.hasAttribute('muted')) {
27442 return false;
27443 }
27444 return true;
27445 }
27446 var no_autoplay_audio_matches_default = noAutoplayAudioMatches;
27447 function nestedInteractiveMatches(node, virtualNode) {
27448 var role = get_role_default(virtualNode);
27449 if (!role) {
27450 return false;
27451 }
27452 return !!standards_default.ariaRoles[role].childrenPresentational;
27453 }
27454 var nested_interactive_matches_default = nestedInteractiveMatches;
27455 function linkInTextBlockMatches(node) {
27456 var text = sanitize_default(node.innerText);
27457 var role = get_explicit_role_default(node);
27458 if (role && role !== 'link') {
27459 return false;
27460 }
27461 if (!text) {
27462 return false;
27463 }
27464 if (!_isVisibleOnScreen(node)) {
27465 return false;
27466 }
27467 return is_in_text_block_default(node);
27468 }
27469 var link_in_text_block_matches_default = linkInTextBlockMatches;
27470 function dataTableMatches(node) {
27471 return !is_data_table_default(node) && !_isFocusable(node);
27472 }
27473 var layout_table_matches_default = dataTableMatches;
27474 function landmarkUniqueMatches(node, virtualNode) {
27475 return isLandmarkVirtual(virtualNode) && _isVisibleToScreenReaders(virtualNode);
27476 }
27477 function isLandmarkVirtual(vNode) {
27478 var landmarkRoles2 = get_aria_roles_by_type_default('landmark');
27479 var role = get_role_default(vNode);
27480 if (!role) {
27481 return false;
27482 }
27483 var nodeName2 = vNode.props.nodeName;
27484 if (nodeName2 === 'section' || nodeName2 === 'form') {
27485 var accessibleText2 = _accessibleTextVirtual(vNode);
27486 return !!accessibleText2;
27487 }
27488 return landmarkRoles2.indexOf(role) >= 0 || role === 'region';
27489 }
27490 function landmarkHasBodyContextMatches(node, virtualNode) {
27491 var nativeScopeFilter = 'article, aside, main, nav, section';
27492 return node.hasAttribute('role') || !find_up_virtual_default(virtualNode, nativeScopeFilter);
27493 }
27494 var landmark_has_body_context_matches_default = landmarkHasBodyContextMatches;
27495 function labelMatches(node, virtualNode) {
27496 if (virtualNode.props.nodeName !== 'input' || virtualNode.hasAttr('type') === false) {
27497 return true;
27498 }
27499 var type2 = virtualNode.attr('type').toLowerCase();
27500 return [ 'hidden', 'image', 'button', 'submit', 'reset' ].includes(type2) === false;
27501 }
27502 var label_matches_default = labelMatches;
27503 function labelContentNameMismatchMatches(node, virtualNode) {
27504 var role = get_role_default(node);
27505 if (!role) {
27506 return false;
27507 }
27508 var widgetRoles = get_aria_roles_by_type_default('widget');
27509 var isWidgetType2 = widgetRoles.includes(role);
27510 if (!isWidgetType2) {
27511 return false;
27512 }
27513 var rolesWithNameFromContents = get_aria_roles_supporting_name_from_content_default();
27514 if (!rolesWithNameFromContents.includes(role)) {
27515 return false;
27516 }
27517 if (!sanitize_default(_arialabelText(virtualNode)) && !sanitize_default(arialabelledby_text_default(node))) {
27518 return false;
27519 }
27520 if (!sanitize_default(visible_virtual_default(virtualNode))) {
27521 return false;
27522 }
27523 return true;
27524 }
27525 var label_content_name_mismatch_matches_default = labelContentNameMismatchMatches;
27526 function isVisibleOnScreenMatches(node, virtualNode) {
27527 return _isVisibleOnScreen(virtualNode);
27528 }
27529 function hasVisibleTextMatches(node) {
27530 return _isVisibleOnScreen(node);
27531 }
27532 function isInitiatorMatches(node, virtualNode, context) {
27533 return context.initiator;
27534 }
27535 var is_initiator_matches_default = isInitiatorMatches;
27536 function insertedIntoFocusOrderMatches(node) {
27537 return inserted_into_focus_order_default(node);
27538 }
27539 var inserted_into_focus_order_matches_default = insertedIntoFocusOrderMatches;
27540 function identicalLinksSamePurposeMatches(node, virtualNode) {
27541 var hasAccName = !!_accessibleTextVirtual(virtualNode);
27542 if (!hasAccName) {
27543 return false;
27544 }
27545 var role = get_role_default(node);
27546 if (role && role !== 'link') {
27547 return false;
27548 }
27549 return true;
27550 }
27551 var identical_links_same_purpose_matches_default = identicalLinksSamePurposeMatches;
27552 function htmlNamespaceMatches(node, virtualNode) {
27553 return !svg_namespace_matches_default(node, virtualNode);
27554 }
27555 var html_namespace_matches_default = htmlNamespaceMatches;
27556 function headingMatches(node, virtualNode) {
27557 return get_role_default(virtualNode) === 'heading';
27558 }
27559 function hasImplicitChromiumRoleMatches(node, virtualNode) {
27560 return implicit_role_default(virtualNode, {
27561 chromium: true
27562 }) !== null;
27563 }
27564 var has_implicit_chromium_role_matches_default = hasImplicitChromiumRoleMatches;
27565 function frameTitleHasTextMatches(node) {
27566 var title = node.getAttribute('title');
27567 return !!sanitize_default(title);
27568 }
27569 var frame_title_has_text_matches_default = frameTitleHasTextMatches;
27570 function frameFocusableContentMatches(node, virtualNode, context) {
27571 var _context$size, _context$size2;
27572 return !context.initiator && !context.focusable && ((_context$size = context.size) === null || _context$size === void 0 ? void 0 : _context$size.width) * ((_context$size2 = context.size) === null || _context$size2 === void 0 ? void 0 : _context$size2.height) > 1;
27573 }
27574 var frame_focusable_content_matches_default = frameFocusableContentMatches;
27575 function duplicateIdMiscMatches(node) {
27576 var id = node.getAttribute('id').trim();
27577 var idSelector = '*[id="'.concat(escape_selector_default(id), '"]');
27578 var idMatchingElms = Array.from(get_root_node_default2(node).querySelectorAll(idSelector));
27579 return !is_accessible_ref_default(node) && idMatchingElms.every(function(elm) {
27580 return !_isFocusable(elm);
27581 });
27582 }
27583 var duplicate_id_misc_matches_default = duplicateIdMiscMatches;
27584 function duplicateIdAriaMatches(node) {
27585 return is_accessible_ref_default(node);
27586 }
27587 var duplicate_id_aria_matches_default = duplicateIdAriaMatches;
27588 function duplicateIdActiveMatches(node) {
27589 var id = node.getAttribute('id').trim();
27590 var idSelector = '*[id="'.concat(escape_selector_default(id), '"]');
27591 var idMatchingElms = Array.from(get_root_node_default2(node).querySelectorAll(idSelector));
27592 return !is_accessible_ref_default(node) && idMatchingElms.some(_isFocusable);
27593 }
27594 var duplicate_id_active_matches_default = duplicateIdActiveMatches;
27595 function dataTableMatches2(node) {
27596 return is_data_table_default(node);
27597 }
27598 var data_table_matches_default = dataTableMatches2;
27599 function dataTableLargeMatches(node) {
27600 if (is_data_table_default(node)) {
27601 var tableArray = to_grid_default(node);
27602 return tableArray.length >= 3 && tableArray[0].length >= 3 && tableArray[1].length >= 3 && tableArray[2].length >= 3;
27603 }
27604 return false;
27605 }
27606 var data_table_large_matches_default = dataTableLargeMatches;
27607 function colorContrastMatches(node, virtualNode) {
27608 var _virtualNode$props2 = virtualNode.props, nodeName2 = _virtualNode$props2.nodeName, inputType = _virtualNode$props2.type;
27609 if (nodeName2 === 'option') {
27610 return false;
27611 }
27612 if (nodeName2 === 'select' && !node.options.length) {
27613 return false;
27614 }
27615 var nonTextInput = [ 'hidden', 'range', 'color', 'checkbox', 'radio', 'image' ];
27616 if (nodeName2 === 'input' && nonTextInput.includes(inputType)) {
27617 return false;
27618 }
27619 if (is_disabled_default(virtualNode) || _isInert(virtualNode)) {
27620 return false;
27621 }
27622 var formElements = [ 'input', 'select', 'textarea' ];
27623 if (formElements.includes(nodeName2)) {
27624 var style = window.getComputedStyle(node);
27625 var textIndent = parseInt(style.getPropertyValue('text-indent'), 10);
27626 if (textIndent) {
27627 var rect = node.getBoundingClientRect();
27628 rect = {
27629 top: rect.top,
27630 bottom: rect.bottom,
27631 left: rect.left + textIndent,
27632 right: rect.right + textIndent
27633 };
27634 if (!visually_overlaps_default(rect, node)) {
27635 return false;
27636 }
27637 }
27638 return true;
27639 }
27640 var nodeParentLabel = find_up_virtual_default(virtualNode, 'label');
27641 if (nodeName2 === 'label' || nodeParentLabel) {
27642 var labelNode = nodeParentLabel || node;
27643 var labelVirtual3 = nodeParentLabel ? get_node_from_tree_default(nodeParentLabel) : virtualNode;
27644 if (labelNode.htmlFor) {
27645 var doc = get_root_node_default2(labelNode);
27646 var explicitControl = doc.getElementById(labelNode.htmlFor);
27647 var explicitControlVirtual = explicitControl && get_node_from_tree_default(explicitControl);
27648 if (explicitControlVirtual && is_disabled_default(explicitControlVirtual)) {
27649 return false;
27650 }
27651 }
27652 var query = 'input:not([type="hidden"],[type="image"],[type="button"],[type="submit"],[type="reset"]), select, textarea';
27653 var implicitControl = query_selector_all_default(labelVirtual3, query)[0];
27654 if (implicitControl && is_disabled_default(implicitControl)) {
27655 return false;
27656 }
27657 }
27658 var ariaLabelledbyControls = [];
27659 var ancestorNode = virtualNode;
27660 while (ancestorNode) {
27661 if (ancestorNode.props.id) {
27662 var virtualControls = get_accessible_refs_default(ancestorNode).filter(function(control) {
27663 return token_list_default(control.getAttribute('aria-labelledby') || '').includes(ancestorNode.props.id);
27664 }).map(function(control) {
27665 return get_node_from_tree_default(control);
27666 });
27667 ariaLabelledbyControls.push.apply(ariaLabelledbyControls, _toConsumableArray(virtualControls));
27668 }
27669 ancestorNode = ancestorNode.parent;
27670 }
27671 if (ariaLabelledbyControls.length > 0 && ariaLabelledbyControls.every(is_disabled_default)) {
27672 return false;
27673 }
27674 if (!hasRealTextChildren(virtualNode)) {
27675 return false;
27676 }
27677 if (!parseFloat(virtualNode.getComputedStylePropertyValue('font-size'))) {
27678 return false;
27679 }
27680 var range2 = document.createRange();
27681 var childNodes = virtualNode.children;
27682 for (var index = 0; index < childNodes.length; index++) {
27683 var child = childNodes[index];
27684 if (child.actualNode.nodeType === 3 && sanitize_default(child.actualNode.nodeValue) !== '') {
27685 range2.selectNodeContents(child.actualNode);
27686 }
27687 }
27688 var rects = Array.from(range2.getClientRects());
27689 var clippingAncestors = get_overflow_hidden_ancestors_default(virtualNode);
27690 return rects.some(function(rect) {
27691 var overlaps = visually_overlaps_default(rect, node);
27692 if (!clippingAncestors.length) {
27693 return overlaps;
27694 }
27695 var withinOverflow = clippingAncestors.some(function(overflowNode) {
27696 return _rectsOverlap(rect, overflowNode.boundingClientRect);
27697 });
27698 return overlaps && withinOverflow;
27699 });
27700 }
27701 var color_contrast_matches_default = colorContrastMatches;
27702 var removeUnicodeOptions = {
27703 emoji: true,
27704 nonBmp: false,
27705 punctuations: true
27706 };
27707 function hasRealTextChildren(virtualNode) {
27708 var visibleText = visible_virtual_default(virtualNode, false, true);
27709 if (visibleText === '' || remove_unicode_default(visibleText, removeUnicodeOptions) === '') {
27710 return false;
27711 }
27712 return virtualNode.children.some(function(vChild) {
27713 return vChild.props.nodeName === '#text' && !_isIconLigature(vChild);
27714 });
27715 }
27716 function bypassMatches(node, virtualNode, context) {
27717 if (is_initiator_matches_default(node, virtualNode, context)) {
27718 return !!node.querySelector('a[href]');
27719 }
27720 return true;
27721 }
27722 var bypass_matches_default = bypassMatches;
27723 function autocompleteMatches(node, virtualNode) {
27724 var autocomplete2 = virtualNode.attr('autocomplete');
27725 if (!autocomplete2 || sanitize_default(autocomplete2) === '') {
27726 return false;
27727 }
27728 var nodeName2 = virtualNode.props.nodeName;
27729 if ([ 'textarea', 'input', 'select' ].includes(nodeName2) === false) {
27730 return false;
27731 }
27732 var ariaReadonly = virtualNode.attr('aria-readonly') || 'false';
27733 if (virtualNode.hasAttr('readonly') || ariaReadonly.toLowerCase() === 'true') {
27734 return false;
27735 }
27736 var excludedInputTypes = [ 'submit', 'reset', 'button', 'hidden' ];
27737 if (nodeName2 === 'input' && excludedInputTypes.includes(virtualNode.props.type)) {
27738 return false;
27739 }
27740 var ariaDisabled = virtualNode.attr('aria-disabled') || 'false';
27741 if (virtualNode.hasAttr('disabled') || ariaDisabled.toLowerCase() === 'true') {
27742 return false;
27743 }
27744 var role = get_explicit_role_default(virtualNode);
27745 var tabIndex = parse_tabindex_default(virtualNode.attr('tabindex'));
27746 if (tabIndex < 0 && virtualNode.hasAttr('role')) {
27747 var roleDef = standards_default.ariaRoles[role];
27748 if (roleDef === void 0 || roleDef.type !== 'widget') {
27749 return false;
27750 }
27751 }
27752 if (tabIndex < 0 && virtualNode.actualNode && !_isVisibleOnScreen(virtualNode) && !_isVisibleToScreenReaders(virtualNode)) {
27753 return false;
27754 }
27755 return true;
27756 }
27757 var autocomplete_matches_default = autocompleteMatches;
27758 function ariaRequiredParentMatches(node, virtualNode) {
27759 var role = get_explicit_role_default(virtualNode);
27760 return !!required_context_default(role);
27761 }
27762 var aria_required_parent_matches_default = ariaRequiredParentMatches;
27763 function ariaRequiredChildrenMatches(node, virtualNode) {
27764 var role = get_explicit_role_default(virtualNode, {
27765 dpub: true
27766 });
27767 return !!required_owned_default(role);
27768 }
27769 var aria_required_children_matches_default = ariaRequiredChildrenMatches;
27770 function shouldMatchElement(el) {
27771 if (!el) {
27772 return true;
27773 }
27774 if (el.getAttribute('aria-hidden') === 'true') {
27775 return false;
27776 }
27777 return shouldMatchElement(get_composed_parent_default(el));
27778 }
27779 function ariaHiddenFocusMatches(node) {
27780 return shouldMatchElement(get_composed_parent_default(node));
27781 }
27782 var aria_hidden_focus_matches_default = ariaHiddenFocusMatches;
27783 function ariaHasAttrMatches(node, virtualNode) {
27784 var aria = /^aria-/;
27785 return virtualNode.attrNames.some(function(attr) {
27786 return aria.test(attr);
27787 });
27788 }
27789 var aria_has_attr_matches_default = ariaHasAttrMatches;
27790 function ariaAllowedRoleMatches(node, virtualNode) {
27791 return get_explicit_role_default(virtualNode, {
27792 dpub: true,
27793 fallback: true
27794 }) !== null;
27795 }
27796 var aria_allowed_role_matches_default = ariaAllowedRoleMatches;
27797 function ariaAllowedAttrMatches(node, virtualNode) {
27798 var aria = /^aria-/;
27799 var attrs = virtualNode.attrNames;
27800 if (attrs.length) {
27801 for (var _i35 = 0, l = attrs.length; _i35 < l; _i35++) {
27802 if (aria.test(attrs[_i35])) {
27803 return true;
27804 }
27805 }
27806 }
27807 return false;
27808 }
27809 var aria_allowed_attr_matches_default = ariaAllowedAttrMatches;
27810 var metadataFunctionMap = {
27811 'abstractrole-evaluate': abstractrole_evaluate_default,
27812 'accesskeys-after': accesskeys_after_default,
27813 'accesskeys-evaluate': accesskeys_evaluate_default,
27814 'alt-space-value-evaluate': alt_space_value_evaluate_default,
27815 'aria-allowed-attr-elm-evaluate': ariaAllowedAttrElmEvaluate,
27816 'aria-allowed-attr-evaluate': ariaAllowedAttrEvaluate,
27817 'aria-allowed-attr-matches': aria_allowed_attr_matches_default,
27818 'aria-allowed-role-evaluate': aria_allowed_role_evaluate_default,
27819 'aria-allowed-role-matches': aria_allowed_role_matches_default,
27820 'aria-busy-evaluate': ariaBusyEvaluate,
27821 'aria-conditional-attr-evaluate': ariaConditionalAttrEvaluate,
27822 'aria-conditional-checkbox-attr-evaluate': ariaConditionalCheckboxAttr,
27823 'aria-conditional-row-attr-evaluate': ariaConditionalRowAttr,
27824 'aria-errormessage-evaluate': ariaErrormessageEvaluate,
27825 'aria-has-attr-matches': aria_has_attr_matches_default,
27826 'aria-hidden-body-evaluate': aria_hidden_body_evaluate_default,
27827 'aria-hidden-focus-matches': aria_hidden_focus_matches_default,
27828 'aria-label-evaluate': aria_label_evaluate_default,
27829 'aria-labelledby-evaluate': aria_labelledby_evaluate_default,
27830 'aria-level-evaluate': aria_level_evaluate_default,
27831 'aria-prohibited-attr-evaluate': ariaProhibitedAttrEvaluate,
27832 'aria-required-attr-evaluate': ariaRequiredAttrEvaluate,
27833 'aria-required-children-evaluate': ariaRequiredChildrenEvaluate,
27834 'aria-required-children-matches': aria_required_children_matches_default,
27835 'aria-required-parent-evaluate': aria_required_parent_evaluate_default,
27836 'aria-required-parent-matches': aria_required_parent_matches_default,
27837 'aria-roledescription-evaluate': aria_roledescription_evaluate_default,
27838 'aria-unsupported-attr-evaluate': aria_unsupported_attr_evaluate_default,
27839 'aria-valid-attr-evaluate': aria_valid_attr_evaluate_default,
27840 'aria-valid-attr-value-evaluate': ariaValidAttrValueEvaluate,
27841 'attr-non-space-content-evaluate': attr_non_space_content_evaluate_default,
27842 'autocomplete-appropriate-evaluate': autocomplete_appropriate_evaluate_default,
27843 'autocomplete-matches': autocomplete_matches_default,
27844 'autocomplete-valid-evaluate': autocomplete_valid_evaluate_default,
27845 'avoid-inline-spacing-evaluate': avoid_inline_spacing_evaluate_default,
27846 'braille-label-equivalent-evaluate': brailleLabelEquivalentEvaluate,
27847 'braille-roledescription-equivalent-evaluate': brailleRoleDescriptionEquivalentEvaluate,
27848 'bypass-matches': bypass_matches_default,
27849 'caption-evaluate': caption_evaluate_default,
27850 'caption-faked-evaluate': caption_faked_evaluate_default,
27851 'color-contrast-evaluate': colorContrastEvaluate,
27852 'color-contrast-matches': color_contrast_matches_default,
27853 'css-orientation-lock-evaluate': css_orientation_lock_evaluate_default,
27854 'data-table-large-matches': data_table_large_matches_default,
27855 'data-table-matches': data_table_matches_default,
27856 'deprecatedrole-evaluate': deprecatedroleEvaluate,
27857 'dlitem-evaluate': dlitem_evaluate_default,
27858 'doc-has-title-evaluate': doc_has_title_evaluate_default,
27859 'duplicate-id-active-matches': duplicate_id_active_matches_default,
27860 'duplicate-id-after': duplicate_id_after_default,
27861 'duplicate-id-aria-matches': duplicate_id_aria_matches_default,
27862 'duplicate-id-evaluate': duplicate_id_evaluate_default,
27863 'duplicate-id-misc-matches': duplicate_id_misc_matches_default,
27864 'duplicate-img-label-evaluate': duplicate_img_label_evaluate_default,
27865 'exists-evaluate': exists_evaluate_default,
27866 'explicit-evaluate': explicit_evaluate_default,
27867 'fallbackrole-evaluate': fallbackrole_evaluate_default,
27868 'focusable-content-evaluate': focusable_content_evaluate_default,
27869 'focusable-disabled-evaluate': focusable_disabled_evaluate_default,
27870 'focusable-element-evaluate': focusable_element_evaluate_default,
27871 'focusable-modal-open-evaluate': focusable_modal_open_evaluate_default,
27872 'focusable-no-name-evaluate': focusable_no_name_evaluate_default,
27873 'focusable-not-tabbable-evaluate': focusable_not_tabbable_evaluate_default,
27874 'frame-focusable-content-evaluate': frameFocusableContentEvaluate,
27875 'frame-focusable-content-matches': frame_focusable_content_matches_default,
27876 'frame-tested-after': frame_tested_after_default,
27877 'frame-tested-evaluate': frame_tested_evaluate_default,
27878 'frame-title-has-text-matches': frame_title_has_text_matches_default,
27879 'has-alt-evaluate': has_alt_evaluate_default,
27880 'has-descendant-after': has_descendant_after_default,
27881 'has-descendant-evaluate': has_descendant_evaluate_default,
27882 'has-global-aria-attribute-evaluate': has_global_aria_attribute_evaluate_default,
27883 'has-implicit-chromium-role-matches': has_implicit_chromium_role_matches_default,
27884 'has-lang-evaluate': has_lang_evaluate_default,
27885 'has-text-content-evaluate': hasTextContentEvaluate,
27886 'has-widget-role-evaluate': has_widget_role_evaluate_default,
27887 'heading-matches': headingMatches,
27888 'heading-order-after': headingOrderAfter,
27889 'heading-order-evaluate': heading_order_evaluate_default,
27890 'help-same-as-label-evaluate': help_same_as_label_evaluate_default,
27891 'hidden-content-evaluate': hidden_content_evaluate_default,
27892 'hidden-explicit-label-evaluate': hidden_explicit_label_evaluate_default,
27893 'html-namespace-matches': html_namespace_matches_default,
27894 'html5-scope-evaluate': html5_scope_evaluate_default,
27895 'identical-links-same-purpose-after': identical_links_same_purpose_after_default,
27896 'identical-links-same-purpose-evaluate': identical_links_same_purpose_evaluate_default,
27897 'identical-links-same-purpose-matches': identical_links_same_purpose_matches_default,
27898 'implicit-evaluate': implicit_evaluate_default,
27899 'inline-style-property-evaluate': inlineStyleProperty,
27900 'inserted-into-focus-order-matches': inserted_into_focus_order_matches_default,
27901 'internal-link-present-evaluate': internal_link_present_evaluate_default,
27902 'invalid-children-evaluate': invalidChildrenEvaluate,
27903 'invalidrole-evaluate': invalidrole_evaluate_default,
27904 'is-element-focusable-evaluate': is_element_focusable_evaluate_default,
27905 'is-initiator-matches': is_initiator_matches_default,
27906 'is-on-screen-evaluate': is_on_screen_evaluate_default,
27907 'is-visible-matches': hasVisibleTextMatches,
27908 'is-visible-on-screen-matches': isVisibleOnScreenMatches,
27909 'label-content-name-mismatch-evaluate': label_content_name_mismatch_evaluate_default,
27910 'label-content-name-mismatch-matches': label_content_name_mismatch_matches_default,
27911 'label-matches': label_matches_default,
27912 'landmark-has-body-context-matches': landmark_has_body_context_matches_default,
27913 'landmark-is-top-level-evaluate': landmark_is_top_level_evaluate_default,
27914 'landmark-is-unique-after': landmark_is_unique_after_default,
27915 'landmark-is-unique-evaluate': landmark_is_unique_evaluate_default,
27916 'landmark-unique-matches': landmarkUniqueMatches,
27917 'layout-table-matches': layout_table_matches_default,
27918 'link-in-text-block-evaluate': link_in_text_block_evaluate_default,
27919 'link-in-text-block-matches': link_in_text_block_matches_default,
27920 'link-in-text-block-style-evaluate': linkInTextBlockStyleEvaluate,
27921 'listitem-evaluate': listitemEvaluate,
27922 'matches-definition-evaluate': matches_definition_evaluate_default,
27923 'meta-refresh-evaluate': metaRefreshEvaluate,
27924 'meta-viewport-scale-evaluate': meta_viewport_scale_evaluate_default,
27925 'multiple-label-evaluate': multiple_label_evaluate_default,
27926 'nested-interactive-matches': nested_interactive_matches_default,
27927 'no-autoplay-audio-evaluate': no_autoplay_audio_evaluate_default,
27928 'no-autoplay-audio-matches': no_autoplay_audio_matches_default,
27929 'no-empty-role-matches': no_empty_role_matches_default,
27930 'no-explicit-name-required-matches': no_explicit_name_required_matches_default,
27931 'no-focusable-content-evaluate': noFocusableContentEvaluate,
27932 'no-implicit-explicit-label-evaluate': no_implicit_explicit_label_evaluate_default,
27933 'no-naming-method-matches': no_naming_method_matches_default,
27934 'no-negative-tabindex-matches': no_negative_tabindex_matches_default,
27935 'no-role-matches': no_role_matches_default,
27936 'non-empty-if-present-evaluate': non_empty_if_present_evaluate_default,
27937 'not-html-matches': not_html_matches_default,
27938 'object-is-loaded-matches': object_is_loaded_matches_default,
27939 'only-dlitems-evaluate': onlyDlitemsEvaluate,
27940 'only-listitems-evaluate': only_listitems_evaluate_default,
27941 'p-as-heading-evaluate': p_as_heading_evaluate_default,
27942 'p-as-heading-matches': p_as_heading_matches_default,
27943 'page-no-duplicate-after': page_no_duplicate_after_default,
27944 'page-no-duplicate-evaluate': page_no_duplicate_evaluate_default,
27945 'presentation-role-conflict-matches': presentation_role_conflict_matches_default,
27946 'presentational-role-evaluate': presentationalRoleEvaluate,
27947 'region-after': region_after_default,
27948 'region-evaluate': regionEvaluate,
27949 'same-caption-summary-evaluate': same_caption_summary_evaluate_default,
27950 'scope-value-evaluate': scope_value_evaluate_default,
27951 'scrollable-region-focusable-matches': scrollableRegionFocusableMatches,
27952 'skip-link-evaluate': skip_link_evaluate_default,
27953 'skip-link-matches': skip_link_matches_default,
27954 'structured-dlitems-evaluate': structured_dlitems_evaluate_default,
27955 'summary-interactive-matches': summaryIsInteractiveMatches,
27956 'svg-namespace-matches': svg_namespace_matches_default,
27957 'svg-non-empty-title-evaluate': svg_non_empty_title_evaluate_default,
27958 'tabindex-evaluate': tabindex_evaluate_default,
27959 'table-or-grid-role-matches': tableOrGridRoleMatches,
27960 'target-offset-evaluate': targetOffsetEvaluate,
27961 'target-size-evaluate': targetSizeEvaluate,
27962 'td-has-header-evaluate': td_has_header_evaluate_default,
27963 'td-headers-attr-evaluate': tdHeadersAttrEvaluate,
27964 'th-has-data-cells-evaluate': th_has_data_cells_evaluate_default,
27965 'title-only-evaluate': title_only_evaluate_default,
27966 'unique-frame-title-after': unique_frame_title_after_default,
27967 'unique-frame-title-evaluate': unique_frame_title_evaluate_default,
27968 'unsupportedrole-evaluate': unsupportedrole_evaluate_default,
27969 'valid-lang-evaluate': valid_lang_evaluate_default,
27970 'valid-scrollable-semantics-evaluate': valid_scrollable_semantics_evaluate_default,
27971 'widget-not-inline-matches': widgetNotInline,
27972 'window-is-top-matches': window_is_top_matches_default,
27973 'xml-lang-mismatch-evaluate': xml_lang_mismatch_evaluate_default,
27974 'xml-lang-mismatch-matches': xml_lang_mismatch_matches_default
27975 };
27976 var metadata_function_map_default = metadataFunctionMap;
27977 function CheckResult(check) {
27978 this.id = check.id;
27979 this.data = null;
27980 this.relatedNodes = [];
27981 this.result = null;
27982 }
27983 var check_result_default = CheckResult;
27984 function createExecutionContext(spec) {
27985 if (typeof spec === 'string') {
27986 if (metadata_function_map_default[spec]) {
27987 return metadata_function_map_default[spec];
27988 }
27989 if (/^\s*function[\s\w]*\(/.test(spec)) {
27990 return new Function('return ' + spec + ';')();
27991 }
27992 throw new ReferenceError('Function ID does not exist in the metadata-function-map: '.concat(spec));
27993 }
27994 return spec;
27995 }
27996 function normalizeOptions() {
27997 var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
27998 if (Array.isArray(options) || _typeof(options) !== 'object') {
27999 options = {
28000 value: options
28001 };
28002 }
28003 return options;
28004 }
28005 function Check(spec) {
28006 if (spec) {
28007 this.id = spec.id;
28008 this.configure(spec);
28009 }
28010 }
28011 Check.prototype.enabled = true;
28012 Check.prototype.run = function run(node, options, context, resolve, reject) {
28013 options = options || {};
28014 var enabled = options.hasOwnProperty('enabled') ? options.enabled : this.enabled;
28015 var checkOptions = this.getOptions(options.options);
28016 if (enabled) {
28017 var checkResult = new check_result_default(this);
28018 var helper = check_helper_default(checkResult, options, resolve, reject);
28019 var result;
28020 try {
28021 result = this.evaluate.call(helper, node.actualNode, checkOptions, node, context);
28022 } catch (e) {
28023 if (node && node.actualNode) {
28024 e.errorNode = node_serializer_default.toSpec(node);
28025 }
28026 reject(e);
28027 return;
28028 }
28029 if (!helper.isAsync) {
28030 checkResult.result = result;
28031 resolve(checkResult);
28032 }
28033 } else {
28034 resolve(null);
28035 }
28036 };
28037 Check.prototype.runSync = function runSync(node, options, context) {
28038 options = options || {};
28039 var _options2 = options, _options2$enabled = _options2.enabled, enabled = _options2$enabled === void 0 ? this.enabled : _options2$enabled;
28040 if (!enabled) {
28041 return null;
28042 }
28043 var checkOptions = this.getOptions(options.options);
28044 var checkResult = new check_result_default(this);
28045 var helper = check_helper_default(checkResult, options);
28046 helper.async = function async() {
28047 throw new Error('Cannot run async check while in a synchronous run');
28048 };
28049 var result;
28050 try {
28051 result = this.evaluate.call(helper, node.actualNode, checkOptions, node, context);
28052 } catch (e) {
28053 if (node && node.actualNode) {
28054 e.errorNode = node_serializer_default.toSpec(node);
28055 }
28056 throw e;
28057 }
28058 checkResult.result = result;
28059 return checkResult;
28060 };
28061 Check.prototype.configure = function configure2(spec) {
28062 var _this0 = this;
28063 if (!spec.evaluate || metadata_function_map_default[spec.evaluate]) {
28064 this._internalCheck = true;
28065 }
28066 if (spec.hasOwnProperty('enabled')) {
28067 this.enabled = spec.enabled;
28068 }
28069 if (spec.hasOwnProperty('options')) {
28070 if (this._internalCheck) {
28071 this.options = normalizeOptions(spec.options);
28072 } else {
28073 this.options = spec.options;
28074 }
28075 }
28076 [ 'evaluate', 'after' ].filter(function(prop) {
28077 return spec.hasOwnProperty(prop);
28078 }).forEach(function(prop) {
28079 return _this0[prop] = createExecutionContext(spec[prop]);
28080 });
28081 };
28082 Check.prototype.getOptions = function getOptions(options) {
28083 if (this._internalCheck) {
28084 return deep_merge_default(this.options, normalizeOptions(options || {}));
28085 } else {
28086 return options || this.options;
28087 }
28088 };
28089 var check_default = Check;
28090 function RuleResult(rule) {
28091 this.id = rule.id;
28092 this.result = constants_default.NA;
28093 this.pageLevel = rule.pageLevel;
28094 this.impact = null;
28095 this.nodes = [];
28096 }
28097 var rule_result_default = RuleResult;
28098 function Rule(spec, parentAudit) {
28099 this._audit = parentAudit;
28100 this.id = spec.id;
28101 this.selector = spec.selector || '*';
28102 if (spec.impact) {
28103 assert_default(constants_default.impact.includes(spec.impact), 'Impact '.concat(spec.impact, ' is not a valid impact'));
28104 this.impact = spec.impact;
28105 }
28106 this.excludeHidden = typeof spec.excludeHidden === 'boolean' ? spec.excludeHidden : true;
28107 this.enabled = typeof spec.enabled === 'boolean' ? spec.enabled : true;
28108 this.pageLevel = typeof spec.pageLevel === 'boolean' ? spec.pageLevel : false;
28109 this.reviewOnFail = typeof spec.reviewOnFail === 'boolean' ? spec.reviewOnFail : false;
28110 this.any = spec.any || [];
28111 this.all = spec.all || [];
28112 this.none = spec.none || [];
28113 this.tags = spec.tags || [];
28114 this.preload = spec.preload ? true : false;
28115 this.actIds = spec.actIds;
28116 if (spec.matches) {
28117 this.matches = createExecutionContext(spec.matches);
28118 }
28119 }
28120 Rule.prototype.matches = function matches3() {
28121 return true;
28122 };
28123 Rule.prototype.gather = function gather(context) {
28124 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
28125 var markStart = 'mark_gather_start_' + this.id;
28126 var markEnd = 'mark_gather_end_' + this.id;
28127 var markHiddenStart = 'mark_isVisibleToScreenReaders_start_' + this.id;
28128 var markHiddenEnd = 'mark_isVisibleToScreenReaders_end_' + this.id;
28129 if (options.performanceTimer) {
28130 performance_timer_default.mark(markStart);
28131 }
28132 var elements = _select(this.selector, context);
28133 if (this.excludeHidden) {
28134 if (options.performanceTimer) {
28135 performance_timer_default.mark(markHiddenStart);
28136 }
28137 elements = elements.filter(function(element) {
28138 return _isVisibleToScreenReaders(element);
28139 });
28140 if (options.performanceTimer) {
28141 performance_timer_default.mark(markHiddenEnd);
28142 performance_timer_default.measure('rule_' + this.id + '#gather_axe.utils.isVisibleToScreenReaders', markHiddenStart, markHiddenEnd);
28143 }
28144 }
28145 if (options.performanceTimer) {
28146 performance_timer_default.mark(markEnd);
28147 performance_timer_default.measure('rule_' + this.id + '#gather', markStart, markEnd);
28148 }
28149 return elements;
28150 };
28151 Rule.prototype.runChecks = function runChecks(type2, node, options, context, resolve, reject) {
28152 var self2 = this;
28153 var checkQueue = queue_default();
28154 this[type2].forEach(function(c4) {
28155 var check = self2._audit.checks[c4.id || c4];
28156 var option = get_check_option_default(check, self2.id, options);
28157 checkQueue.defer(function(res, rej) {
28158 check.run(node, option, context, res, function(error) {
28159 rej(new rule_error_default({
28160 ruleId: self2.id,
28161 method: ''.concat(check.id, '#evaluate'),
28162 errorNode: new dq_element_default(node),
28163 error: error
28164 }));
28165 });
28166 });
28167 });
28168 checkQueue.then(function(results) {
28169 results = results.filter(function(check) {
28170 return check;
28171 });
28172 resolve({
28173 type: type2,
28174 results: results
28175 });
28176 })['catch'](reject);
28177 };
28178 Rule.prototype.runChecksSync = function runChecksSync(type2, node, options, context) {
28179 var self2 = this;
28180 var results = [];
28181 this[type2].forEach(function(c4) {
28182 var check = self2._audit.checks[c4.id || c4];
28183 var option = get_check_option_default(check, self2.id, options);
28184 results.push(check.runSync(node, option, context));
28185 });
28186 results = results.filter(function(check) {
28187 return check;
28188 });
28189 return {
28190 type: type2,
28191 results: results
28192 };
28193 };
28194 Rule.prototype.run = function run2(context) {
28195 var _this1 = this;
28196 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
28197 var resolve = arguments.length > 2 ? arguments[2] : undefined;
28198 var reject = arguments.length > 3 ? arguments[3] : undefined;
28199 if (options.performanceTimer) {
28200 this._trackPerformance();
28201 }
28202 var q = queue_default();
28203 var ruleResult = new rule_result_default(this);
28204 var nodes;
28205 try {
28206 nodes = this.gatherAndMatchNodes(context, options);
28207 } catch (error) {
28208 reject(error);
28209 return;
28210 }
28211 if (options.performanceTimer) {
28212 this._logGatherPerformance(nodes);
28213 }
28214 nodes.forEach(function(node) {
28215 q.defer(function(resolveNode, rejectNode) {
28216 var checkQueue = queue_default();
28217 [ 'any', 'all', 'none' ].forEach(function(type2) {
28218 checkQueue.defer(function(res, rej) {
28219 _this1.runChecks(type2, node, options, context, res, rej);
28220 });
28221 });
28222 checkQueue.then(function(results) {
28223 var result = getResult(results);
28224 if (result) {
28225 result.node = new dq_element_default(node);
28226 ruleResult.nodes.push(result);
28227 if (_this1.reviewOnFail) {
28228 [ 'any', 'all' ].forEach(function(type2) {
28229 result[type2].forEach(function(checkResult) {
28230 if (checkResult.result === false) {
28231 checkResult.result = void 0;
28232 }
28233 });
28234 });
28235 result.none.forEach(function(checkResult) {
28236 if (checkResult.result === true) {
28237 checkResult.result = void 0;
28238 }
28239 });
28240 }
28241 }
28242 resolveNode();
28243 })['catch'](function(err2) {
28244 return rejectNode(err2);
28245 });
28246 });
28247 });
28248 q.then(function() {
28249 if (options.performanceTimer) {
28250 _this1._logRulePerformance();
28251 }
28252 setTimeout(function() {
28253 resolve(ruleResult);
28254 }, 0);
28255 })['catch'](function(error) {
28256 if (options.performanceTimer) {
28257 _this1._logRulePerformance();
28258 }
28259 reject(error);
28260 });
28261 };
28262 Rule.prototype.runSync = function runSync2(context) {
28263 var _this10 = this;
28264 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
28265 if (options.performanceTimer) {
28266 this._trackPerformance();
28267 }
28268 var ruleResult = new rule_result_default(this);
28269 var nodes = this.gatherAndMatchNodes(context, options);
28270 if (options.performanceTimer) {
28271 this._logGatherPerformance(nodes);
28272 }
28273 nodes.forEach(function(node) {
28274 var results = [];
28275 [ 'any', 'all', 'none' ].forEach(function(type2) {
28276 results.push(_this10.runChecksSync(type2, node, options, context));
28277 });
28278 var result = getResult(results);
28279 if (result) {
28280 result.node = node.actualNode ? new dq_element_default(node) : null;
28281 ruleResult.nodes.push(result);
28282 if (_this10.reviewOnFail) {
28283 [ 'any', 'all' ].forEach(function(type2) {
28284 result[type2].forEach(function(checkResult) {
28285 if (checkResult.result === false) {
28286 checkResult.result = void 0;
28287 }
28288 });
28289 });
28290 result.none.forEach(function(checkResult) {
28291 if (checkResult.result === true) {
28292 checkResult.result = void 0;
28293 }
28294 });
28295 }
28296 }
28297 });
28298 if (options.performanceTimer) {
28299 this._logRulePerformance();
28300 }
28301 return ruleResult;
28302 };
28303 Rule.prototype._trackPerformance = function _trackPerformance() {
28304 this._markStart = 'mark_rule_start_' + this.id;
28305 this._markEnd = 'mark_rule_end_' + this.id;
28306 this._markChecksStart = 'mark_runchecks_start_' + this.id;
28307 this._markChecksEnd = 'mark_runchecks_end_' + this.id;
28308 };
28309 Rule.prototype._logGatherPerformance = function _logGatherPerformance(nodes) {
28310 log_default('gather for '.concat(this.id, ' (').concat(nodes.length, ' nodes): ').concat(performance_timer_default.timeElapsed(), 'ms'));
28311 performance_timer_default.mark(this._markChecksStart);
28312 };
28313 Rule.prototype._logRulePerformance = function _logRulePerformance() {
28314 performance_timer_default.mark(this._markChecksEnd);
28315 performance_timer_default.mark(this._markEnd);
28316 performance_timer_default.measure('runchecks_' + this.id, this._markChecksStart, this._markChecksEnd);
28317 performance_timer_default.measure('rule_' + this.id, this._markStart, this._markEnd);
28318 };
28319 function getResult(results) {
28320 if (results.length) {
28321 var hasResults = false;
28322 var result = {};
28323 results.forEach(function(r) {
28324 var res = r.results.filter(function(_result) {
28325 return _result;
28326 });
28327 result[r.type] = res;
28328 if (res.length) {
28329 hasResults = true;
28330 }
28331 });
28332 if (hasResults) {
28333 return result;
28334 }
28335 return null;
28336 }
28337 }
28338 Rule.prototype.gatherAndMatchNodes = function gatherAndMatchNodes(context, options) {
28339 var _this11 = this;
28340 var markMatchesStart = 'mark_matches_start_' + this.id;
28341 var markMatchesEnd = 'mark_matches_end_' + this.id;
28342 var nodes = this.gather(context, options);
28343 if (options.performanceTimer) {
28344 performance_timer_default.mark(markMatchesStart);
28345 }
28346 nodes = nodes.filter(function(node) {
28347 try {
28348 return _this11.matches(node.actualNode, node, context);
28349 } catch (error) {
28350 throw new rule_error_default({
28351 ruleId: _this11.id,
28352 method: '#matches',
28353 errorNode: new dq_element_default(node),
28354 error: error
28355 });
28356 }
28357 });
28358 if (options.performanceTimer) {
28359 performance_timer_default.mark(markMatchesEnd);
28360 performance_timer_default.measure('rule_' + this.id + '#matches', markMatchesStart, markMatchesEnd);
28361 }
28362 return nodes;
28363 };
28364 function findAfterChecks(rule) {
28365 return get_all_checks_default(rule).map(function(c4) {
28366 var check = rule._audit.checks[c4.id || c4];
28367 return check && typeof check.after === 'function' ? check : null;
28368 }).filter(Boolean);
28369 }
28370 function findCheckResults(nodes, checkID) {
28371 var checkResults = [];
28372 nodes.forEach(function(nodeResult) {
28373 var checks = get_all_checks_default(nodeResult);
28374 checks.forEach(function(checkResult) {
28375 if (checkResult.id === checkID) {
28376 checkResult.node = nodeResult.node;
28377 checkResults.push(checkResult);
28378 }
28379 });
28380 });
28381 return checkResults;
28382 }
28383 function filterChecks(checks) {
28384 return checks.filter(function(check) {
28385 return check.filtered !== true;
28386 });
28387 }
28388 function sanitizeNodes(result) {
28389 var checkTypes2 = [ 'any', 'all', 'none' ];
28390 var nodes = result.nodes.filter(function(detail) {
28391 var length = 0;
28392 checkTypes2.forEach(function(type2) {
28393 detail[type2] = filterChecks(detail[type2]);
28394 length += detail[type2].length;
28395 });
28396 return length > 0;
28397 });
28398 if (result.pageLevel && nodes.length) {
28399 nodes = [ nodes.reduce(function(a2, b2) {
28400 if (a2) {
28401 checkTypes2.forEach(function(type2) {
28402 a2[type2].push.apply(a2[type2], b2[type2]);
28403 });
28404 return a2;
28405 }
28406 }) ];
28407 }
28408 return nodes;
28409 }
28410 Rule.prototype.after = function after(result, options) {
28411 var _this12 = this;
28412 var afterChecks = findAfterChecks(this);
28413 afterChecks.forEach(function(check) {
28414 var beforeResults = findCheckResults(result.nodes, check.id);
28415 var checkOption = get_check_option_default(check, _this12.id, options);
28416 var afterResults;
28417 try {
28418 afterResults = check.after(beforeResults, checkOption.options);
28419 } catch (error) {
28420 var _result$nodes;
28421 throw new rule_error_default({
28422 ruleId: _this12.id,
28423 method: ''.concat(check.id, '#after'),
28424 errorNode: (_result$nodes = result.nodes) === null || _result$nodes === void 0 || (_result$nodes = _result$nodes[0]) === null || _result$nodes === void 0 ? void 0 : _result$nodes.node,
28425 error: error
28426 });
28427 }
28428 if (_this12.reviewOnFail) {
28429 afterResults.forEach(function(checkResult) {
28430 var changeAnyAllResults = (_this12.any.includes(checkResult.id) || _this12.all.includes(checkResult.id)) && checkResult.result === false;
28431 var changeNoneResult = _this12.none.includes(checkResult.id) && checkResult.result === true;
28432 if (changeAnyAllResults || changeNoneResult) {
28433 checkResult.result = void 0;
28434 }
28435 });
28436 }
28437 beforeResults.forEach(function(item) {
28438 delete item.node;
28439 if (afterResults.indexOf(item) === -1) {
28440 item.filtered = true;
28441 }
28442 });
28443 });
28444 result.nodes = sanitizeNodes(result);
28445 return result;
28446 };
28447 Rule.prototype.configure = function configure3(spec) {
28448 if (spec.hasOwnProperty('selector')) {
28449 this.selector = spec.selector;
28450 }
28451 if (spec.hasOwnProperty('excludeHidden')) {
28452 this.excludeHidden = typeof spec.excludeHidden === 'boolean' ? spec.excludeHidden : true;
28453 }
28454 if (spec.hasOwnProperty('enabled')) {
28455 this.enabled = typeof spec.enabled === 'boolean' ? spec.enabled : true;
28456 }
28457 if (spec.hasOwnProperty('pageLevel')) {
28458 this.pageLevel = typeof spec.pageLevel === 'boolean' ? spec.pageLevel : false;
28459 }
28460 if (spec.hasOwnProperty('reviewOnFail')) {
28461 this.reviewOnFail = typeof spec.reviewOnFail === 'boolean' ? spec.reviewOnFail : false;
28462 }
28463 if (spec.hasOwnProperty('any')) {
28464 this.any = spec.any;
28465 }
28466 if (spec.hasOwnProperty('all')) {
28467 this.all = spec.all;
28468 }
28469 if (spec.hasOwnProperty('none')) {
28470 this.none = spec.none;
28471 }
28472 if (spec.hasOwnProperty('tags')) {
28473 this.tags = spec.tags;
28474 }
28475 if (spec.hasOwnProperty('actIds')) {
28476 this.actIds = spec.actIds;
28477 }
28478 if (spec.hasOwnProperty('matches')) {
28479 this.matches = createExecutionContext(spec.matches);
28480 }
28481 if (spec.impact) {
28482 assert_default(constants_default.impact.includes(spec.impact), 'Impact '.concat(spec.impact, ' is not a valid impact'));
28483 this.impact = spec.impact;
28484 }
28485 };
28486 var dotRegex = /\{\{.+?\}\}/g;
28487 var Audit = function() {
28488 function Audit(audit) {
28489 _classCallCheck(this, Audit);
28490 this.lang = 'en';
28491 this.defaultConfig = audit;
28492 this.standards = standards_default;
28493 this._init();
28494 this._defaultLocale = null;
28495 }
28496 return _createClass(Audit, [ {
28497 key: '_setDefaultLocale',
28498 value: function _setDefaultLocale() {
28499 if (this._defaultLocale) {
28500 return;
28501 }
28502 var locale = {
28503 checks: {},
28504 rules: {},
28505 failureSummaries: {},
28506 incompleteFallbackMessage: '',
28507 lang: this.lang
28508 };
28509 var checkIDs = Object.keys(this.data.checks);
28510 for (var _i36 = 0; _i36 < checkIDs.length; _i36++) {
28511 var _id8 = checkIDs[_i36];
28512 var check = this.data.checks[_id8];
28513 var _check$messages = check.messages, pass = _check$messages.pass, fail = _check$messages.fail, incomplete = _check$messages.incomplete;
28514 locale.checks[_id8] = {
28515 pass: pass,
28516 fail: fail,
28517 incomplete: incomplete
28518 };
28519 }
28520 var ruleIDs = Object.keys(this.data.rules);
28521 for (var _i37 = 0; _i37 < ruleIDs.length; _i37++) {
28522 var _id9 = ruleIDs[_i37];
28523 var rule = this.data.rules[_id9];
28524 var description = rule.description, help = rule.help;
28525 locale.rules[_id9] = {
28526 description: description,
28527 help: help
28528 };
28529 }
28530 var failureSummaries = Object.keys(this.data.failureSummaries);
28531 for (var _i38 = 0; _i38 < failureSummaries.length; _i38++) {
28532 var type2 = failureSummaries[_i38];
28533 var failureSummary2 = this.data.failureSummaries[type2];
28534 var failureMessage = failureSummary2.failureMessage;
28535 locale.failureSummaries[type2] = {
28536 failureMessage: failureMessage
28537 };
28538 }
28539 locale.incompleteFallbackMessage = this.data.incompleteFallbackMessage;
28540 this._defaultLocale = locale;
28541 }
28542 }, {
28543 key: '_resetLocale',
28544 value: function _resetLocale() {
28545 var defaultLocale = this._defaultLocale;
28546 if (!defaultLocale) {
28547 return;
28548 }
28549 this.applyLocale(defaultLocale);
28550 }
28551 }, {
28552 key: '_applyCheckLocale',
28553 value: function _applyCheckLocale(checks) {
28554 var keys = Object.keys(checks);
28555 for (var _i39 = 0; _i39 < keys.length; _i39++) {
28556 var _id0 = keys[_i39];
28557 if (!this.data.checks[_id0]) {
28558 throw new Error('Locale provided for unknown check: "'.concat(_id0, '"'));
28559 }
28560 this.data.checks[_id0] = mergeCheckLocale(this.data.checks[_id0], checks[_id0]);
28561 }
28562 }
28563 }, {
28564 key: '_applyRuleLocale',
28565 value: function _applyRuleLocale(rules) {
28566 var keys = Object.keys(rules);
28567 for (var _i40 = 0; _i40 < keys.length; _i40++) {
28568 var _id1 = keys[_i40];
28569 if (!this.data.rules[_id1]) {
28570 throw new Error('Locale provided for unknown rule: "'.concat(_id1, '"'));
28571 }
28572 this.data.rules[_id1] = mergeRuleLocale(this.data.rules[_id1], rules[_id1]);
28573 }
28574 }
28575 }, {
28576 key: '_applyFailureSummaries',
28577 value: function _applyFailureSummaries(messages) {
28578 var keys = Object.keys(messages);
28579 for (var _i41 = 0; _i41 < keys.length; _i41++) {
28580 var _key1 = keys[_i41];
28581 if (!this.data.failureSummaries[_key1]) {
28582 throw new Error('Locale provided for unknown failureMessage: "'.concat(_key1, '"'));
28583 }
28584 this.data.failureSummaries[_key1] = mergeFailureMessage(this.data.failureSummaries[_key1], messages[_key1]);
28585 }
28586 }
28587 }, {
28588 key: 'applyLocale',
28589 value: function applyLocale(locale) {
28590 this._setDefaultLocale();
28591 if (locale.checks) {
28592 this._applyCheckLocale(locale.checks);
28593 }
28594 if (locale.rules) {
28595 this._applyRuleLocale(locale.rules);
28596 }
28597 if (locale.failureSummaries) {
28598 this._applyFailureSummaries(locale.failureSummaries, 'failureSummaries');
28599 }
28600 if (locale.incompleteFallbackMessage) {
28601 this.data.incompleteFallbackMessage = mergeFallbackMessage(this.data.incompleteFallbackMessage, locale.incompleteFallbackMessage);
28602 }
28603 if (locale.lang) {
28604 this.lang = locale.lang;
28605 }
28606 }
28607 }, {
28608 key: 'setAllowedOrigins',
28609 value: function setAllowedOrigins(allowedOrigins) {
28610 var defaultOrigin = getDefaultOrigin();
28611 this.allowedOrigins = [];
28612 var _iterator24 = _createForOfIteratorHelper(allowedOrigins), _step24;
28613 try {
28614 for (_iterator24.s(); !(_step24 = _iterator24.n()).done; ) {
28615 var origin = _step24.value;
28616 if (origin === constants_default.allOrigins) {
28617 this.allowedOrigins = [ '*' ];
28618 return;
28619 } else if (origin !== constants_default.sameOrigin) {
28620 this.allowedOrigins.push(origin);
28621 } else if (defaultOrigin) {
28622 this.allowedOrigins.push(defaultOrigin);
28623 }
28624 }
28625 } catch (err) {
28626 _iterator24.e(err);
28627 } finally {
28628 _iterator24.f();
28629 }
28630 }
28631 }, {
28632 key: '_init',
28633 value: function _init() {
28634 var audit = getDefaultConfiguration(this.defaultConfig);
28635 this.lang = audit.lang || 'en';
28636 this.reporter = audit.reporter;
28637 this.commands = {};
28638 this.rules = [];
28639 this.checks = {};
28640 this.brand = 'axe';
28641 this.application = 'axeAPI';
28642 this.tagExclude = [ 'experimental', 'deprecated' ];
28643 this.noHtml = audit.noHtml;
28644 this.allowedOrigins = audit.allowedOrigins;
28645 unpackToObject(audit.rules, this, 'addRule');
28646 unpackToObject(audit.checks, this, 'addCheck');
28647 this.data = {};
28648 this.data.checks = audit.data && audit.data.checks || {};
28649 this.data.rules = audit.data && audit.data.rules || {};
28650 this.data.failureSummaries = audit.data && audit.data.failureSummaries || {};
28651 this.data.incompleteFallbackMessage = audit.data && audit.data.incompleteFallbackMessage || '';
28652 this._constructHelpUrls();
28653 }
28654 }, {
28655 key: 'registerCommand',
28656 value: function registerCommand(command) {
28657 this.commands[command.id] = command.callback;
28658 }
28659 }, {
28660 key: 'addRule',
28661 value: function addRule(spec) {
28662 if (spec.metadata) {
28663 this.data.rules[spec.id] = spec.metadata;
28664 }
28665 var rule = this.getRule(spec.id);
28666 if (rule) {
28667 rule.configure(spec);
28668 } else {
28669 this.rules.push(new Rule(spec, this));
28670 }
28671 }
28672 }, {
28673 key: 'addCheck',
28674 value: function addCheck(spec) {
28675 var metadata = spec.metadata;
28676 if (_typeof(metadata) === 'object') {
28677 this.data.checks[spec.id] = metadata;
28678 if (_typeof(metadata.messages) === 'object') {
28679 Object.keys(metadata.messages).filter(function(prop) {
28680 return metadata.messages.hasOwnProperty(prop) && typeof metadata.messages[prop] === 'string';
28681 }).forEach(function(prop) {
28682 if (metadata.messages[prop].indexOf('function') === 0) {
28683 metadata.messages[prop] = new Function('return ' + metadata.messages[prop] + ';')();
28684 }
28685 });
28686 }
28687 }
28688 if (this.checks[spec.id]) {
28689 this.checks[spec.id].configure(spec);
28690 } else {
28691 this.checks[spec.id] = new check_default(spec);
28692 }
28693 }
28694 }, {
28695 key: 'run',
28696 value: function run(context, options, resolve, reject) {
28697 this.normalizeOptions(options);
28698 dq_element_default.setRunOptions(options);
28699 axe._selectCache = [];
28700 var allRulesToRun = getRulesToRun(this.rules, context, options);
28701 var runNowRules = allRulesToRun.now;
28702 var runLaterRules = allRulesToRun.later;
28703 var nowRulesQueue = queue_default();
28704 runNowRules.forEach(function(rule) {
28705 nowRulesQueue.defer(getDefferedRule(rule, context, options));
28706 });
28707 var preloaderQueue = queue_default();
28708 if (runLaterRules.length) {
28709 preloaderQueue.defer(function(res) {
28710 _preload(options).then(function(assets) {
28711 return res(assets);
28712 })['catch'](function(err2) {
28713 console.warn('Couldn\'t load preload assets: ', err2);
28714 res(void 0);
28715 });
28716 });
28717 }
28718 var queueForNowRulesAndPreloader = queue_default();
28719 queueForNowRulesAndPreloader.defer(nowRulesQueue);
28720 queueForNowRulesAndPreloader.defer(preloaderQueue);
28721 queueForNowRulesAndPreloader.then(function(nowRulesAndPreloaderResults) {
28722 var assetsFromQueue = nowRulesAndPreloaderResults.pop();
28723 if (assetsFromQueue && assetsFromQueue.length) {
28724 var assets = assetsFromQueue[0];
28725 if (assets) {
28726 context = _extends({}, context, assets);
28727 }
28728 }
28729 var nowRulesResults = nowRulesAndPreloaderResults[0];
28730 if (!runLaterRules.length) {
28731 axe._selectCache = void 0;
28732 resolve(nowRulesResults.filter(function(result) {
28733 return !!result;
28734 }));
28735 return;
28736 }
28737 var laterRulesQueue = queue_default();
28738 runLaterRules.forEach(function(rule) {
28739 var deferredRule = getDefferedRule(rule, context, options);
28740 laterRulesQueue.defer(deferredRule);
28741 });
28742 laterRulesQueue.then(function(laterRuleResults) {
28743 axe._selectCache = void 0;
28744 resolve(nowRulesResults.concat(laterRuleResults).filter(function(result) {
28745 return !!result;
28746 }));
28747 })['catch'](reject);
28748 })['catch'](reject);
28749 }
28750 }, {
28751 key: 'after',
28752 value: function after(results, options) {
28753 var rules = this.rules;
28754 return results.map(function(ruleResult) {
28755 if (ruleResult.error) {
28756 return ruleResult;
28757 }
28758 var rule = find_by_default(rules, 'id', ruleResult.id);
28759 if (!rule) {
28760 throw new Error('Result for unknown rule. You may be running mismatch axe-core versions');
28761 }
28762 try {
28763 return rule.after(ruleResult, options);
28764 } catch (err2) {
28765 if (options.debug) {
28766 throw err2;
28767 }
28768 return createIncompleteErrorResult(rule, err2);
28769 }
28770 });
28771 }
28772 }, {
28773 key: 'getRule',
28774 value: function getRule(ruleId) {
28775 return this.rules.find(function(rule) {
28776 return rule.id === ruleId;
28777 });
28778 }
28779 }, {
28780 key: 'normalizeOptions',
28781 value: function normalizeOptions(options) {
28782 var audit = this;
28783 var tags = [];
28784 var ruleIds = [];
28785 audit.rules.forEach(function(rule) {
28786 ruleIds.push(rule.id);
28787 rule.tags.forEach(function(tag) {
28788 if (!tags.includes(tag)) {
28789 tags.push(tag);
28790 }
28791 });
28792 });
28793 if ([ 'object', 'string' ].includes(_typeof(options.runOnly))) {
28794 if (typeof options.runOnly === 'string') {
28795 options.runOnly = [ options.runOnly ];
28796 }
28797 if (Array.isArray(options.runOnly)) {
28798 var hasTag = options.runOnly.find(function(value) {
28799 return tags.includes(value);
28800 });
28801 var hasRule = options.runOnly.find(function(value) {
28802 return ruleIds.includes(value);
28803 });
28804 if (hasTag && hasRule) {
28805 throw new Error('runOnly cannot be both rules and tags');
28806 }
28807 if (hasRule) {
28808 options.runOnly = {
28809 type: 'rule',
28810 values: options.runOnly
28811 };
28812 } else {
28813 options.runOnly = {
28814 type: 'tag',
28815 values: options.runOnly
28816 };
28817 }
28818 }
28819 var only = options.runOnly;
28820 if (only.value && !only.values) {
28821 only.values = only.value;
28822 delete only.value;
28823 }
28824 if (!Array.isArray(only.values) || only.values.length === 0) {
28825 throw new Error('runOnly.values must be a non-empty array');
28826 }
28827 if ([ 'rule', 'rules' ].includes(only.type)) {
28828 only.type = 'rule';
28829 only.values.forEach(function(ruleId) {
28830 if (!ruleIds.includes(ruleId)) {
28831 throw new Error('unknown rule `' + ruleId + '` in options.runOnly');
28832 }
28833 });
28834 } else if ([ 'tag', 'tags', void 0 ].includes(only.type)) {
28835 only.type = 'tag';
28836 var unmatchedTags = only.values.filter(function(tag) {
28837 return !tags.includes(tag) && !/wcag2[1-3]a{1,3}/.test(tag);
28838 });
28839 if (unmatchedTags.length !== 0) {
28840 axe.log('Could not find tags `' + unmatchedTags.join('`, `') + '`');
28841 }
28842 } else {
28843 throw new Error('Unknown runOnly type \''.concat(only.type, '\''));
28844 }
28845 }
28846 if (_typeof(options.rules) === 'object') {
28847 Object.keys(options.rules).forEach(function(ruleId) {
28848 if (!ruleIds.includes(ruleId)) {
28849 throw new Error('unknown rule `' + ruleId + '` in options.rules');
28850 }
28851 });
28852 }
28853 return options;
28854 }
28855 }, {
28856 key: 'setBranding',
28857 value: function setBranding(branding) {
28858 var previous = {
28859 brand: this.brand,
28860 application: this.application
28861 };
28862 if (typeof branding === 'string') {
28863 this.application = branding;
28864 }
28865 if (branding && branding.hasOwnProperty('brand') && branding.brand && typeof branding.brand === 'string') {
28866 this.brand = branding.brand;
28867 }
28868 if (branding && branding.hasOwnProperty('application') && branding.application && typeof branding.application === 'string') {
28869 this.application = branding.application;
28870 }
28871 this._constructHelpUrls(previous);
28872 }
28873 }, {
28874 key: '_constructHelpUrls',
28875 value: function _constructHelpUrls() {
28876 var _this13 = this;
28877 var previous = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
28878 var version = (axe.version.match(/^[1-9][0-9]*\.[0-9]+/) || [ 'x.y' ])[0];
28879 this.rules.forEach(function(rule) {
28880 if (!_this13.data.rules[rule.id]) {
28881 _this13.data.rules[rule.id] = {};
28882 }
28883 var metaData = _this13.data.rules[rule.id];
28884 if (typeof metaData.helpUrl !== 'string' || previous && metaData.helpUrl === getHelpUrl(previous, rule.id, version)) {
28885 metaData.helpUrl = getHelpUrl(_this13, rule.id, version);
28886 }
28887 });
28888 }
28889 }, {
28890 key: 'resetRulesAndChecks',
28891 value: function resetRulesAndChecks() {
28892 this._init();
28893 this._resetLocale();
28894 }
28895 } ]);
28896 }();
28897 var audit_default = Audit;
28898 function getDefaultOrigin() {
28899 if (window.origin && window.origin !== 'null') {
28900 return window.origin;
28901 }
28902 if (window.location && window.location.origin && window.location.origin !== 'null') {
28903 return window.location.origin;
28904 }
28905 }
28906 function getDefaultConfiguration(audit) {
28907 var config;
28908 if (audit) {
28909 config = clone2(audit);
28910 config.commons = audit.commons;
28911 } else {
28912 config = {};
28913 }
28914 config.reporter = config.reporter || null;
28915 config.noHtml = config.noHtml || false;
28916 if (!config.allowedOrigins) {
28917 var defaultOrigin = getDefaultOrigin();
28918 config.allowedOrigins = defaultOrigin ? [ defaultOrigin ] : [];
28919 }
28920 config.rules = config.rules || [];
28921 config.checks = config.checks || [];
28922 config.data = _extends({
28923 checks: {},
28924 rules: {}
28925 }, config.data);
28926 return config;
28927 }
28928 function unpackToObject(collection, audit, method) {
28929 var i, l;
28930 for (i = 0, l = collection.length; i < l; i++) {
28931 audit[method](collection[i]);
28932 }
28933 }
28934 var mergeCheckLocale = function mergeCheckLocale(a2, b2) {
28935 var pass = b2.pass, fail = b2.fail;
28936 if (typeof pass === 'string' && dotRegex.test(pass)) {
28937 pass = import_dot['default'].compile(pass);
28938 }
28939 if (typeof fail === 'string' && dotRegex.test(fail)) {
28940 fail = import_dot['default'].compile(fail);
28941 }
28942 return _extends({}, a2, {
28943 messages: {
28944 pass: pass || a2.messages.pass,
28945 fail: fail || a2.messages.fail,
28946 incomplete: _typeof(a2.messages.incomplete) === 'object' ? _extends({}, a2.messages.incomplete, b2.incomplete) : b2.incomplete
28947 }
28948 });
28949 };
28950 var mergeRuleLocale = function mergeRuleLocale(a2, b2) {
28951 var help = b2.help, description = b2.description;
28952 if (typeof help === 'string' && dotRegex.test(help)) {
28953 help = import_dot['default'].compile(help);
28954 }
28955 if (typeof description === 'string' && dotRegex.test(description)) {
28956 description = import_dot['default'].compile(description);
28957 }
28958 return _extends({}, a2, {
28959 help: help || a2.help,
28960 description: description || a2.description
28961 });
28962 };
28963 var mergeFailureMessage = function mergeFailureMessage(a2, b2) {
28964 var failureMessage = b2.failureMessage;
28965 if (typeof failureMessage === 'string' && dotRegex.test(failureMessage)) {
28966 failureMessage = import_dot['default'].compile(failureMessage);
28967 }
28968 return _extends({}, a2, {
28969 failureMessage: failureMessage || a2.failureMessage
28970 });
28971 };
28972 var mergeFallbackMessage = function mergeFallbackMessage(a2, b2) {
28973 if (typeof b2 === 'string' && dotRegex.test(b2)) {
28974 b2 = import_dot['default'].compile(b2);
28975 }
28976 return b2 || a2;
28977 };
28978 function getRulesToRun(rules, context, options) {
28979 var base = {
28980 now: [],
28981 later: []
28982 };
28983 var splitRules = rules.reduce(function(out, rule) {
28984 if (!rule_should_run_default(rule, context, options)) {
28985 return out;
28986 }
28987 if (rule.preload) {
28988 out.later.push(rule);
28989 return out;
28990 }
28991 out.now.push(rule);
28992 return out;
28993 }, base);
28994 return splitRules;
28995 }
28996 function getDefferedRule(rule, context, options) {
28997 if (options.performanceTimer) {
28998 performance_timer_default.mark('mark_rule_start_' + rule.id);
28999 }
29000 return function(resolve, reject) {
29001 rule.run(context, options, function(ruleResult) {
29002 return resolve(ruleResult);
29003 }, function(err2) {
29004 if (options.debug) {
29005 reject(err2);
29006 } else {
29007 resolve(createIncompleteErrorResult(rule, err2));
29008 }
29009 });
29010 };
29011 }
29012 function createIncompleteErrorResult(rule, error) {
29013 var errorNode = error.errorNode;
29014 var serialError = _serializeError(error);
29015 var none = [ {
29016 id: 'error-occurred',
29017 result: void 0,
29018 data: serialError,
29019 relatedNodes: []
29020 } ];
29021 var node = errorNode || new dq_element_default(document.documentElement);
29022 return Object.assign(new rule_result_default(rule), {
29023 error: serialError,
29024 result: constants_default.CANTTELL,
29025 nodes: [ {
29026 any: [],
29027 all: [],
29028 none: none,
29029 node: node
29030 } ]
29031 });
29032 }
29033 function getHelpUrl(_ref145, ruleId, version) {
29034 var brand = _ref145.brand, application = _ref145.application, lang = _ref145.lang;
29035 return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
29036 }
29037 function setupGlobals(context) {
29038 var hasWindow = window && 'Node' in window && 'NodeList' in window;
29039 var hasDoc = !!document;
29040 if (hasWindow && hasDoc) {
29041 return;
29042 }
29043 if (!context || !context.ownerDocument) {
29044 throw new Error('Required "window" or "document" globals not defined and cannot be deduced from the context. Either set the globals before running or pass in a valid Element.');
29045 }
29046 if (!hasDoc) {
29047 cache_default.set('globalDocumentSet', true);
29048 document = context.ownerDocument;
29049 }
29050 if (!hasWindow) {
29051 cache_default.set('globalWindowSet', true);
29052 window = document.defaultView;
29053 }
29054 }
29055 function resetGlobals() {
29056 if (cache_default.get('globalDocumentSet')) {
29057 cache_default.set('globalDocumentSet', false);
29058 document = null;
29059 }
29060 if (cache_default.get('globalWindowSet')) {
29061 cache_default.set('globalWindowSet', false);
29062 window = null;
29063 }
29064 }
29065 function teardown() {
29066 resetGlobals();
29067 axe._memoizedFns.forEach(function(fn) {
29068 return fn.clear();
29069 });
29070 cache_default.clear();
29071 axe._tree = void 0;
29072 axe._selectorData = void 0;
29073 axe._selectCache = void 0;
29074 }
29075 var teardown_default = teardown;
29076 function runRules(context, options, resolve, reject) {
29077 try {
29078 context = new Context(context);
29079 axe._tree = context.flatTree;
29080 axe._selectorData = _getSelectorData(context.flatTree);
29081 } catch (e) {
29082 teardown_default();
29083 return reject(e);
29084 }
29085 var q = queue_default();
29086 var audit = axe._audit;
29087 if (options.performanceTimer) {
29088 performance_timer_default.auditStart();
29089 }
29090 if (context.frames.length && options.iframes !== false) {
29091 q.defer(function(res, rej) {
29092 _collectResultsFromFrames(context, options, 'rules', null, res, rej);
29093 });
29094 }
29095 q.defer(function(res, rej) {
29096 audit.run(context, options, res, rej);
29097 });
29098 q.then(function(data) {
29099 try {
29100 if (options.performanceTimer) {
29101 performance_timer_default.auditEnd();
29102 }
29103 var results = merge_results_default(data.map(function(res) {
29104 return {
29105 results: res
29106 };
29107 }));
29108 if (context.initiator) {
29109 if (options.performanceTimer) {
29110 performance_timer_default.mark('auditAfterStart');
29111 }
29112 results = audit.after(results, options);
29113 if (options.performanceTimer) {
29114 performance_timer_default.mark('auditAfterEnd');
29115 performance_timer_default.measure('audit.after', 'auditAfterStart', 'auditAfterEnd');
29116 performance_timer_default.logMeasures('audit.after');
29117 }
29118 results.forEach(_publishMetaData);
29119 results = results.map(_finalizeRuleResult);
29120 }
29121 try {
29122 resolve(results, teardown_default);
29123 } catch (e) {
29124 teardown_default();
29125 log_default(e);
29126 }
29127 } catch (e) {
29128 teardown_default();
29129 reject(e);
29130 }
29131 })['catch'](function(e) {
29132 teardown_default();
29133 reject(e);
29134 });
29135 }
29136 function load(audit) {
29137 axe._audit = new audit_default(audit);
29138 }
29139 function runCommand(data, keepalive, callback) {
29140 var resolve = callback;
29141 var reject = function reject2(err2) {
29142 if (err2 instanceof Error === false) {
29143 err2 = new Error(err2);
29144 }
29145 callback(err2);
29146 };
29147 var context = data && data.context || {};
29148 if (context.hasOwnProperty('include') && !context.include.length) {
29149 context.include = [ document ];
29150 }
29151 var options = data && data.options || {};
29152 switch (data.command) {
29153 case 'rules':
29154 return runRules(context, options, function(results, cleanupFn) {
29155 results = node_serializer_default.mapRawResults(results);
29156 resolve(results);
29157 cleanupFn();
29158 }, reject);
29159
29160 case 'cleanup-plugin':
29161 return cleanup_default(resolve, reject);
29162
29163 default:
29164 if (axe._audit && axe._audit.commands && axe._audit.commands[data.command]) {
29165 return axe._audit.commands[data.command](data, callback);
29166 }
29167 }
29168 }
29169 if (window.top !== window) {
29170 _respondable.subscribe('axe.start', runCommand);
29171 _respondable.subscribe('axe.ping', function(data, keepalive, respond) {
29172 respond({
29173 axe: true
29174 });
29175 });
29176 }
29177 function Plugin(spec) {
29178 this._run = spec.run;
29179 this._collect = spec.collect;
29180 this._registry = {};
29181 spec.commands.forEach(function(command) {
29182 axe._audit.registerCommand(command);
29183 });
29184 }
29185 Plugin.prototype.run = function run3() {
29186 return this._run.apply(this, arguments);
29187 };
29188 Plugin.prototype.collect = function collect() {
29189 return this._collect.apply(this, arguments);
29190 };
29191 Plugin.prototype.cleanup = function cleanup2(done) {
29192 var q = axe.utils.queue();
29193 var that = this;
29194 Object.keys(this._registry).forEach(function(key) {
29195 q.defer(function(_done) {
29196 that._registry[key].cleanup(_done);
29197 });
29198 });
29199 q.then(done);
29200 };
29201 Plugin.prototype.add = function add(impl) {
29202 this._registry[impl.id] = impl;
29203 };
29204 function registerPlugin(plugin) {
29205 axe.plugins[plugin.id] = new Plugin(plugin);
29206 }
29207 var plugins_default = registerPlugin;
29208 function reset() {
29209 var audit = axe._audit;
29210 if (!audit) {
29211 throw new Error('No audit configured');
29212 }
29213 audit.resetRulesAndChecks();
29214 resetStandards();
29215 }
29216 var reset_default = reset;
29217 function runVirtualRule(ruleId, vNode) {
29218 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
29219 options.reporter = options.reporter || axe._audit.reporter || 'v1';
29220 axe._selectorData = {};
29221 if (!(vNode instanceof abstract_virtual_node_default)) {
29222 vNode = new serial_virtual_node_default(vNode);
29223 }
29224 var rule = _getRule(ruleId);
29225 if (!rule) {
29226 throw new Error('unknown rule `' + ruleId + '`');
29227 }
29228 rule = Object.create(rule, {
29229 excludeHidden: {
29230 value: false
29231 }
29232 });
29233 var context = {
29234 initiator: true,
29235 include: [ vNode ],
29236 exclude: [],
29237 frames: [],
29238 page: false,
29239 focusable: true,
29240 size: {},
29241 flatTree: []
29242 };
29243 var rawResults = rule.runSync(context, options);
29244 _publishMetaData(rawResults);
29245 _finalizeRuleResult(rawResults);
29246 var results = aggregate_result_default([ rawResults ]);
29247 results.violations.forEach(function(result) {
29248 return result.nodes.forEach(function(nodeResult) {
29249 nodeResult.failureSummary = failure_summary_default(nodeResult);
29250 });
29251 });
29252 return _extends({}, _getEnvironmentData(), results, {
29253 toolOptions: options
29254 });
29255 }
29256 function normalizeRunParams(_ref146) {
29257 var _ref148, _options$reporter, _axe$_audit;
29258 var _ref147 = _slicedToArray(_ref146, 3), context = _ref147[0], options = _ref147[1], callback = _ref147[2];
29259 var typeErr = new TypeError('axe.run arguments are invalid');
29260 if (!_isContextSpec(context)) {
29261 if (callback !== void 0) {
29262 throw typeErr;
29263 }
29264 callback = options;
29265 options = context;
29266 context = document;
29267 }
29268 if (_typeof(options) !== 'object') {
29269 if (callback !== void 0) {
29270 throw typeErr;
29271 }
29272 callback = options;
29273 options = {};
29274 }
29275 if (typeof callback !== 'function' && callback !== void 0) {
29276 throw typeErr;
29277 }
29278 options = clone2(options);
29279 options.reporter = (_ref148 = (_options$reporter = options.reporter) !== null && _options$reporter !== void 0 ? _options$reporter : (_axe$_audit = axe._audit) === null || _axe$_audit === void 0 ? void 0 : _axe$_audit.reporter) !== null && _ref148 !== void 0 ? _ref148 : 'v1';
29280 return {
29281 context: context,
29282 options: options,
29283 callback: callback
29284 };
29285 }
29286 var noop2 = function noop2() {};
29287 function run4() {
29288 for (var _len8 = arguments.length, args = new Array(_len8), _key10 = 0; _key10 < _len8; _key10++) {
29289 args[_key10] = arguments[_key10];
29290 }
29291 setupGlobals(args[0]);
29292 var _normalizeRunParams = normalizeRunParams(args), context = _normalizeRunParams.context, options = _normalizeRunParams.options, _normalizeRunParams$c = _normalizeRunParams.callback, callback = _normalizeRunParams$c === void 0 ? noop2 : _normalizeRunParams$c;
29293 var _getPromiseHandlers = getPromiseHandlers(callback), thenable = _getPromiseHandlers.thenable, resolve = _getPromiseHandlers.resolve, reject = _getPromiseHandlers.reject;
29294 try {
29295 assert_default(axe._audit, 'No audit configured');
29296 assert_default(!axe._running, 'Axe is already running. Use `await axe.run()` to wait for the previous run to finish before starting a new run.');
29297 } catch (e) {
29298 return handleError(e, callback);
29299 }
29300 axe._running = true;
29301 if (options.performanceTimer) {
29302 performance_timer_default.start();
29303 }
29304 function handleRunRules(rawResults, teardown2) {
29305 var respond = function respond(results) {
29306 if (options.performanceTimer) {
29307 performance_timer_default.mark('reporterEnd');
29308 performance_timer_default.measure('reporter', 'reporterStart', 'reporterEnd');
29309 performance_timer_default.logMeasures('reporter');
29310 performance_timer_default.end();
29311 }
29312 axe._running = false;
29313 teardown2();
29314 try {
29315 resolve(results);
29316 } catch (e) {
29317 axe.log(e);
29318 }
29319 };
29320 var wrappedReject = function wrappedReject(err2) {
29321 axe._running = false;
29322 teardown2();
29323 try {
29324 reject(err2);
29325 } catch (e) {
29326 axe.log(e);
29327 }
29328 };
29329 try {
29330 if (options.performanceTimer) {
29331 performance_timer_default.mark('reporterStart');
29332 }
29333 createReport(rawResults, options, respond, wrappedReject);
29334 } catch (err2) {
29335 wrappedReject(err2);
29336 }
29337 }
29338 function errorRunRules(err2) {
29339 if (options.performanceTimer) {
29340 performance_timer_default.end();
29341 }
29342 axe._running = false;
29343 callback(err2);
29344 reject(err2);
29345 }
29346 axe._runRules(context, options, handleRunRules, errorRunRules);
29347 return thenable;
29348 }
29349 function getPromiseHandlers(callback) {
29350 var thenable, reject, resolve;
29351 if (typeof Promise === 'function' && callback === noop2) {
29352 thenable = new Promise(function(_resolve, _reject) {
29353 reject = _reject;
29354 resolve = _resolve;
29355 });
29356 } else {
29357 resolve = function resolve(result) {
29358 return callback(null, result);
29359 };
29360 reject = function reject(err2) {
29361 return callback(err2);
29362 };
29363 }
29364 return {
29365 thenable: thenable,
29366 reject: reject,
29367 resolve: resolve
29368 };
29369 }
29370 function createReport(rawResults, options, respond, reject) {
29371 var reporter = getReporter(options.reporter);
29372 var results = reporter(rawResults, options, respond, reject);
29373 if (results !== void 0) {
29374 respond(results);
29375 }
29376 }
29377 function handleError(err2, callback) {
29378 if (typeof callback === 'function' && callback !== noop2) {
29379 callback(err2.message);
29380 return;
29381 }
29382 throw err2;
29383 }
29384 function runPartial() {
29385 for (var _len9 = arguments.length, args = new Array(_len9), _key11 = 0; _key11 < _len9; _key11++) {
29386 args[_key11] = arguments[_key11];
29387 }
29388 var _normalizeRunParams2 = normalizeRunParams(args), options = _normalizeRunParams2.options, context = _normalizeRunParams2.context;
29389 assert_default(axe._audit, 'Axe is not configured. Audit is missing.');
29390 assert_default(!axe._running, 'Axe is already running. Use `await axe.run()` to wait for the previous run to finish before starting a new run.');
29391 var contextObj = new Context(context, axe._tree);
29392 axe._tree = contextObj.flatTree;
29393 axe._selectorData = _getSelectorData(contextObj.flatTree);
29394 axe._running = true;
29395 options.elementRef = false;
29396 return new Promise(function(res, rej) {
29397 axe._audit.run(contextObj, options, res, rej);
29398 }).then(function(results) {
29399 results = node_serializer_default.mapRawResults(results);
29400 var frames = contextObj.frames.map(function(_ref149) {
29401 var node = _ref149.node;
29402 return node_serializer_default.toSpec(node);
29403 });
29404 var environmentData;
29405 if (contextObj.initiator) {
29406 environmentData = _getEnvironmentData();
29407 }
29408 axe._running = false;
29409 teardown_default();
29410 return {
29411 results: results,
29412 frames: frames,
29413 environmentData: environmentData
29414 };
29415 })['catch'](function(err2) {
29416 axe._running = false;
29417 teardown_default();
29418 return Promise.reject(err2);
29419 });
29420 }
29421 function finishRun(partialResults) {
29422 var _ref151, _options$reporter2, _axe$_audit2;
29423 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
29424 options = clone2(options);
29425 var _ref150 = partialResults.find(function(r) {
29426 return r.environmentData;
29427 }) || {}, environmentData = _ref150.environmentData;
29428 axe._audit.normalizeOptions(options);
29429 options.reporter = (_ref151 = (_options$reporter2 = options.reporter) !== null && _options$reporter2 !== void 0 ? _options$reporter2 : (_axe$_audit2 = axe._audit) === null || _axe$_audit2 === void 0 ? void 0 : _axe$_audit2.reporter) !== null && _ref151 !== void 0 ? _ref151 : 'v1';
29430 setFrameSpec(partialResults);
29431 var results = merge_results_default(partialResults);
29432 results = axe._audit.after(results, options);
29433 results.forEach(_publishMetaData);
29434 results = results.map(_finalizeRuleResult);
29435 return createReport2(results, _extends({
29436 environmentData: environmentData
29437 }, options));
29438 }
29439 function setFrameSpec(partialResults) {
29440 var frameStack = [];
29441 var _iterator25 = _createForOfIteratorHelper(partialResults), _step25;
29442 try {
29443 for (_iterator25.s(); !(_step25 = _iterator25.n()).done; ) {
29444 var partialResult = _step25.value;
29445 var frameSpec = frameStack.shift();
29446 if (!partialResult) {
29447 continue;
29448 }
29449 partialResult.frameSpec = frameSpec !== null && frameSpec !== void 0 ? frameSpec : null;
29450 var frameSpecs = getMergedFrameSpecs(partialResult);
29451 frameStack.unshift.apply(frameStack, _toConsumableArray(frameSpecs));
29452 }
29453 } catch (err) {
29454 _iterator25.e(err);
29455 } finally {
29456 _iterator25.f();
29457 }
29458 }
29459 function getMergedFrameSpecs(_ref152) {
29460 var childFrameSpecs = _ref152.frames, parentFrameSpec = _ref152.frameSpec;
29461 if (!parentFrameSpec) {
29462 return childFrameSpecs;
29463 }
29464 return childFrameSpecs.map(function(childFrameSpec) {
29465 return node_serializer_default.mergeSpecs(childFrameSpec, parentFrameSpec);
29466 });
29467 }
29468 function createReport2(results, options) {
29469 return new Promise(function(resolve, reject) {
29470 var reporter = getReporter(options.reporter);
29471 reporter(results, options, resolve, reject);
29472 });
29473 }
29474 function setup(node) {
29475 if (axe._tree) {
29476 throw new Error('Axe is already setup. Call `axe.teardown()` before calling `axe.setup` again.');
29477 }
29478 if (node && _typeof(node.documentElement) === 'object' && _typeof(node.defaultView) === 'object') {
29479 node = node.documentElement;
29480 }
29481 setupGlobals(node);
29482 axe._tree = _getFlattenedTree(node);
29483 axe._selectorData = _getSelectorData(axe._tree);
29484 return axe._tree[0];
29485 }
29486 var setup_default = setup;
29487 var naReporter = function naReporter(results, options, callback) {
29488 console.warn('"na" reporter will be deprecated in axe v4.0. Use the "v2" reporter instead.');
29489 if (typeof options === 'function') {
29490 callback = options;
29491 options = {};
29492 }
29493 var _options3 = options, environmentData = _options3.environmentData, toolOptions = _objectWithoutProperties(_options3, _excluded13);
29494 callback(_extends({}, _getEnvironmentData(environmentData), {
29495 toolOptions: toolOptions
29496 }, processAggregate(results, options)));
29497 };
29498 var na_default = naReporter;
29499 var noPassesReporter = function noPassesReporter(results, options, callback) {
29500 if (typeof options === 'function') {
29501 callback = options;
29502 options = {};
29503 }
29504 var _options4 = options, environmentData = _options4.environmentData, toolOptions = _objectWithoutProperties(_options4, _excluded14);
29505 options.resultTypes = [ 'violations' ];
29506 var _processAggregate = processAggregate(results, options), violations = _processAggregate.violations;
29507 callback(_extends({}, _getEnvironmentData(environmentData), {
29508 toolOptions: toolOptions,
29509 violations: violations
29510 }));
29511 };
29512 var no_passes_default = noPassesReporter;
29513 var rawReporter = function rawReporter(results, options, callback) {
29514 if (typeof options === 'function') {
29515 callback = options;
29516 options = {};
29517 }
29518 if (!results || !Array.isArray(results)) {
29519 return callback(results);
29520 }
29521 var transformedResults = results.map(function(result) {
29522 var transformedResult = _extends({}, result);
29523 var types = [ 'passes', 'violations', 'incomplete', 'inapplicable' ];
29524 for (var _i42 = 0, _types = types; _i42 < _types.length; _i42++) {
29525 var type2 = _types[_i42];
29526 transformedResult[type2] = node_serializer_default.mapRawNodeResults(transformedResult[type2]);
29527 }
29528 return transformedResult;
29529 });
29530 callback(transformedResults);
29531 };
29532 var raw_default = rawReporter;
29533 var rawEnvReporter = function rawEnvReporter(results, options, callback) {
29534 if (typeof options === 'function') {
29535 callback = options;
29536 options = {};
29537 }
29538 var _options5 = options, environmentData = _options5.environmentData, toolOptions = _objectWithoutProperties(_options5, _excluded15);
29539 raw_default(results, toolOptions, function(raw) {
29540 var env = _getEnvironmentData(environmentData);
29541 callback({
29542 raw: raw,
29543 env: env
29544 });
29545 });
29546 };
29547 var raw_env_default = rawEnvReporter;
29548 var v1Reporter = function v1Reporter(results, options, callback) {
29549 if (typeof options === 'function') {
29550 callback = options;
29551 options = {};
29552 }
29553 var _options6 = options, environmentData = _options6.environmentData, toolOptions = _objectWithoutProperties(_options6, _excluded16);
29554 var out = processAggregate(results, options);
29555 var addFailureSummaries = function addFailureSummaries(result) {
29556 result.nodes.forEach(function(nodeResult) {
29557 nodeResult.failureSummary = failure_summary_default(nodeResult);
29558 });
29559 };
29560 out.incomplete.forEach(addFailureSummaries);
29561 out.violations.forEach(addFailureSummaries);
29562 callback(_extends({}, _getEnvironmentData(environmentData), {
29563 toolOptions: toolOptions
29564 }, out));
29565 };
29566 var v1_default = v1Reporter;
29567 var v2Reporter = function v2Reporter(results, options, callback) {
29568 if (typeof options === 'function') {
29569 callback = options;
29570 options = {};
29571 }
29572 var _options7 = options, environmentData = _options7.environmentData, toolOptions = _objectWithoutProperties(_options7, _excluded17);
29573 var out = processAggregate(results, options);
29574 callback(_extends({}, _getEnvironmentData(environmentData), {
29575 toolOptions: toolOptions
29576 }, out));
29577 };
29578 var v2_default = v2Reporter;
29579 var _thisWillBeDeletedDoNotUse = {
29580 base: {
29581 Audit: audit_default,
29582 CheckResult: check_result_default,
29583 Check: check_default,
29584 Context: Context,
29585 RuleResult: rule_result_default,
29586 Rule: Rule,
29587 metadataFunctionMap: metadata_function_map_default
29588 },
29589 public: {
29590 reporters: reporters
29591 },
29592 helpers: {
29593 failureSummary: failure_summary_default,
29594 incompleteFallbackMessage: incompleteFallbackMessage,
29595 processAggregate: processAggregate
29596 },
29597 utils: {
29598 setDefaultFrameMessenger: setDefaultFrameMessenger,
29599 cacheNodeSelectors: cacheNodeSelectors,
29600 getNodesMatchingExpression: getNodesMatchingExpression,
29601 convertSelector: _convertSelector
29602 },
29603 commons: {
29604 dom: {
29605 nativelyHidden: nativelyHidden,
29606 displayHidden: displayHidden,
29607 visibilityHidden: visibilityHidden,
29608 contentVisibiltyHidden: contentVisibiltyHidden,
29609 ariaHidden: ariaHidden,
29610 opacityHidden: opacityHidden,
29611 scrollHidden: scrollHidden,
29612 overflowHidden: overflowHidden,
29613 clipHidden: clipHidden,
29614 areaHidden: areaHidden,
29615 detailsHidden: detailsHidden
29616 }
29617 }
29618 };
29619 var exposed_for_testing_default = _thisWillBeDeletedDoNotUse;
29620 axe._thisWillBeDeletedDoNotUse = exposed_for_testing_default;
29621 axe.constants = constants_default;
29622 axe.log = log_default;
29623 axe.AbstractVirtualNode = abstract_virtual_node_default;
29624 axe.SerialVirtualNode = serial_virtual_node_default;
29625 axe.VirtualNode = virtual_node_default;
29626 axe._cache = cache_default;
29627 axe.imports = imports_exports;
29628 axe.cleanup = cleanup_default;
29629 axe.configure = configure_default;
29630 axe.frameMessenger = frameMessenger2;
29631 axe.getRules = get_rules_default;
29632 axe._load = load;
29633 axe.plugins = {};
29634 axe.registerPlugin = plugins_default;
29635 axe.hasReporter = hasReporter;
29636 axe.getReporter = getReporter;
29637 axe.addReporter = addReporter;
29638 axe.reset = reset_default;
29639 axe._runRules = runRules;
29640 axe.runVirtualRule = runVirtualRule;
29641 axe.run = run4;
29642 axe.setup = setup_default;
29643 axe.teardown = teardown_default;
29644 axe.runPartial = runPartial;
29645 axe.finishRun = finishRun;
29646 axe.commons = commons_exports;
29647 axe.utils = utils_exports;
29648 axe.addReporter('na', na_default);
29649 axe.addReporter('no-passes', no_passes_default);
29650 axe.addReporter('rawEnv', raw_env_default);
29651 axe.addReporter('raw', raw_default);
29652 axe.addReporter('v1', v1_default);
29653 axe.addReporter('v2', v2_default, true);
29654 })();
29655 'use strict';
29656 axe._load({
29657 lang: 'en',
29658 data: {
29659 rules: {
29660 accesskeys: {
29661 description: 'Ensure every accesskey attribute value is unique',
29662 help: 'accesskey attribute value should be unique'
29663 },
29664 'area-alt': {
29665 description: 'Ensure <area> elements of image maps have alternative text',
29666 help: 'Active <area> elements must have alternative text'
29667 },
29668 'aria-allowed-attr': {
29669 description: 'Ensure an element\'s role supports its ARIA attributes',
29670 help: 'Elements must only use supported ARIA attributes'
29671 },
29672 'aria-allowed-role': {
29673 description: 'Ensure role attribute has an appropriate value for the element',
29674 help: 'ARIA role should be appropriate for the element'
29675 },
29676 'aria-braille-equivalent': {
29677 description: 'Ensure aria-braillelabel and aria-brailleroledescription have a non-braille equivalent',
29678 help: 'aria-braille attributes must have a non-braille equivalent'
29679 },
29680 'aria-command-name': {
29681 description: 'Ensure every ARIA button, link and menuitem has an accessible name',
29682 help: 'ARIA commands must have an accessible name'
29683 },
29684 'aria-conditional-attr': {
29685 description: 'Ensure ARIA attributes are used as described in the specification of the element\'s role',
29686 help: 'ARIA attributes must be used as specified for the element\'s role'
29687 },
29688 'aria-deprecated-role': {
29689 description: 'Ensure elements do not use deprecated roles',
29690 help: 'Deprecated ARIA roles must not be used'
29691 },
29692 'aria-dialog-name': {
29693 description: 'Ensure every ARIA dialog and alertdialog node has an accessible name',
29694 help: 'ARIA dialog and alertdialog nodes should have an accessible name'
29695 },
29696 'aria-hidden-body': {
29697 description: 'Ensure aria-hidden="true" is not present on the document body.',
29698 help: 'aria-hidden="true" must not be present on the document body'
29699 },
29700 'aria-hidden-focus': {
29701 description: 'Ensure aria-hidden elements are not focusable nor contain focusable elements',
29702 help: 'ARIA hidden element must not be focusable or contain focusable elements'
29703 },
29704 'aria-input-field-name': {
29705 description: 'Ensure every ARIA input field has an accessible name',
29706 help: 'ARIA input fields must have an accessible name'
29707 },
29708 'aria-meter-name': {
29709 description: 'Ensure every ARIA meter node has an accessible name',
29710 help: 'ARIA meter nodes must have an accessible name'
29711 },
29712 'aria-progressbar-name': {
29713 description: 'Ensure every ARIA progressbar node has an accessible name',
29714 help: 'ARIA progressbar nodes must have an accessible name'
29715 },
29716 'aria-prohibited-attr': {
29717 description: 'Ensure ARIA attributes are not prohibited for an element\'s role',
29718 help: 'Elements must only use permitted ARIA attributes'
29719 },
29720 'aria-required-attr': {
29721 description: 'Ensure elements with ARIA roles have all required ARIA attributes',
29722 help: 'Required ARIA attributes must be provided'
29723 },
29724 'aria-required-children': {
29725 description: 'Ensure elements with an ARIA role that require child roles contain them',
29726 help: 'Certain ARIA roles must contain particular children'
29727 },
29728 'aria-required-parent': {
29729 description: 'Ensure elements with an ARIA role that require parent roles are contained by them',
29730 help: 'Certain ARIA roles must be contained by particular parents'
29731 },
29732 'aria-roledescription': {
29733 description: 'Ensure aria-roledescription is only used on elements with an implicit or explicit role',
29734 help: 'aria-roledescription must be on elements with a semantic role'
29735 },
29736 'aria-roles': {
29737 description: 'Ensure all elements with a role attribute use a valid value',
29738 help: 'ARIA roles used must conform to valid values'
29739 },
29740 'aria-text': {
29741 description: 'Ensure role="text" is used on elements with no focusable descendants',
29742 help: '"role=text" should have no focusable descendants'
29743 },
29744 'aria-toggle-field-name': {
29745 description: 'Ensure every ARIA toggle field has an accessible name',
29746 help: 'ARIA toggle fields must have an accessible name'
29747 },
29748 'aria-tooltip-name': {
29749 description: 'Ensure every ARIA tooltip node has an accessible name',
29750 help: 'ARIA tooltip nodes must have an accessible name'
29751 },
29752 'aria-treeitem-name': {
29753 description: 'Ensure every ARIA treeitem node has an accessible name',
29754 help: 'ARIA treeitem nodes should have an accessible name'
29755 },
29756 'aria-valid-attr-value': {
29757 description: 'Ensure all ARIA attributes have valid values',
29758 help: 'ARIA attributes must conform to valid values'
29759 },
29760 'aria-valid-attr': {
29761 description: 'Ensure attributes that begin with aria- are valid ARIA attributes',
29762 help: 'ARIA attributes must conform to valid names'
29763 },
29764 'audio-caption': {
29765 description: 'Ensure <audio> elements have captions',
29766 help: '<audio> elements must have a captions track'
29767 },
29768 'autocomplete-valid': {
29769 description: 'Ensure the autocomplete attribute is correct and suitable for the form field',
29770 help: 'autocomplete attribute must be used correctly'
29771 },
29772 'avoid-inline-spacing': {
29773 description: 'Ensure that text spacing set through style attributes can be adjusted with custom stylesheets',
29774 help: 'Inline text spacing must be adjustable with custom stylesheets'
29775 },
29776 blink: {
29777 description: 'Ensure <blink> elements are not used',
29778 help: '<blink> elements are deprecated and must not be used'
29779 },
29780 'button-name': {
29781 description: 'Ensure buttons have discernible text',
29782 help: 'Buttons must have discernible text'
29783 },
29784 bypass: {
29785 description: 'Ensure each page has at least one mechanism for a user to bypass navigation and jump straight to the content',
29786 help: 'Page must have means to bypass repeated blocks'
29787 },
29788 'color-contrast-enhanced': {
29789 description: 'Ensure the contrast between foreground and background colors meets WCAG 2 AAA enhanced contrast ratio thresholds',
29790 help: 'Elements must meet enhanced color contrast ratio thresholds'
29791 },
29792 'color-contrast': {
29793 description: 'Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds',
29794 help: 'Elements must meet minimum color contrast ratio thresholds'
29795 },
29796 'css-orientation-lock': {
29797 description: 'Ensure content is not locked to any specific display orientation, and the content is operable in all display orientations',
29798 help: 'CSS Media queries must not lock display orientation'
29799 },
29800 'definition-list': {
29801 description: 'Ensure <dl> elements are structured correctly',
29802 help: '<dl> elements must only directly contain properly-ordered <dt> and <dd> groups, <script>, <template> or <div> elements'
29803 },
29804 dlitem: {
29805 description: 'Ensure <dt> and <dd> elements are contained by a <dl>',
29806 help: '<dt> and <dd> elements must be contained by a <dl>'
29807 },
29808 'document-title': {
29809 description: 'Ensure each HTML document contains a non-empty <title> element',
29810 help: 'Documents must have <title> element to aid in navigation'
29811 },
29812 'duplicate-id-active': {
29813 description: 'Ensure every id attribute value of active elements is unique',
29814 help: 'IDs of active elements must be unique'
29815 },
29816 'duplicate-id-aria': {
29817 description: 'Ensure every id attribute value used in ARIA and in labels is unique',
29818 help: 'IDs used in ARIA and labels must be unique'
29819 },
29820 'duplicate-id': {
29821 description: 'Ensure every id attribute value is unique',
29822 help: 'id attribute value must be unique'
29823 },
29824 'empty-heading': {
29825 description: 'Ensure headings have discernible text',
29826 help: 'Headings should not be empty'
29827 },
29828 'empty-table-header': {
29829 description: 'Ensure table headers have discernible text',
29830 help: 'Table header text should not be empty'
29831 },
29832 'focus-order-semantics': {
29833 description: 'Ensure elements in the focus order have a role appropriate for interactive content',
29834 help: 'Elements in the focus order should have an appropriate role'
29835 },
29836 'form-field-multiple-labels': {
29837 description: 'Ensure form field does not have multiple label elements',
29838 help: 'Form field must not have multiple label elements'
29839 },
29840 'frame-focusable-content': {
29841 description: 'Ensure <frame> and <iframe> elements with focusable content do not have tabindex=-1',
29842 help: 'Frames with focusable content must not have tabindex=-1'
29843 },
29844 'frame-tested': {
29845 description: 'Ensure <iframe> and <frame> elements contain the axe-core script',
29846 help: 'Frames should be tested with axe-core'
29847 },
29848 'frame-title-unique': {
29849 description: 'Ensure <iframe> and <frame> elements contain a unique title attribute',
29850 help: 'Frames must have a unique title attribute'
29851 },
29852 'frame-title': {
29853 description: 'Ensure <iframe> and <frame> elements have an accessible name',
29854 help: 'Frames must have an accessible name'
29855 },
29856 'heading-order': {
29857 description: 'Ensure the order of headings is semantically correct',
29858 help: 'Heading levels should only increase by one'
29859 },
29860 'hidden-content': {
29861 description: 'Inform users about hidden content.',
29862 help: 'Hidden content on the page should be analyzed'
29863 },
29864 'html-has-lang': {
29865 description: 'Ensure every HTML document has a lang attribute',
29866 help: '<html> element must have a lang attribute'
29867 },
29868 'html-lang-valid': {
29869 description: 'Ensure the lang attribute of the <html> element has a valid value',
29870 help: '<html> element must have a valid value for the lang attribute'
29871 },
29872 'html-xml-lang-mismatch': {
29873 description: 'Ensure that HTML elements with both valid lang and xml:lang attributes agree on the base language of the page',
29874 help: 'HTML elements with lang and xml:lang must have the same base language'
29875 },
29876 'identical-links-same-purpose': {
29877 description: 'Ensure that links with the same accessible name serve a similar purpose',
29878 help: 'Links with the same name must have a similar purpose'
29879 },
29880 'image-alt': {
29881 description: 'Ensure <img> elements have alternative text or a role of none or presentation',
29882 help: 'Images must have alternative text'
29883 },
29884 'image-redundant-alt': {
29885 description: 'Ensure image alternative is not repeated as text',
29886 help: 'Alternative text of images should not be repeated as text'
29887 },
29888 'input-button-name': {
29889 description: 'Ensure input buttons have discernible text',
29890 help: 'Input buttons must have discernible text'
29891 },
29892 'input-image-alt': {
29893 description: 'Ensure <input type="image"> elements have alternative text',
29894 help: 'Image buttons must have alternative text'
29895 },
29896 'label-content-name-mismatch': {
29897 description: 'Ensure that elements labelled through their content must have their visible text as part of their accessible name',
29898 help: 'Elements must have their visible text as part of their accessible name'
29899 },
29900 'label-title-only': {
29901 description: 'Ensure that every form element has a visible label and is not solely labeled using hidden labels, or the title or aria-describedby attributes',
29902 help: 'Form elements should have a visible label'
29903 },
29904 label: {
29905 description: 'Ensure every form element has a label',
29906 help: 'Form elements must have labels'
29907 },
29908 'landmark-banner-is-top-level': {
29909 description: 'Ensure the banner landmark is at top level',
29910 help: 'Banner landmark should not be contained in another landmark'
29911 },
29912 'landmark-complementary-is-top-level': {
29913 description: 'Ensure the complementary landmark or aside is at top level',
29914 help: 'Aside should not be contained in another landmark'
29915 },
29916 'landmark-contentinfo-is-top-level': {
29917 description: 'Ensure the contentinfo landmark is at top level',
29918 help: 'Contentinfo landmark should not be contained in another landmark'
29919 },
29920 'landmark-main-is-top-level': {
29921 description: 'Ensure the main landmark is at top level',
29922 help: 'Main landmark should not be contained in another landmark'
29923 },
29924 'landmark-no-duplicate-banner': {
29925 description: 'Ensure the document has at most one banner landmark',
29926 help: 'Document should not have more than one banner landmark'
29927 },
29928 'landmark-no-duplicate-contentinfo': {
29929 description: 'Ensure the document has at most one contentinfo landmark',
29930 help: 'Document should not have more than one contentinfo landmark'
29931 },
29932 'landmark-no-duplicate-main': {
29933 description: 'Ensure the document has at most one main landmark',
29934 help: 'Document should not have more than one main landmark'
29935 },
29936 'landmark-one-main': {
29937 description: 'Ensure the document has a main landmark',
29938 help: 'Document should have one main landmark'
29939 },
29940 'landmark-unique': {
29941 description: 'Ensure landmarks are unique',
29942 help: 'Landmarks should have a unique role or role/label/title (i.e. accessible name) combination'
29943 },
29944 'link-in-text-block': {
29945 description: 'Ensure links are distinguished from surrounding text in a way that does not rely on color',
29946 help: 'Links must be distinguishable without relying on color'
29947 },
29948 'link-name': {
29949 description: 'Ensure links have discernible text',
29950 help: 'Links must have discernible text'
29951 },
29952 list: {
29953 description: 'Ensure that lists are structured correctly',
29954 help: '<ul> and <ol> must only directly contain <li>, <script> or <template> elements'
29955 },
29956 listitem: {
29957 description: 'Ensure <li> elements are used semantically',
29958 help: '<li> elements must be contained in a <ul> or <ol>'
29959 },
29960 marquee: {
29961 description: 'Ensure <marquee> elements are not used',
29962 help: '<marquee> elements are deprecated and must not be used'
29963 },
29964 'meta-refresh-no-exceptions': {
29965 description: 'Ensure <meta http-equiv="refresh"> is not used for delayed refresh',
29966 help: 'Delayed refresh must not be used'
29967 },
29968 'meta-refresh': {
29969 description: 'Ensure <meta http-equiv="refresh"> is not used for delayed refresh',
29970 help: 'Delayed refresh under 20 hours must not be used'
29971 },
29972 'meta-viewport-large': {
29973 description: 'Ensure <meta name="viewport"> can scale a significant amount',
29974 help: 'Users should be able to zoom and scale the text up to 500%'
29975 },
29976 'meta-viewport': {
29977 description: 'Ensure <meta name="viewport"> does not disable text scaling and zooming',
29978 help: 'Zooming and scaling must not be disabled'
29979 },
29980 'nested-interactive': {
29981 description: 'Ensure interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies',
29982 help: 'Interactive controls must not be nested'
29983 },
29984 'no-autoplay-audio': {
29985 description: 'Ensure <video> or <audio> elements do not autoplay audio for more than 3 seconds without a control mechanism to stop or mute the audio',
29986 help: '<video> or <audio> elements must not play automatically'
29987 },
29988 'object-alt': {
29989 description: 'Ensure <object> elements have alternative text',
29990 help: '<object> elements must have alternative text'
29991 },
29992 'p-as-heading': {
29993 description: 'Ensure bold, italic text and font-size is not used to style <p> elements as a heading',
29994 help: 'Styled <p> elements must not be used as headings'
29995 },
29996 'page-has-heading-one': {
29997 description: 'Ensure that the page, or at least one of its frames contains a level-one heading',
29998 help: 'Page should contain a level-one heading'
29999 },
30000 'presentation-role-conflict': {
30001 description: 'Ensure elements marked as presentational do not have global ARIA or tabindex so that all screen readers ignore them',
30002 help: 'Elements marked as presentational should be consistently ignored'
30003 },
30004 region: {
30005 description: 'Ensure all page content is contained by landmarks',
30006 help: 'All page content should be contained by landmarks'
30007 },
30008 'role-img-alt': {
30009 description: 'Ensure [role="img"] elements have alternative text',
30010 help: '[role="img"] elements must have alternative text'
30011 },
30012 'scope-attr-valid': {
30013 description: 'Ensure the scope attribute is used correctly on tables',
30014 help: 'scope attribute should be used correctly'
30015 },
30016 'scrollable-region-focusable': {
30017 description: 'Ensure elements that have scrollable content are accessible by keyboard in Safari',
30018 help: 'Scrollable region must have keyboard access'
30019 },
30020 'select-name': {
30021 description: 'Ensure select element has an accessible name',
30022 help: 'Select element must have an accessible name'
30023 },
30024 'server-side-image-map': {
30025 description: 'Ensure that server-side image maps are not used',
30026 help: 'Server-side image maps must not be used'
30027 },
30028 'skip-link': {
30029 description: 'Ensure all skip links have a focusable target',
30030 help: 'The skip-link target should exist and be focusable'
30031 },
30032 'summary-name': {
30033 description: 'Ensure summary elements have discernible text',
30034 help: 'Summary elements must have discernible text'
30035 },
30036 'svg-img-alt': {
30037 description: 'Ensure <svg> elements with an img, graphics-document or graphics-symbol role have accessible text',
30038 help: '<svg> elements with an img role must have alternative text'
30039 },
30040 tabindex: {
30041 description: 'Ensure tabindex attribute values are not greater than 0',
30042 help: 'Elements should not have tabindex greater than zero'
30043 },
30044 'table-duplicate-name': {
30045 description: 'Ensure the <caption> element does not contain the same text as the summary attribute',
30046 help: 'Tables should not have the same summary and caption'
30047 },
30048 'table-fake-caption': {
30049 description: 'Ensure that tables with a caption use the <caption> element.',
30050 help: 'Data or header cells must not be used to give caption to a data table.'
30051 },
30052 'target-size': {
30053 description: 'Ensure touch targets have sufficient size and space',
30054 help: 'All touch targets must be 24px large, or leave sufficient space'
30055 },
30056 'td-has-header': {
30057 description: 'Ensure that each non-empty data cell in a <table> larger than 3 by 3 has one or more table headers',
30058 help: 'Non-empty <td> elements in larger <table> must have an associated table header'
30059 },
30060 'td-headers-attr': {
30061 description: 'Ensure that each cell in a table that uses the headers attribute refers only to other <th> elements in that table',
30062 help: 'Table cell headers attributes must refer to other <th> elements in the same table'
30063 },
30064 'th-has-data-cells': {
30065 description: 'Ensure that <th> elements and elements with role=columnheader/rowheader have data cells they describe',
30066 help: 'Table headers in a data table must refer to data cells'
30067 },
30068 'valid-lang': {
30069 description: 'Ensure lang attributes have valid values',
30070 help: 'lang attribute must have a valid value'
30071 },
30072 'video-caption': {
30073 description: 'Ensure <video> elements have captions',
30074 help: '<video> elements must have captions'
30075 }
30076 },
30077 checks: {
30078 abstractrole: {
30079 impact: 'serious',
30080 messages: {
30081 pass: 'Abstract roles are not used',
30082 fail: {
30083 singular: 'Abstract role cannot be directly used: ${data.values}',
30084 plural: 'Abstract roles cannot be directly used: ${data.values}'
30085 }
30086 }
30087 },
30088 'aria-allowed-attr-elm': {
30089 messages: {
30090 pass: 'ARIA attributes are allowed for this element',
30091 fail: {
30092 singular: 'ARIA attribute is not allowed on ${data.nodeName} elements: ${data.values}',
30093 plural: 'ARIA attributes are not allowed on ${data.nodeName} elements: ${data.values}'
30094 }
30095 }
30096 },
30097 'aria-allowed-attr': {
30098 impact: 'critical',
30099 messages: {
30100 pass: 'ARIA attributes are used correctly for the defined role',
30101 fail: {
30102 singular: 'ARIA attribute is not allowed: ${data.values}',
30103 plural: 'ARIA attributes are not allowed: ${data.values}'
30104 },
30105 incomplete: 'Check that there is no problem if the ARIA attribute is ignored on this element: ${data.values}'
30106 }
30107 },
30108 'aria-allowed-role': {
30109 impact: 'minor',
30110 messages: {
30111 pass: 'ARIA role is allowed for given element',
30112 fail: {
30113 singular: 'ARIA role ${data.values} is not allowed for given element',
30114 plural: 'ARIA roles ${data.values} are not allowed for given element'
30115 },
30116 incomplete: {
30117 singular: 'ARIA role ${data.values} must be removed when the element is made visible, as it is not allowed for the element',
30118 plural: 'ARIA roles ${data.values} must be removed when the element is made visible, as they are not allowed for the element'
30119 }
30120 }
30121 },
30122 'aria-busy': {
30123 impact: 'serious',
30124 messages: {
30125 pass: 'Element has an aria-busy attribute',
30126 fail: 'Element uses aria-busy="true" while showing a loader'
30127 }
30128 },
30129 'aria-conditional-attr': {
30130 impact: 'serious',
30131 messages: {
30132 pass: 'ARIA attribute is allowed',
30133 fail: {
30134 checkbox: 'Remove aria-checked, or set it to "${data.checkState}" to match the real checkbox state',
30135 rowSingular: 'This attribute is supported with treegrid rows, but not ${data.ownerRole}: ${data.invalidAttrs}',
30136 rowPlural: 'These attributes are supported with treegrid rows, but not ${data.ownerRole}: ${data.invalidAttrs}'
30137 }
30138 }
30139 },
30140 'aria-errormessage': {
30141 impact: 'critical',
30142 messages: {
30143 pass: 'aria-errormessage exists and references elements visible to screen readers that use a supported aria-errormessage technique',
30144 fail: {
30145 singular: 'aria-errormessage value `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)',
30146 plural: 'aria-errormessage values `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)',
30147 unsupported: 'Multiple IDs in aria-errormessage is not widely supported in assistive technologies',
30148 hidden: 'aria-errormessage value `${data.values}` cannot reference a hidden element'
30149 },
30150 incomplete: {
30151 singular: 'Ensure aria-errormessage value `${data.values}` references an existing element',
30152 plural: 'Ensure aria-errormessage values `${data.values}` reference existing elements',
30153 idrefs: 'Unable to determine if aria-errormessage element exists on the page: ${data.values}'
30154 }
30155 }
30156 },
30157 'aria-hidden-body': {
30158 impact: 'critical',
30159 messages: {
30160 pass: 'No aria-hidden attribute is present on document body',
30161 fail: 'aria-hidden=true should not be present on the document body'
30162 }
30163 },
30164 'aria-level': {
30165 impact: 'serious',
30166 messages: {
30167 pass: 'aria-level values are valid',
30168 incomplete: 'aria-level values greater than 6 are not supported in all screenreader and browser combinations'
30169 }
30170 },
30171 'aria-prohibited-attr': {
30172 impact: 'serious',
30173 messages: {
30174 pass: 'ARIA attribute is allowed',
30175 fail: {
30176 hasRolePlural: '${data.prohibited} attributes cannot be used with role "${data.role}".',
30177 hasRoleSingular: '${data.prohibited} attribute cannot be used with role "${data.role}".',
30178 noRolePlural: '${data.prohibited} attributes cannot be used on a ${data.nodeName} with no valid role attribute.',
30179 noRoleSingular: '${data.prohibited} attribute cannot be used on a ${data.nodeName} with no valid role attribute.'
30180 },
30181 incomplete: {
30182 hasRoleSingular: '${data.prohibited} attribute is not well supported with role "${data.role}".',
30183 hasRolePlural: '${data.prohibited} attributes are not well supported with role "${data.role}".',
30184 noRoleSingular: '${data.prohibited} attribute is not well supported on a ${data.nodeName} with no valid role attribute.',
30185 noRolePlural: '${data.prohibited} attributes are not well supported on a ${data.nodeName} with no valid role attribute.'
30186 }
30187 }
30188 },
30189 'aria-required-attr': {
30190 impact: 'critical',
30191 messages: {
30192 pass: 'All required ARIA attributes are present',
30193 fail: {
30194 singular: 'Required ARIA attribute not present: ${data.values}',
30195 plural: 'Required ARIA attributes not present: ${data.values}'
30196 }
30197 }
30198 },
30199 'aria-required-children': {
30200 impact: 'critical',
30201 messages: {
30202 pass: {
30203 default: 'Required ARIA children are present',
30204 'aria-busy': 'Element has an aria-busy attribute, so it is allowed to omit required children'
30205 },
30206 fail: {
30207 singular: 'Required ARIA child role not present: ${data.values}',
30208 plural: 'Required ARIA children role not present: ${data.values}',
30209 unallowed: 'Element has children which are not allowed: ${data.values}',
30210 'aria-busy-fail': 'Element has children which are not allowed: ${data.values}; Having aria-busy="true" does not allow children with roles that are not allowed'
30211 },
30212 incomplete: {
30213 singular: 'Expecting ARIA child role to be added: ${data.values}',
30214 plural: 'Expecting ARIA children role to be added: ${data.values}'
30215 }
30216 }
30217 },
30218 'aria-required-parent': {
30219 impact: 'critical',
30220 messages: {
30221 pass: 'Required ARIA parent role present',
30222 fail: {
30223 singular: 'Required ARIA parent role not present: ${data.values}',
30224 plural: 'Required ARIA parents role not present: ${data.values}'
30225 }
30226 }
30227 },
30228 'aria-roledescription': {
30229 impact: 'serious',
30230 messages: {
30231 pass: 'aria-roledescription used on a supported semantic role',
30232 incomplete: 'Check that the aria-roledescription is announced by supported screen readers',
30233 fail: 'Give the element a role that supports aria-roledescription'
30234 }
30235 },
30236 'aria-unsupported-attr': {
30237 impact: 'critical',
30238 messages: {
30239 pass: 'ARIA attribute is supported',
30240 fail: 'ARIA attribute is not widely supported in screen readers and assistive technologies: ${data.values}'
30241 }
30242 },
30243 'aria-valid-attr-value': {
30244 impact: 'critical',
30245 messages: {
30246 pass: 'ARIA attribute values are valid',
30247 fail: {
30248 singular: 'Invalid ARIA attribute value: ${data.values}',
30249 plural: 'Invalid ARIA attribute values: ${data.values}'
30250 },
30251 incomplete: {
30252 noId: 'ARIA attribute element ID does not exist on the page: ${data.needsReview}',
30253 noIdShadow: 'ARIA attribute element ID does not exist on the page or is a descendant of a different shadow DOM tree: ${data.needsReview}',
30254 ariaCurrent: 'ARIA attribute value is invalid and will be treated as "aria-current=true": ${data.needsReview}',
30255 idrefs: 'Unable to determine if ARIA attribute element ID exists on the page: ${data.needsReview}',
30256 empty: 'ARIA attribute value is ignored while empty: ${data.needsReview}',
30257 controlsWithinPopup: 'Unable to determine if aria-controls referenced ID exists on the page while using aria-haspopup: ${data.needsReview}'
30258 }
30259 }
30260 },
30261 'aria-valid-attr': {
30262 impact: 'critical',
30263 messages: {
30264 pass: 'ARIA attribute name is valid',
30265 fail: {
30266 singular: 'Invalid ARIA attribute name: ${data.values}',
30267 plural: 'Invalid ARIA attribute names: ${data.values}'
30268 }
30269 }
30270 },
30271 'braille-label-equivalent': {
30272 impact: 'serious',
30273 messages: {
30274 pass: 'aria-braillelabel is used on an element with accessible text',
30275 fail: 'aria-braillelabel is used on an element with no accessible text',
30276 incomplete: 'Unable to compute accessible text'
30277 }
30278 },
30279 'braille-roledescription-equivalent': {
30280 impact: 'serious',
30281 messages: {
30282 pass: 'aria-brailleroledescription is used on an element with aria-roledescription',
30283 fail: {
30284 noRoleDescription: 'aria-brailleroledescription is used on an element with no aria-roledescription',
30285 emptyRoleDescription: 'aria-brailleroledescription is used on an element with an empty aria-roledescription'
30286 }
30287 }
30288 },
30289 deprecatedrole: {
30290 impact: 'minor',
30291 messages: {
30292 pass: 'ARIA role is not deprecated',
30293 fail: 'The role used is deprecated: ${data}'
30294 }
30295 },
30296 fallbackrole: {
30297 impact: 'serious',
30298 messages: {
30299 pass: 'Only one role value used',
30300 fail: 'Use only one role value, since fallback roles are not supported in older browsers',
30301 incomplete: 'Use only role \'presentation\' or \'none\' since they are synonymous.'
30302 }
30303 },
30304 'has-global-aria-attribute': {
30305 impact: 'minor',
30306 messages: {
30307 pass: {
30308 singular: 'Element has global ARIA attribute: ${data.values}',
30309 plural: 'Element has global ARIA attributes: ${data.values}'
30310 },
30311 fail: 'Element does not have global ARIA attribute'
30312 }
30313 },
30314 'has-widget-role': {
30315 impact: 'minor',
30316 messages: {
30317 pass: 'Element has a widget role.',
30318 fail: 'Element does not have a widget role.'
30319 }
30320 },
30321 invalidrole: {
30322 impact: 'critical',
30323 messages: {
30324 pass: 'ARIA role is valid',
30325 fail: {
30326 singular: 'Role must be one of the valid ARIA roles: ${data.values}',
30327 plural: 'Roles must be one of the valid ARIA roles: ${data.values}'
30328 }
30329 }
30330 },
30331 'is-element-focusable': {
30332 impact: 'minor',
30333 messages: {
30334 pass: 'Element is focusable.',
30335 fail: 'Element is not focusable.'
30336 }
30337 },
30338 'no-implicit-explicit-label': {
30339 impact: 'serious',
30340 messages: {
30341 pass: 'There is no mismatch between a <label> and accessible name',
30342 incomplete: 'Check that the <label> does not need be part of the ARIA ${data} field\'s name'
30343 }
30344 },
30345 unsupportedrole: {
30346 impact: 'critical',
30347 messages: {
30348 pass: 'ARIA role is supported',
30349 fail: 'The role used is not widely supported in screen readers and assistive technologies: ${data}'
30350 }
30351 },
30352 'valid-scrollable-semantics': {
30353 impact: 'minor',
30354 messages: {
30355 pass: 'Element has valid semantics for an element in the focus order.',
30356 fail: 'Element has invalid semantics for an element in the focus order.'
30357 }
30358 },
30359 'color-contrast-enhanced': {
30360 impact: 'serious',
30361 messages: {
30362 pass: 'Element has sufficient color contrast of ${data.contrastRatio}',
30363 fail: {
30364 default: 'Element has insufficient color contrast of ${data.contrastRatio} (foreground color: ${data.fgColor}, background color: ${data.bgColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}',
30365 fgOnShadowColor: 'Element has insufficient color contrast of ${data.contrastRatio} between the foreground and shadow color (foreground color: ${data.fgColor}, text-shadow color: ${data.shadowColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}',
30366 shadowOnBgColor: 'Element has insufficient color contrast of ${data.contrastRatio} between the shadow color and background color (text-shadow color: ${data.shadowColor}, background color: ${data.bgColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}'
30367 },
30368 incomplete: {
30369 default: 'Unable to determine contrast ratio',
30370 bgImage: 'Element\'s background color could not be determined due to a background image',
30371 bgGradient: 'Element\'s background color could not be determined due to a background gradient',
30372 imgNode: 'Element\'s background color could not be determined because element contains an image node',
30373 bgOverlap: 'Element\'s background color could not be determined because it is overlapped by another element',
30374 fgAlpha: 'Element\'s foreground color could not be determined because of alpha transparency',
30375 elmPartiallyObscured: 'Element\'s background color could not be determined because it\'s partially obscured by another element',
30376 elmPartiallyObscuring: 'Element\'s background color could not be determined because it partially overlaps other elements',
30377 outsideViewport: 'Element\'s background color could not be determined because it\'s outside the viewport',
30378 equalRatio: 'Element has a 1:1 contrast ratio with the background',
30379 shortTextContent: 'Element content is too short to determine if it is actual text content',
30380 nonBmp: 'Element content contains only non-text characters',
30381 pseudoContent: 'Element\'s background color could not be determined due to a pseudo element',
30382 colorParse: 'Could not parse color string ${data.colorParse}'
30383 }
30384 }
30385 },
30386 'color-contrast': {
30387 impact: 'serious',
30388 messages: {
30389 pass: {
30390 default: 'Element has sufficient color contrast of ${data.contrastRatio}',
30391 hidden: 'Element is hidden'
30392 },
30393 fail: {
30394 default: 'Element has insufficient color contrast of ${data.contrastRatio} (foreground color: ${data.fgColor}, background color: ${data.bgColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}',
30395 fgOnShadowColor: 'Element has insufficient color contrast of ${data.contrastRatio} between the foreground and shadow color (foreground color: ${data.fgColor}, text-shadow color: ${data.shadowColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}',
30396 shadowOnBgColor: 'Element has insufficient color contrast of ${data.contrastRatio} between the shadow color and background color (text-shadow color: ${data.shadowColor}, background color: ${data.bgColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}'
30397 },
30398 incomplete: {
30399 default: 'Unable to determine contrast ratio',
30400 bgImage: 'Element\'s background color could not be determined due to a background image',
30401 bgGradient: 'Element\'s background color could not be determined due to a background gradient',
30402 imgNode: 'Element\'s background color could not be determined because element contains an image node',
30403 bgOverlap: 'Element\'s background color could not be determined because it is overlapped by another element',
30404 complexTextShadows: 'Element\'s contrast could not be determined because it uses complex text shadows',
30405 fgAlpha: 'Element\'s foreground color could not be determined because of alpha transparency',
30406 elmPartiallyObscured: 'Element\'s background color could not be determined because it\'s partially obscured by another element',
30407 elmPartiallyObscuring: 'Element\'s background color could not be determined because it partially overlaps other elements',
30408 outsideViewport: 'Element\'s background color could not be determined because it\'s outside the viewport',
30409 equalRatio: 'Element has a 1:1 contrast ratio with the background',
30410 shortTextContent: 'Element content is too short to determine if it is actual text content',
30411 nonBmp: 'Element content contains only non-text characters',
30412 pseudoContent: 'Element\'s background color could not be determined due to a pseudo element',
30413 colorParse: 'Could not parse color string ${data.colorParse}'
30414 }
30415 }
30416 },
30417 'link-in-text-block-style': {
30418 impact: 'serious',
30419 messages: {
30420 pass: 'Links can be distinguished from surrounding text by visual styling',
30421 incomplete: {
30422 default: 'Check if the link needs styling to distinguish it from nearby text',
30423 pseudoContent: 'Check if the link\'s pseudo style is sufficient to distinguish it from the surrounding text'
30424 },
30425 fail: 'The link has no styling (such as underline) to distinguish it from the surrounding text'
30426 }
30427 },
30428 'link-in-text-block': {
30429 impact: 'serious',
30430 messages: {
30431 pass: 'Links can be distinguished from surrounding text in some way other than by color',
30432 fail: {
30433 fgContrast: 'The link has insufficient color contrast of ${data.contrastRatio}:1 with the surrounding text. (Minimum contrast is ${data.requiredContrastRatio}:1, link text: ${data.nodeColor}, surrounding text: ${data.parentColor})',
30434 bgContrast: 'The link background has insufficient color contrast of ${data.contrastRatio} (Minimum contrast is ${data.requiredContrastRatio}:1, link background color: ${data.nodeBackgroundColor}, surrounding background color: ${data.parentBackgroundColor})'
30435 },
30436 incomplete: {
30437 default: 'Element\'s foreground contrast ratio could not be determined',
30438 bgContrast: 'Element\'s background contrast ratio could not be determined',
30439 bgImage: 'Element\'s contrast ratio could not be determined due to a background image',
30440 bgGradient: 'Element\'s contrast ratio could not be determined due to a background gradient',
30441 imgNode: 'Element\'s contrast ratio could not be determined because element contains an image node',
30442 bgOverlap: 'Element\'s contrast ratio could not be determined because of element overlap'
30443 }
30444 }
30445 },
30446 'autocomplete-appropriate': {
30447 impact: 'serious',
30448 messages: {
30449 pass: 'The autocomplete value is on an appropriate element',
30450 fail: 'The autocomplete value is inappropriate for this type of input'
30451 }
30452 },
30453 'autocomplete-valid': {
30454 impact: 'serious',
30455 messages: {
30456 pass: 'the autocomplete attribute is correctly formatted',
30457 fail: 'the autocomplete attribute is incorrectly formatted',
30458 incomplete: 'the autocomplete attribute has a non-standard value. Check whether any standard value could be used instead.'
30459 }
30460 },
30461 accesskeys: {
30462 impact: 'serious',
30463 messages: {
30464 pass: 'Accesskey attribute value is unique',
30465 fail: 'Document has multiple elements with the same accesskey'
30466 }
30467 },
30468 'focusable-content': {
30469 impact: 'serious',
30470 messages: {
30471 pass: 'Element contains focusable elements',
30472 fail: 'Element should have focusable content'
30473 }
30474 },
30475 'focusable-disabled': {
30476 impact: 'serious',
30477 messages: {
30478 pass: 'No focusable elements contained within element',
30479 incomplete: 'Check if the focusable elements immediately move the focus indicator',
30480 fail: 'Focusable content should be disabled or be removed from the DOM'
30481 }
30482 },
30483 'focusable-element': {
30484 impact: 'serious',
30485 messages: {
30486 pass: 'Element is focusable',
30487 fail: 'Element should be focusable'
30488 }
30489 },
30490 'focusable-modal-open': {
30491 impact: 'serious',
30492 messages: {
30493 pass: 'No focusable elements while a modal is open',
30494 incomplete: 'Check that focusable elements are not tabbable in the current state'
30495 }
30496 },
30497 'focusable-no-name': {
30498 impact: 'serious',
30499 messages: {
30500 pass: 'Element is not in tab order or has accessible text',
30501 fail: 'Element is in tab order and does not have accessible text',
30502 incomplete: 'Unable to determine if element has an accessible name'
30503 }
30504 },
30505 'focusable-not-tabbable': {
30506 impact: 'serious',
30507 messages: {
30508 pass: 'No focusable elements contained within element',
30509 incomplete: 'Check if the focusable elements immediately move the focus indicator',
30510 fail: 'Focusable content should have tabindex="-1" or be removed from the DOM'
30511 }
30512 },
30513 'frame-focusable-content': {
30514 impact: 'serious',
30515 messages: {
30516 pass: 'Element does not have focusable descendants',
30517 fail: 'Element has focusable descendants',
30518 incomplete: 'Could not determine if element has descendants'
30519 }
30520 },
30521 'landmark-is-top-level': {
30522 impact: 'moderate',
30523 messages: {
30524 pass: 'The ${data.role} landmark is at the top level.',
30525 fail: 'The ${data.role} landmark is contained in another landmark.'
30526 }
30527 },
30528 'no-focusable-content': {
30529 impact: 'serious',
30530 messages: {
30531 pass: 'Element does not have focusable descendants',
30532 fail: {
30533 default: 'Element has focusable descendants',
30534 notHidden: 'Using a negative tabindex on an element inside an interactive control does not prevent assistive technologies from focusing the element (even with aria-hidden="true")'
30535 },
30536 incomplete: 'Could not determine if element has descendants'
30537 }
30538 },
30539 'page-has-heading-one': {
30540 impact: 'moderate',
30541 messages: {
30542 pass: 'Page has at least one level-one heading',
30543 fail: 'Page must have a level-one heading'
30544 }
30545 },
30546 'page-has-main': {
30547 impact: 'moderate',
30548 messages: {
30549 pass: 'Document has at least one main landmark',
30550 fail: 'Document does not have a main landmark'
30551 }
30552 },
30553 'page-no-duplicate-banner': {
30554 impact: 'moderate',
30555 messages: {
30556 pass: 'Document does not have more than one banner landmark',
30557 fail: 'Document has more than one banner landmark'
30558 }
30559 },
30560 'page-no-duplicate-contentinfo': {
30561 impact: 'moderate',
30562 messages: {
30563 pass: 'Document does not have more than one contentinfo landmark',
30564 fail: 'Document has more than one contentinfo landmark'
30565 }
30566 },
30567 'page-no-duplicate-main': {
30568 impact: 'moderate',
30569 messages: {
30570 pass: 'Document does not have more than one main landmark',
30571 fail: 'Document has more than one main landmark'
30572 }
30573 },
30574 tabindex: {
30575 impact: 'serious',
30576 messages: {
30577 pass: 'Element does not have a tabindex greater than 0',
30578 fail: 'Element has a tabindex greater than 0'
30579 }
30580 },
30581 'alt-space-value': {
30582 impact: 'critical',
30583 messages: {
30584 pass: 'Element has a valid alt attribute value',
30585 fail: 'Element has an alt attribute containing only a space character, which is not ignored by all screen readers'
30586 }
30587 },
30588 'duplicate-img-label': {
30589 impact: 'minor',
30590 messages: {
30591 pass: 'Element does not duplicate existing text in <img> alt text',
30592 fail: 'Element contains <img> element with alt text that duplicates existing text'
30593 }
30594 },
30595 'explicit-label': {
30596 impact: 'critical',
30597 messages: {
30598 pass: 'Element has an explicit <label>',
30599 fail: 'Element does not have an explicit <label>',
30600 incomplete: 'Unable to determine if form element has an explicit <label>'
30601 }
30602 },
30603 'help-same-as-label': {
30604 impact: 'minor',
30605 messages: {
30606 pass: 'Help text (title or aria-describedby) does not duplicate label text',
30607 fail: 'Help text (title or aria-describedby) text is the same as the label text'
30608 }
30609 },
30610 'hidden-explicit-label': {
30611 impact: 'critical',
30612 messages: {
30613 pass: 'Form element has a visible explicit <label>',
30614 fail: 'Form element has explicit <label> that is hidden',
30615 incomplete: 'Unable to determine if form element has explicit <label> that is hidden'
30616 }
30617 },
30618 'implicit-label': {
30619 impact: 'critical',
30620 messages: {
30621 pass: 'Element has an implicit (wrapped) <label>',
30622 fail: 'Element does not have an implicit (wrapped) <label>',
30623 incomplete: 'Unable to determine if form element has an implicit (wrapped) <label>'
30624 }
30625 },
30626 'label-content-name-mismatch': {
30627 impact: 'serious',
30628 messages: {
30629 pass: 'Element contains visible text as part of it\'s accessible name',
30630 fail: 'Text inside the element is not included in the accessible name'
30631 }
30632 },
30633 'multiple-label': {
30634 impact: 'moderate',
30635 messages: {
30636 pass: 'Form field does not have multiple label elements',
30637 incomplete: 'Multiple label elements is not widely supported in assistive technologies. Ensure the first label contains all necessary information.'
30638 }
30639 },
30640 'title-only': {
30641 impact: 'serious',
30642 messages: {
30643 pass: 'Form element does not solely use title attribute for its label',
30644 fail: 'Only title used to generate label for form element'
30645 }
30646 },
30647 'landmark-is-unique': {
30648 impact: 'moderate',
30649 messages: {
30650 pass: 'Landmarks must have a unique role or role/label/title (i.e. accessible name) combination',
30651 fail: 'The landmark must have a unique aria-label, aria-labelledby, or title to make landmarks distinguishable'
30652 }
30653 },
30654 'has-lang': {
30655 impact: 'serious',
30656 messages: {
30657 pass: 'The <html> element has a lang attribute',
30658 fail: {
30659 noXHTML: 'The xml:lang attribute is not valid on HTML pages, use the lang attribute.',
30660 noLang: 'The <html> element does not have a lang attribute'
30661 }
30662 }
30663 },
30664 'valid-lang': {
30665 impact: 'serious',
30666 messages: {
30667 pass: 'Value of lang attribute is included in the list of valid languages',
30668 fail: 'Value of lang attribute not included in the list of valid languages'
30669 }
30670 },
30671 'xml-lang-mismatch': {
30672 impact: 'moderate',
30673 messages: {
30674 pass: 'Lang and xml:lang attributes have the same base language',
30675 fail: 'Lang and xml:lang attributes do not have the same base language'
30676 }
30677 },
30678 dlitem: {
30679 impact: 'serious',
30680 messages: {
30681 pass: 'Description list item has a <dl> parent element',
30682 fail: 'Description list item does not have a <dl> parent element'
30683 }
30684 },
30685 listitem: {
30686 impact: 'serious',
30687 messages: {
30688 pass: 'List item has a <ul>, <ol> or role="list" parent element',
30689 fail: {
30690 default: 'List item does not have a <ul>, <ol> parent element',
30691 roleNotValid: 'List item parent element has a role that is not role="list"'
30692 }
30693 }
30694 },
30695 'only-dlitems': {
30696 impact: 'serious',
30697 messages: {
30698 pass: 'dl element only has direct children that are allowed inside; <dt>, <dd>, or <div> elements',
30699 fail: 'dl element has direct children that are not allowed: ${data.values}'
30700 }
30701 },
30702 'only-listitems': {
30703 impact: 'serious',
30704 messages: {
30705 pass: 'List element only has direct children that are allowed inside <li> elements',
30706 fail: 'List element has direct children that are not allowed: ${data.values}'
30707 }
30708 },
30709 'structured-dlitems': {
30710 impact: 'serious',
30711 messages: {
30712 pass: 'When not empty, element has both <dt> and <dd> elements',
30713 fail: 'When not empty, element does not have at least one <dt> element followed by at least one <dd> element'
30714 }
30715 },
30716 caption: {
30717 impact: 'critical',
30718 messages: {
30719 pass: 'The multimedia element has a captions track',
30720 incomplete: 'Check that captions are available for the element'
30721 }
30722 },
30723 'frame-tested': {
30724 impact: 'critical',
30725 messages: {
30726 pass: 'The iframe was tested with axe-core',
30727 fail: 'The iframe could not be tested with axe-core',
30728 incomplete: 'The iframe still has to be tested with axe-core'
30729 }
30730 },
30731 'no-autoplay-audio': {
30732 impact: 'moderate',
30733 messages: {
30734 pass: '<video> or <audio> does not output audio for more than allowed duration or has controls mechanism',
30735 fail: '<video> or <audio> outputs audio for more than allowed duration and does not have a controls mechanism',
30736 incomplete: 'Check that the <video> or <audio> does not output audio for more than allowed duration or provides a controls mechanism'
30737 }
30738 },
30739 'css-orientation-lock': {
30740 impact: 'serious',
30741 messages: {
30742 pass: 'Display is operable, and orientation lock does not exist',
30743 fail: 'CSS Orientation lock is applied, and makes display inoperable',
30744 incomplete: 'CSS Orientation lock cannot be determined'
30745 }
30746 },
30747 'meta-viewport-large': {
30748 impact: 'minor',
30749 messages: {
30750 pass: '<meta> tag does not prevent significant zooming on mobile devices',
30751 fail: '<meta> tag limits zooming on mobile devices'
30752 }
30753 },
30754 'meta-viewport': {
30755 impact: 'critical',
30756 messages: {
30757 pass: '<meta> tag does not disable zooming on mobile devices',
30758 fail: '${data} on <meta> tag disables zooming on mobile devices'
30759 }
30760 },
30761 'target-offset': {
30762 impact: 'serious',
30763 messages: {
30764 pass: {
30765 default: 'Target has sufficient space from its closest neighbors. Safe clickable space has a diameter of ${data.closestOffset}px which is at least ${data.minOffset}px.',
30766 large: 'Target far exceeds the minimum size of ${data.minOffset}px.'
30767 },
30768 fail: 'Target has insufficient space to its closest neighbors. Safe clickable space has a diameter of ${data.closestOffset}px instead of at least ${data.minOffset}px.',
30769 incomplete: {
30770 default: 'Element with negative tabindex has insufficient space to its closest neighbors. Safe clickable space has a diameter of ${data.closestOffset}px instead of at least ${data.minOffset}px. Is this a target?',
30771 nonTabbableNeighbor: 'Target has insufficient space to its closest neighbors. Safe clickable space has a diameter of ${data.closestOffset}px instead of at least ${data.minOffset}px. Is the neighbor a target?',
30772 tooManyRects: 'Could not get the target size because there are too many overlapping elements'
30773 }
30774 }
30775 },
30776 'target-size': {
30777 impact: 'serious',
30778 messages: {
30779 pass: {
30780 default: 'Control has sufficient size (${data.width}px by ${data.height}px, should be at least ${data.minSize}px by ${data.minSize}px)',
30781 obscured: 'Control is ignored because it is fully obscured and thus not clickable',
30782 large: 'Target far exceeds the minimum size of ${data.minSize}px.'
30783 },
30784 fail: {
30785 default: 'Target has insufficient size (${data.width}px by ${data.height}px, should be at least ${data.minSize}px by ${data.minSize}px)',
30786 partiallyObscured: 'Target has insufficient size because it is partially obscured (smallest space is ${data.width}px by ${data.height}px, should be at least ${data.minSize}px by ${data.minSize}px)'
30787 },
30788 incomplete: {
30789 default: 'Element with negative tabindex has insufficient size (${data.width}px by ${data.height}px, should be at least ${data.minSize}px by ${data.minSize}px). Is this a target?',
30790 contentOverflow: 'Element size could not be accurately determined due to overflow content',
30791 partiallyObscured: 'Element with negative tabindex has insufficient size because it is partially obscured (smallest space is ${data.width}px by ${data.height}px, should be at least ${data.minSize}px by ${data.minSize}px). Is this a target?',
30792 partiallyObscuredNonTabbable: 'Target has insufficient size because it is partially obscured by a neighbor with negative tabindex (smallest space is ${data.width}px by ${data.height}px, should be at least ${data.minSize}px by ${data.minSize}px). Is the neighbor a target?',
30793 tooManyRects: 'Could not get the target size because there are too many overlapping elements'
30794 }
30795 }
30796 },
30797 'header-present': {
30798 impact: 'serious',
30799 messages: {
30800 pass: 'Page has a heading',
30801 fail: 'Page does not have a heading'
30802 }
30803 },
30804 'heading-order': {
30805 impact: 'moderate',
30806 messages: {
30807 pass: 'Heading order valid',
30808 fail: 'Heading order invalid',
30809 incomplete: 'Unable to determine previous heading'
30810 }
30811 },
30812 'identical-links-same-purpose': {
30813 impact: 'minor',
30814 messages: {
30815 pass: 'There are no other links with the same name, that go to a different URL',
30816 incomplete: 'Check that links have the same purpose, or are intentionally ambiguous.'
30817 }
30818 },
30819 'internal-link-present': {
30820 impact: 'serious',
30821 messages: {
30822 pass: 'Valid skip link found',
30823 fail: 'No valid skip link found'
30824 }
30825 },
30826 landmark: {
30827 impact: 'serious',
30828 messages: {
30829 pass: 'Page has a landmark region',
30830 fail: 'Page does not have a landmark region'
30831 }
30832 },
30833 'meta-refresh-no-exceptions': {
30834 impact: 'minor',
30835 messages: {
30836 pass: '<meta> tag does not immediately refresh the page',
30837 fail: '<meta> tag forces timed refresh of page'
30838 }
30839 },
30840 'meta-refresh': {
30841 impact: 'critical',
30842 messages: {
30843 pass: '<meta> tag does not immediately refresh the page',
30844 fail: '<meta> tag forces timed refresh of page (less than 20 hours)'
30845 }
30846 },
30847 'p-as-heading': {
30848 impact: 'serious',
30849 messages: {
30850 pass: '<p> elements are not styled as headings',
30851 fail: 'Heading elements should be used instead of styled <p> elements',
30852 incomplete: 'Unable to determine if <p> elements are styled as headings'
30853 }
30854 },
30855 region: {
30856 impact: 'moderate',
30857 messages: {
30858 pass: 'All page content is contained by landmarks',
30859 fail: 'Some page content is not contained by landmarks'
30860 }
30861 },
30862 'skip-link': {
30863 impact: 'moderate',
30864 messages: {
30865 pass: 'Skip link target exists',
30866 incomplete: 'Skip link target should become visible on activation',
30867 fail: 'No skip link target'
30868 }
30869 },
30870 'unique-frame-title': {
30871 impact: 'serious',
30872 messages: {
30873 pass: 'Element\'s title attribute is unique',
30874 fail: 'Element\'s title attribute is not unique'
30875 }
30876 },
30877 'duplicate-id-active': {
30878 impact: 'serious',
30879 messages: {
30880 pass: 'Document has no active elements that share the same id attribute',
30881 fail: 'Document has active elements with the same id attribute: ${data}'
30882 }
30883 },
30884 'duplicate-id-aria': {
30885 impact: 'critical',
30886 messages: {
30887 pass: 'Document has no elements referenced with ARIA or labels that share the same id attribute',
30888 fail: 'Document has multiple elements referenced with ARIA with the same id attribute: ${data}'
30889 }
30890 },
30891 'duplicate-id': {
30892 impact: 'minor',
30893 messages: {
30894 pass: 'Document has no static elements that share the same id attribute',
30895 fail: 'Document has multiple static elements with the same id attribute: ${data}'
30896 }
30897 },
30898 'aria-label': {
30899 impact: 'serious',
30900 messages: {
30901 pass: 'aria-label attribute exists and is not empty',
30902 fail: 'aria-label attribute does not exist or is empty'
30903 }
30904 },
30905 'aria-labelledby': {
30906 impact: 'serious',
30907 messages: {
30908 pass: 'aria-labelledby attribute exists and references elements that are visible to screen readers',
30909 fail: 'aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty',
30910 incomplete: 'Ensure aria-labelledby references an existing element'
30911 }
30912 },
30913 'avoid-inline-spacing': {
30914 impact: 'serious',
30915 messages: {
30916 pass: 'No inline styles with \'!important\' that affect text spacing has been specified',
30917 fail: {
30918 singular: 'Remove \'!important\' from inline style ${data.values}, as overriding this is not supported by most browsers',
30919 plural: 'Remove \'!important\' from inline styles ${data.values}, as overriding this is not supported by most browsers'
30920 }
30921 }
30922 },
30923 'button-has-visible-text': {
30924 impact: 'critical',
30925 messages: {
30926 pass: 'Element has inner text that is visible to screen readers',
30927 fail: 'Element does not have inner text that is visible to screen readers',
30928 incomplete: 'Unable to determine if element has children'
30929 }
30930 },
30931 'doc-has-title': {
30932 impact: 'serious',
30933 messages: {
30934 pass: 'Document has a non-empty <title> element',
30935 fail: 'Document does not have a non-empty <title> element'
30936 }
30937 },
30938 'error-occurred': {
30939 messages: {
30940 pass: '',
30941 incomplete: 'Axe encountered an error; test the page for this type of problem manually'
30942 }
30943 },
30944 exists: {
30945 impact: 'minor',
30946 messages: {
30947 pass: 'Element does not exist',
30948 incomplete: 'Element exists'
30949 }
30950 },
30951 'has-alt': {
30952 impact: 'critical',
30953 messages: {
30954 pass: 'Element has an alt attribute',
30955 fail: 'Element does not have an alt attribute'
30956 }
30957 },
30958 'has-visible-text': {
30959 impact: 'minor',
30960 messages: {
30961 pass: 'Element has text that is visible to screen readers',
30962 fail: 'Element does not have text that is visible to screen readers',
30963 incomplete: 'Unable to determine if element has children'
30964 }
30965 },
30966 'important-letter-spacing': {
30967 impact: 'serious',
30968 messages: {
30969 pass: 'Letter-spacing in the style attribute is not set to !important, or meets the minimum',
30970 fail: 'letter-spacing in the style attribute must not use !important, or be at ${data.minValue}em (current ${data.value}em)'
30971 }
30972 },
30973 'important-line-height': {
30974 impact: 'serious',
30975 messages: {
30976 pass: 'line-height in the style attribute is not set to !important, or meets the minimum',
30977 fail: 'line-height in the style attribute must not use !important, or be at ${data.minValue}em (current ${data.value}em)'
30978 }
30979 },
30980 'important-word-spacing': {
30981 impact: 'serious',
30982 messages: {
30983 pass: 'word-spacing in the style attribute is not set to !important, or meets the minimum',
30984 fail: 'word-spacing in the style attribute must not use !important, or be at ${data.minValue}em (current ${data.value}em)'
30985 }
30986 },
30987 'is-on-screen': {
30988 impact: 'serious',
30989 messages: {
30990 pass: 'Element is not visible',
30991 fail: 'Element is visible'
30992 }
30993 },
30994 'non-empty-alt': {
30995 impact: 'critical',
30996 messages: {
30997 pass: 'Element has a non-empty alt attribute',
30998 fail: {
30999 noAttr: 'Element has no alt attribute',
31000 emptyAttr: 'Element has an empty alt attribute'
31001 }
31002 }
31003 },
31004 'non-empty-if-present': {
31005 impact: 'critical',
31006 messages: {
31007 pass: {
31008 default: 'Element does not have a value attribute',
31009 'has-label': 'Element has a non-empty value attribute'
31010 },
31011 fail: 'Element has a value attribute and the value attribute is empty'
31012 }
31013 },
31014 'non-empty-placeholder': {
31015 impact: 'serious',
31016 messages: {
31017 pass: 'Element has a placeholder attribute',
31018 fail: {
31019 noAttr: 'Element has no placeholder attribute',
31020 emptyAttr: 'Element has an empty placeholder attribute'
31021 }
31022 }
31023 },
31024 'non-empty-title': {
31025 impact: 'serious',
31026 messages: {
31027 pass: 'Element has a title attribute',
31028 fail: {
31029 noAttr: 'Element has no title attribute',
31030 emptyAttr: 'Element has an empty title attribute'
31031 }
31032 }
31033 },
31034 'non-empty-value': {
31035 impact: 'critical',
31036 messages: {
31037 pass: 'Element has a non-empty value attribute',
31038 fail: {
31039 noAttr: 'Element has no value attribute',
31040 emptyAttr: 'Element has an empty value attribute'
31041 }
31042 }
31043 },
31044 'presentational-role': {
31045 impact: 'minor',
31046 messages: {
31047 pass: 'Element\'s default semantics were overridden with role="${data.role}"',
31048 fail: {
31049 default: 'Element\'s default semantics were not overridden with role="none" or role="presentation"',
31050 globalAria: 'Element\'s role is not presentational because it has a global ARIA attribute',
31051 focusable: 'Element\'s role is not presentational because it is focusable',
31052 both: 'Element\'s role is not presentational because it has a global ARIA attribute and is focusable',
31053 iframe: 'Using the "title" attribute on an ${data.nodeName} element with a presentational role behaves inconsistently between screen readers'
31054 }
31055 }
31056 },
31057 'role-none': {
31058 impact: 'minor',
31059 messages: {
31060 pass: 'Element\'s default semantics were overridden with role="none"',
31061 fail: 'Element\'s default semantics were not overridden with role="none"'
31062 }
31063 },
31064 'role-presentation': {
31065 impact: 'minor',
31066 messages: {
31067 pass: 'Element\'s default semantics were overridden with role="presentation"',
31068 fail: 'Element\'s default semantics were not overridden with role="presentation"'
31069 }
31070 },
31071 'svg-non-empty-title': {
31072 impact: 'serious',
31073 messages: {
31074 pass: 'Element has a child that is a title',
31075 fail: {
31076 noTitle: 'Element has no child that is a title',
31077 emptyTitle: 'Element child title is empty'
31078 },
31079 incomplete: 'Unable to determine element has a child that is a title'
31080 }
31081 },
31082 'caption-faked': {
31083 impact: 'serious',
31084 messages: {
31085 pass: 'The first row of a table is not used as a caption',
31086 fail: 'The first child of the table should be a caption instead of a table cell'
31087 }
31088 },
31089 'html5-scope': {
31090 impact: 'moderate',
31091 messages: {
31092 pass: 'Scope attribute is only used on table header elements (<th>)',
31093 fail: 'In HTML 5, scope attributes may only be used on table header elements (<th>)'
31094 }
31095 },
31096 'same-caption-summary': {
31097 impact: 'minor',
31098 messages: {
31099 pass: 'Content of summary attribute and <caption> are not duplicated',
31100 fail: 'Content of summary attribute and <caption> element are identical',
31101 incomplete: 'Unable to determine if <table> element has a caption'
31102 }
31103 },
31104 'scope-value': {
31105 impact: 'critical',
31106 messages: {
31107 pass: 'Scope attribute is used correctly',
31108 fail: 'The value of the scope attribute may only be \'row\' or \'col\''
31109 }
31110 },
31111 'td-has-header': {
31112 impact: 'critical',
31113 messages: {
31114 pass: 'All non-empty data cells have table headers',
31115 fail: 'Some non-empty data cells do not have table headers'
31116 }
31117 },
31118 'td-headers-attr': {
31119 impact: 'serious',
31120 messages: {
31121 pass: 'The headers attribute is exclusively used to refer to other header cells in the table',
31122 incomplete: 'The headers attribute is empty',
31123 fail: {
31124 'cell-header-not-in-table': 'The headers attribute is not exclusively used to refer to other header cells in the table',
31125 'cell-header-not-th': 'The headers attribute must refer to header cells, not data cells',
31126 'header-refs-self': 'The element with headers attribute refers to itself'
31127 }
31128 }
31129 },
31130 'th-has-data-cells': {
31131 impact: 'serious',
31132 messages: {
31133 pass: 'All table header cells refer to data cells',
31134 fail: 'Not all table header cells refer to data cells',
31135 incomplete: 'Table data cells are missing or empty'
31136 }
31137 },
31138 'hidden-content': {
31139 impact: 'minor',
31140 messages: {
31141 pass: 'All content on the page has been analyzed.',
31142 fail: 'There were problems analyzing the content on this page.',
31143 incomplete: 'There is hidden content on the page that was not analyzed. You will need to trigger the display of this content in order to analyze it.'
31144 }
31145 }
31146 },
31147 failureSummaries: {
31148 any: {
31149 failureMessage: function anonymous(it) {
31150 var out = 'Fix any of the following:';
31151 var arr1 = it;
31152 if (arr1) {
31153 var value, i1 = -1, l1 = arr1.length - 1;
31154 while (i1 < l1) {
31155 value = arr1[i1 += 1];
31156 out += '\n ' + value.split('\n').join('\n ');
31157 }
31158 }
31159 return out;
31160 }
31161 },
31162 none: {
31163 failureMessage: function anonymous(it) {
31164 var out = 'Fix all of the following:';
31165 var arr1 = it;
31166 if (arr1) {
31167 var value, i1 = -1, l1 = arr1.length - 1;
31168 while (i1 < l1) {
31169 value = arr1[i1 += 1];
31170 out += '\n ' + value.split('\n').join('\n ');
31171 }
31172 }
31173 return out;
31174 }
31175 }
31176 },
31177 incompleteFallbackMessage: 'axe couldn\'t tell the reason. Time to break out the element inspector!'
31178 },
31179 rules: [ {
31180 id: 'accesskeys',
31181 impact: 'serious',
31182 selector: '[accesskey]',
31183 excludeHidden: false,
31184 tags: [ 'cat.keyboard', 'best-practice' ],
31185 all: [],
31186 any: [],
31187 none: [ 'accesskeys' ]
31188 }, {
31189 id: 'area-alt',
31190 impact: 'critical',
31191 selector: 'map area[href]',
31192 excludeHidden: false,
31193 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag244', 'wcag412', 'section508', 'section508.22.a', 'TTv5', 'TT6.a', 'EN-301-549', 'EN-9.2.4.4', 'EN-9.4.1.2', 'ACT', 'RGAAv4', 'RGAA-1.1.2' ],
31194 actIds: [ 'c487ae' ],
31195 all: [],
31196 any: [ {
31197 options: {
31198 attribute: 'alt'
31199 },
31200 id: 'non-empty-alt'
31201 }, 'aria-label', 'aria-labelledby', {
31202 options: {
31203 attribute: 'title'
31204 },
31205 id: 'non-empty-title'
31206 } ],
31207 none: []
31208 }, {
31209 id: 'aria-allowed-attr',
31210 impact: 'critical',
31211 matches: 'aria-allowed-attr-matches',
31212 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-7.1.1' ],
31213 actIds: [ '5c01ea' ],
31214 all: [ {
31215 options: {
31216 validTreeRowAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-level' ]
31217 },
31218 id: 'aria-allowed-attr'
31219 }, 'aria-allowed-attr-elm' ],
31220 any: [],
31221 none: [ 'aria-unsupported-attr' ]
31222 }, {
31223 id: 'aria-allowed-role',
31224 impact: 'minor',
31225 excludeHidden: false,
31226 selector: '[role]',
31227 matches: 'aria-allowed-role-matches',
31228 tags: [ 'cat.aria', 'best-practice' ],
31229 all: [],
31230 any: [ {
31231 options: {
31232 allowImplicit: true,
31233 ignoredTags: []
31234 },
31235 id: 'aria-allowed-role'
31236 } ],
31237 none: []
31238 }, {
31239 id: 'aria-braille-equivalent',
31240 reviewOnFail: true,
31241 impact: 'serious',
31242 selector: '[aria-brailleroledescription], [aria-braillelabel]',
31243 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2' ],
31244 all: [ 'braille-roledescription-equivalent', 'braille-label-equivalent' ],
31245 any: [],
31246 none: []
31247 }, {
31248 id: 'aria-command-name',
31249 impact: 'serious',
31250 selector: '[role="link"], [role="button"], [role="menuitem"]',
31251 matches: 'no-naming-method-matches',
31252 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'TTv5', 'TT6.a', 'EN-301-549', 'EN-9.4.1.2', 'ACT', 'RGAAv4', 'RGAA-11.9.1' ],
31253 actIds: [ '97a4e1' ],
31254 all: [],
31255 any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
31256 options: {
31257 attribute: 'title'
31258 },
31259 id: 'non-empty-title'
31260 } ],
31261 none: []
31262 }, {
31263 id: 'aria-conditional-attr',
31264 impact: 'serious',
31265 matches: 'aria-allowed-attr-matches',
31266 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-7.1.1' ],
31267 actIds: [ '5c01ea' ],
31268 all: [ {
31269 options: {
31270 invalidTableRowAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-level' ]
31271 },
31272 id: 'aria-conditional-attr'
31273 } ],
31274 any: [],
31275 none: []
31276 }, {
31277 id: 'aria-deprecated-role',
31278 impact: 'minor',
31279 selector: '[role]',
31280 matches: 'no-empty-role-matches',
31281 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-7.1.1' ],
31282 actIds: [ '674b10' ],
31283 all: [],
31284 any: [],
31285 none: [ 'deprecatedrole' ]
31286 }, {
31287 id: 'aria-dialog-name',
31288 impact: 'serious',
31289 selector: '[role="dialog"], [role="alertdialog"]',
31290 matches: 'no-naming-method-matches',
31291 tags: [ 'cat.aria', 'best-practice' ],
31292 all: [],
31293 any: [ 'aria-label', 'aria-labelledby', {
31294 options: {
31295 attribute: 'title'
31296 },
31297 id: 'non-empty-title'
31298 } ],
31299 none: []
31300 }, {
31301 id: 'aria-hidden-body',
31302 impact: 'critical',
31303 selector: 'body',
31304 excludeHidden: false,
31305 matches: 'is-initiator-matches',
31306 tags: [ 'cat.aria', 'wcag2a', 'wcag131', 'wcag412', 'EN-301-549', 'EN-9.1.3.1', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-10.8.1' ],
31307 all: [],
31308 any: [ 'aria-hidden-body' ],
31309 none: []
31310 }, {
31311 id: 'aria-hidden-focus',
31312 impact: 'serious',
31313 selector: '[aria-hidden="true"]',
31314 matches: 'aria-hidden-focus-matches',
31315 excludeHidden: false,
31316 tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'TTv5', 'TT6.a', 'EN-301-549', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-10.8.1' ],
31317 actIds: [ '6cfa84' ],
31318 all: [ 'focusable-modal-open', 'focusable-disabled', 'focusable-not-tabbable' ],
31319 any: [],
31320 none: []
31321 }, {
31322 id: 'aria-input-field-name',
31323 impact: 'serious',
31324 selector: '[role="combobox"], [role="listbox"], [role="searchbox"], [role="slider"], [role="spinbutton"], [role="textbox"]',
31325 matches: 'no-naming-method-matches',
31326 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'TTv5', 'TT5.c', 'EN-301-549', 'EN-9.4.1.2', 'ACT', 'RGAAv4', 'RGAA-11.1.1' ],
31327 actIds: [ 'e086e5' ],
31328 all: [],
31329 any: [ 'aria-label', 'aria-labelledby', {
31330 options: {
31331 attribute: 'title'
31332 },
31333 id: 'non-empty-title'
31334 } ],
31335 none: [ 'no-implicit-explicit-label' ]
31336 }, {
31337 id: 'aria-meter-name',
31338 impact: 'serious',
31339 selector: '[role="meter"]',
31340 matches: 'no-naming-method-matches',
31341 tags: [ 'cat.aria', 'wcag2a', 'wcag111', 'EN-301-549', 'EN-9.1.1.1', 'RGAAv4', 'RGAA-11.1.1' ],
31342 all: [],
31343 any: [ 'aria-label', 'aria-labelledby', {
31344 options: {
31345 attribute: 'title'
31346 },
31347 id: 'non-empty-title'
31348 } ],
31349 none: []
31350 }, {
31351 id: 'aria-progressbar-name',
31352 impact: 'serious',
31353 selector: '[role="progressbar"]',
31354 matches: 'no-naming-method-matches',
31355 tags: [ 'cat.aria', 'wcag2a', 'wcag111', 'EN-301-549', 'EN-9.1.1.1', 'RGAAv4', 'RGAA-11.1.1' ],
31356 all: [],
31357 any: [ 'aria-label', 'aria-labelledby', {
31358 options: {
31359 attribute: 'title'
31360 },
31361 id: 'non-empty-title'
31362 } ],
31363 none: []
31364 }, {
31365 id: 'aria-prohibited-attr',
31366 impact: 'serious',
31367 matches: 'aria-allowed-attr-matches',
31368 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-7.1.1' ],
31369 actIds: [ '5c01ea' ],
31370 all: [],
31371 any: [],
31372 none: [ {
31373 options: {
31374 elementsAllowedAriaLabel: [ 'applet', 'input' ]
31375 },
31376 id: 'aria-prohibited-attr'
31377 } ]
31378 }, {
31379 id: 'aria-required-attr',
31380 impact: 'critical',
31381 selector: '[role]',
31382 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-7.1.1' ],
31383 actIds: [ '4e8ab6' ],
31384 all: [],
31385 any: [ 'aria-required-attr' ],
31386 none: []
31387 }, {
31388 id: 'aria-required-children',
31389 impact: 'critical',
31390 selector: '[role]',
31391 matches: 'aria-required-children-matches',
31392 tags: [ 'cat.aria', 'wcag2a', 'wcag131', 'EN-301-549', 'EN-9.1.3.1', 'RGAAv4', 'RGAA-9.3.1' ],
31393 actIds: [ 'bc4a75', 'ff89c9' ],
31394 all: [],
31395 any: [ {
31396 options: {
31397 reviewEmpty: [ 'doc-bibliography', 'doc-endnotes', 'grid', 'list', 'listbox', 'menu', 'menubar', 'table', 'tablist', 'tree', 'treegrid', 'rowgroup' ]
31398 },
31399 id: 'aria-required-children'
31400 } ],
31401 none: []
31402 }, {
31403 id: 'aria-required-parent',
31404 impact: 'critical',
31405 selector: '[role]',
31406 matches: 'aria-required-parent-matches',
31407 tags: [ 'cat.aria', 'wcag2a', 'wcag131', 'EN-301-549', 'EN-9.1.3.1', 'RGAAv4', 'RGAA-9.3.1' ],
31408 actIds: [ 'ff89c9' ],
31409 all: [],
31410 any: [ {
31411 options: {
31412 ownGroupRoles: [ 'listitem', 'treeitem' ]
31413 },
31414 id: 'aria-required-parent'
31415 } ],
31416 none: []
31417 }, {
31418 id: 'aria-roledescription',
31419 impact: 'serious',
31420 selector: '[aria-roledescription]',
31421 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2', 'deprecated' ],
31422 enabled: false,
31423 all: [],
31424 any: [ {
31425 options: {
31426 supportedRoles: [ 'button', 'img', 'checkbox', 'radio', 'combobox', 'menuitemcheckbox', 'menuitemradio' ]
31427 },
31428 id: 'aria-roledescription'
31429 } ],
31430 none: []
31431 }, {
31432 id: 'aria-roles',
31433 impact: 'critical',
31434 selector: '[role]',
31435 matches: 'no-empty-role-matches',
31436 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-7.1.1' ],
31437 actIds: [ '674b10' ],
31438 all: [],
31439 any: [],
31440 none: [ 'invalidrole', 'abstractrole', 'unsupportedrole' ]
31441 }, {
31442 id: 'aria-text',
31443 impact: 'serious',
31444 selector: '[role=text]',
31445 tags: [ 'cat.aria', 'best-practice' ],
31446 all: [],
31447 any: [ 'no-focusable-content' ],
31448 none: []
31449 }, {
31450 id: 'aria-toggle-field-name',
31451 impact: 'serious',
31452 selector: '[role="checkbox"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="radio"], [role="switch"], [role="option"]',
31453 matches: 'no-naming-method-matches',
31454 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'TTv5', 'TT5.c', 'EN-301-549', 'EN-9.4.1.2', 'ACT', 'RGAAv4', 'RGAA-7.1.1' ],
31455 actIds: [ 'e086e5' ],
31456 all: [],
31457 any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
31458 options: {
31459 attribute: 'title'
31460 },
31461 id: 'non-empty-title'
31462 } ],
31463 none: [ 'no-implicit-explicit-label' ]
31464 }, {
31465 id: 'aria-tooltip-name',
31466 impact: 'serious',
31467 selector: '[role="tooltip"]',
31468 matches: 'no-naming-method-matches',
31469 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2' ],
31470 all: [],
31471 any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
31472 options: {
31473 attribute: 'title'
31474 },
31475 id: 'non-empty-title'
31476 } ],
31477 none: []
31478 }, {
31479 id: 'aria-treeitem-name',
31480 impact: 'serious',
31481 selector: '[role="treeitem"]',
31482 matches: 'no-naming-method-matches',
31483 tags: [ 'cat.aria', 'best-practice' ],
31484 all: [],
31485 any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
31486 options: {
31487 attribute: 'title'
31488 },
31489 id: 'non-empty-title'
31490 } ],
31491 none: []
31492 }, {
31493 id: 'aria-valid-attr-value',
31494 impact: 'critical',
31495 matches: 'aria-has-attr-matches',
31496 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-7.1.1' ],
31497 actIds: [ '6a7281' ],
31498 all: [ {
31499 options: [],
31500 id: 'aria-valid-attr-value'
31501 }, 'aria-errormessage', 'aria-level' ],
31502 any: [],
31503 none: []
31504 }, {
31505 id: 'aria-valid-attr',
31506 impact: 'critical',
31507 matches: 'aria-has-attr-matches',
31508 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-7.1.1' ],
31509 actIds: [ '5f99a7' ],
31510 all: [],
31511 any: [ {
31512 options: [],
31513 id: 'aria-valid-attr'
31514 } ],
31515 none: []
31516 }, {
31517 id: 'audio-caption',
31518 impact: 'critical',
31519 selector: 'audio',
31520 enabled: false,
31521 excludeHidden: false,
31522 tags: [ 'cat.time-and-media', 'wcag2a', 'wcag121', 'EN-301-549', 'EN-9.1.2.1', 'section508', 'section508.22.a', 'deprecated' ],
31523 actIds: [ '2eb176', 'afb423' ],
31524 all: [],
31525 any: [],
31526 none: [ 'caption' ]
31527 }, {
31528 id: 'autocomplete-valid',
31529 impact: 'serious',
31530 matches: 'autocomplete-matches',
31531 tags: [ 'cat.forms', 'wcag21aa', 'wcag135', 'EN-301-549', 'EN-9.1.3.5', 'ACT', 'RGAAv4', 'RGAA-11.13.1' ],
31532 actIds: [ '73f2c2' ],
31533 all: [ {
31534 options: {
31535 stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null', 'xoff', 'xon' ],
31536 ignoredValues: [ 'text', 'pronouns', 'gender', 'message', 'content' ]
31537 },
31538 id: 'autocomplete-valid'
31539 } ],
31540 any: [],
31541 none: []
31542 }, {
31543 id: 'avoid-inline-spacing',
31544 impact: 'serious',
31545 selector: '[style]',
31546 matches: 'is-visible-on-screen-matches',
31547 tags: [ 'cat.structure', 'wcag21aa', 'wcag1412', 'EN-301-549', 'EN-9.1.4.12', 'ACT' ],
31548 actIds: [ '24afc2', '9e45ec', '78fd32' ],
31549 all: [ {
31550 options: {
31551 cssProperty: 'letter-spacing',
31552 minValue: .12
31553 },
31554 id: 'important-letter-spacing'
31555 }, {
31556 options: {
31557 cssProperty: 'word-spacing',
31558 minValue: .16
31559 },
31560 id: 'important-word-spacing'
31561 }, {
31562 options: {
31563 multiLineOnly: true,
31564 cssProperty: 'line-height',
31565 minValue: 1.5,
31566 normalValue: 1
31567 },
31568 id: 'important-line-height'
31569 } ],
31570 any: [],
31571 none: []
31572 }, {
31573 id: 'blink',
31574 impact: 'serious',
31575 selector: 'blink',
31576 excludeHidden: false,
31577 tags: [ 'cat.time-and-media', 'wcag2a', 'wcag222', 'section508', 'section508.22.j', 'TTv5', 'TT2.b', 'EN-301-549', 'EN-9.2.2.2', 'RGAAv4', 'RGAA-13.8.1' ],
31578 all: [],
31579 any: [],
31580 none: [ 'is-on-screen' ]
31581 }, {
31582 id: 'button-name',
31583 impact: 'critical',
31584 selector: 'button',
31585 matches: 'no-explicit-name-required-matches',
31586 tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'section508', 'section508.22.a', 'TTv5', 'TT6.a', 'EN-301-549', 'EN-9.4.1.2', 'ACT', 'RGAAv4', 'RGAA-11.9.1' ],
31587 actIds: [ '97a4e1', 'm6b1q3' ],
31588 all: [],
31589 any: [ 'button-has-visible-text', 'aria-label', 'aria-labelledby', {
31590 options: {
31591 attribute: 'title'
31592 },
31593 id: 'non-empty-title'
31594 }, 'implicit-label', 'explicit-label', 'presentational-role' ],
31595 none: []
31596 }, {
31597 id: 'bypass',
31598 impact: 'serious',
31599 selector: 'html:not(html *)',
31600 pageLevel: true,
31601 matches: 'bypass-matches',
31602 reviewOnFail: true,
31603 tags: [ 'cat.keyboard', 'wcag2a', 'wcag241', 'section508', 'section508.22.o', 'TTv5', 'TT9.a', 'EN-301-549', 'EN-9.2.4.1', 'RGAAv4', 'RGAA-12.7.1' ],
31604 actIds: [ 'cf77f2', '047fe0', 'b40fd1', '3e12e1', 'ye5d6e' ],
31605 all: [],
31606 any: [ 'internal-link-present', {
31607 options: {
31608 selector: ':is(h1, h2, h3, h4, h5, h6):not([role]), [role=heading]'
31609 },
31610 id: 'header-present'
31611 }, {
31612 options: {
31613 selector: 'main, [role=main]'
31614 },
31615 id: 'landmark'
31616 } ],
31617 none: []
31618 }, {
31619 id: 'color-contrast-enhanced',
31620 impact: 'serious',
31621 matches: 'color-contrast-matches',
31622 excludeHidden: false,
31623 enabled: false,
31624 tags: [ 'cat.color', 'wcag2aaa', 'wcag146', 'ACT' ],
31625 actIds: [ '09o5cg' ],
31626 all: [],
31627 any: [ {
31628 options: {
31629 ignoreUnicode: true,
31630 ignoreLength: false,
31631 ignorePseudo: false,
31632 boldValue: 700,
31633 boldTextPt: 14,
31634 largeTextPt: 18,
31635 contrastRatio: {
31636 normal: {
31637 expected: 7,
31638 minThreshold: 4.5
31639 },
31640 large: {
31641 expected: 4.5,
31642 minThreshold: 3
31643 }
31644 },
31645 pseudoSizeThreshold: .25,
31646 shadowOutlineEmMax: .1,
31647 textStrokeEmMin: .03
31648 },
31649 id: 'color-contrast-enhanced'
31650 } ],
31651 none: []
31652 }, {
31653 id: 'color-contrast',
31654 impact: 'serious',
31655 matches: 'color-contrast-matches',
31656 excludeHidden: false,
31657 tags: [ 'cat.color', 'wcag2aa', 'wcag143', 'TTv5', 'TT13.c', 'EN-301-549', 'EN-9.1.4.3', 'ACT', 'RGAAv4', 'RGAA-3.2.1' ],
31658 actIds: [ 'afw4f7', '09o5cg' ],
31659 all: [],
31660 any: [ {
31661 options: {
31662 ignoreUnicode: true,
31663 ignoreLength: false,
31664 ignorePseudo: false,
31665 boldValue: 700,
31666 boldTextPt: 14,
31667 largeTextPt: 18,
31668 contrastRatio: {
31669 normal: {
31670 expected: 4.5
31671 },
31672 large: {
31673 expected: 3
31674 }
31675 },
31676 pseudoSizeThreshold: .25,
31677 shadowOutlineEmMax: .2,
31678 textStrokeEmMin: .03
31679 },
31680 id: 'color-contrast'
31681 } ],
31682 none: []
31683 }, {
31684 id: 'css-orientation-lock',
31685 impact: 'serious',
31686 selector: 'html:not(html *)',
31687 tags: [ 'cat.structure', 'wcag134', 'wcag21aa', 'EN-301-549', 'EN-9.1.3.4', 'RGAAv4', 'RGAA-13.9.1', 'experimental' ],
31688 actIds: [ 'b33eff' ],
31689 all: [ {
31690 options: {
31691 degreeThreshold: 2
31692 },
31693 id: 'css-orientation-lock'
31694 } ],
31695 any: [],
31696 none: [],
31697 preload: true
31698 }, {
31699 id: 'definition-list',
31700 impact: 'serious',
31701 selector: 'dl',
31702 matches: 'no-role-matches',
31703 tags: [ 'cat.structure', 'wcag2a', 'wcag131', 'EN-301-549', 'EN-9.1.3.1', 'RGAAv4', 'RGAA-9.3.3' ],
31704 all: [],
31705 any: [],
31706 none: [ 'structured-dlitems', {
31707 options: {
31708 validRoles: [ 'definition', 'term', 'listitem' ],
31709 validNodeNames: [ 'dt', 'dd' ],
31710 divGroups: true
31711 },
31712 id: 'only-dlitems'
31713 } ]
31714 }, {
31715 id: 'dlitem',
31716 impact: 'serious',
31717 selector: 'dd, dt',
31718 matches: 'no-role-matches',
31719 tags: [ 'cat.structure', 'wcag2a', 'wcag131', 'EN-301-549', 'EN-9.1.3.1', 'RGAAv4', 'RGAA-9.3.3' ],
31720 all: [],
31721 any: [ 'dlitem' ],
31722 none: []
31723 }, {
31724 id: 'document-title',
31725 impact: 'serious',
31726 selector: 'html:not(html *)',
31727 matches: 'is-initiator-matches',
31728 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag242', 'TTv5', 'TT12.a', 'EN-301-549', 'EN-9.2.4.2', 'ACT', 'RGAAv4', 'RGAA-8.5.1' ],
31729 actIds: [ '2779a5' ],
31730 all: [],
31731 any: [ 'doc-has-title' ],
31732 none: []
31733 }, {
31734 id: 'duplicate-id-active',
31735 impact: 'serious',
31736 selector: '[id]',
31737 matches: 'duplicate-id-active-matches',
31738 excludeHidden: false,
31739 tags: [ 'cat.parsing', 'wcag2a-obsolete', 'wcag411', 'deprecated' ],
31740 enabled: false,
31741 actIds: [ '3ea0c8' ],
31742 all: [],
31743 any: [ 'duplicate-id-active' ],
31744 none: []
31745 }, {
31746 id: 'duplicate-id-aria',
31747 impact: 'critical',
31748 selector: '[id]',
31749 matches: 'duplicate-id-aria-matches',
31750 excludeHidden: false,
31751 tags: [ 'cat.parsing', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-8.2.1' ],
31752 reviewOnFail: true,
31753 actIds: [ '3ea0c8' ],
31754 all: [],
31755 any: [ 'duplicate-id-aria' ],
31756 none: []
31757 }, {
31758 id: 'duplicate-id',
31759 impact: 'minor',
31760 selector: '[id]',
31761 matches: 'duplicate-id-misc-matches',
31762 excludeHidden: false,
31763 tags: [ 'cat.parsing', 'wcag2a-obsolete', 'wcag411', 'deprecated' ],
31764 enabled: false,
31765 actIds: [ '3ea0c8' ],
31766 all: [],
31767 any: [ 'duplicate-id' ],
31768 none: []
31769 }, {
31770 id: 'empty-heading',
31771 impact: 'minor',
31772 selector: 'h1, h2, h3, h4, h5, h6, [role="heading"]',
31773 matches: 'heading-matches',
31774 tags: [ 'cat.name-role-value', 'best-practice' ],
31775 actIds: [ 'ffd0e9' ],
31776 all: [],
31777 any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
31778 options: {
31779 attribute: 'title'
31780 },
31781 id: 'non-empty-title'
31782 } ],
31783 none: []
31784 }, {
31785 id: 'empty-table-header',
31786 impact: 'minor',
31787 selector: 'th:not([role]), [role="rowheader"], [role="columnheader"]',
31788 tags: [ 'cat.name-role-value', 'best-practice' ],
31789 all: [],
31790 any: [ 'has-visible-text' ],
31791 none: []
31792 }, {
31793 id: 'focus-order-semantics',
31794 impact: 'minor',
31795 selector: 'div, h1, h2, h3, h4, h5, h6, [role=heading], p, span',
31796 matches: 'inserted-into-focus-order-matches',
31797 tags: [ 'cat.keyboard', 'best-practice', 'RGAAv4', 'RGAA-12.8.1', 'experimental' ],
31798 all: [],
31799 any: [ {
31800 options: [],
31801 id: 'has-widget-role'
31802 }, {
31803 options: {
31804 roles: [ 'tooltip' ]
31805 },
31806 id: 'valid-scrollable-semantics'
31807 } ],
31808 none: []
31809 }, {
31810 id: 'form-field-multiple-labels',
31811 impact: 'moderate',
31812 selector: 'input, select, textarea',
31813 matches: 'label-matches',
31814 tags: [ 'cat.forms', 'wcag2a', 'wcag332', 'TTv5', 'TT5.c', 'EN-301-549', 'EN-9.3.3.2', 'RGAAv4', 'RGAA-11.2.1' ],
31815 all: [],
31816 any: [],
31817 none: [ 'multiple-label' ]
31818 }, {
31819 id: 'frame-focusable-content',
31820 impact: 'serious',
31821 selector: 'html:not(html *)',
31822 matches: 'frame-focusable-content-matches',
31823 tags: [ 'cat.keyboard', 'wcag2a', 'wcag211', 'TTv5', 'TT4.a', 'EN-301-549', 'EN-9.2.1.1', 'RGAAv4', 'RGAA-7.3.2' ],
31824 actIds: [ 'akn7bn' ],
31825 all: [],
31826 any: [ 'frame-focusable-content' ],
31827 none: []
31828 }, {
31829 id: 'frame-tested',
31830 impact: 'critical',
31831 selector: 'html:not(html *), frame, iframe',
31832 tags: [ 'cat.structure', 'best-practice', 'review-item' ],
31833 all: [ {
31834 options: {
31835 isViolation: false
31836 },
31837 id: 'frame-tested'
31838 } ],
31839 any: [],
31840 none: []
31841 }, {
31842 id: 'frame-title-unique',
31843 impact: 'serious',
31844 selector: 'frame[title], iframe[title]',
31845 matches: 'frame-title-has-text-matches',
31846 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag412', 'TTv5', 'TT12.d', 'EN-301-549', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-2.2.1' ],
31847 actIds: [ '4b1c6c' ],
31848 all: [],
31849 any: [],
31850 none: [ 'unique-frame-title' ],
31851 reviewOnFail: true
31852 }, {
31853 id: 'frame-title',
31854 impact: 'serious',
31855 selector: 'frame, iframe',
31856 matches: 'no-negative-tabindex-matches',
31857 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag412', 'section508', 'section508.22.i', 'TTv5', 'TT12.d', 'EN-301-549', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-2.1.1' ],
31858 actIds: [ 'cae760' ],
31859 all: [],
31860 any: [ {
31861 options: {
31862 attribute: 'title'
31863 },
31864 id: 'non-empty-title'
31865 }, 'aria-label', 'aria-labelledby', 'presentational-role' ],
31866 none: []
31867 }, {
31868 id: 'heading-order',
31869 impact: 'moderate',
31870 selector: 'h1, h2, h3, h4, h5, h6, [role=heading]',
31871 matches: 'heading-matches',
31872 tags: [ 'cat.semantics', 'best-practice' ],
31873 all: [],
31874 any: [ 'heading-order' ],
31875 none: []
31876 }, {
31877 id: 'hidden-content',
31878 impact: 'minor',
31879 selector: '*',
31880 excludeHidden: false,
31881 tags: [ 'cat.structure', 'best-practice', 'experimental', 'review-item' ],
31882 all: [],
31883 any: [ 'hidden-content' ],
31884 none: []
31885 }, {
31886 id: 'html-has-lang',
31887 impact: 'serious',
31888 selector: 'html:not(html *)',
31889 matches: 'is-initiator-matches',
31890 tags: [ 'cat.language', 'wcag2a', 'wcag311', 'TTv5', 'TT11.a', 'EN-301-549', 'EN-9.3.1.1', 'ACT', 'RGAAv4', 'RGAA-8.3.1' ],
31891 actIds: [ 'b5c3f8' ],
31892 all: [],
31893 any: [ {
31894 options: {
31895 attributes: [ 'lang', 'xml:lang' ]
31896 },
31897 id: 'has-lang'
31898 } ],
31899 none: []
31900 }, {
31901 id: 'html-lang-valid',
31902 impact: 'serious',
31903 selector: 'html[lang]:not([lang=""]):not(html *), html[xml\\:lang]:not([xml\\:lang=""]):not(html *)',
31904 tags: [ 'cat.language', 'wcag2a', 'wcag311', 'TTv5', 'TT11.a', 'EN-301-549', 'EN-9.3.1.1', 'ACT', 'RGAAv4', 'RGAA-8.4.1' ],
31905 actIds: [ 'bf051a' ],
31906 all: [],
31907 any: [],
31908 none: [ {
31909 options: {
31910 attributes: [ 'lang', 'xml:lang' ]
31911 },
31912 id: 'valid-lang'
31913 } ]
31914 }, {
31915 id: 'html-xml-lang-mismatch',
31916 impact: 'moderate',
31917 selector: 'html[lang][xml\\:lang]:not(html *)',
31918 matches: 'xml-lang-mismatch-matches',
31919 tags: [ 'cat.language', 'wcag2a', 'wcag311', 'EN-301-549', 'EN-9.3.1.1', 'ACT', 'RGAAv4', 'RGAA-8.3.1' ],
31920 actIds: [ '5b7ae0' ],
31921 all: [ 'xml-lang-mismatch' ],
31922 any: [],
31923 none: []
31924 }, {
31925 id: 'identical-links-same-purpose',
31926 impact: 'minor',
31927 selector: 'a[href], area[href], [role="link"]',
31928 excludeHidden: false,
31929 enabled: false,
31930 matches: 'identical-links-same-purpose-matches',
31931 tags: [ 'cat.semantics', 'wcag2aaa', 'wcag249' ],
31932 actIds: [ 'b20e66' ],
31933 all: [ 'identical-links-same-purpose' ],
31934 any: [],
31935 none: []
31936 }, {
31937 id: 'image-alt',
31938 impact: 'critical',
31939 selector: 'img',
31940 matches: 'no-explicit-name-required-matches',
31941 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'TTv5', 'TT7.a', 'TT7.b', 'EN-301-549', 'EN-9.1.1.1', 'ACT', 'RGAAv4', 'RGAA-1.1.1' ],
31942 actIds: [ '23a2a8' ],
31943 all: [],
31944 any: [ 'has-alt', 'aria-label', 'aria-labelledby', {
31945 options: {
31946 attribute: 'title'
31947 },
31948 id: 'non-empty-title'
31949 }, 'presentational-role' ],
31950 none: [ 'alt-space-value' ]
31951 }, {
31952 id: 'image-redundant-alt',
31953 impact: 'minor',
31954 selector: 'img',
31955 tags: [ 'cat.text-alternatives', 'best-practice' ],
31956 all: [],
31957 any: [],
31958 none: [ {
31959 options: {
31960 parentSelector: 'button, [role=button], a[href], p, li, td, th'
31961 },
31962 id: 'duplicate-img-label'
31963 } ]
31964 }, {
31965 id: 'input-button-name',
31966 impact: 'critical',
31967 selector: 'input[type="button"], input[type="submit"], input[type="reset"]',
31968 matches: 'no-explicit-name-required-matches',
31969 tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'section508', 'section508.22.a', 'TTv5', 'TT5.c', 'EN-301-549', 'EN-9.4.1.2', 'ACT', 'RGAAv4', 'RGAA-11.9.1' ],
31970 actIds: [ '97a4e1' ],
31971 all: [],
31972 any: [ 'non-empty-if-present', {
31973 options: {
31974 attribute: 'value'
31975 },
31976 id: 'non-empty-value'
31977 }, 'aria-label', 'aria-labelledby', {
31978 options: {
31979 attribute: 'title'
31980 },
31981 id: 'non-empty-title'
31982 }, 'implicit-label', 'explicit-label', 'presentational-role' ],
31983 none: []
31984 }, {
31985 id: 'input-image-alt',
31986 impact: 'critical',
31987 selector: 'input[type="image"]',
31988 matches: 'no-explicit-name-required-matches',
31989 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'wcag412', 'section508', 'section508.22.a', 'TTv5', 'TT7.a', 'EN-301-549', 'EN-9.1.1.1', 'EN-9.4.1.2', 'ACT', 'RGAAv4', 'RGAA-1.1.3' ],
31990 actIds: [ '59796f' ],
31991 all: [],
31992 any: [ {
31993 options: {
31994 attribute: 'alt'
31995 },
31996 id: 'non-empty-alt'
31997 }, 'aria-label', 'aria-labelledby', {
31998 options: {
31999 attribute: 'title'
32000 },
32001 id: 'non-empty-title'
32002 }, 'implicit-label', 'explicit-label' ],
32003 none: []
32004 }, {
32005 id: 'label-content-name-mismatch',
32006 impact: 'serious',
32007 matches: 'label-content-name-mismatch-matches',
32008 tags: [ 'cat.semantics', 'wcag21a', 'wcag253', 'EN-301-549', 'EN-9.2.5.3', 'RGAAv4', 'RGAA-6.1.5', 'experimental' ],
32009 actIds: [ '2ee8b8' ],
32010 all: [],
32011 any: [ {
32012 options: {
32013 pixelThreshold: .1,
32014 occurrenceThreshold: 3
32015 },
32016 id: 'label-content-name-mismatch'
32017 } ],
32018 none: []
32019 }, {
32020 id: 'label-title-only',
32021 impact: 'serious',
32022 selector: 'input, select, textarea',
32023 matches: 'label-matches',
32024 tags: [ 'cat.forms', 'best-practice' ],
32025 all: [],
32026 any: [],
32027 none: [ 'title-only' ]
32028 }, {
32029 id: 'label',
32030 impact: 'critical',
32031 selector: 'input, textarea',
32032 matches: 'label-matches',
32033 tags: [ 'cat.forms', 'wcag2a', 'wcag412', 'section508', 'section508.22.n', 'TTv5', 'TT5.c', 'EN-301-549', 'EN-9.4.1.2', 'ACT', 'RGAAv4', 'RGAA-11.1.1' ],
32034 actIds: [ 'e086e5' ],
32035 all: [],
32036 any: [ 'implicit-label', 'explicit-label', 'aria-label', 'aria-labelledby', {
32037 options: {
32038 attribute: 'title'
32039 },
32040 id: 'non-empty-title'
32041 }, {
32042 options: {
32043 attribute: 'placeholder'
32044 },
32045 id: 'non-empty-placeholder'
32046 }, 'presentational-role' ],
32047 none: [ 'hidden-explicit-label' ]
32048 }, {
32049 id: 'landmark-banner-is-top-level',
32050 impact: 'moderate',
32051 selector: 'header:not([role]), [role=banner]',
32052 matches: 'landmark-has-body-context-matches',
32053 tags: [ 'cat.semantics', 'best-practice' ],
32054 all: [],
32055 any: [ 'landmark-is-top-level' ],
32056 none: []
32057 }, {
32058 id: 'landmark-complementary-is-top-level',
32059 impact: 'moderate',
32060 selector: 'aside:not([role]), [role=complementary]',
32061 tags: [ 'cat.semantics', 'best-practice' ],
32062 all: [],
32063 any: [ 'landmark-is-top-level' ],
32064 none: []
32065 }, {
32066 id: 'landmark-contentinfo-is-top-level',
32067 impact: 'moderate',
32068 selector: 'footer:not([role]), [role=contentinfo]',
32069 matches: 'landmark-has-body-context-matches',
32070 tags: [ 'cat.semantics', 'best-practice' ],
32071 all: [],
32072 any: [ 'landmark-is-top-level' ],
32073 none: []
32074 }, {
32075 id: 'landmark-main-is-top-level',
32076 impact: 'moderate',
32077 selector: 'main:not([role]), [role=main]',
32078 tags: [ 'cat.semantics', 'best-practice' ],
32079 all: [],
32080 any: [ 'landmark-is-top-level' ],
32081 none: []
32082 }, {
32083 id: 'landmark-no-duplicate-banner',
32084 impact: 'moderate',
32085 selector: 'header:not([role]), [role=banner]',
32086 tags: [ 'cat.semantics', 'best-practice' ],
32087 all: [],
32088 any: [ {
32089 options: {
32090 selector: 'header:not([role]), [role=banner]',
32091 role: 'banner'
32092 },
32093 id: 'page-no-duplicate-banner'
32094 } ],
32095 none: []
32096 }, {
32097 id: 'landmark-no-duplicate-contentinfo',
32098 impact: 'moderate',
32099 selector: 'footer:not([role]), [role=contentinfo]',
32100 tags: [ 'cat.semantics', 'best-practice' ],
32101 all: [],
32102 any: [ {
32103 options: {
32104 selector: 'footer:not([role]), [role=contentinfo]',
32105 role: 'contentinfo'
32106 },
32107 id: 'page-no-duplicate-contentinfo'
32108 } ],
32109 none: []
32110 }, {
32111 id: 'landmark-no-duplicate-main',
32112 impact: 'moderate',
32113 selector: 'main:not([role]), [role=main]',
32114 tags: [ 'cat.semantics', 'best-practice' ],
32115 all: [],
32116 any: [ {
32117 options: {
32118 selector: 'main:not([role]), [role=\'main\']'
32119 },
32120 id: 'page-no-duplicate-main'
32121 } ],
32122 none: []
32123 }, {
32124 id: 'landmark-one-main',
32125 impact: 'moderate',
32126 selector: 'html:not(html *)',
32127 tags: [ 'cat.semantics', 'best-practice' ],
32128 all: [ {
32129 options: {
32130 selector: 'main:not([role]), [role=\'main\']',
32131 passForModal: true
32132 },
32133 id: 'page-has-main'
32134 } ],
32135 any: [],
32136 none: []
32137 }, {
32138 id: 'landmark-unique',
32139 impact: 'moderate',
32140 selector: '[role=banner], [role=complementary], [role=contentinfo], [role=main], [role=navigation], [role=region], [role=search], [role=form], form, footer, header, aside, main, nav, section',
32141 tags: [ 'cat.semantics', 'best-practice' ],
32142 matches: 'landmark-unique-matches',
32143 all: [],
32144 any: [ 'landmark-is-unique' ],
32145 none: []
32146 }, {
32147 id: 'link-in-text-block',
32148 impact: 'serious',
32149 selector: 'a[href], [role=link]',
32150 matches: 'link-in-text-block-matches',
32151 excludeHidden: false,
32152 tags: [ 'cat.color', 'wcag2a', 'wcag141', 'TTv5', 'TT13.a', 'EN-301-549', 'EN-9.1.4.1', 'RGAAv4', 'RGAA-10.6.1' ],
32153 all: [],
32154 any: [ {
32155 options: {
32156 requiredContrastRatio: 3,
32157 allowSameColor: true
32158 },
32159 id: 'link-in-text-block'
32160 }, 'link-in-text-block-style' ],
32161 none: []
32162 }, {
32163 id: 'link-name',
32164 impact: 'serious',
32165 selector: 'a[href]',
32166 tags: [ 'cat.name-role-value', 'wcag2a', 'wcag244', 'wcag412', 'section508', 'section508.22.a', 'TTv5', 'TT6.a', 'EN-301-549', 'EN-9.2.4.4', 'EN-9.4.1.2', 'ACT', 'RGAAv4', 'RGAA-6.2.1' ],
32167 actIds: [ 'c487ae' ],
32168 all: [],
32169 any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
32170 options: {
32171 attribute: 'title'
32172 },
32173 id: 'non-empty-title'
32174 } ],
32175 none: [ 'focusable-no-name' ]
32176 }, {
32177 id: 'list',
32178 impact: 'serious',
32179 selector: 'ul, ol',
32180 matches: 'no-role-matches',
32181 tags: [ 'cat.structure', 'wcag2a', 'wcag131', 'EN-301-549', 'EN-9.1.3.1', 'RGAAv4', 'RGAA-9.3.1' ],
32182 all: [],
32183 any: [],
32184 none: [ {
32185 options: {
32186 validRoles: [ 'listitem' ],
32187 validNodeNames: [ 'li' ]
32188 },
32189 id: 'only-listitems'
32190 } ]
32191 }, {
32192 id: 'listitem',
32193 impact: 'serious',
32194 selector: 'li',
32195 matches: 'no-role-matches',
32196 tags: [ 'cat.structure', 'wcag2a', 'wcag131', 'EN-301-549', 'EN-9.1.3.1', 'RGAAv4', 'RGAA-9.3.1' ],
32197 all: [],
32198 any: [ 'listitem' ],
32199 none: []
32200 }, {
32201 id: 'marquee',
32202 impact: 'serious',
32203 selector: 'marquee',
32204 excludeHidden: false,
32205 tags: [ 'cat.parsing', 'wcag2a', 'wcag222', 'TTv5', 'TT2.b', 'EN-301-549', 'EN-9.2.2.2', 'RGAAv4', 'RGAA-13.8.1' ],
32206 all: [],
32207 any: [],
32208 none: [ 'is-on-screen' ]
32209 }, {
32210 id: 'meta-refresh-no-exceptions',
32211 impact: 'minor',
32212 selector: 'meta[http-equiv="refresh"][content]',
32213 excludeHidden: false,
32214 enabled: false,
32215 tags: [ 'cat.time-and-media', 'wcag2aaa', 'wcag224', 'wcag325' ],
32216 actIds: [ 'bisz58' ],
32217 all: [],
32218 any: [ {
32219 options: {
32220 minDelay: 72e3,
32221 maxDelay: false
32222 },
32223 id: 'meta-refresh-no-exceptions'
32224 } ],
32225 none: []
32226 }, {
32227 id: 'meta-refresh',
32228 impact: 'critical',
32229 selector: 'meta[http-equiv="refresh"][content]',
32230 excludeHidden: false,
32231 tags: [ 'cat.time-and-media', 'wcag2a', 'wcag221', 'TTv5', 'TT8.a', 'EN-301-549', 'EN-9.2.2.1', 'RGAAv4', 'RGAA-13.1.2' ],
32232 actIds: [ 'bc659a', 'bisz58' ],
32233 all: [],
32234 any: [ {
32235 options: {
32236 minDelay: 0,
32237 maxDelay: 72e3
32238 },
32239 id: 'meta-refresh'
32240 } ],
32241 none: []
32242 }, {
32243 id: 'meta-viewport-large',
32244 impact: 'minor',
32245 selector: 'meta[name="viewport"]',
32246 matches: 'is-initiator-matches',
32247 excludeHidden: false,
32248 tags: [ 'cat.sensory-and-visual-cues', 'best-practice' ],
32249 all: [],
32250 any: [ {
32251 options: {
32252 scaleMinimum: 5,
32253 lowerBound: 2
32254 },
32255 id: 'meta-viewport-large'
32256 } ],
32257 none: []
32258 }, {
32259 id: 'meta-viewport',
32260 impact: 'moderate',
32261 selector: 'meta[name="viewport"]',
32262 matches: 'is-initiator-matches',
32263 excludeHidden: false,
32264 tags: [ 'cat.sensory-and-visual-cues', 'wcag2aa', 'wcag144', 'EN-301-549', 'EN-9.1.4.4', 'ACT', 'RGAAv4', 'RGAA-10.4.2' ],
32265 actIds: [ 'b4f0c3' ],
32266 all: [],
32267 any: [ {
32268 options: {
32269 scaleMinimum: 2
32270 },
32271 id: 'meta-viewport'
32272 } ],
32273 none: []
32274 }, {
32275 id: 'nested-interactive',
32276 impact: 'serious',
32277 matches: 'nested-interactive-matches',
32278 tags: [ 'cat.keyboard', 'wcag2a', 'wcag412', 'TTv5', 'TT6.a', 'EN-301-549', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-7.1.1' ],
32279 actIds: [ '307n5z' ],
32280 all: [],
32281 any: [ 'no-focusable-content' ],
32282 none: []
32283 }, {
32284 id: 'no-autoplay-audio',
32285 impact: 'moderate',
32286 excludeHidden: false,
32287 selector: 'audio[autoplay], video[autoplay]',
32288 matches: 'no-autoplay-audio-matches',
32289 reviewOnFail: true,
32290 tags: [ 'cat.time-and-media', 'wcag2a', 'wcag142', 'TTv5', 'TT2.a', 'EN-301-549', 'EN-9.1.4.2', 'ACT', 'RGAAv4', 'RGAA-4.10.1' ],
32291 actIds: [ '80f0bf' ],
32292 preload: true,
32293 all: [ {
32294 options: {
32295 allowedDuration: 3
32296 },
32297 id: 'no-autoplay-audio'
32298 } ],
32299 any: [],
32300 none: []
32301 }, {
32302 id: 'object-alt',
32303 impact: 'serious',
32304 selector: 'object[data]',
32305 matches: 'object-is-loaded-matches',
32306 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'EN-301-549', 'EN-9.1.1.1', 'RGAAv4', 'RGAA-1.1.6' ],
32307 actIds: [ '8fc3b6' ],
32308 all: [],
32309 any: [ 'aria-label', 'aria-labelledby', {
32310 options: {
32311 attribute: 'title'
32312 },
32313 id: 'non-empty-title'
32314 }, 'presentational-role' ],
32315 none: []
32316 }, {
32317 id: 'p-as-heading',
32318 impact: 'serious',
32319 selector: 'p',
32320 matches: 'p-as-heading-matches',
32321 tags: [ 'cat.semantics', 'wcag2a', 'wcag131', 'EN-301-549', 'EN-9.1.3.1', 'RGAAv4', 'RGAA-9.1.3', 'experimental' ],
32322 all: [ {
32323 options: {
32324 margins: [ {
32325 weight: 150,
32326 italic: true
32327 }, {
32328 weight: 150,
32329 size: 1.15
32330 }, {
32331 italic: true,
32332 size: 1.15
32333 }, {
32334 size: 1.4
32335 } ],
32336 passLength: 1,
32337 failLength: .5
32338 },
32339 id: 'p-as-heading'
32340 } ],
32341 any: [],
32342 none: []
32343 }, {
32344 id: 'page-has-heading-one',
32345 impact: 'moderate',
32346 selector: 'html:not(html *)',
32347 tags: [ 'cat.semantics', 'best-practice' ],
32348 all: [ {
32349 options: {
32350 selector: 'h1:not([role], [aria-level]), :is(h1, h2, h3, h4, h5, h6):not([role])[aria-level=1], [role=heading][aria-level=1]',
32351 passForModal: true
32352 },
32353 id: 'page-has-heading-one'
32354 } ],
32355 any: [],
32356 none: []
32357 }, {
32358 id: 'presentation-role-conflict',
32359 impact: 'minor',
32360 selector: 'img[alt=\'\'], [role="none"], [role="presentation"]',
32361 matches: 'has-implicit-chromium-role-matches',
32362 tags: [ 'cat.aria', 'best-practice', 'ACT' ],
32363 actIds: [ '46ca7f' ],
32364 all: [],
32365 any: [],
32366 none: [ 'is-element-focusable', 'has-global-aria-attribute' ]
32367 }, {
32368 id: 'region',
32369 impact: 'moderate',
32370 selector: 'body *',
32371 tags: [ 'cat.keyboard', 'best-practice', 'RGAAv4', 'RGAA-9.2.1' ],
32372 all: [],
32373 any: [ {
32374 options: {
32375 regionMatcher: 'dialog, [role=dialog], [role=alertdialog], svg'
32376 },
32377 id: 'region'
32378 } ],
32379 none: []
32380 }, {
32381 id: 'role-img-alt',
32382 impact: 'serious',
32383 selector: '[role=\'img\']:not(img, area, input, object)',
32384 matches: 'html-namespace-matches',
32385 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'TTv5', 'TT7.a', 'EN-301-549', 'EN-9.1.1.1', 'ACT', 'RGAAv4', 'RGAA-1.1.1' ],
32386 actIds: [ '23a2a8' ],
32387 all: [],
32388 any: [ 'aria-label', 'aria-labelledby', {
32389 options: {
32390 attribute: 'title'
32391 },
32392 id: 'non-empty-title'
32393 } ],
32394 none: []
32395 }, {
32396 id: 'scope-attr-valid',
32397 impact: 'moderate',
32398 selector: 'td[scope], th[scope]',
32399 tags: [ 'cat.tables', 'best-practice' ],
32400 all: [ 'html5-scope', {
32401 options: {
32402 values: [ 'row', 'col', 'rowgroup', 'colgroup' ]
32403 },
32404 id: 'scope-value'
32405 } ],
32406 any: [],
32407 none: []
32408 }, {
32409 id: 'scrollable-region-focusable',
32410 impact: 'serious',
32411 selector: '*:not(select,textarea)',
32412 matches: 'scrollable-region-focusable-matches',
32413 tags: [ 'cat.keyboard', 'wcag2a', 'wcag211', 'wcag213', 'TTv5', 'TT4.a', 'EN-301-549', 'EN-9.2.1.1', 'EN-9.2.1.3', 'RGAAv4', 'RGAA-7.3.2' ],
32414 actIds: [ '0ssw9k' ],
32415 all: [],
32416 any: [ 'focusable-content', 'focusable-element' ],
32417 none: []
32418 }, {
32419 id: 'select-name',
32420 impact: 'critical',
32421 selector: 'select',
32422 tags: [ 'cat.forms', 'wcag2a', 'wcag412', 'section508', 'section508.22.n', 'TTv5', 'TT5.c', 'EN-301-549', 'EN-9.4.1.2', 'ACT', 'RGAAv4', 'RGAA-11.1.1' ],
32423 actIds: [ 'e086e5' ],
32424 all: [],
32425 any: [ 'implicit-label', 'explicit-label', 'aria-label', 'aria-labelledby', {
32426 options: {
32427 attribute: 'title'
32428 },
32429 id: 'non-empty-title'
32430 }, 'presentational-role' ],
32431 none: [ 'hidden-explicit-label' ]
32432 }, {
32433 id: 'server-side-image-map',
32434 impact: 'minor',
32435 selector: 'img[ismap]',
32436 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag211', 'section508', 'section508.22.f', 'TTv5', 'TT4.a', 'EN-301-549', 'EN-9.2.1.1', 'RGAAv4', 'RGAA-1.1.4' ],
32437 all: [],
32438 any: [],
32439 none: [ 'exists' ]
32440 }, {
32441 id: 'skip-link',
32442 impact: 'moderate',
32443 selector: 'a[href^="#"], a[href^="/#"]',
32444 matches: 'skip-link-matches',
32445 tags: [ 'cat.keyboard', 'best-practice', 'RGAAv4', 'RGAA-12.7.1' ],
32446 all: [],
32447 any: [ 'skip-link' ],
32448 none: []
32449 }, {
32450 id: 'summary-name',
32451 impact: 'serious',
32452 selector: 'summary',
32453 matches: 'summary-interactive-matches',
32454 tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'section508', 'section508.22.a', 'TTv5', 'TT6.a', 'EN-301-549', 'EN-9.4.1.2' ],
32455 all: [],
32456 any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
32457 options: {
32458 attribute: 'title'
32459 },
32460 id: 'non-empty-title'
32461 } ],
32462 none: []
32463 }, {
32464 id: 'svg-img-alt',
32465 impact: 'serious',
32466 selector: '[role="img"], [role="graphics-symbol"], svg[role="graphics-document"]',
32467 matches: 'svg-namespace-matches',
32468 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'TTv5', 'TT7.a', 'EN-301-549', 'EN-9.1.1.1', 'ACT', 'RGAAv4', 'RGAA-1.1.5' ],
32469 actIds: [ '7d6734' ],
32470 all: [],
32471 any: [ 'svg-non-empty-title', 'aria-label', 'aria-labelledby', {
32472 options: {
32473 attribute: 'title'
32474 },
32475 id: 'non-empty-title'
32476 } ],
32477 none: []
32478 }, {
32479 id: 'tabindex',
32480 impact: 'serious',
32481 selector: '[tabindex]',
32482 tags: [ 'cat.keyboard', 'best-practice' ],
32483 all: [],
32484 any: [ 'tabindex' ],
32485 none: []
32486 }, {
32487 id: 'table-duplicate-name',
32488 impact: 'minor',
32489 selector: 'table',
32490 tags: [ 'cat.tables', 'best-practice', 'RGAAv4', 'RGAA-5.2.1' ],
32491 all: [],
32492 any: [],
32493 none: [ 'same-caption-summary' ]
32494 }, {
32495 id: 'table-fake-caption',
32496 impact: 'serious',
32497 selector: 'table',
32498 matches: 'data-table-matches',
32499 tags: [ 'cat.tables', 'experimental', 'wcag2a', 'wcag131', 'section508', 'section508.22.g', 'EN-301-549', 'EN-9.1.3.1', 'RGAAv4', 'RGAA-5.4.1' ],
32500 all: [ 'caption-faked' ],
32501 any: [],
32502 none: []
32503 }, {
32504 id: 'target-size',
32505 impact: 'serious',
32506 selector: '*',
32507 enabled: false,
32508 matches: 'widget-not-inline-matches',
32509 tags: [ 'cat.sensory-and-visual-cues', 'wcag22aa', 'wcag258' ],
32510 all: [],
32511 any: [ {
32512 options: {
32513 minSize: 24
32514 },
32515 id: 'target-size'
32516 }, {
32517 options: {
32518 minOffset: 24
32519 },
32520 id: 'target-offset'
32521 } ],
32522 none: []
32523 }, {
32524 id: 'td-has-header',
32525 impact: 'critical',
32526 selector: 'table',
32527 matches: 'data-table-large-matches',
32528 tags: [ 'cat.tables', 'experimental', 'wcag2a', 'wcag131', 'section508', 'section508.22.g', 'TTv5', 'TT14.b', 'EN-301-549', 'EN-9.1.3.1', 'RGAAv4', 'RGAA-5.7.4' ],
32529 all: [ 'td-has-header' ],
32530 any: [],
32531 none: []
32532 }, {
32533 id: 'td-headers-attr',
32534 impact: 'serious',
32535 selector: 'table',
32536 matches: 'table-or-grid-role-matches',
32537 tags: [ 'cat.tables', 'wcag2a', 'wcag131', 'section508', 'section508.22.g', 'TTv5', 'TT14.b', 'EN-301-549', 'EN-9.1.3.1', 'RGAAv4', 'RGAA-5.7.4' ],
32538 actIds: [ 'a25f45' ],
32539 all: [ 'td-headers-attr' ],
32540 any: [],
32541 none: []
32542 }, {
32543 id: 'th-has-data-cells',
32544 impact: 'serious',
32545 selector: 'table',
32546 matches: 'data-table-matches',
32547 tags: [ 'cat.tables', 'wcag2a', 'wcag131', 'section508', 'section508.22.g', 'TTv5', 'TT14.b', 'EN-301-549', 'EN-9.1.3.1', 'RGAAv4', 'RGAA-5.7.1' ],
32548 actIds: [ 'd0f69e' ],
32549 all: [ 'th-has-data-cells' ],
32550 any: [],
32551 none: []
32552 }, {
32553 id: 'valid-lang',
32554 impact: 'serious',
32555 selector: '[lang]:not(html), [xml\\:lang]:not(html)',
32556 tags: [ 'cat.language', 'wcag2aa', 'wcag312', 'TTv5', 'TT11.b', 'EN-301-549', 'EN-9.3.1.2', 'ACT', 'RGAAv4', 'RGAA-8.8.1' ],
32557 actIds: [ 'de46e4' ],
32558 all: [],
32559 any: [],
32560 none: [ {
32561 options: {
32562 attributes: [ 'lang', 'xml:lang' ]
32563 },
32564 id: 'valid-lang'
32565 } ]
32566 }, {
32567 id: 'video-caption',
32568 impact: 'critical',
32569 selector: 'video',
32570 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag122', 'section508', 'section508.22.a', 'TTv5', 'TT17.a', 'EN-301-549', 'EN-9.1.2.2', 'RGAAv4', 'RGAA-4.3.1' ],
32571 actIds: [ 'eac66b' ],
32572 all: [],
32573 any: [],
32574 none: [ 'caption' ]
32575 } ],
32576 checks: [ {
32577 id: 'abstractrole',
32578 evaluate: 'abstractrole-evaluate'
32579 }, {
32580 id: 'aria-allowed-attr-elm',
32581 evaluate: 'aria-allowed-attr-elm-evaluate'
32582 }, {
32583 id: 'aria-allowed-attr',
32584 evaluate: 'aria-allowed-attr-evaluate',
32585 options: {
32586 validTreeRowAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-level' ]
32587 }
32588 }, {
32589 id: 'aria-allowed-role',
32590 evaluate: 'aria-allowed-role-evaluate',
32591 options: {
32592 allowImplicit: true,
32593 ignoredTags: []
32594 }
32595 }, {
32596 id: 'aria-busy',
32597 evaluate: 'aria-busy-evaluate',
32598 deprecated: true
32599 }, {
32600 id: 'aria-conditional-attr',
32601 evaluate: 'aria-conditional-attr-evaluate',
32602 options: {
32603 invalidTableRowAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-level' ]
32604 }
32605 }, {
32606 id: 'aria-errormessage',
32607 evaluate: 'aria-errormessage-evaluate'
32608 }, {
32609 id: 'aria-hidden-body',
32610 evaluate: 'aria-hidden-body-evaluate'
32611 }, {
32612 id: 'aria-level',
32613 evaluate: 'aria-level-evaluate'
32614 }, {
32615 id: 'aria-prohibited-attr',
32616 evaluate: 'aria-prohibited-attr-evaluate',
32617 options: {
32618 elementsAllowedAriaLabel: [ 'applet', 'input' ]
32619 }
32620 }, {
32621 id: 'aria-required-attr',
32622 evaluate: 'aria-required-attr-evaluate'
32623 }, {
32624 id: 'aria-required-children',
32625 evaluate: 'aria-required-children-evaluate',
32626 options: {
32627 reviewEmpty: [ 'doc-bibliography', 'doc-endnotes', 'grid', 'list', 'listbox', 'menu', 'menubar', 'table', 'tablist', 'tree', 'treegrid', 'rowgroup' ]
32628 }
32629 }, {
32630 id: 'aria-required-parent',
32631 evaluate: 'aria-required-parent-evaluate',
32632 options: {
32633 ownGroupRoles: [ 'listitem', 'treeitem' ]
32634 }
32635 }, {
32636 id: 'aria-roledescription',
32637 evaluate: 'aria-roledescription-evaluate',
32638 options: {
32639 supportedRoles: [ 'button', 'img', 'checkbox', 'radio', 'combobox', 'menuitemcheckbox', 'menuitemradio' ]
32640 }
32641 }, {
32642 id: 'aria-unsupported-attr',
32643 evaluate: 'aria-unsupported-attr-evaluate'
32644 }, {
32645 id: 'aria-valid-attr-value',
32646 evaluate: 'aria-valid-attr-value-evaluate',
32647 options: []
32648 }, {
32649 id: 'aria-valid-attr',
32650 evaluate: 'aria-valid-attr-evaluate',
32651 options: []
32652 }, {
32653 id: 'braille-label-equivalent',
32654 evaluate: 'braille-label-equivalent-evaluate'
32655 }, {
32656 id: 'braille-roledescription-equivalent',
32657 evaluate: 'braille-roledescription-equivalent-evaluate'
32658 }, {
32659 id: 'deprecatedrole',
32660 evaluate: 'deprecatedrole-evaluate'
32661 }, {
32662 id: 'fallbackrole',
32663 evaluate: 'fallbackrole-evaluate'
32664 }, {
32665 id: 'has-global-aria-attribute',
32666 evaluate: 'has-global-aria-attribute-evaluate'
32667 }, {
32668 id: 'has-widget-role',
32669 evaluate: 'has-widget-role-evaluate',
32670 options: []
32671 }, {
32672 id: 'invalidrole',
32673 evaluate: 'invalidrole-evaluate'
32674 }, {
32675 id: 'is-element-focusable',
32676 evaluate: 'is-element-focusable-evaluate'
32677 }, {
32678 id: 'no-implicit-explicit-label',
32679 evaluate: 'no-implicit-explicit-label-evaluate'
32680 }, {
32681 id: 'unsupportedrole',
32682 evaluate: 'unsupportedrole-evaluate'
32683 }, {
32684 id: 'valid-scrollable-semantics',
32685 evaluate: 'valid-scrollable-semantics-evaluate',
32686 options: {
32687 roles: [ 'tooltip' ]
32688 }
32689 }, {
32690 id: 'color-contrast-enhanced',
32691 evaluate: 'color-contrast-evaluate',
32692 options: {
32693 ignoreUnicode: true,
32694 ignoreLength: false,
32695 ignorePseudo: false,
32696 boldValue: 700,
32697 boldTextPt: 14,
32698 largeTextPt: 18,
32699 contrastRatio: {
32700 normal: {
32701 expected: 7,
32702 minThreshold: 4.5
32703 },
32704 large: {
32705 expected: 4.5,
32706 minThreshold: 3
32707 }
32708 },
32709 pseudoSizeThreshold: .25,
32710 shadowOutlineEmMax: .1,
32711 textStrokeEmMin: .03
32712 }
32713 }, {
32714 id: 'color-contrast',
32715 evaluate: 'color-contrast-evaluate',
32716 options: {
32717 ignoreUnicode: true,
32718 ignoreLength: false,
32719 ignorePseudo: false,
32720 boldValue: 700,
32721 boldTextPt: 14,
32722 largeTextPt: 18,
32723 contrastRatio: {
32724 normal: {
32725 expected: 4.5
32726 },
32727 large: {
32728 expected: 3
32729 }
32730 },
32731 pseudoSizeThreshold: .25,
32732 shadowOutlineEmMax: .2,
32733 textStrokeEmMin: .03
32734 }
32735 }, {
32736 id: 'link-in-text-block-style',
32737 evaluate: 'link-in-text-block-style-evaluate'
32738 }, {
32739 id: 'link-in-text-block',
32740 evaluate: 'link-in-text-block-evaluate',
32741 options: {
32742 requiredContrastRatio: 3,
32743 allowSameColor: true
32744 }
32745 }, {
32746 id: 'autocomplete-appropriate',
32747 evaluate: 'autocomplete-appropriate-evaluate',
32748 deprecated: true
32749 }, {
32750 id: 'autocomplete-valid',
32751 evaluate: 'autocomplete-valid-evaluate',
32752 options: {
32753 stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null', 'xoff', 'xon' ],
32754 ignoredValues: [ 'text', 'pronouns', 'gender', 'message', 'content' ]
32755 }
32756 }, {
32757 id: 'accesskeys',
32758 evaluate: 'accesskeys-evaluate',
32759 after: 'accesskeys-after'
32760 }, {
32761 id: 'focusable-content',
32762 evaluate: 'focusable-content-evaluate'
32763 }, {
32764 id: 'focusable-disabled',
32765 evaluate: 'focusable-disabled-evaluate'
32766 }, {
32767 id: 'focusable-element',
32768 evaluate: 'focusable-element-evaluate'
32769 }, {
32770 id: 'focusable-modal-open',
32771 evaluate: 'focusable-modal-open-evaluate'
32772 }, {
32773 id: 'focusable-no-name',
32774 evaluate: 'focusable-no-name-evaluate'
32775 }, {
32776 id: 'focusable-not-tabbable',
32777 evaluate: 'focusable-not-tabbable-evaluate'
32778 }, {
32779 id: 'frame-focusable-content',
32780 evaluate: 'frame-focusable-content-evaluate'
32781 }, {
32782 id: 'landmark-is-top-level',
32783 evaluate: 'landmark-is-top-level-evaluate'
32784 }, {
32785 id: 'no-focusable-content',
32786 evaluate: 'no-focusable-content-evaluate'
32787 }, {
32788 id: 'page-has-heading-one',
32789 evaluate: 'has-descendant-evaluate',
32790 after: 'has-descendant-after',
32791 options: {
32792 selector: 'h1:not([role], [aria-level]), :is(h1, h2, h3, h4, h5, h6):not([role])[aria-level=1], [role=heading][aria-level=1]',
32793 passForModal: true
32794 }
32795 }, {
32796 id: 'page-has-main',
32797 evaluate: 'has-descendant-evaluate',
32798 after: 'has-descendant-after',
32799 options: {
32800 selector: 'main:not([role]), [role=\'main\']',
32801 passForModal: true
32802 }
32803 }, {
32804 id: 'page-no-duplicate-banner',
32805 evaluate: 'page-no-duplicate-evaluate',
32806 after: 'page-no-duplicate-after',
32807 options: {
32808 selector: 'header:not([role]), [role=banner]',
32809 role: 'banner'
32810 }
32811 }, {
32812 id: 'page-no-duplicate-contentinfo',
32813 evaluate: 'page-no-duplicate-evaluate',
32814 after: 'page-no-duplicate-after',
32815 options: {
32816 selector: 'footer:not([role]), [role=contentinfo]',
32817 role: 'contentinfo'
32818 }
32819 }, {
32820 id: 'page-no-duplicate-main',
32821 evaluate: 'page-no-duplicate-evaluate',
32822 after: 'page-no-duplicate-after',
32823 options: {
32824 selector: 'main:not([role]), [role=\'main\']'
32825 }
32826 }, {
32827 id: 'tabindex',
32828 evaluate: 'tabindex-evaluate'
32829 }, {
32830 id: 'alt-space-value',
32831 evaluate: 'alt-space-value-evaluate'
32832 }, {
32833 id: 'duplicate-img-label',
32834 evaluate: 'duplicate-img-label-evaluate',
32835 options: {
32836 parentSelector: 'button, [role=button], a[href], p, li, td, th'
32837 }
32838 }, {
32839 id: 'explicit-label',
32840 evaluate: 'explicit-evaluate'
32841 }, {
32842 id: 'help-same-as-label',
32843 evaluate: 'help-same-as-label-evaluate'
32844 }, {
32845 id: 'hidden-explicit-label',
32846 evaluate: 'hidden-explicit-label-evaluate'
32847 }, {
32848 id: 'implicit-label',
32849 evaluate: 'implicit-evaluate'
32850 }, {
32851 id: 'label-content-name-mismatch',
32852 evaluate: 'label-content-name-mismatch-evaluate',
32853 options: {
32854 pixelThreshold: .1,
32855 occurrenceThreshold: 3
32856 }
32857 }, {
32858 id: 'multiple-label',
32859 evaluate: 'multiple-label-evaluate'
32860 }, {
32861 id: 'title-only',
32862 evaluate: 'title-only-evaluate'
32863 }, {
32864 id: 'landmark-is-unique',
32865 evaluate: 'landmark-is-unique-evaluate',
32866 after: 'landmark-is-unique-after'
32867 }, {
32868 id: 'has-lang',
32869 evaluate: 'has-lang-evaluate',
32870 options: {
32871 attributes: [ 'lang', 'xml:lang' ]
32872 }
32873 }, {
32874 id: 'valid-lang',
32875 evaluate: 'valid-lang-evaluate',
32876 options: {
32877 attributes: [ 'lang', 'xml:lang' ]
32878 }
32879 }, {
32880 id: 'xml-lang-mismatch',
32881 evaluate: 'xml-lang-mismatch-evaluate'
32882 }, {
32883 id: 'dlitem',
32884 evaluate: 'dlitem-evaluate'
32885 }, {
32886 id: 'listitem',
32887 evaluate: 'listitem-evaluate'
32888 }, {
32889 id: 'only-dlitems',
32890 evaluate: 'invalid-children-evaluate',
32891 options: {
32892 validRoles: [ 'definition', 'term', 'listitem' ],
32893 validNodeNames: [ 'dt', 'dd' ],
32894 divGroups: true
32895 }
32896 }, {
32897 id: 'only-listitems',
32898 evaluate: 'invalid-children-evaluate',
32899 options: {
32900 validRoles: [ 'listitem' ],
32901 validNodeNames: [ 'li' ]
32902 }
32903 }, {
32904 id: 'structured-dlitems',
32905 evaluate: 'structured-dlitems-evaluate'
32906 }, {
32907 id: 'caption',
32908 evaluate: 'caption-evaluate'
32909 }, {
32910 id: 'frame-tested',
32911 evaluate: 'frame-tested-evaluate',
32912 after: 'frame-tested-after',
32913 options: {
32914 isViolation: false
32915 }
32916 }, {
32917 id: 'no-autoplay-audio',
32918 evaluate: 'no-autoplay-audio-evaluate',
32919 options: {
32920 allowedDuration: 3
32921 }
32922 }, {
32923 id: 'css-orientation-lock',
32924 evaluate: 'css-orientation-lock-evaluate',
32925 options: {
32926 degreeThreshold: 2
32927 }
32928 }, {
32929 id: 'meta-viewport-large',
32930 evaluate: 'meta-viewport-scale-evaluate',
32931 options: {
32932 scaleMinimum: 5,
32933 lowerBound: 2
32934 }
32935 }, {
32936 id: 'meta-viewport',
32937 evaluate: 'meta-viewport-scale-evaluate',
32938 options: {
32939 scaleMinimum: 2
32940 }
32941 }, {
32942 id: 'target-offset',
32943 evaluate: 'target-offset-evaluate',
32944 options: {
32945 minOffset: 24
32946 }
32947 }, {
32948 id: 'target-size',
32949 evaluate: 'target-size-evaluate',
32950 options: {
32951 minSize: 24
32952 }
32953 }, {
32954 id: 'header-present',
32955 evaluate: 'has-descendant-evaluate',
32956 after: 'has-descendant-after',
32957 options: {
32958 selector: ':is(h1, h2, h3, h4, h5, h6):not([role]), [role=heading]'
32959 }
32960 }, {
32961 id: 'heading-order',
32962 evaluate: 'heading-order-evaluate',
32963 after: 'heading-order-after'
32964 }, {
32965 id: 'identical-links-same-purpose',
32966 evaluate: 'identical-links-same-purpose-evaluate',
32967 after: 'identical-links-same-purpose-after'
32968 }, {
32969 id: 'internal-link-present',
32970 evaluate: 'internal-link-present-evaluate'
32971 }, {
32972 id: 'landmark',
32973 evaluate: 'has-descendant-evaluate',
32974 options: {
32975 selector: 'main, [role=main]'
32976 }
32977 }, {
32978 id: 'meta-refresh-no-exceptions',
32979 evaluate: 'meta-refresh-evaluate',
32980 options: {
32981 minDelay: 72e3,
32982 maxDelay: false
32983 }
32984 }, {
32985 id: 'meta-refresh',
32986 evaluate: 'meta-refresh-evaluate',
32987 options: {
32988 minDelay: 0,
32989 maxDelay: 72e3
32990 }
32991 }, {
32992 id: 'p-as-heading',
32993 evaluate: 'p-as-heading-evaluate',
32994 options: {
32995 margins: [ {
32996 weight: 150,
32997 italic: true
32998 }, {
32999 weight: 150,
33000 size: 1.15
33001 }, {
33002 italic: true,
33003 size: 1.15
33004 }, {
33005 size: 1.4
33006 } ],
33007 passLength: 1,
33008 failLength: .5
33009 }
33010 }, {
33011 id: 'region',
33012 evaluate: 'region-evaluate',
33013 after: 'region-after',
33014 options: {
33015 regionMatcher: 'dialog, [role=dialog], [role=alertdialog], svg'
33016 }
33017 }, {
33018 id: 'skip-link',
33019 evaluate: 'skip-link-evaluate'
33020 }, {
33021 id: 'unique-frame-title',
33022 evaluate: 'unique-frame-title-evaluate',
33023 after: 'unique-frame-title-after'
33024 }, {
33025 id: 'duplicate-id-active',
33026 evaluate: 'duplicate-id-evaluate',
33027 after: 'duplicate-id-after'
33028 }, {
33029 id: 'duplicate-id-aria',
33030 evaluate: 'duplicate-id-evaluate',
33031 after: 'duplicate-id-after'
33032 }, {
33033 id: 'duplicate-id',
33034 evaluate: 'duplicate-id-evaluate',
33035 after: 'duplicate-id-after'
33036 }, {
33037 id: 'aria-label',
33038 evaluate: 'aria-label-evaluate'
33039 }, {
33040 id: 'aria-labelledby',
33041 evaluate: 'aria-labelledby-evaluate'
33042 }, {
33043 id: 'avoid-inline-spacing',
33044 evaluate: 'avoid-inline-spacing-evaluate',
33045 options: {
33046 cssProperties: [ 'line-height', 'letter-spacing', 'word-spacing' ]
33047 }
33048 }, {
33049 id: 'button-has-visible-text',
33050 evaluate: 'has-text-content-evaluate'
33051 }, {
33052 id: 'doc-has-title',
33053 evaluate: 'doc-has-title-evaluate'
33054 }, {
33055 id: 'error-occurred',
33056 evaluate: 'exists-evaluate'
33057 }, {
33058 id: 'exists',
33059 evaluate: 'exists-evaluate'
33060 }, {
33061 id: 'has-alt',
33062 evaluate: 'has-alt-evaluate'
33063 }, {
33064 id: 'has-visible-text',
33065 evaluate: 'has-text-content-evaluate'
33066 }, {
33067 id: 'important-letter-spacing',
33068 evaluate: 'inline-style-property-evaluate',
33069 options: {
33070 cssProperty: 'letter-spacing',
33071 minValue: .12
33072 }
33073 }, {
33074 id: 'important-line-height',
33075 evaluate: 'inline-style-property-evaluate',
33076 options: {
33077 multiLineOnly: true,
33078 cssProperty: 'line-height',
33079 minValue: 1.5,
33080 normalValue: 1
33081 }
33082 }, {
33083 id: 'important-word-spacing',
33084 evaluate: 'inline-style-property-evaluate',
33085 options: {
33086 cssProperty: 'word-spacing',
33087 minValue: .16
33088 }
33089 }, {
33090 id: 'is-on-screen',
33091 evaluate: 'is-on-screen-evaluate'
33092 }, {
33093 id: 'non-empty-alt',
33094 evaluate: 'attr-non-space-content-evaluate',
33095 options: {
33096 attribute: 'alt'
33097 }
33098 }, {
33099 id: 'non-empty-if-present',
33100 evaluate: 'non-empty-if-present-evaluate'
33101 }, {
33102 id: 'non-empty-placeholder',
33103 evaluate: 'attr-non-space-content-evaluate',
33104 options: {
33105 attribute: 'placeholder'
33106 }
33107 }, {
33108 id: 'non-empty-title',
33109 evaluate: 'attr-non-space-content-evaluate',
33110 options: {
33111 attribute: 'title'
33112 }
33113 }, {
33114 id: 'non-empty-value',
33115 evaluate: 'attr-non-space-content-evaluate',
33116 options: {
33117 attribute: 'value'
33118 }
33119 }, {
33120 id: 'presentational-role',
33121 evaluate: 'presentational-role-evaluate'
33122 }, {
33123 id: 'role-none',
33124 evaluate: 'matches-definition-evaluate',
33125 deprecated: true,
33126 options: {
33127 matcher: {
33128 attributes: {
33129 role: 'none'
33130 }
33131 }
33132 }
33133 }, {
33134 id: 'role-presentation',
33135 evaluate: 'matches-definition-evaluate',
33136 deprecated: true,
33137 options: {
33138 matcher: {
33139 attributes: {
33140 role: 'presentation'
33141 }
33142 }
33143 }
33144 }, {
33145 id: 'svg-non-empty-title',
33146 evaluate: 'svg-non-empty-title-evaluate'
33147 }, {
33148 id: 'caption-faked',
33149 evaluate: 'caption-faked-evaluate'
33150 }, {
33151 id: 'html5-scope',
33152 evaluate: 'html5-scope-evaluate'
33153 }, {
33154 id: 'same-caption-summary',
33155 evaluate: 'same-caption-summary-evaluate'
33156 }, {
33157 id: 'scope-value',
33158 evaluate: 'scope-value-evaluate',
33159 options: {
33160 values: [ 'row', 'col', 'rowgroup', 'colgroup' ]
33161 }
33162 }, {
33163 id: 'td-has-header',
33164 evaluate: 'td-has-header-evaluate'
33165 }, {
33166 id: 'td-headers-attr',
33167 evaluate: 'td-headers-attr-evaluate'
33168 }, {
33169 id: 'th-has-data-cells',
33170 evaluate: 'th-has-data-cells-evaluate'
33171 }, {
33172 id: 'hidden-content',
33173 evaluate: 'hidden-content-evaluate'
33174 } ]
33175 });
33176})(typeof window === 'object' ? window : this);
Note: See TracBrowser for help on using the repository browser.